Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
15ba2c9
RDKEMW-1008: Add COM-RPC support to AVInput plugin: WIP
pahearn73 Jul 1, 2025
b9e1be0
RDKEMW-1008: Sync'd with develop
pahearn73 Jul 14, 2025
7c67c4b
RDKEMW-1008: Corrected build errors
pahearn73 Jul 14, 2025
a00ea79
RDKEMW-1008: Compiler errors: WIP
pahearn73 Jul 18, 2025
87c701a
RDKEMW-1008: Compiler errors: WIP
pahearn73 Jul 21, 2025
e9fb8ca
RDKEMW-1008: Compiler errors: WIP
pahearn73 Jul 22, 2025
65ce724
RDKEMW-1008: Compiler errors: WIP
pahearn73 Jul 24, 2025
5565a0d
RDKEMW-1008: Compiler errors: WIP
pahearn73 Jul 25, 2025
8f221ca
RDKEMW-1008: Compiler errors: Resolved
pahearn73 Jul 28, 2025
5abd2e8
RDKEMW-1008: Clean-up, adding onDeviceChanged WIP
pahearn73 Jul 28, 2025
d911ff9
RDKEMW-1008: Clean-up, adding onDeviceChanged WIP
pahearn73 Jul 30, 2025
944cbe5
RDKEMW-1008: Clean-up, adding onDeviceChanged WIP
pahearn73 Jul 30, 2025
2bfa954
RDKEMW-1008: Fixed onDeviceChanged: WIP
pahearn73 Jul 31, 2025
0c6546f
RDKEMW-1008: WIP
pahearn73 Aug 5, 2025
723c169
RDKEMW-1008: WIP
pahearn73 Aug 20, 2025
ad05b72
RDKEMW-1008: WIP
pahearn73 Aug 21, 2025
6cfe221
RDKEMW-1008: WIP
pahearn73 Aug 24, 2025
0227325
RDKEMW-1008: WIP
pahearn73 Aug 25, 2025
f55dba1
RDKEMW-1008: WIP
pahearn73 Aug 26, 2025
0902665
Merge branch 'develop' into pahearn_RDKEMW-1008
pahearn73 Aug 26, 2025
9867b00
Restored DeviceInfo.json
pahearn73 Aug 26, 2025
8f08832
Removed debug
pahearn73 Aug 26, 2025
23ae920
Formatting
pahearn73 Aug 26, 2025
293ac13
Formatting
pahearn73 Aug 26, 2025
5a009aa
Merge branch 'develop' into feature/RDKEMW-1008-COM-RPC_support
pahearn73 Sep 4, 2025
c9b5a3f
Formatting
pahearn73 Sep 4, 2025
51f5738
AVInput COM-RPC Support: Updated per PR comments.
pahearn73 Sep 9, 2025
979a54b
Merge branch 'develop' into feature/RDKEMW-1008-COM-RPC_support
pahearn73 Sep 10, 2025
1f058bf
AVInput COM-RPC Support: Fixed GetInputDevices
pahearn73 Sep 10, 2025
93c096d
Merge branch 'develop' into feature/RDKEMW-1008-COM-RPC_support
pahearn73 Sep 10, 2025
1d9fc89
AVInput COM-RPC Support: Aligned repsonses with existing code
pahearn73 Sep 11, 2025
c1c6e1f
AVInput COM-RPC Support: Fixed JSON for responses with only a success…
pahearn73 Sep 14, 2025
d861a89
Merge branch 'develop' into feature/RDKEMW-1008-COM-RPC_support
pahearn73 Sep 14, 2025
f7f1bc7
AVInput COM-RPC Support: Renamed SuccessResult instances
pahearn73 Sep 15, 2025
05edc59
AVInput COM-RPC Support: Refactored OnDevicesChanged to use iterator …
pahearn73 Sep 15, 2025
bbc5e1b
AVInput COM-RPC Support: Sync'd with develop
pahearn73 Sep 15, 2025
0b7f2ff
AVInput COM-RPC Support: Removed debug
pahearn73 Sep 16, 2025
1149f5c
AVInput COM-RPC Support: Rebased
pahearn73 Sep 16, 2025
13935b3
Formatting
pahearn73 Aug 26, 2025
5f50ce4
AVInput COM-RPC Support: Rebased
pahearn73 Sep 16, 2025
627f3aa
AVInput COM-RPC Support: Fixed rebase issue
pahearn73 Sep 16, 2025
36e41e1
AVInput COM-RPC Support: Formatting
pahearn73 Sep 16, 2025
dba53f4
AVInput COM-RPC Support: Rebased DeviceInfo.json
pahearn73 Sep 16, 2025
5fc8cdc
AVInput COM-RPC Support: Fixed rebase issue
pahearn73 Sep 16, 2025
8750576
AVInput COM-RPC Support: Fixed rebase issue
pahearn73 Sep 16, 2025
e5fed14
AVInput COM-RPC Support: Moved #defines to implementation
pahearn73 Sep 16, 2025
3efd4d3
AVInput COM-RPC Support: Removed ContentType
pahearn73 Sep 16, 2025
79b7542
AVInput COM-RPC Support: Unit tests: Fixed setMixerLevels
pahearn73 Sep 17, 2025
8d12821
AVInput COM-RPC Support: Moved getInputDevices out of IAVInput
pahearn73 Sep 17, 2025
8fc7512
Merge branch 'develop' into feature/RDKEMW-1008-COM-RPC_support
pahearn73 Sep 17, 2025
f425ece
AVInput COM-RPC Support: Converted input types in interface to string…
pahearn73 Sep 18, 2025
5e80a47
AVInput COM-RPC Support: Removed debug
pahearn73 Sep 18, 2025
844eab6
AVInput COM-RPC Support: WIP
pahearn73 Sep 19, 2025
0bd452d
AVInput COM-RPC Support: WIP
pahearn73 Sep 19, 2025
4635607
AVInput COM-RPC Support: WIP
pahearn73 Sep 19, 2025
16393b7
AVInput COM-RPC Support: WIP
pahearn73 Sep 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
303 changes: 303 additions & 0 deletions apis/AVInput/IAVInput.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,303 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2025 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");

