/ohos5.0/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 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() 88 stampNanoTime_ = nanoTime; in UpdataFrameStamp() 97 bool LinearPosTimeModel::GetFrameStamp(uint64_t &frame, int64_t &nanoTime) in GetFrameStamp() argument [all …]
|
H A D | oh_audio_buffer.cpp | 482 bool OHAudioBuffer::GetHandleInfo(uint64_t &frames, int64_t &nanoTime) in GetHandleInfo() argument 488 nanoTime = basicBufferInfo_->handleTime.load(); in GetHandleInfo() 492 void OHAudioBuffer::SetHandleInfo(uint64_t frames, int64_t nanoTime) in SetHandleInfo() argument 495 basicBufferInfo_->handleTime.store(nanoTime); in SetHandleInfo()
|
/ohos5.0/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 | 138 bool GetHandleInfo(uint64_t &frames, int64_t &nanoTime); 140 void SetHandleInfo(uint64_t frames, int64_t nanoTime);
|
/ohos5.0/base/time/time_service/test/unittest/js_test/permission/ |
H A D | SystemTimeGet.test.js | 114 const nanoTime = await systemTime.getCurrentTime(true); 115 console.log('Get current nano time is ' + nanoTime); 116 const milliTime = nanoTime / NANO_TO_MILLI; 226 const nanoTime = await systemTime.getRealActiveTime(true); 227 console.log('Get real active nano time is ' + nanoTime); 228 expect(nanoTime / NANO_TO_BASE > 0).assertTrue(); 337 const nanoTime = await systemTime.getRealTime(true); 338 console.log('Get real nano time is ' + nanoTime); 339 expect(nanoTime / NANO_TO_BASE > 0).assertTrue();
|
H A D | SystemDateTimeGet.test.js | 119 const nanoTime = await systemDateTime.getCurrentTime(true); 120 console.log('Get current nano time is ' + nanoTime); 121 const milliTime = nanoTime / NANO_TO_MILLI; 237 const nanoTime = await systemDateTime.getRealActiveTime(true); 238 console.log('Get real active nano time is ' + nanoTime); 239 expect(nanoTime / NANO_TO_BASE > 0).assertTrue(); 354 const nanoTime = await systemDateTime.getRealTime(true); 355 console.log('Get real nano time is ' + nanoTime); 356 expect(nanoTime / NANO_TO_BASE > 0).assertTrue();
|
/ohos5.0/foundation/multimedia/audio_framework/services/audio_service/test/unittest/ |
H A D | audio_service_common_unit_test.cpp | 112 int64_t nanoTime = 0; variable 113 linearPosTimeModel->ResetFrameStamp(frame, nanoTime); 122 …int64_t retPosCal1 = nanoTime + deltaFrame * NANO_COUNT_PER_SECOND / (int64_t)AudioSamplingRate::S… 126 nanoTime = 50; 127 linearPosTimeModel->UpdataFrameStamp(frame, nanoTime); 131 …int64_t retPosCal2 = nanoTime + deltaFrame * NANO_COUNT_PER_SECOND / (int64_t)AudioSamplingRate::S… 184 int64_t nanoTime = NANO_COUNT_PER_SECOND; variable 185 oHAudioBuffer->SetHandleInfo(frames, nanoTime); 186 bool ret = oHAudioBuffer->GetHandleInfo(frames, nanoTime);
|
/ohos5.0/drivers/peripheral/distributed_audio/hdi_service/common/utils/src/ |
H A D | daudio_utils.cpp | 186 int32_t AbsoluteSleep(int64_t nanoTime) in AbsoluteSleep() argument 189 if (nanoTime <= 0) { in AbsoluteSleep() 193 time.tv_sec = nanoTime / AUDIO_NS_PER_SECOND; in AbsoluteSleep() 194 time.tv_nsec = nanoTime - (time.tv_sec * AUDIO_NS_PER_SECOND); in AbsoluteSleep()
|
/ohos5.0/foundation/multimedia/audio_framework/frameworks/native/audioutils/src/ |
H A D | audio_utils.cpp | 199 int32_t ClockTime::AbsoluteSleep(int64_t nanoTime) in AbsoluteSleep() argument 202 CHECK_AND_RETURN_RET_LOG(nanoTime > 0, ret, in AbsoluteSleep() 203 "AbsoluteSleep invalid sleep time :%{public}" PRId64 " ns", nanoTime); in AbsoluteSleep() 205 time.tv_sec = nanoTime / AUDIO_NS_PER_SECOND; in AbsoluteSleep() 206 time.tv_nsec = nanoTime - (time.tv_sec * AUDIO_NS_PER_SECOND); // Avoids % operation. in AbsoluteSleep() 217 std::string ClockTime::NanoTimeToString(int64_t nanoTime) in NanoTimeToString() argument 221 time_t time_seconds = nanoTime / AUDIO_NS_PER_SECOND; in NanoTimeToString() 234 int32_t ClockTime::RelativeSleep(int64_t nanoTime) in RelativeSleep() argument 237 CHECK_AND_RETURN_RET_LOG(nanoTime > 0, ret, in RelativeSleep() 238 "AbsoluteSleep invalid sleep time :%{public}" PRId64 " ns", nanoTime); in RelativeSleep() [all …]
|
/ohos5.0/foundation/distributedhardware/distributed_audio/common/test/unittest/src/ |
H A D | daudio_utils_test.cpp | 420 int64_t nanoTime = 0; variable 421 EXPECT_NE(DH_SUCCESS, AbsoluteSleep(nanoTime)); 422 nanoTime = 123456; 423 EXPECT_EQ(DH_SUCCESS, AbsoluteSleep(nanoTime));
|
/ohos5.0/foundation/multimedia/player_framework/services/services/screen_capture/server/ |
H A D | audio_capturer_wrapper.cpp | 280 int32_t AudioCapturerWrapper::RelativeSleep(int64_t nanoTime) in RelativeSleep() argument 283 CHECK_AND_RETURN_RET_LOG(nanoTime > 0, ret, in RelativeSleep() 284 "ACW AbsoluteSleep invalid sleep time :%{public}" PRId64 " ns", nanoTime); in RelativeSleep() 286 time.tv_sec = nanoTime / AUDIO_NS_PER_SECOND; in RelativeSleep() 287 time.tv_nsec = nanoTime - (time.tv_sec * AUDIO_NS_PER_SECOND); // Avoids % operation. in RelativeSleep()
|
H A D | audio_capturer_wrapper.h | 82 int32_t RelativeSleep(int64_t nanoTime);
|
/ohos5.0/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()
|
/ohos5.0/foundation/multimedia/audio_framework/services/audio_service/server/src/ |
H A D | audio_endpoint_separate.cpp | 631 bool AudioEndpointSeparate::GetDeviceHandleInfo(uint64_t &frames, int64_t &nanoTime) in GetDeviceHandleInfo() argument 649 nanoTime = timeNanoSec + timeSec * AUDIO_NS_PER_SECOND; in GetDeviceHandleInfo() 651 std::to_string(nanoTime) + " at " + std::to_string(ClockTime::GetCurNano())); in GetDeviceHandleInfo() 652 nanoTime += DELTA_TO_REAL_READ_START_TIME; // global delay in server in GetDeviceHandleInfo()
|
/ohos5.0/drivers/peripheral/distributed_audio/hdi_service/common/utils/include/ |
H A D | daudio_utils.h | 57 int32_t AbsoluteSleep(int64_t nanoTime);
|
/ohos5.0/foundation/multimedia/audio_framework/frameworks/native/audioutils/include/ |
H A D | audio_utils.h | 113 static int32_t AbsoluteSleep(int64_t nanoTime); 114 static int32_t RelativeSleep(int64_t nanoTime); 115 static std::string NanoTimeToString(int64_t nanoTime);
|
/ohos5.0/foundation/distributedhardware/distributed_audio/common/include/ |
H A D | daudio_util.h | 47 int32_t AbsoluteSleep(int64_t nanoTime);
|
/ohos5.0/foundation/multimedia/audio_framework/frameworks/native/audioutils/test/unittest/ |
H A D | audio_utils_unit_test.cpp | 69 int64_t nanoTime = 1000; variable 70 ret = ClockTime::AbsoluteSleep(nanoTime); 76 ret = ClockTime::RelativeSleep(nanoTime);
|
/ohos5.0/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()
|
/ohos5.0/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()
|
/ohos5.0/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()
|
/ohos5.0/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()
|
/ohos5.0/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()
|
/ohos5.0/foundation/multimedia/audio_framework/services/audio_service/server/include/ |
H A D | audio_endpoint.h | 162 bool GetDeviceHandleInfo(uint64_t &frames, int64_t &nanoTime);
|
/ohos5.0/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()
|