Home
last modified time | relevance | path

Searched refs:nanoTime (Results 1 - 25 of 41) sorted by relevance

12

/foundation/multimedia/audio_framework/services/audio_service/common/src/
H A Dlinear_pos_time_model.cpp53 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 Doh_audio_buffer.cpp501 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 Dlinear_pos_time_model.h29 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 Doh_audio_buffer.h139 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 Daudio_utils_fuzzer.cpp92 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 Daudio_service_common_unit_test.cpp112 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 Daudio_endpoint_separate_unit_test.cpp597 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 Daudio_utils.cpp136 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 Ddaudio_utils_test.cpp420 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 Drs_profiler_base.cpp1170 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 Daudio_endpoint_separate.cpp628 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 Ddaudio_util.cpp372 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 Ddaudio_util.h47 int32_t AbsoluteSleep(int64_t nanoTime);
/foundation/multimedia/av_codec/test/fuzztest/hevcswdecoderconfigure_fuzzer/
H A Dvideodec_sample.cpp140 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 Dvideodec_api11_sample.cpp122 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 Dhdrcodec_inner_ndk_sample.cpp41 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 Dhdrcodec_ndk_sample.cpp38 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 Dvideoenc_api11_sample.cpp88 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 Dvideodec_sample.cpp140 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 Dvideodec_sample.cpp124 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 Dvideodec_api11_sample.cpp122 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 Daudio_endpoint.h171 bool GetDeviceHandleInfo(uint64_t &frames, int64_t &nanoTime);
/foundation/multimedia/audio_framework/frameworks/native/audioutils/include/
H A Daudio_utils.h119 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 Dvideodec_ndk_inner_sample.cpp115 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 Dvideoenc_sample.cpp85 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()

Completed in 22 milliseconds

12