Skip to content

Commit 958f072

Browse files
authored
Merge pull request #438 from rdkcentral/feature/RDKEMW-6331
RDKEMW-6331 : Fix HdmiCecSink COM-RPC issues
2 parents 0ed0803 + d752936 commit 958f072

File tree

2 files changed

+129
-54
lines changed

2 files changed

+129
-54
lines changed

apis/HdmiCecSink/IHdmiCecSink.h

Lines changed: 58 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,29 @@
2727
{
2828
namespace Exchange
2929
{
30-
// @json @text:keep
30+
/* @json 1.0.0 @text:keep */
3131
struct EXTERNAL IHdmiCecSink : virtual public Core::IUnknown {
3232
enum { ID = ID_HDMI_CEC_SINK };
3333

34-
struct HdmiCecSinkActivePath
34+
struct EXTERNAL HdmiCecSinkActivePath
3535
{
36-
uint8_t logicalAddress; /* @text logical address*/
37-
string physicalAddress; /* @text physical address*/
38-
string deviceType; /* @text device type*/
39-
string vendorID; /* @text vendor id*/
40-
string osdName; /* @text osd name*/
36+
uint8_t logicalAddress;
37+
string physicalAddress;
38+
string deviceType;
39+
string vendorID;
40+
string osdName;
4141
};
4242

43-
struct HdmiCecSinkDevices
43+
struct EXTERNAL HdmiCecSinkDevices
4444
{
45-
uint8_t logicalAddress; /* @text logical address*/
46-
string physicalAddress; /* @text physical address*/
47-
string deviceType; /* @text device type*/
48-
string cecVersion; /* @text cec version*/
49-
string osdName; /* @text osd name*/
50-
string vendorID; /* @text vendor id*/
51-
string powerStatus; /* @text power status*/
52-
string portNumber; /* @text port number*/
45+
uint8_t logicalAddress;
46+
string physicalAddress;
47+
string deviceType;
48+
string cecVersion;
49+
string osdName;
50+
string vendorID;
51+
string powerStatus;
52+
string portNumber;
5353
};
5454

5555
struct EXTERNAL HdmiCecSinkSuccess {
@@ -67,84 +67,84 @@
6767

6868
// @brief Triggered when routing though the HDMI ARC port is successfully established.
6969
// @text arcInitiationEvent
70-
// @param success: Is the operation successful or not
71-
virtual void ArcInitiationEvent(const string success /* @in */) {};
70+
// @param status: Is the operation successful or not
71+
virtual void ArcInitiationEvent(const string status) {};
7272

7373
// @brief Triggered when routing though the HDMI ARC port terminates.
7474
// @text arcTerminationEvent
75-
// @param success: Is the operation successful or not
76-
virtual void ArcTerminationEvent(const string success /* @in */) {};
75+
// @param status: Is the operation successful or not
76+
virtual void ArcTerminationEvent(const string status) {};
7777

7878
// @brief Triggered when the active source device changes.
7979
// @text onActiveSourceChange
8080
// @param logicalAddress: Logical address of the active source
8181
// @param physicalAddress: Physical address of the active source
82-
virtual void OnActiveSourceChange(const int logicalAddress /* @in */, const string physicalAddress /* @in */) {};
82+
virtual void OnActiveSourceChange(const int logicalAddress, const string physicalAddress) {};
8383

8484
// @brief Triggered when a new device is added to the CEC network.
8585
// @text onDeviceAdded
8686
// @param logicalAddress: Logical address of the added device
87-
virtual void OnDeviceAdded(const int logicalAddress /* @in */) {};
87+
virtual void OnDeviceAdded(const int logicalAddress) {};
8888

8989
// @brief Triggered when device information changes.
9090
// @text onDeviceInfoUpdated
9191
// @param logicalAddress: Logical address of the device
92-
virtual void OnDeviceInfoUpdated(const int logicalAddress /* @in */) {};
92+
virtual void OnDeviceInfoUpdated(const int logicalAddress) {};
9393

9494
// @brief Triggered when a device is removed from the CEC network.
9595
// @text onDeviceRemoved
9696
// @param logicalAddress: Logical address of the removed device
97-
virtual void OnDeviceRemoved(const int logicalAddress /* @in */) {};
97+
virtual void OnDeviceRemoved(const int logicalAddress) {};
9898

9999
// @brief Triggered when an <Image View ON> CEC message is received from the source device.
100100
// @text onImageViewOnMsg
101101
// @param logicalAddress: Logical address of the device
102-
virtual void OnImageViewOnMsg(const int logicalAddress /* @in */) {};
102+
virtual void OnImageViewOnMsg(const int logicalAddress) {};
103103

104104
// @brief Triggered when the source is no longer active.
105105
// @text onInActiveSource
106106
// @param logicalAddress: Logical address of the source
107107
// @param physicalAddress: Physical address of the source
108-
virtual void OnInActiveSource(const int logicalAddress /* @in */, const string physicalAddress /* @in */) {};
108+
virtual void OnInActiveSource(const int logicalAddress, const string physicalAddress) {};
109109

110110
// @brief Triggered when a <Text View ON> CEC message is received from the source device.
111111
// @text onTextViewOnMsg
112112
// @param logicalAddress: Logical address of the device
113-
virtual void OnTextViewOnMsg(const int logicalAddress /* @in */) {};
113+
virtual void OnTextViewOnMsg(const int logicalAddress) {};
114114

115115
// @brief Triggered when the TV is in standby mode and it receives <Image View ON>/ <Text View ON>/ <Active Source> CEC message from the connected source device.
116116
// @text onWakeupFromStandby
117117
// @param logicalAddress: Logical address of the device
118-
virtual void OnWakeupFromStandby(const int logicalAddress /* @in */) {};
118+
virtual void OnWakeupFromStandby(const int logicalAddress) {};
119119

120120
// @brief Triggered when an audio device is added or removed.
121121
// @text reportAudioDeviceConnectedStatus
122122
// @param status: Status of the audio device
123123
// @param audioDeviceConnected: Audio device connected or not
124-
virtual void ReportAudioDeviceConnectedStatus(const string status /* @in */, const string audioDeviceConnected /* @in */) {};
124+
virtual void ReportAudioDeviceConnectedStatus(const string status, const string audioDeviceConnected) {};
125125

126126
// @brief Triggered when CEC <Report Audio Status> message of device is received.
127127
// @text reportAudioStatusEvent
128128
// @param muteStatus: Mute status of the device
129129
// @param volumeLevel: Volume level of the device
130-
virtual void ReportAudioStatusEvent(const int muteStatus /* @in */, const int volumeLevel /* @in */) {};
130+
virtual void ReportAudioStatusEvent(const int muteStatus, const int volumeLevel) {};
131131

132132
// @brief Triggered when CEC <Feature Abort> message of device is received.
133133
// @text reportFeatureAbortEvent
134134
// @param logicalAddress: Logical address of the device
135135
// @param opcode: Opcode of the message
136136
// @param FeatureAbortReason: Reason for the feature abort
137-
virtual void ReportFeatureAbortEvent(const int logicalAddress /* @in */, const int opcode /* @in */, const int FeatureAbortReason /* @in */) {};
137+
virtual void ReportFeatureAbortEvent(const int logicalAddress, const int opcode, const int FeatureAbortReason) {};
138138

139139
// @brief Triggered when the HDMI-CEC is enabled.
140140
// @text reportCecEnabledEvent
141141
// @param cecEnable: HDMI-CEC enabled or not
142-
virtual void ReportCecEnabledEvent(const string cecEnable /* @in */) {};
142+
virtual void ReportCecEnabledEvent(const string cecEnable) {};
143143

144144
// @brief Triggered when CEC <Set System Audio Mode> message of device is received.
145145
// @text setSystemAudioModeEvent
146146
// @param audioMode: Audio mode of the device
147-
virtual void SetSystemAudioModeEvent(const string audioMode /* @in */) {};
147+
virtual void SetSystemAudioModeEvent(const string audioMode) {};
148148

149149
// @brief Triggered when SAD is received from the connected audio device. See requestShortAudioDescriptor.
150150
// @text shortAudiodescriptorEvent
@@ -154,12 +154,12 @@
154154
// @brief Triggered when the source device changes status to STANDBY.
155155
// @text standbyMessageReceived
156156
// @param logicalAddress: Logical address of the device
157-
virtual void StandbyMessageReceived(const int logicalAddress /* @in */) {};
157+
virtual void StandbyMessageReceived(const int logicalAddress) {};
158158

159159
// @brief Triggered when the source device changes.
160160
// @text reportAudioDevicePowerStatus
161161
// @param powerStatus: Power status of the device
162-
virtual void ReportAudioDevicePowerStatus(const int powerStatus /* @in */) {};
162+
virtual void ReportAudioDevicePowerStatus(const int powerStatus) {};
163163

164164

165165
};
@@ -233,95 +233,95 @@
233233
// @brief Request the active source in the network
234234
// @text requestActiveSource
235235
// @param success: Is the operation successful or not
236-
virtual Core::hresult RequestActiveSource(HdmiCecSinkSuccess &success /* @out */) = 0;
236+
virtual Core::hresult RequestActiveSource(HdmiCecSinkSuccess &successResult /* @out */) = 0;
237237

238238
// @brief Sends the CEC Request Short Audio Descriptor (SAD) message as an
239239
// @text requestShortAudioDescriptor
240240
// @param success: Is the operation successful or not
241-
virtual Core::hresult RequestShortAudioDescriptor(HdmiCecSinkSuccess &success /* @out */) = 0;
241+
virtual Core::hresult RequestShortAudioDescriptor(HdmiCecSinkSuccess &successResult /* @out */) = 0;
242242

243243
// @brief This message is used to power on the connected audio device. Usually sent by the TV when it comes out of standby and detects audio device connected in the network.
244244
// @text sendAudioDevicePowerOnMessage
245245
// @param success: Is the operation successful or not
246-
virtual Core::hresult SendAudioDevicePowerOnMessage(HdmiCecSinkSuccess &success /* @out */) = 0;
246+
virtual Core::hresult SendAudioDevicePowerOnMessage(HdmiCecSinkSuccess &successResult /* @out */) = 0;
247247

248248
// @brief Sends the CEC <Give Audio Status> message to request the audio status.
249249
// @text sendGetAudioStatusMessage
250250
// @param success: Is the operation successful or not
251-
virtual Core::hresult SendGetAudioStatusMessage(HdmiCecSinkSuccess &success /* @out */) = 0;
251+
virtual Core::hresult SendGetAudioStatusMessage(HdmiCecSinkSuccess &successResult /* @out */) = 0;
252252

253253
// @brief Sends the CEC <User Control Pressed> message when TV remote key is pressed.
254254
// @text sendKeyPressEvent
255255
// @param logicalAddress: Logical address of the device
256256
// @param keyCode: Key code of the key press event
257257
// @param success: Is the operation successful or not
258-
virtual Core::hresult SendKeyPressEvent(const uint32_t &logicalAddress /* @in */, const uint32_t &keyCode /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
258+
virtual Core::hresult SendKeyPressEvent(const uint32_t &logicalAddress /* @in */, const uint32_t &keyCode /* @in */, HdmiCecSinkSuccess &successResult /* @out */) = 0;
259259

260260
// @brief Sends the CEC <User Control Pressed> message when TV remote key is pressed.
261261
// @text sendUserControlPressed
262262
// @param logicalAddress: Logical address of the device
263263
// @param keyCode: Key code of the key press event
264264
// @param success: Is the operation successful or not
265-
virtual Core::hresult SendUserControlPressed(const uint32_t &logicalAddress /* @in */, const uint32_t &keyCode /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
265+
virtual Core::hresult SendUserControlPressed(const uint32_t &logicalAddress /* @in */, const uint32_t &keyCode /* @in */, HdmiCecSinkSuccess &successResult /* @out */) = 0;
266266

267267
// @brief Sends the CEC <User Control Released> message when TV remote key is released.
268268
// @text sendUserControlReleased
269269
// @param logicalAddress: Logical address of the device
270270
// @param success: Is the operation successful or not
271-
virtual Core::hresult SendUserControlReleased(const uint32_t &logicalAddress /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
271+
virtual Core::hresult SendUserControlReleased(const uint32_t &logicalAddress /* @in */, HdmiCecSinkSuccess &successResult /* @out */) = 0;
272272

273273
// @brief Sends the CEC <Standby> message to another CEC device
274274
// @text sendStandbyMessage
275275
// @param success: Is the operation successful or not
276-
virtual Core::hresult SendStandbyMessage(HdmiCecSinkSuccess &success /* @out */) = 0;
276+
virtual Core::hresult SendStandbyMessage(HdmiCecSinkSuccess &successResult /* @out */) = 0;
277277

278278
// @brief Sets the source device to active (setStreamPath). The source wakes from standby if it’s in the standby state.
279279
// @text setActivePath
280280
// @param activePath: Active path of the device
281281
// @param success: Is the operation successful or not
282-
virtual Core::hresult SetActivePath(const string &activePath /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
282+
virtual Core::hresult SetActivePath(const string &activePath /* @in */, HdmiCecSinkSuccess &successResult /* @out */) = 0;
283283

284284
// @brief Sets the current active source as TV (physical address 0.0.0.0). This call needs to be made when the TV switches to internal tuner or any apps.
285285
// @text setActiveSource
286286
// @param success: Is the operation successful or not
287-
virtual Core::hresult SetActiveSource(HdmiCecSinkSuccess &success /* @out */) = 0;
287+
virtual Core::hresult SetActiveSource(HdmiCecSinkSuccess &successResult /* @out */) = 0;
288288

289289
// @brief Sets the status of the HDMI CEC Sink
290290
// @text setEnabled
291291
// @param enabled: Is the HDMI CEC Sink enabled or not
292292
// @param success: Is the operation successful or not
293-
virtual Core::hresult SetEnabled(const bool &enabled /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
293+
virtual Core::hresult SetEnabled(const bool &enabled /* @in */, HdmiCecSinkSuccess &successResult /* @out */) = 0;
294294

295295
// @brief Updates the internal data structure with the new menu Language and also broadcasts the <Set Menu Language> CEC message.
296296
// @text setMenuLanguage
297297
// @param language: Menu language to be set
298298
// @param success: Is the operation successful or not
299-
virtual Core::hresult SetMenuLanguage(const string &language /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
299+
virtual Core::hresult SetMenuLanguage(const string &language /* @in */, HdmiCecSinkSuccess &successResult /* @out */) = 0;
300300

301301
// @brief Sets the OSD name of the HDMI CEC Sink
302302
// @text setOSDName
303303
// @param osdName: OSD name of the HDMI CEC Sink
304304
// @param success: Is the operation successful or not
305-
virtual Core::hresult SetOSDName(const string &name /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
305+
virtual Core::hresult SetOSDName(const string &name /* @in */, HdmiCecSinkSuccess &successResult /* @out */) = 0;
306306

307307
// @brief Changes routing while switching between HDMI inputs and TV.
308308
// @text setRoutingChange
309309
// @param oldPort: Old port number
310310
// @param newPort: New port number
311311
// @param success: Is the operation successful or not
312-
virtual Core::hresult SetRoutingChange(const string &oldPort /* @in */, const string &newPort /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
312+
virtual Core::hresult SetRoutingChange(const string &oldPort /* @in */, const string &newPort /* @in */, HdmiCecSinkSuccess &successResult /* @out */) = 0;
313313

314314
// @brief Enable (or disable) HDMI-CEC Audio Return Channel (ARC) routing. Upon enabling, triggers arcInitiationEvent and upon disabling, triggers arcTerminationEvent.
315315
// @text setupARCRouting
316316
// @param enabled: Is the HDMI-CEC ARC routing enabled or not
317317
// @param success: Is the operation successful or not
318-
virtual Core::hresult SetupARCRouting(const bool &enabled /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
318+
virtual Core::hresult SetupARCRouting(const bool &enabled /* @in */, HdmiCecSinkSuccess &successResult /* @out */) = 0;
319319

320320
// @brief Sets the vendor ID of the HDMI CEC Sink
321321
// @text setVendorId
322322
// @param vendorId: Vendor ID of the HDMI CEC Sink
323323
// @param success: Is the operation successful or not
324-
virtual Core::hresult SetVendorId(const string &vendorid /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
324+
virtual Core::hresult SetVendorId(const string &vendorid /* @in */, HdmiCecSinkSuccess &successResult /* @out */) = 0;
325325

326326
// @brief Sets the Current Latency Values such as Video Latency, Latency Flags,Audio Output Compensated value and Audio Output Delay by sending <Report Current Latency> message for Dynamic Auto LipSync Feature.
327327
// @text setLatencyInfo
@@ -330,10 +330,14 @@
330330
// @param audioOutputCompensated: Audio Output Compensated value
331331
// @param audioOutputDelay: Audio Output Delay value
332332
// @param success: Is the operation successful or not
333-
virtual Core::hresult SetLatencyInfo(const string &videoLatency /* @in */, const string &lowLatencyMode /* @in */, const string &audioOutputCompensated /* @in */, const string &audioOutputDelay /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
333+
virtual Core::hresult SetLatencyInfo(const string &videoLatency /* @in */, const string &lowLatencyMode /* @in */, const string &audioOutputCompensated /* @in */, const string &audioOutputDelay /* @in */, HdmiCecSinkSuccess &successResult /* @out */) = 0;
334334

335-
};
335+
// @brief Requests the audio device power status.
336+
// @text requestAudioDevicePowerStatus
337+
// @param success: Is the operation successful or not
338+
virtual Core::hresult RequestAudioDevicePowerStatus(HdmiCecSinkSuccess &successResult /* @out */) = 0;
336339

340+
};
337341
} // namespace Exchange
338342
} // namespace WPEFramework
339-
343+

0 commit comments

Comments
 (0)