Check failure on line 7 in apis/AVInput/IAVInput.h

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'apis/AVInput/IAVInput.h' (Match: peridyno/peridyno/0.4.0, 14 lines, url: https://github.com/peridyno/peridyno/archive/refs/tags/v0.4.0.tar.gz, file: src/Framework/Module/Pipeline.h)
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once
#include "Module.h"

// @stubgen:include <com/IIteratorType.h>

#define INPUT_TYPE_ALL "ALL"
#define INPUT_TYPE_HDMI "HDMI"
#define INPUT_TYPE_COMPOSITE "COMPOSITE"

namespace WPEFramework {
namespace Exchange {
/* @json 1.0.0 @text:keep */
struct EXTERNAL IAVInput : virtual public Core::IUnknown {
enum {
ID = ID_AV_INPUT
};

struct InputDevice {
int id /* @brief id */;
string locator /* @brief locator */;
bool connected /* @brief connected */;
};

struct SuccessResult {
bool success /* @brief success */;
};

using IStringIterator = RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>;
using IInputDeviceIterator = RPC::IIteratorType<InputDevice, ID_AV_INPUT_DEVICE_LIST_ITERATOR>;

struct EXTERNAL IDevicesChangedNotification : virtual public Core::IUnknown {
enum {
ID = ID_AV_INPUT_NOTIFICATION_DEVICES_CHANGED
};

// @text onDevicesChanged
// @brief Triggered whenever a new HDMI/Composite device is connected to an HDMI/Composite Input
virtual void OnDevicesChanged(IInputDeviceIterator* const devices) {}
};

// @json:omit
virtual Core::hresult Register(IDevicesChangedNotification* notification) = 0;

// @json:omit
virtual Core::hresult Unregister(IDevicesChangedNotification* notification) = 0;

// @event
struct EXTERNAL ISignalChangedNotification : virtual public Core::IUnknown {
enum {
ID = ID_AV_INPUT_NOTIFICATION_SIGNAL_CHANGED
};

// @text onSignalChanged
// @brief Triggered whenever the signal status changes for an HDMI/Composite Input
// @param id - in - The port identifier for the HDMI/Composite Input
// @param locator - in - A URL corresponding to the HDMI/Composite Input port
// @param signalStatus - in - Signal Status of the HDMI/Composite Input. Valid values are noSignal, unstableSignal, notSupportedSignal, stableSignal
virtual void OnSignalChanged(const int id, const string& locator, const string& signalStatus) { };
};

virtual Core::hresult Register(ISignalChangedNotification* notification) = 0;
virtual Core::hresult Unregister(ISignalChangedNotification* notification) = 0;

// @event
struct EXTERNAL IInputStatusChangedNotification : virtual public Core::IUnknown {
enum {
ID = ID_AV_INPUT_NOTIFICATION_INPUT_STATUS_CHANGED
};

// @text onInputStatusChanged
// @brief Triggered whenever the status changes for an HDMI/Composite Input
// @param id - in - The port identifier for the HDMI/Composite Input
// @param locator - in - A URL corresponding to the HDMI/Composite Input port
// @param status - in - Status of the HDMI/Composite Input. Valid values are started or stopped
// @param plane - in - Defines whether the video plane type, 0 - Primary video plane, 1 - Secondary Video Plane, Other values - Invalid
virtual void OnInputStatusChanged(const int id, const string& locator, const string& status, const int plane) { };
};

virtual Core::hresult Register(IInputStatusChangedNotification* notification) = 0;
virtual Core::hresult Unregister(IInputStatusChangedNotification* notification) = 0;

// @event
struct EXTERNAL IVideoStreamInfoUpdateNotification : virtual public Core::IUnknown {
enum {
ID = ID_AV_INPUT_NOTIFICATION_VIDEO_STREAM_INFO_UPDATE
};

// @text videoStreamInfoUpdate
// @brief Triggered whenever there is an update in HDMI/Composite Input video stream info
// @param id - in - The port identifier for the HDMI/Composite Input
// @param locator - in - A URL corresponding to the HDMI/Composite Input port
// @param width - in - Width of the Video Stream
// @param height - in - Height of the Video Stream
// @param progressive - in - Whether the Video Stream is progressive or not
// @param frameRateN - in - FrameRate Numerator
// @param frameRateD - in - FrameRate Denominator
virtual void VideoStreamInfoUpdate(const int id, const string& locator, const int width, const int height, const bool progressive, const int frameRateN, const int frameRateD) { };
};

virtual Core::hresult Register(IVideoStreamInfoUpdateNotification* notification) = 0;
virtual Core::hresult Unregister(IVideoStreamInfoUpdateNotification* notification) = 0;

// @event
struct EXTERNAL IGameFeatureStatusUpdateNotification : virtual public Core::IUnknown {
enum {
ID = ID_AV_INPUT_NOTIFICATION_GAME_FEATURE_STATUS_UPDATE
};

// @text gameFeatureStatusUpdate
// @brief Triggered whenever game feature(ALLM) status changes for an HDMI Input
// @param id - in - The port identifier for the HDMI Input
// @param gameFeature - in - Game Feature to which current status requested
// @param mode - in - The current game feature status. Mode is required only for ALLM. Need to add support for future game features
virtual void GameFeatureStatusUpdate(const int id, const string& gameFeature, const bool mode) { };
};

virtual Core::hresult Register(IGameFeatureStatusUpdateNotification* notification) = 0;
virtual Core::hresult Unregister(IGameFeatureStatusUpdateNotification* notification) = 0;

// @event
struct EXTERNAL IHdmiContentTypeUpdateNotification : virtual public Core::IUnknown {
enum {
ID = ID_AV_INPUT_NOTIFICATION_HDMI_CONTENT_TYPE_UPDATE
};

// @text hdmiContentTypeUpdate
// @brief Triggered whenever AV Infoframe content type changes for an HDMI Input
// @param id - in - Hdmi Input port ID for which content type change event received and possible values are port id 0, 1 and 2 for three Hdmi Input ports
// @param aviContentType - in - new Content type received for the active hdmi input port and the possible integer values indicates following accordingly 0 - Graphics, 1 - Photo, 2 - Cinema, 3 - Game, 4 - Invalid data
virtual void HdmiContentTypeUpdate(const int id, const int aviContentType) { };
};

virtual Core::hresult Register(IHdmiContentTypeUpdateNotification* notification) = 0;
virtual Core::hresult Unregister(IHdmiContentTypeUpdateNotification* notification) = 0;

// @text numberOfInputs
// @brief Returns an integer that specifies the number of available inputs
// @param numberOfInputs - out - The number of inputs that are available for selection
// @param success - out - Whether the request succeeded
virtual Core::hresult NumberOfInputs(uint32_t& numberOfInputs /* @out */, bool& success /* @out */) = 0;

// @text writeEDID
// @brief Changes a current EDID value.
// @param portId - in - An ID of an HDMI/Composite Input port as returned by the getInputDevices method
// @param message - in - A new EDID value
// @param success - out - Whether the request succeeded
virtual Core::hresult WriteEDID(const string& portId, const string& message, SuccessResult& successResult /* @out */) = 0;

// @text readEDID
// @brief Returns the current EDID value.
// @param portId - in - An ID of an HDMI/Composite Input port as returned by the getInputDevices method
// @param EDID - out - The EDID Value
// @param success - out - Whether the request succeeded
virtual Core::hresult ReadEDID(const string& portId, string& EDID /* @out */, bool& success /* @out */) = 0;

// @text getRawSPD
// @brief Returns the Source Data Product Descriptor (SPD) infoFrame packet information for the specified HDMI Input device as raw bits
// @param portId - in - An ID of an HDMI/Composite Input port as returned by the getInputDevices method
// @param HDMISPD - out - The SPD information as raw bits
// @param success - out - Whether the request succeeded
virtual Core::hresult GetRawSPD(const string& portId, string& HDMISPD /* @out */, bool& success /* @out */) = 0;

// @text getSPD
// @brief Returns the Source Data Product Descriptor (SPD) infoFrame packet information for the specified HDMI Input device
// @param portId - in - An ID of an HDMI/Composite Input port as returned by the getInputDevices method
// @param HDMISPD - out - The SPD information
// @param success - out - Whether the request succeeded
virtual Core::hresult GetSPD(const string& portId, string& HDMISPD /* @out */, bool& success /* @out */) = 0;

// @text setEdidVersion
// @brief Sets an HDMI EDID version
// @param portId - in - An ID of an HDMI/Composite Input port as returned by the getInputDevices method
// @param edidVersion - in - The EDID version
// @param success - out - Whether the request succeeded
virtual Core::hresult SetEdidVersion(const string& portId, const string& edidVersion, SuccessResult& successResult /* @out */) = 0;

// @text getEdidVersion
// @brief Returns the EDID version
// @param portId - in - An ID of an HDMI/Composite Input port as returned by the getInputDevices method
// @param edidVersion - out - The EDID version
// @param success - out - Whether the request succeeded
virtual Core::hresult GetEdidVersion(const string& portId, string& edidVersion /* @out */, bool& success /* @out */) = 0;

// @text setEdid2AllmSupport
// @brief Sets an HDMI ALLM bit in EDID.
// @param portId - in - An ID of an HDMI/Composite Input port as returned by the getInputDevices method
// @param allmSupport - in - The ALLM support in EDID
// @param success - out - Whether the request succeeded
virtual Core::hresult SetEdid2AllmSupport(const string& portId, const bool allmSupport, SuccessResult& successResult /* @out */) = 0;

// @text getEdid2AllmSupport
// @brief Returns the ALLM bit in EDID
// @param portId - in - The ID of the input device to get the ALLM
// @param allmSupport - out - The ALLM bit value in edid
// @param success - out - Whether the request succeeded
virtual Core::hresult GetEdid2AllmSupport(const string& portId, bool& allmSupport /* @out */, bool& success /* @out */) = 0;

// @text setVRRSupport
// @brief Sets an HDMI VRR support bit in EDID
// @param id - in - The ID of the input device to set the VRR
// @param vrrSupport - in - The VRR support bit value to set
virtual Core::hresult SetVRRSupport(const string& portId, const bool vrrSupport, SuccessResult& successResult /* @out */) = 0;

// @text getVRRSupport
// @brief Returns the VRR support bit in EDID
// @param id - in - The ID of the input device to get the VRR
// @param vrrSupport - out - The VRR support bit value
virtual Core::hresult GetVRRSupport(const string& portId, bool& vrrSupport /* @out */, bool& success /* @out */) = 0;

// @text getHdmiVersion
// @brief Gets the maximum hdmi compatibility version supported for the given port.
// @param portId - in - An ID of an HDMI/Composite Input port as returned by the getInputDevices method
// @param HdmiCapabilityVersion - out - The Maximum Hdmi compatibility version supported by the given port
// @param success - out - Whether the request succeeded
virtual Core::hresult GetHdmiVersion(const string& portId, string& HdmiCapabilityVersion /* @out */, bool& success /* @out */) = 0;

// @text setMixerLevels
// @brief Sets the audio mixer level for given audio input.
// @param primaryVolume - in - Primary audio input volume
// @param inputVolume - in - System audio input volume
// @param success - out - Whether the request succeeded
virtual Core::hresult SetMixerLevels(const int primaryVolume, const int inputVolume, SuccessResult& successResult /* @out */) = 0;

// @text startInput
// @brief Activates the specified HDMI/Composite Input port as the primary video source.
// @param portId - in - An ID of an HDMI/Composite Input port as returned by the getInputDevices method
// @param typeOfInput - in - The type of Input - HDMI/COMPOSITE
// @param requestAudioMix - in - Defines whether the Audio mixing is true or false, This is an optional argument
// @param plane - in - Defines whether the video plane type, 0 - Primary video plane, 1 - Secondary Video Plane, Other values - Invalid - This is an optional argument
// @param topMost - in - Defines whether the Hdmi Input should be over or under the other video plane
// @param success - out - Whether the request succeeded
virtual Core::hresult StartInput(const string& portId, const string& typeOfInput, const bool requestAudioMix, const int plane, const bool topMost, SuccessResult& successResult /* @out */) = 0;

// @text stopInput
// @brief Deactivates the HDMI/Composite Input port currently selected as the primary video source.
// @param typeOfInput - in - The type of Input - HDMI/COMPOSITE
// @param success - out - Whether the request succeeded
virtual Core::hresult StopInput(const string& typeOfInput, SuccessResult& successResult /* @out */) = 0;

// @text setVideoRectangle
// @brief Sets an HDMI/Composite Input video window.
// @param x - in - The x-coordinate of the video rectangle
// @param y - in - The y-coordinate of the video rectangle
// @param w - in - The width of the video rectangle
// @param h - in - The height of the video rectangle
// @param typeOfInput - in - The type of Input - HDMI/COMPOSITE
// @param success - out - Whether the request succeeded
virtual Core::hresult SetVideoRectangle(const uint16_t x, const uint16_t y, const uint16_t w, const uint16_t h, const string& typeOfInput, SuccessResult& successResult /* @out */) = 0;

// @text currentVideoMode
// @brief Returns the current video mode for the specified input device
// @param currentVideoMode - out - The current video mode
// @param success - out - Whether the request succeeded
virtual Core::hresult CurrentVideoMode(string& currentVideoMode /* @out */, bool& success /* @out */) = 0;

// @text contentProtected
// @brief Returns whether the content is protected for the specified input device
// @param isContentProtected - out - Whether the HDMI input is protected
// @param success - out - Whether the request succeeded
virtual Core::hresult ContentProtected(bool& isContentProtected /* @out */, bool& success /* @out */) = 0;

// @text getSupportedGameFeatures
// @brief Returns the list of supported game features.
// @param supportedGameFeatures - out - The supported game Features
// @param success - out - Whether the request succeeded
virtual Core::hresult GetSupportedGameFeatures(Exchange::IAVInput::IStringIterator*& supportedGameFeatures /* @out */, bool& success /* @out */) = 0;

// @text getGameFeatureStatus
// @brief Returns the Game Feature Status. For example: ALLM.
// @param portId - in - An ID of an HDMI Input port as returned by the getInputDevices method
// @param gameFeature - in - Game Feature to which current status requested
// @param mode - out - The current game feature status. Mode is required only for ALLM. Need to add support for future game features
// @param success - out - Whether the request succeeded
virtual Core::hresult GetGameFeatureStatus(const string& portId, const string& gameFeature, bool& mode /* @out */, bool& success /* @out */) = 0;

// @text getVRRFrameRate
// @brief Returns the current VRR frame rate for the specified input device
// @param portId - in - An ID of an HDMI Input port as returned by the getInputDevices method
// @param currentVRRVideoFrameRate - out - The current VRR frame rate
// @param success - out - Whether the request succeeded
virtual Core::hresult GetVRRFrameRate(const string& portId, double& currentVRRVideoFrameRate /* @out */, bool& success /* @out */) = 0;
};
} // namespace Exchange
} // namespace WPEFramework
19 changes: 15 additions & 4 deletions apis/Ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,18 @@ namespace Exchange {

ID_FRONT_PANEL = ID_ENTOS_OFFSET + 0x3E0,
ID_FRONT_PANEL_LIGHTS_LIST_ITERATOR = ID_FRONT_PANEL + 1,
ID_FRONT_PANEL_BLINK_INFO_LIST_ITERATOR = ID_FRONT_PANEL + 2
};
}
}
ID_FRONT_PANEL_BLINK_INFO_LIST_ITERATOR = ID_FRONT_PANEL + 2,

ID_AV_INPUT = ID_ENTOS_OFFSET + 0x3F0,
ID_AV_INPUT_NOTIFICATION_DEVICES_CHANGED = ID_AV_INPUT + 1,
ID_AV_INPUT_NOTIFICATION_SIGNAL_CHANGED = ID_AV_INPUT + 2,
ID_AV_INPUT_NOTIFICATION_INPUT_STATUS_CHANGED = ID_AV_INPUT + 3,
ID_AV_INPUT_NOTIFICATION_VIDEO_STREAM_INFO_UPDATE = ID_AV_INPUT + 4,
ID_AV_INPUT_NOTIFICATION_GAME_FEATURE_STATUS_UPDATE = ID_AV_INPUT + 5,
ID_AV_INPUT_NOTIFICATION_HDMI_CONTENT_TYPE_UPDATE = ID_AV_INPUT + 6,
ID_AV_INPUT_DEVICE_LIST_ITERATOR = ID_AV_INPUT + 7

}; // enum IDS

} // namespace Exchange
} // namespace WPEFramework
Loading