/foundation/multimedia/audio_framework/services/audio_service/common/src/ |
H A D | linear_pos_time_model.cpp | 53 void LinearPosTimeModel::ResetFrameStamp(uint64_t frame, int64_t nanoTime) in ResetFrameStamp() argument 55 AUDIO_INFO_LOG("Reset frame:%{public}" PRIu64" with time:%{public}" PRId64".", frame, nanoTime); in ResetFrameStamp() 57 stampNanoTime_ = nanoTime; in ResetFrameStamp() 61 bool LinearPosTimeModel::IsReasonable(uint64_t frame, int64_t nanoTime) in IsReasonable() argument 63 if (frame == stampFrame_ && nanoTime == stampNanoTime_) { in IsReasonable() 76 if (nanoTime <= (reasonableDeltaTime + REASONABLE_BOUND_IN_NANO) && in IsReasonable() 77 nanoTime >= (reasonableDeltaTime - REASONABLE_BOUND_IN_NANO)) { in IsReasonable() 83 bool LinearPosTimeModel::UpdataFrameStamp(uint64_t frame, int64_t nanoTime) in UpdataFrameStamp() argument 85 if (IsReasonable(frame, nanoTime)) { in UpdataFrameStamp() 86 AUDIO_DEBUG_LOG("Updata frame:%{public}" PRIu64" with time:%{public}" PRId64".", frame, nanoTime); in UpdataFrameStamp() 97 GetFrameStamp(uint64_t &frame, int64_t &nanoTime) GetFrameStamp() argument [all...] |
H A D | oh_audio_buffer.cpp | 501 bool OHAudioBuffer::GetHandleInfo(uint64_t &frames, int64_t &nanoTime) in GetHandleInfo() argument 507 nanoTime = basicBufferInfo_->handleTime.load(); in GetHandleInfo() 511 void OHAudioBuffer::SetHandleInfo(uint64_t frames, int64_t nanoTime) in SetHandleInfo() argument 514 basicBufferInfo_->handleTime.store(nanoTime); in SetHandleInfo()
|
/foundation/multimedia/audio_framework/services/audio_service/common/include/ |
H A D | linear_pos_time_model.h | 29 void ResetFrameStamp(uint64_t frame, int64_t nanoTime); 31 bool UpdataFrameStamp(uint64_t frame, int64_t nanoTime); 33 bool GetFrameStamp(uint64_t &frame, int64_t &nanoTime); 41 bool IsReasonable(uint64_t frame, int64_t nanoTime);
|
H A D | oh_audio_buffer.h | 139 bool GetHandleInfo(uint64_t &frames, int64_t &nanoTime); 141 void SetHandleInfo(uint64_t frames, int64_t nanoTime);
|
/foundation/multimedia/audio_framework/test/fuzztest/audioutils_fuzzer/ |
H A D | audio_utils_fuzzer.cpp | 92 int64_t nanoTime = COMMON_INT64_NUM; in AbsoluteSleepFuzzTest() local 93 if (nanoTime > LIMIT_TIME) { in AbsoluteSleepFuzzTest() 94 nanoTime = LIMIT_TIME; in AbsoluteSleepFuzzTest() 96 ClockTime::AbsoluteSleep(nanoTime); in AbsoluteSleepFuzzTest() 105 int64_t nanoTime = COMMON_INT64_NUM; in RelativeSleepFuzzTest() local 106 if (nanoTime > LIMIT_TIME) { in RelativeSleepFuzzTest() 107 nanoTime = LIMIT_TIME; in RelativeSleepFuzzTest() 109 ClockTime::RelativeSleep(nanoTime); in RelativeSleepFuzzTest()
|
/foundation/multimedia/audio_framework/services/audio_service/test/unittest/ |
H A D | audio_service_common_unit_test.cpp | 112 int64_t nanoTime = 0; in HWTEST() local 113 linearPosTimeModel->ResetFrameStamp(frame, nanoTime); in HWTEST() 122 int64_t retPosCal1 = nanoTime + deltaFrame * NANO_COUNT_PER_SECOND / (int64_t)AudioSamplingRate::SAMPLE_RATE_44100; in HWTEST() 126 nanoTime = 50; in HWTEST() 127 linearPosTimeModel->UpdataFrameStamp(frame, nanoTime); in HWTEST() 131 int64_t retPosCal2 = nanoTime + deltaFrame * NANO_COUNT_PER_SECOND / (int64_t)AudioSamplingRate::SAMPLE_RATE_44100; in HWTEST() 184 int64_t nanoTime = NANO_COUNT_PER_SECOND; in HWTEST() local 185 oHAudioBuffer->SetHandleInfo(frames, nanoTime); in HWTEST() 186 bool ret = oHAudioBuffer->GetHandleInfo(frames, nanoTime); in HWTEST()
|
H A D | audio_endpoint_separate_unit_test.cpp | 597 int64_t nanoTime = 0; in HWTEST() local 599 auto ret = ptr->GetDeviceHandleInfo(frames, nanoTime); in HWTEST() 601 ptr->GetDeviceHandleInfo(frames, nanoTime); in HWTEST() 1152 int64_t nanoTime = 0; in HWTEST() local 1154 ptr->GetDeviceHandleInfo(frames, nanoTime); in HWTEST()
|
/foundation/multimedia/audio_framework/frameworks/native/audioutils/src/ |
H A D | audio_utils.cpp | 136 int32_t ClockTime::AbsoluteSleep(int64_t nanoTime) in AbsoluteSleep() argument 139 CHECK_AND_RETURN_RET_LOG(nanoTime > 0, ret, in AbsoluteSleep() 140 "AbsoluteSleep invalid sleep time :%{public}" PRId64 " ns", nanoTime); in AbsoluteSleep() 142 time.tv_sec = nanoTime / AUDIO_NS_PER_SECOND; in AbsoluteSleep() 143 time.tv_nsec = nanoTime - (time.tv_sec * AUDIO_NS_PER_SECOND); // Avoids % operation. in AbsoluteSleep() 154 int32_t ClockTime::RelativeSleep(int64_t nanoTime) in RelativeSleep() argument 157 CHECK_AND_RETURN_RET_LOG(nanoTime > 0, ret, in RelativeSleep() 158 "AbsoluteSleep invalid sleep time :%{public}" PRId64 " ns", nanoTime); in RelativeSleep() 160 time.tv_sec = nanoTime / AUDIO_NS_PER_SECOND; in RelativeSleep() 161 time.tv_nsec = nanoTime in RelativeSleep() [all...] |
/foundation/distributedhardware/distributed_audio/common/test/unittest/src/ |
H A D | daudio_utils_test.cpp | 420 int64_t nanoTime = 0; in HWTEST_F() local 421 EXPECT_NE(DH_SUCCESS, AbsoluteSleep(nanoTime)); in HWTEST_F() 422 nanoTime = 123456; in HWTEST_F() 423 EXPECT_EQ(DH_SUCCESS, AbsoluteSleep(nanoTime)); in HWTEST_F()
|
/foundation/graphic/graphic_2d/rosen/modules/render_service_profiler/ |
H A D | rs_profiler_base.cpp | 1170 int64_t RSProfiler::AnimeSetStartTime(AnimationId id, int64_t nanoTime) in AnimeSetStartTime() argument 1173 return nanoTime; in AnimeSetStartTime() 1178 return nanoTime; in AnimeSetStartTime() 1180 int64_t minDt = INT64_MAX, minTime = nanoTime - g_replayStartTimeNano; in AnimeSetStartTime() 1182 int64_t dt = abs(recordedTime - (nanoTime - g_replayStartTimeNano)); in AnimeSetStartTime() 1191 g_animeStartMap[Utils::PatchNodeId(id)].push_back(nanoTime); in AnimeSetStartTime() 1194 list.push_back(nanoTime); in AnimeSetStartTime() 1199 return nanoTime; in AnimeSetStartTime()
|
/foundation/multimedia/audio_framework/services/audio_service/server/src/ |
H A D | audio_endpoint_separate.cpp | 628 bool AudioEndpointSeparate::GetDeviceHandleInfo(uint64_t &frames, int64_t &nanoTime) in GetDeviceHandleInfo() argument 646 nanoTime = timeNanoSec + timeSec * AUDIO_NS_PER_SECOND; in GetDeviceHandleInfo() 648 std::to_string(nanoTime) + " at " + std::to_string(ClockTime::GetCurNano())); in GetDeviceHandleInfo() 649 nanoTime += DELTA_TO_REAL_READ_START_TIME; // global delay in server in GetDeviceHandleInfo()
|
/foundation/distributedhardware/distributed_audio/common/src/ |
H A D | daudio_util.cpp | 372 int32_t AbsoluteSleep(int64_t nanoTime) in AbsoluteSleep() argument 375 if (nanoTime <= 0) { in AbsoluteSleep() 376 DHLOGE("AbsoluteSleep invalid sleep time : %{public}" PRId64" ns", nanoTime); in AbsoluteSleep() 380 time.tv_sec = nanoTime / AUDIO_NS_PER_SECOND; in AbsoluteSleep() 381 time.tv_nsec = nanoTime - (time.tv_sec * AUDIO_NS_PER_SECOND); in AbsoluteSleep()
|
/foundation/distributedhardware/distributed_audio/common/include/ |
H A D | daudio_util.h | 47 int32_t AbsoluteSleep(int64_t nanoTime);
|
/foundation/multimedia/av_codec/test/fuzztest/hevcswdecoderconfigure_fuzzer/ |
H A D | videodec_sample.cpp | 140 int64_t nanoTime = static_cast<int64_t>(now.tv_sec) * NANOS_IN_SECOND + now.tv_nsec; in GetSystemTimeUs() local 141 return nanoTime / NANOS_IN_MICRO; in GetSystemTimeUs()
|
/foundation/multimedia/av_codec/test/fuzztest/hwdecoderapi11_fuzzer/ |
H A D | videodec_api11_sample.cpp | 122 int64_t nanoTime = static_cast<int64_t>(now.tv_sec) * NANOS_IN_SECOND + now.tv_nsec; in GetSystemTimeUs() local 123 return nanoTime / NANOS_IN_MICRO; in GetSystemTimeUs()
|
/foundation/multimedia/av_codec/test/moduletest/vcodec/hdrcodec/src/InnerAPI/ |
H A D | hdrcodec_inner_ndk_sample.cpp | 41 int64_t nanoTime = static_cast<int64_t>(now.tv_sec) * NANOS_IN_SECOND + now.tv_nsec; in GetSystemTimeUs() local 43 return nanoTime / NANOS_IN_MICRO; in GetSystemTimeUs()
|
/foundation/multimedia/av_codec/test/moduletest/vcodec/hdrcodec/src/ |
H A D | hdrcodec_ndk_sample.cpp | 38 int64_t nanoTime = static_cast<int64_t>(now.tv_sec) * NANOS_IN_SECOND + now.tv_nsec; in GetSystemTimeUs() local 40 return nanoTime / NANOS_IN_MICRO; in GetSystemTimeUs()
|
/foundation/multimedia/av_codec/test/fuzztest/encoderapi11_fuzzer/ |
H A D | videoenc_api11_sample.cpp | 88 int64_t nanoTime = reinterpret_cast<int64_t>(now.tv_sec) * NANOS_IN_SECOND + now.tv_nsec; in GetSystemTimeUs() local 90 return nanoTime / NANOS_IN_MICRO; in GetSystemTimeUs()
|
/foundation/multimedia/av_codec/test/fuzztest/swdecoderconfigure_fuzzer/ |
H A D | videodec_sample.cpp | 140 int64_t nanoTime = static_cast<int64_t>(now.tv_sec) * NANOS_IN_SECOND + now.tv_nsec; in GetSystemTimeUs() local 141 return nanoTime / NANOS_IN_MICRO; in GetSystemTimeUs()
|
/foundation/multimedia/av_codec/test/fuzztest/hwdecoder_fuzzer/ |
H A D | videodec_sample.cpp | 124 int64_t nanoTime = static_cast<int64_t>(now.tv_sec) * NANOS_IN_SECOND + now.tv_nsec; in GetSystemTimeUs() local 125 return nanoTime / NANOS_IN_MICRO; in GetSystemTimeUs()
|
/foundation/multimedia/av_codec/test/fuzztest/hevcswdecoderapi11_fuzzer/ |
H A D | videodec_api11_sample.cpp | 122 int64_t nanoTime = static_cast<int64_t>(now.tv_sec) * NANOS_IN_SECOND + now.tv_nsec; in GetSystemTimeUs() local 123 return nanoTime / NANOS_IN_MICRO; in GetSystemTimeUs()
|
/foundation/multimedia/audio_framework/services/audio_service/server/include/ |
H A D | audio_endpoint.h | 171 bool GetDeviceHandleInfo(uint64_t &frames, int64_t &nanoTime);
|
/foundation/multimedia/audio_framework/frameworks/native/audioutils/include/ |
H A D | audio_utils.h | 119 static int32_t AbsoluteSleep(int64_t nanoTime); 120 static int32_t RelativeSleep(int64_t nanoTime);
|
/foundation/multimedia/av_codec/test/moduletest/vcodec/hwdecoder/src/InnerAPI/ |
H A D | videodec_ndk_inner_sample.cpp | 115 int64_t nanoTime = (int64_t)now.tv_sec * NANOS_IN_SECOND + now.tv_nsec; in GetSystemTimeUs() local 117 return nanoTime / NANOS_IN_MICRO; in GetSystemTimeUs()
|
/foundation/multimedia/av_codec/test/fuzztest/encoderconfigure_fuzzer/ |
H A D | videoenc_sample.cpp | 85 int64_t nanoTime = static_cast<int64_t>(now.tv_sec) * NANOS_IN_SECOND + now.tv_nsec; in GetSystemTimeUs() local 86 return nanoTime / NANOS_IN_MICRO; in GetSystemTimeUs()
|