Skip to content

Commit 1d654db

Browse files
authored
Merge branch 'develop' into feature/RDKEMW-3529-VRR_support
2 parents 4dd3be9 + 4ab8acb commit 1d654db

File tree

7 files changed

+454
-162
lines changed

7 files changed

+454
-162
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: 13 additions & 1 deletion
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,
@@ -273,7 +276,16 @@ namespace Exchange {
273276
ID_HDCPPROFILE = ID_ENTOS_OFFSET + 0x390,
274277
ID_HDCPPROFILE_NOTIFICATION = ID_HDCPPROFILE + 1,
275278

276-
ID_LEDCONTROL = ID_ENTOS_OFFSET + 0x3A0
279+
ID_LEDCONTROL = ID_ENTOS_OFFSET + 0x3A0,
280+
281+
ID_SHARED_STORAGE = ID_ENTOS_OFFSET + 0x3B0,
282+
ID_SHARED_STORAGE_NOTIFICATION = ID_SHARED_STORAGE + 1,
283+
ID_SHARED_STORAGE_INSPECTOR = ID_SHARED_STORAGE + 2,
284+
ID_SHARED_STORAGE_INSPECTOR_NAMESPACE_SIZE_ITERATOR = ID_SHARED_STORAGE + 3,
285+
ID_SHARED_STORAGE_LIMIT = ID_SHARED_STORAGE + 4,
286+
ID_SHARED_STORAGE_LIMIT_NOTIFICATION = ID_SHARED_STORAGE + 5,
287+
ID_SHARED_STORAGE_LIMIT_INSPECTOR = ID_SHARED_STORAGE + 6,
288+
ID_SHARED_STORAGE_CACHE = ID_SHARED_STORAGE + 7
277289
};
278290
}
279291
}
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
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+
22+
#include "Module.h"
23+
24+
// @stubgen:include <com/IIteratorType.h>
25+
26+
namespace WPEFramework {
27+
namespace Exchange {
28+
29+
/* @json @text:keep */
30+
struct EXTERNAL ISharedStorage : virtual public Core::IUnknown {
31+
enum { ID = ID_SHARED_STORAGE };
32+
33+
~ISharedStorage() override = default;
34+
35+
enum ScopeType : uint8_t {
36+
DEVICE /* @text device */,
37+
ACCOUNT /* @text account */
38+
};
39+
struct EXTERNAL Success {
40+
bool success;
41+
};
42+
43+
// @event
44+
struct EXTERNAL INotification : virtual public Core::IUnknown {
45+
enum { ID = ID_SHARED_STORAGE_NOTIFICATION };
46+
47+
~INotification() override = default;
48+
49+
// @brief Values stored are changed using setValue
50+
// @text onValueChanged
51+
// @param scope: must be device or account
52+
// @param key: key
53+
// @param value: value
54+
virtual void OnValueChanged(const ScopeType scope, const string& ns /* @text:namespace */, const string& key, const string& value) {};
55+
};
56+
57+
virtual Core::hresult Register(Exchange::ISharedStorage::INotification* notification) = 0;
58+
virtual Core::hresult Unregister(Exchange::ISharedStorage::INotification* notification) = 0;
59+
60+
// @brief Sets the value of a key in the the specified namespace
61+
// @text setValue
62+
// @param scope: must be device or account
63+
// @param ns: name space
64+
// @param key: key
65+
// @param value: value
66+
// @param ttl: time to live (optional)
67+
// @param success: success
68+
virtual Core::hresult SetValue(const ScopeType scope, const string& ns /* @text:namespace */, const string& key, const string& value, const uint32_t ttl, Success& success /* @out */) = 0;
69+
// @brief Returns the value of a key from the specified namespace.
70+
// @text getValue
71+
// @param scope: must be device or account
72+
// @param ns: name space
73+
// @param key: key
74+
// @param value: value out
75+
// @param ttl: time to live (optional)
76+
// @param success: success
77+
virtual Core::hresult GetValue(const ScopeType scope, const string& ns /* @text:namespace */, const string& key, string& value /* @out */, uint32_t& ttl /* @out */, bool& success /* @out */) = 0;
78+
// @brief Deletes a key from the specified namespace
79+
// @text deleteKey
80+
// @param scope: must be device or account
81+
// @param ns: name space
82+
// @param key: key
83+
// @param success: success
84+
virtual Core::hresult DeleteKey(const ScopeType scope, const string& ns /* @text:namespace */, const string& key, Success& success /* @out */) = 0;
85+
// @brief Deletes the specified namespace
86+
// @text deleteNamespace
87+
// @param scope: must be device or account
88+
// @param ns: name space
89+
// @param success: success
90+
virtual Core::hresult DeleteNamespace(const ScopeType scope, const string& ns /* @text:namespace */, Success& success /* @out */) = 0;
91+
};
92+
93+
/* @json @text:keep */
94+
struct EXTERNAL ISharedStorageInspector : virtual public Core::IUnknown {
95+
enum { ID = ID_SHARED_STORAGE_INSPECTOR };
96+
97+
~ISharedStorageInspector() override = default;
98+
99+
struct NamespaceSize {
100+
string ns;
101+
uint32_t size;
102+
};
103+
104+
using ScopeType = ISharedStorage::ScopeType;
105+
using IStringIterator = RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>;
106+
using INamespaceSizeIterator = RPC::IIteratorType<NamespaceSize, ID_SHARED_STORAGE_INSPECTOR_NAMESPACE_SIZE_ITERATOR>;
107+
108+
// @brief Returns the keys that are stored in the specified namespace
109+
// @text getKeys
110+
// @param scope: must be device or account
111+
// @param ns: name space
112+
// @param keys: keys list
113+
// @param success: success
114+
virtual Core::hresult GetKeys(const ScopeType scope, const string& ns /* @text:namespace */, IStringIterator*& keys /* @out */, bool& success /* @out */) = 0;
115+
// @brief Returns the namespaces
116+
// @text getNamespaces
117+
// @param scope: must be device or account
118+
// @param namespaces: namespaces list
119+
// @param success: success
120+
virtual Core::hresult GetNamespaces(const ScopeType scope, IStringIterator*& namespaces /* @out */, bool& success /* @out */) = 0;
121+
// @brief Returns the size occupied by each namespace
122+
// @text getStorageSizes
123+
// @param scope: must be device or account
124+
// @param storageList: list of namespaces and their sizes
125+
// @param success: success
126+
virtual Core::hresult GetStorageSizes(const ScopeType scope, INamespaceSizeIterator*& storageList /* @out */, bool& success /* @out */) = 0;
127+
};
128+
129+
/* @json @text:keep */
130+
struct EXTERNAL ISharedStorageLimit : virtual public Core::IUnknown {
131+
enum { ID = ID_SHARED_STORAGE_LIMIT };
132+
133+
~ISharedStorageLimit() override = default;
134+
135+
using ScopeType = ISharedStorage::ScopeType;
136+
struct StorageLimit {
137+
uint32_t storageLimit;
138+
};
139+
140+
// @brief Sets the storage limit for a given namespace
141+
// @text setNamespaceStorageLimit
142+
// @param scope: must be device or account
143+
// @param ns: name space
144+
// @param storageLimit: size
145+
// @param success: success
146+
virtual Core::hresult SetNamespaceStorageLimit(const ScopeType scope, const string& ns /* @text:namespace */, const uint32_t storageLimit, bool& success /* @out */) = 0;
147+
// @brief Returns the storage limit for a given namespace
148+
// @text getNamespaceStorageLimit
149+
// @param scope: must be device or account
150+
// @param ns: name space
151+
// @param storageLimit: Size in bytes
152+
virtual Core::hresult GetNamespaceStorageLimit(const ScopeType scope, const string& ns /* @text:namespace */, StorageLimit& storageLimit /* @out */) = 0;
153+
};
154+
155+
/* @json @text:keep */
156+
struct EXTERNAL ISharedStorageCache : virtual public Core::IUnknown {
157+
enum { ID = ID_SHARED_STORAGE_CACHE };
158+
159+
// @brief Flushes the device cache
160+
// @text flushCache
161+
virtual Core::hresult FlushCache() = 0;
162+
};
163+
164+
} // namespace Exchange
165+
} // namespace WPEFramework

0 commit comments

Comments
 (0)