/foundation/graphic/graphic_2d/rosen/modules/hyper_graphic_manager/core/hgm_screen_manager/ |
H A D | hgm_screen.cpp | 55 int32_t HgmScreen::SetActiveRefreshRate(int32_t sceneId, uint32_t rate)
in SetActiveRefreshRate() argument 57 // check if this screen supports the requested rate
in SetActiveRefreshRate() 58 if (supportedRefreshRates_.find(rate) == supportedRefreshRates_.end()) {
in SetActiveRefreshRate() 59 HGM_LOGE("HgmScreen refreshrate %{public}u is not supported, abandoned", rate);
in SetActiveRefreshRate() 63 // decide if this rate should be accepted
in SetActiveRefreshRate() 64 if (!IfSwitchToRate(sceneId, rate)) {
in SetActiveRefreshRate() 68 int32_t modeIdToApply = GetModeIdViaRate(rate);
in SetActiveRefreshRate() 75 int32_t HgmScreen::SetRateAndResolution(int32_t sceneId, uint32_t rate, int32_t width, int32_t height)
in SetRateAndResolution() argument 77 if (!IfSwitchToRate(sceneId, rate)) {
in SetRateAndResolution() 81 int32_t modeIdToApply = GetModeIdViaResolutionAndRate(width, height, rate);
in SetRateAndResolution() 95 AddScreenModeInfo(int32_t width, int32_t height, uint32_t rate, int32_t modeId) AddScreenModeInfo() argument [all...] |
H A D | hgm_screen.h | 64 bool IsSupportRate(uint32_t rate) const
in IsSupportRate() 66 return supportedRefreshRates_.find(rate) != supportedRefreshRates_.end() ? true : false;
in IsSupportRate() 110 int32_t SetActiveRefreshRate(int32_t sceneId, uint32_t rate);
111 int32_t SetRateAndResolution(int32_t sceneId, uint32_t rate, int32_t width, int32_t height);
113 int32_t AddScreenModeInfo(int32_t width, int32_t height, uint32_t rate, int32_t modeId);
118 ScreenProfile(int32_t width, int32_t height, uint32_t rate, int32_t modeId)
in ScreenProfile() argument 119 : width_(width), height_(height), refreshrate_(rate), modeId_(modeId) {}
in ScreenProfile() 176 bool IfSwitchToRate(int32_t sceneId, uint32_t rate) const;
177 int32_t GetModeIdViaRate(uint32_t rate) const;
178 int32_t GetModeIdViaResolutionAndRate(int32_t width, int32_t height, uint32_t rate) cons [all...] |
H A D | hgm_core.cpp | 274 int32_t HgmCore::SetScreenRefreshRate(ScreenId id, int32_t sceneId, int32_t rate)
in SetScreenRefreshRate() argument 281 HGM_LOGD("HgmCore setting screen " PUBU64 " to the rate of %{public}d", id, rate);
in SetScreenRefreshRate() 291 if (rate <= 0) {
in SetScreenRefreshRate() 292 HGM_LOGW("HgmCore refuse an illegal framerate: %{public}d", rate);
in SetScreenRefreshRate() 295 int32_t modeToSwitch = screen->SetActiveRefreshRate(sceneId, static_cast<uint32_t>(rate));
in SetScreenRefreshRate() 302 // the rate is accepted and passed to a list, will be applied by hardwarethread before sending the composition
in SetScreenRefreshRate() 303 HGM_LOGI("HgmCore the rate of %{public}d is accepted, the target mode is %{public}d", rate, modeToSwitch);
in SetScreenRefreshRate() 312 refreshRateUpdateCallback_(rate);
in SetScreenRefreshRate() 318 SetRateAndResolution(ScreenId id, int32_t sceneId, int32_t rate, int32_t width, int32_t height) SetRateAndResolution() argument 403 AddScreenInfo(ScreenId id, int32_t width, int32_t height, uint32_t rate, int32_t mode) AddScreenInfo() argument 514 GetIdealPeriod(uint32_t rate) GetIdealPeriod() argument [all...] |
H A D | hgm_core.h | 69 void SetPendingScreenRefreshRate(uint32_t rate)
in SetPendingScreenRefreshRate() argument 71 pendingScreenRefreshRate_.store(rate);
in SetPendingScreenRefreshRate() 81 // the rate takes effect at the latest hardware timing
82 void SetScreenRefreshRateImme(uint32_t rate)
in SetScreenRefreshRateImme() argument 84 screenRefreshRateImme_.store(rate);
in SetScreenRefreshRateImme() 184 int32_t SetScreenRefreshRate(ScreenId id, int32_t sceneId, int32_t rate);
185 static int32_t SetRateAndResolution(ScreenId id, int32_t sceneId, int32_t rate, int32_t width, int32_t height);
193 int32_t AddScreenInfo(ScreenId id, int32_t width, int32_t height, uint32_t rate, int32_t mode);
209 int64_t GetIdealPeriod(uint32_t rate);
|
/foundation/graphic/graphic_2d/rosen/modules/hyper_graphic_manager/frame_rate_vote/ |
H A D | rs_video_frame_rate_vote.cpp | 57 uint32_t rate = static_cast<uint32_t>(intRate); in VoteVideoFrameRate() local 58 if (rate < NORMAL_RATE_MIN || rate > NORMAL_RATE_MAX) { in VoteVideoFrameRate() 61 if (rate == lastRate_) { in VoteVideoFrameRate() 64 RS_LOGI("video vote surfaceNodeId(%{public}s) rate(%{public}u)", std::to_string(surfaceNodeId_).c_str(), rate); in VoteVideoFrameRate() 65 DoVoteCallback(rate); in VoteVideoFrameRate() 66 lastRate_ = rate; in VoteVideoFrameRate() 91 void RSVideoFrameRateVote::DoVoteCallback(uint32_t rate) in DoVoteCallback() argument 96 voteCallback_(surfaceNodeId_, rate); in DoVoteCallback() [all...] |
H A D | rs_frame_rate_vote.cpp | 60 [this](uint64_t id, uint32_t rate) { this->SurfaceVideoVote(id, rate); }); in VideoFrameRateVote() 90 void RSFrameRateVote::SurfaceVideoVote(uint64_t surfaceNodeId, uint32_t rate) in SurfaceVideoVote() argument 93 if (rate == 0) { in SurfaceVideoVote() 99 surfaceVideoRate_[surfaceNodeId] = rate; in SurfaceVideoVote() 120 void RSFrameRateVote::VoteRate(pid_t pid, std::string eventName, uint32_t rate) in VoteRate() argument 126 .minRefreshRate = rate, in VoteRate() 127 .maxRefreshRate = rate, in VoteRate() 148 RS_LOGI("video vote pid:%{public}d rate(%{public}u, %{public}u)", in NotifyRefreshRateEvent()
|
H A D | rs_frame_rate_vote.h | 33 * @brief vote frame rate by video rate 43 void SurfaceVideoVote(uint64_t surfaceNodeId, uint32_t rate); 44 void VoteRate(pid_t pid, std::string eventName, uint32_t rate);
|
/foundation/multimodalinput/input/service/event_handler/test/ |
H A D | key_auto_repeat_test.cpp | 201 int32_t rate = 500; in HWTEST_F() local 203 int32_t result = keyAutoRepeat.SetKeyboardRepeatRate(rate); in HWTEST_F() 205 rate = 30; in HWTEST_F() 206 result = keyAutoRepeat.SetKeyboardRepeatRate(rate); in HWTEST_F() 208 rate = 101; in HWTEST_F() 209 result = keyAutoRepeat.SetKeyboardRepeatRate(rate); in HWTEST_F() 211 rate = -1; in HWTEST_F() 212 result = keyAutoRepeat.SetKeyboardRepeatRate(rate); in HWTEST_F() 245 int32_t rate = 0; in HWTEST_F() local 246 EXPECT_EQ(keyAutoRepeat.GetKeyboardRepeatRate(rate), RET_O in HWTEST_F() [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/manager/frame_rate/ |
H A D | frame_rate_manager.cpp | 28 void FrameRateManager::AddNodeRate(int32_t nodeId, int32_t rate) in AddNodeRate() argument 30 auto [iter, success] = nodeRateMap_.try_emplace(nodeId, rate); in AddNodeRate() 44 void FrameRateManager::UpdateNodeRate(int32_t nodeId, int32_t rate) in UpdateNodeRate() argument 46 if (auto iter = nodeRateMap_.find(nodeId); iter != nodeRateMap_.end() && iter->second != rate) { in UpdateNodeRate() 47 iter->second = rate; in UpdateNodeRate() 52 void FrameRateManager::SetAnimateRate(int32_t rate, bool hasFirstFrameAnimation) in SetAnimateRate() argument 54 if (animateRate_ != rate || hasFirstFrameAnimation_ != hasFirstFrameAnimation) { in SetAnimateRate() 56 animateRate_ = rate; in SetAnimateRate()
|
H A D | frame_rate_manager.h | 42 void AddNodeRate(int32_t nodeId, int32_t rate = 0); 46 void UpdateNodeRate(int32_t nodeId, int32_t rate); 48 void SetAnimateRate(int32_t rate, bool hasFirstFrameAnimation);
|
/foundation/systemabilitymgr/samgr_lite/samgr_endpoint/source/ |
H A D | token_bucket.h | 28 int rate; // The rate of token generation per millisecond. Now, we use the TPS instead.
member 31 int used; // The used buckets. When the rate is TPS, the value is used * TOKEN_PRE_MSG.
39 inline static void TB_InitBucket(TokenBucket *bucket, int rate, int burst)
in TB_InitBucket() argument 42 bucket->rate = rate;
in TB_InitBucket()
|
/foundation/multimedia/player_framework/test/fuzztest/soundpool_fuzztest/soundpoolsetrate_fuzzer/ |
H A D | soundpoolsetrate_fuzzer.cpp | 67 playParameters.rate = *reinterpret_cast<int32_t *>(data);
in FuzzSoundPoolSetRate() 68 AudioRendererRate rate;
in FuzzSoundPoolSetRate() local 72 rate = rateType_[datatypesubscript];
in FuzzSoundPoolSetRate() 77 TestSoundPool::SetRate(streamID, rate);
in FuzzSoundPoolSetRate() 81 TestSoundPool::SetRate(streamId, rate);
in FuzzSoundPoolSetRate()
|
/foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/pipeline/ |
H A D | rs_render_display_sync.cpp | 145 int32_t rate = 0; in GetNearestFrameRate() local 150 rate = rates.back(); in GetNearestFrameRate() 154 rate = rates.front(); in GetNearestFrameRate() 157 rate = *iter; in GetNearestFrameRate() 164 rate = rates[index - 1]; in GetNearestFrameRate() 166 rate = rates[index]; in GetNearestFrameRate() 170 return rate; in GetNearestFrameRate()
|
H A D | rs_render_frame_rate_linker.cpp | 50 void RSRenderFrameRateLinker::SetFrameRate(uint32_t rate) in SetFrameRate() argument 52 frameRate_ = rate; in SetFrameRate()
|
/foundation/graphic/graphic_2d/rosen/modules/render_service/core/pipeline/ |
H A D | rs_vsync_rate_reduce_manager.cpp | 31 // reduce the app refresh rate by ratio on the frame rate of entire system. 32 // if frame rate is 120, ratio of 1 means 120, 2 means 60, 3 means 40, 4 means 30 33 // vsync rate table, first dimension means the balance level as one frame duration increased 49 // v_val of the v-rate result 208 RS_OPTIONAL_TRACE_NAME_FMT("CalcRates name=%s id=%" PRIu64 ",rate=%d,isSysAni=%d", vRateInfo.name.c_str(), in CalcRates() 229 int rate = GetRateByBalanceLevel(vVal); in CalcRates() local 230 vSyncRateMap_[nodeId] = rate; in CalcRates() 231 SetVSyncRatesChanged(lastIter == lastVSyncRateMap_.end() || lastIter->second != rate); in CalcRates() 232 RS_OPTIONAL_TRACE_NAME_FMT("CalcRates name=%s id=%" PRIu64 ",vVal=%.2f,rate in CalcRates() [all...] |
/foundation/multimodalinput/input/service/event_handler/src/ |
H A D | key_auto_repeat.cpp | 253 int32_t KeyAutoRepeat::SetKeyboardRepeatRate(int32_t rate) in SetKeyboardRepeatRate() argument 256 int32_t repeatRateTime = rate; in SetKeyboardRepeatRate() 257 if (rate < MIN_KEY_REPEAT_RATE) { in SetKeyboardRepeatRate() 260 if (rate > MAX_KEY_REPEAT_RATE) { in SetKeyboardRepeatRate() 265 MMI_HILOGE("Failed to set keyboard repeat rate"); in SetKeyboardRepeatRate() 268 MMI_HILOGD("Successfully set keyboard repeat for rate:%{public}d", repeatRateTime); in SetKeyboardRepeatRate() 290 int32_t KeyAutoRepeat::GetKeyboardRepeatRate(int32_t &rate) in GetKeyboardRepeatRate() argument 294 if (GetConfigDataFromDatabase(name, rate) != RET_OK) { in GetKeyboardRepeatRate() 295 MMI_HILOGE("Failed to get keyboard repeat rate"); in GetKeyboardRepeatRate() 298 if (rate in GetKeyboardRepeatRate() [all...] |
/foundation/graphic/graphic_2d/rosen/test/hyper_graphic_manager/unittest/ |
H A D | hyper_graphic_manager_test.cpp | 262 uint32_t rate = 120;
in HWTEST_F() local 274 auto addScreenProfile = instance8.AddScreenInfo(screenId, width, height, rate, mode);
in HWTEST_F() 309 uint32_t rate = 120;
in HWTEST_F() local 320 auto addScreenProfile = instance.AddScreenInfo(screenId, width, height, rate, mode);
in HWTEST_F() 346 uint32_t rate = 120;
in HWTEST_F() local 354 instance.AddScreenInfo(screenId2, width, height, rate, mode);
in HWTEST_F() 355 EXPECT_EQ(instance.AddScreenInfo(screenId2, width, height, rate, mode), HgmErrCode::HGM_SCREEN_PARAM_ERROR);
in HWTEST_F() 365 EXPECT_EQ(screen2->SetRateAndResolution(screenId2, rate, width, height), mode);
in HWTEST_F() 372 EXPECT_EQ(screen2->SetRateAndResolution(screenId2, rate, width2, height2), -1);
in HWTEST_F() 373 EXPECT_EQ(screen2->SetRateAndResolution(screenId2, rate, widt in HWTEST_F() 443 uint32_t rate = 120; HWTEST_F() local 505 uint32_t rate = 120; HWTEST_F() local [all...] |
/foundation/graphic/graphic_2d/rosen/test/render_service/render_service_base/unittest/pipeline/ |
H A D | rs_render_frame_rate_linker_test.cpp | 64 uint32_t rate = 120; in HWTEST_F() local 65 frameRateLinker->SetFrameRate(rate); in HWTEST_F() 66 EXPECT_EQ(frameRateLinker->GetFrameRate(), rate); in HWTEST_F()
|
/foundation/communication/dsoftbus/components/nstackx/fillp/src/fillp_lib/src/fillp/ |
H A D | fillp_flow_control_alg0.c | 170 if ((alg->sendRateIncreaseGainIndex < FILLP_FC_RTT_PACK_RATIO) && (pack->rate == 0)) { in FillpAlg0FcHandleInit() 171 /* In send rate increase period and recv rate getting nothing currently */ in FillpAlg0FcHandleInit() 175 alg->maxRecvRate = pack->rate; in FillpAlg0FcHandleInit() 176 alg->historyMaxRecvRate.rateSample[0].v = pack->rate; in FillpAlg0FcHandleInit() 195 FILLP_UINT32 recvRate = pack->rate; in FillpAlg0FcHandleBwProbe() 213 /* Update the allowed max rate */ in FillpAlg0PackStateProcess() 247 double rate = (double)pcb->statistics.debugPcb.packIntervalSendBytes * FILLP_FC_IN_BIT; in FillpAlg0AnalysePack() local 248 rate *= FILLP_BPS_TO_KBPS; in FillpAlg0AnalysePack() 249 rate / in FillpAlg0AnalysePack() [all...] |
/foundation/multimedia/audio_framework/frameworks/native/pulseaudio/modules/hdi/ |
H A D | module_hdi_source.c | 48 "rate=<sample rate> " 65 "rate", 129 AUDIO_INFO_LOG("SOURCE rate = %{public}d ALGO rate = %{public}d ", in SetResampler() 130 so->source->sample_spec.rate, algoSpecs->micSpec.rate); in SetResampler() 138 pa_resampler_set_input_rate(so->thread_info.resampler, algoSpecs->micSpec.rate); in SetResampler() 140 if ((u->ecType != EC_NONE) && (algoSpecs->ecSpec.rate != 0) && in SetResampler() 142 AUDIO_INFO_LOG("EC: SOURCE rate in SetResampler() [all...] |
/foundation/graphic/graphic_2d/rosen/modules/composer/vsync/src/ |
H A D | vsync_connection_proxy.cpp | 167 VsyncError VSyncConnectionProxy::SetVSyncRate(int32_t rate)
in SetVSyncRate() argument 169 if (rate < -1) {
in SetVSyncRate() 180 if (!arg.WriteInt32(rate)) {
in SetVSyncRate() 181 VLOGE("Failed to write rate:%{public}d", rate);
in SetVSyncRate()
|
H A D | vsync_distributor.cpp | 204 VsyncError VSyncConnection::SetVSyncRate(int32_t rate)
in SetVSyncRate() argument 218 return distributor->SetVSyncRate(rate, this);
in SetVSyncRate() 742 /* std::pair<id, refresh rate> */
795 int32_t rate = connections_[i]->highPriorityState_ ? connections_[i]->highPriorityRate_ :
in CollectConnections() local 798 if (rate < 0) {
in CollectConnections() 802 if (rate == 0) { // for RequestNextVSync
in CollectConnections() 819 if (timestamp > 0 && (vsyncCount % rate == 0)) {
in CollectConnections() 826 if (timestamp > 0 && (vsyncCount % rate == 0)) {
in CollectConnections() 846 SCOPED_DEBUG_TRACE_FMT("CollectConnectionsLTPO, i:%d, name:%s, rate:%d, vsyncPulseFreq:%u"
in CollectConnectionsLTPO() 964 VLOGD("conn name:%{public}s, rate in RequestNextVSync() 968 SetVSyncRate(int32_t rate, const sptr<VSyncConnection>& connection) SetVSyncRate() argument 1040 SetQosVSyncRateByPid(uint32_t pid, int32_t rate, bool isSystemAnimateScene) SetQosVSyncRateByPid() argument 1086 SetQosVSyncRate(uint64_t windowNodeId, int32_t rate, bool isSystemAnimateScene) SetQosVSyncRate() argument [all...] |
/foundation/graphic/graphic_2d/rosen/modules/composer/vsync/test/fuzztest/vsyncdistributor_fuzzer/ |
H A D | vsyncdistributor_fuzzer.cpp | 63 int32_t rate = GetData<int32_t>(); in DoSomethingInterestingWithMyAPI() local 71 vsyncDistributor->SetVSyncRate(rate, conn); in DoSomethingInterestingWithMyAPI()
|
/foundation/arkui/ace_engine/test/unittest/core/manager/ |
H A D | frame_rate_manager_test.cpp | 93 int32_t rate = 120; in HWTEST_F() local 116 frameRageManager.AddNodeRate(nodeId, rate); in HWTEST_F() 118 EXPECT_EQ(rate, expectedRate2); in HWTEST_F()
|
/foundation/multimedia/media_lite/services/recorder_lite/server/src/ |
H A D | recorder_service.cpp | 107 int32_t rate; in Dispatch() local 108 ReadInt32(req, &rate); in Dispatch() 109 int32_t ret = recorder->SetVideoEncodingBitRate(sourceId, rate); in Dispatch() 149 int32_t rate; in Dispatch() local 150 ReadInt32(req, &rate); in Dispatch() 151 int32_t ret = recorder->SetAudioSampleRate(sourceId, rate); in Dispatch()
|