Skip to content

Commit 17fb509

Browse files
mukesh972mmuruk414_comcastarun-madhavan-013
authored
RDKEMW-1012: Add Framerate interface header & IDs. (#259)
* RDKEMW-1012: Add Framerate interface header & IDs. * RDKEMW-1012: moving FrameRate IDs to fill the void created by deprecated plugin * RDKEMW-1012: fixed the missing COMMA --------- Co-authored-by: mmuruk414_comcast <[email protected]> Co-authored-by: Arun P Madhavan <[email protected]> Co-authored-by: Arun Madhavan <[email protected]>
1 parent 2074036 commit 17fb509

File tree

2 files changed

+118
-0
lines changed

2 files changed

+118
-0
lines changed

apis/FrameRate/IFrameRate.h

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
/*
2+
* If not stated otherwise in this file or this component's LICENSE file the
3+
* following copyright and licenses apply:
4+
*
5+
* Copyright 2025 RDK Management
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
20+
#pragma once
21+
#include "Module.h"
22+
23+
// @stubgen:include <com/IIteratorType.h>
24+
25+
namespace WPEFramework
26+
{
27+
namespace Exchange
28+
{
29+
/* @json 1.0.0 @text:keep */
30+
struct EXTERNAL IFrameRate : virtual public Core::IUnknown
31+
{
32+
enum { ID = ID_FRAMERATE };
33+
34+
// @event
35+
struct EXTERNAL INotification : virtual public Core::IUnknown
36+
{
37+
enum { ID = ID_FRAMERATE_NOTIFICATION };
38+
39+
// @text onFpsEvent
40+
// @brief Triggered by callback from FrameRate after onFpsEvent
41+
// @param average - in - int
42+
// @param min - in - int
43+
// @param max - in - int
44+
virtual void OnFpsEvent(const int average, const int min, const int max) {};
45+
46+
// @text onDisplayFrameRateChanging
47+
// @brief Triggered when the framerate changes started
48+
// @param displayFrameRate - in - string
49+
virtual void OnDisplayFrameRateChanging(const string& displayFrameRate) {};
50+
51+
// @text onDisplayFrameRateChanged
52+
// @brief Triggered when the framerate changed.
53+
// @param displayFrameRate - in - string
54+
virtual void OnDisplayFrameRateChanged(const string& displayFrameRate) {};
55+
};
56+
57+
virtual Core::hresult Register(IFrameRate::INotification* notification) = 0;
58+
virtual Core::hresult Unregister(IFrameRate::INotification* notification) = 0;
59+
60+
/** Gets the Display Frame Rate*/
61+
// @text getDisplayFrameRate
62+
// @brief Gets the current display frame rate values.
63+
// @param framerate - out - string
64+
// @param success - out - boolean
65+
virtual Core::hresult GetDisplayFrameRate(string& framerate /* @out */, bool& success /* @out */) = 0;
66+
67+
/** Gets framerate mode */
68+
// @text getFrmMode
69+
// @brief Gets the current auto framerate mode.
70+
// @param frmmode - out - int
71+
// @param success - out - boolean
72+
virtual Core::hresult GetFrmMode(int &framerateMode /* @out @text:auto-frm-mode */, bool& success /* @out */) = 0;
73+
74+
/** Sets the FPS data collection interval */
75+
// @text setCollectionFrequency
76+
// @brief Sets the FPS data collection interval.
77+
// @param frequency - in - int
78+
// @param success - out - boolean
79+
virtual Core::hresult SetCollectionFrequency(const int frequency, bool& success /* @out */) = 0;
80+
81+
/** Sets the display framerate values */
82+
// @text setDisplayFrameRate
83+
// @brief Sets the display framerate values.
84+
// @param framerate - in - string
85+
// @param success - out - boolean
86+
virtual Core::hresult SetDisplayFrameRate(const string& framerate, bool& success /* @out */) = 0;
87+
88+
/** Sets the auto framerate mode */
89+
// @text setFrmMode
90+
// @brief Set the Frm mode.
91+
// @param frmmode - in - int
92+
// @param success - out - boolean
93+
virtual Core::hresult SetFrmMode(const int frmmode /* @in */, bool& success /* @out */) = 0;
94+
95+
/** Starts the FPS data collection */
96+
// @text startFpsCollection
97+
// @brief Starts the FPS data collection. Starts the FPS data collection
98+
// @param success - out - boolean
99+
virtual Core::hresult StartFpsCollection(bool& success /* @out */) = 0;
100+
101+
/** Stops the FPS data collection */
102+
// @text stopFpsCollection
103+
// @brief Stops the FPS data collection
104+
// @param success - out - boolean
105+
virtual Core::hresult StopFpsCollection(bool& success /* @out */) = 0;
106+
107+
/** Update the FPS value */
108+
// @text updateFps
109+
// @brief Update the FPS value
110+
// @param newFpsValue - in - int
111+
// @param success - out - boolean
112+
virtual Core::hresult UpdateFps(const int newFpsValue, bool& success /* @out */) = 0;
113+
};
114+
} // namespace Exchange
115+
} // namespace WPEFramework

apis/Ids.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ namespace Exchange {
7575
ID_CONTENTDECRYPTION = ID_ENTOS_OFFSET + 0x030,
7676
ID_CONTENTDECRYPTION_NOTIFICATION = ID_CONTENTDECRYPTION + 1,
7777

78+
ID_FRAMERATE = ID_ENTOS_OFFSET + 0x040,
79+
ID_FRAMERATE_NOTIFICATION = ID_FRAMERATE + 1,
80+
7881
ID_CAPTURE = ID_ENTOS_OFFSET + 0x050,
7982

8083
ID_PACKAGER = ID_ENTOS_OFFSET + 0x060,

0 commit comments

Comments
 (0)