-
Notifications
You must be signed in to change notification settings - Fork 14
RDKEMW-1008: Add COM-RPC support to AVInput plugin #480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 24 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
15ba2c9
RDKEMW-1008: Add COM-RPC support to AVInput plugin: WIP
pahearn73 b9e1be0
RDKEMW-1008: Sync'd with develop
pahearn73 7c67c4b
RDKEMW-1008: Corrected build errors
pahearn73 a00ea79
RDKEMW-1008: Compiler errors: WIP
pahearn73 87c701a
RDKEMW-1008: Compiler errors: WIP
pahearn73 e9fb8ca
RDKEMW-1008: Compiler errors: WIP
pahearn73 65ce724
RDKEMW-1008: Compiler errors: WIP
pahearn73 5565a0d
RDKEMW-1008: Compiler errors: WIP
pahearn73 8f221ca
RDKEMW-1008: Compiler errors: Resolved
pahearn73 5abd2e8
RDKEMW-1008: Clean-up, adding onDeviceChanged WIP
pahearn73 d911ff9
RDKEMW-1008: Clean-up, adding onDeviceChanged WIP
pahearn73 944cbe5
RDKEMW-1008: Clean-up, adding onDeviceChanged WIP
pahearn73 2bfa954
RDKEMW-1008: Fixed onDeviceChanged: WIP
pahearn73 0c6546f
RDKEMW-1008: WIP
pahearn73 723c169
RDKEMW-1008: WIP
pahearn73 ad05b72
RDKEMW-1008: WIP
pahearn73 6cfe221
RDKEMW-1008: WIP
pahearn73 0227325
RDKEMW-1008: WIP
pahearn73 f55dba1
RDKEMW-1008: WIP
pahearn73 0902665
Merge branch 'develop' into pahearn_RDKEMW-1008
pahearn73 9867b00
Restored DeviceInfo.json
pahearn73 8f08832
Removed debug
pahearn73 23ae920
Formatting
pahearn73 293ac13
Formatting
pahearn73 5a009aa
Merge branch 'develop' into feature/RDKEMW-1008-COM-RPC_support
pahearn73 c9b5a3f
Formatting
pahearn73 51f5738
AVInput COM-RPC Support: Updated per PR comments.
pahearn73 979a54b
Merge branch 'develop' into feature/RDKEMW-1008-COM-RPC_support
pahearn73 1f058bf
AVInput COM-RPC Support: Fixed GetInputDevices
pahearn73 93c096d
Merge branch 'develop' into feature/RDKEMW-1008-COM-RPC_support
pahearn73 1d9fc89
AVInput COM-RPC Support: Aligned repsonses with existing code
pahearn73 c1c6e1f
AVInput COM-RPC Support: Fixed JSON for responses with only a success…
pahearn73 d861a89
Merge branch 'develop' into feature/RDKEMW-1008-COM-RPC_support
pahearn73 f7f1bc7
AVInput COM-RPC Support: Renamed SuccessResult instances
pahearn73 05edc59
AVInput COM-RPC Support: Refactored OnDevicesChanged to use iterator …
pahearn73 bbc5e1b
AVInput COM-RPC Support: Sync'd with develop
pahearn73 0b7f2ff
AVInput COM-RPC Support: Removed debug
pahearn73 1149f5c
AVInput COM-RPC Support: Rebased
pahearn73 13935b3
Formatting
pahearn73 5f50ce4
AVInput COM-RPC Support: Rebased
pahearn73 627f3aa
AVInput COM-RPC Support: Fixed rebase issue
pahearn73 36e41e1
AVInput COM-RPC Support: Formatting
pahearn73 dba53f4
AVInput COM-RPC Support: Rebased DeviceInfo.json
pahearn73 5fc8cdc
AVInput COM-RPC Support: Fixed rebase issue
pahearn73 8750576
AVInput COM-RPC Support: Fixed rebase issue
pahearn73 e5fed14
AVInput COM-RPC Support: Moved #defines to implementation
pahearn73 3efd4d3
AVInput COM-RPC Support: Removed ContentType
pahearn73 79b7542
AVInput COM-RPC Support: Unit tests: Fixed setMixerLevels
pahearn73 8d12821
AVInput COM-RPC Support: Moved getInputDevices out of IAVInput
pahearn73 8fc7512
Merge branch 'develop' into feature/RDKEMW-1008-COM-RPC_support
pahearn73 f425ece
AVInput COM-RPC Support: Converted input types in interface to string…
pahearn73 5e80a47
AVInput COM-RPC Support: Removed debug
pahearn73 844eab6
AVInput COM-RPC Support: WIP
pahearn73 0bd452d
AVInput COM-RPC Support: WIP
pahearn73 4635607
AVInput COM-RPC Support: WIP
pahearn73 16393b7
AVInput COM-RPC Support: WIP
pahearn73 dfc88a9
AVInput COM-RPC Support: WIP
pahearn73 74f16c2
AVInput COM-RPC Support: Renamed HdmiContentTypeUpdate --> AviContent…
pahearn73 db7735d
Merge branch 'develop' into feature/RDKEMW-1008-COM-RPC_support
pahearn73 6f8ca01
AVInput COM-RPC Support: Sync'd with develop
pahearn73 1a35c90
AVInput COM-RPC Support: Updated documentaion to reflect existing cod…
pahearn73 0128eae
Merge branch 'develop' into feature/RDKEMW-1008-COM-RPC_support
pahearn73 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,301 @@ | ||
/* | ||
* 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
|
||
* 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 HDMI 0 | ||
#define COMPOSITE 1 | ||
|
||
namespace WPEFramework { | ||
namespace Exchange { | ||
/* @json 1.0.0 @text:keep */ | ||
struct EXTERNAL IAVInput : virtual public Core::IUnknown { | ||
enum { | ||
ID = ID_AV_INPUT | ||
}; | ||
|
||
struct MixerLevels { | ||
int primaryVolume; | ||
int playerVolume; | ||
}; | ||
|
||
struct InputSignalInfo { | ||
int id; | ||
string locator; | ||
string status; | ||
}; | ||
|
||
struct InputStatus { | ||
InputSignalInfo info; | ||
int plane; | ||
}; | ||
|
||
struct InputVideoMode { | ||
int id; | ||
string locator; | ||
uint32_t width; | ||
uint32_t height; | ||
bool progressive; | ||
uint32_t frameRateN; | ||
uint32_t frameRateD; | ||
}; | ||
|
||
struct GameFeatureStatus { | ||
int id; | ||
string gameFeature; | ||
bool allmMode; | ||
}; | ||
|
||
struct InputDevice { | ||
int id /* @text id */; | ||
string locator /* @text locator */; | ||
bool connected /* @text connected */; | ||
}; | ||
|
||
struct ContentInfo { | ||
int id; | ||
int contentType; | ||
}; | ||
|
||
using IStringIterator = RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>; | ||
using IInputDeviceIterator = RPC::IIteratorType<InputDevice, ID_AV_INPUT_DEVICE_LIST_ITERATOR>; | ||
|
||
// @event | ||
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 | ||
// @param devices - in - List of input devices in JSON format | ||
virtual void OnDevicesChanged(const string& devices) { }; // Thunder does not currently support iterators as a notification parameter | ||
pahearn73 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
}; | ||
|
||
virtual Core::hresult Register(IDevicesChangedNotification* notification /* @in */) = 0; | ||
pahearn73 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
virtual Core::hresult Unregister(IDevicesChangedNotification* notification /* @in */) = 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 info - in - The new signal information of the input device | ||
virtual void OnSignalChanged(const Exchange::IAVInput::InputSignalInfo& info) { }; | ||
}; | ||
|
||
virtual Core::hresult Register(ISignalChangedNotification* notification /* @in */) = 0; | ||
virtual Core::hresult Unregister(ISignalChangedNotification* notification /* @in */) = 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 info - in - The new input status information of the input device | ||
virtual void OnInputStatusChanged(const Exchange::IAVInput::InputStatus& status) { }; | ||
}; | ||
|
||
virtual Core::hresult Register(IInputStatusChangedNotification* notification /* @in */) = 0; | ||
virtual Core::hresult Unregister(IInputStatusChangedNotification* notification /* @in */) = 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 videoMode - in - The new video mode information of the input device | ||
virtual void VideoStreamInfoUpdate(const Exchange::IAVInput::InputVideoMode& videoMode) { }; | ||
pahearn73 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
}; | ||
|
||
virtual Core::hresult Register(IVideoStreamInfoUpdateNotification* notification /* @in */) = 0; | ||
virtual Core::hresult Unregister(IVideoStreamInfoUpdateNotification* notification /* @in */) = 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 status - in - The new game feature status of the input device | ||
virtual void GameFeatureStatusUpdate(const Exchange::IAVInput::GameFeatureStatus& status) { }; | ||
}; | ||
|
||
virtual Core::hresult Register(IGameFeatureStatusUpdateNotification* notification /* @in */) = 0; | ||
virtual Core::hresult Unregister(IGameFeatureStatusUpdateNotification* notification /* @in */) = 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 contentType - in - The new AVI content type of the input device | ||
virtual void HdmiContentTypeUpdate(const Exchange::IAVInput::ContentInfo& contentInfo) { }; | ||
}; | ||
|
||
virtual Core::hresult Register(IHdmiContentTypeUpdateNotification* notification /* @in */) = 0; | ||
virtual Core::hresult Unregister(IHdmiContentTypeUpdateNotification* notification /* @in */) = 0; | ||
|
||
// @text numberOfInputs | ||
// @brief Returns an integer that specifies the number of available inputs | ||
// @param inputCount - out - An integer representing number of inputs | ||
virtual Core::hresult NumberOfInputs(uint32_t& inputCount /* @out */) = 0; | ||
|
||
// @text getInputDevices | ||
// @brief Returns a list of input devices of the specified type | ||
// @param type - in - The type of input devices to retrieve | ||
// @param devices - out - An iterator to the list of input devices | ||
virtual Core::hresult GetInputDevices(int type /* @in */, Exchange::IAVInput::IInputDeviceIterator*& devices /* @out */) = 0; | ||
|
||
// @text writeEDID | ||
// @brief Returns a list of input devices of the specified type | ||
// @param id - in - The ID of the input device to write EDID to | ||
// @param edid - in - The EDID message to write | ||
virtual Core::hresult WriteEDID(int id /* @in */, const string& edid /* @in */) = 0; | ||
|
||
// @text readEDID | ||
// @brief Reads the EDID from the specified input device | ||
// @param edid - out - The EDID message read from the device | ||
// @param id - in - The ID of the input device to write EDID to | ||
// @param edid - out - The EDID message to read | ||
virtual Core::hresult ReadEDID(int id /* @in */, string& edid /* @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 spd - out - The SPD infoFrame packet information read from the device | ||
virtual Core::hresult GetRawSPD(int id /* @in */, string& spd /* @out */) = 0; | ||
|
||
// @text getSPD | ||
// @brief Returns the Source Data Product Descriptor (SPD) infoFrame packet information for the specified HDMI Input device | ||
// @param spd - out - The SPD infoFrame packet information read from the device | ||
virtual Core::hresult GetSPD(int id /* @in @optional */, string& spd /* @out */) = 0; | ||
|
||
// @text setEdidVersion | ||
// @brief Sets an HDMI EDID version | ||
// @param id - in - The ID of the input device to set the EDID version for | ||
// @param version - in - The EDID version to set | ||
virtual Core::hresult SetEdidVersion(int id /* @in @optional */, const string& version /* @in */) = 0; | ||
|
||
// @text getEdidVersion | ||
// @brief Returns the EDID version | ||
// @param id - in - The ID of the input device to get the EDID version for | ||
// @param version - out - The EDID version | ||
virtual Core::hresult GetEdidVersion(int id /* @in */, string& version /* @out */) = 0; | ||
|
||
// @text setEdid2AllmSupport | ||
// @brief Sets an HDMI ALLM bit in EDID | ||
// @param id - in - The ID of the input device to set the ALLM bit for | ||
// @param allm - in - The ALLM bit value to set | ||
virtual Core::hresult SetEdid2AllmSupport(int id /* @in */, bool allm /* @in */) = 0; | ||
|
||
// @text getEdid2AllmSupport | ||
// @brief Returns the ALLM bit in EDID | ||
// @param id - in - The ID of the input device to get the ALLM | ||
// @param allm - out - The ALLM bit value | ||
virtual Core::hresult GetEdid2AllmSupport(int id /* @in */, bool& allm /* @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(int id /* @in */, bool vrrSupport /* @in */) = 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(int id /* @in */, bool& vrrSupport /* @out */) = 0; | ||
|
||
// @text getHdmiVersion | ||
// @brief Returns the HDMI compatibility version for the specified input device | ||
// @param id - in - The ID of the input device to get the HDMI version | ||
// @param hdmiVersion - out - The HDMI compatibility version | ||
virtual Core::hresult GetHdmiVersion(int id /* @in */, string& hdmiVersion /* @out */) = 0; | ||
|
||
// @text setAudioMixerLevels | ||
// @brief Sets the mixer levels for the specified input device | ||
// @param levels - in - The mixer levels to set | ||
virtual Core::hresult SetAudioMixerLevels(Exchange::IAVInput::MixerLevels levels /* @in */) = 0; | ||
|
||
// @text startInput | ||
// @brief Starts the specified input device | ||
// @param id - in - The ID of the input device to start | ||
// @param type - in - The type of input device to start | ||
// @param audioMix - in - Whether to enable audio mixing | ||
// @param planeType - in - The video plane type to use | ||
// @param topMostPlane - in - Whether to use the top-most video plane | ||
// TODO: Documentation states ID is optional. If optional, are any specified defaults inserted into the JSON prior to calling | ||
pahearn73 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
// the implmentation? Does the new COM-RPC method need to handle optional params via OptionalType<T>? | ||
virtual Core::hresult StartInput(int id /* @in @optional */, int type /* @in */, bool audioMix /* @in @optional */, int planeType /* @in @optional */, bool topMostPlane /* @in @optional */) = 0; | ||
|
||
// @text stopInput | ||
// @brief Stops the specified input device | ||
// @param type - in - The type of input device to stop | ||
virtual Core::hresult StopInput(int type /* @in */) = 0; | ||
|
||
// @text setVideoRectangle | ||
// @brief Sets the video rectangle for the specified input device | ||
// @param x - in - The x-coordinate of the video rectangle | ||
// @param y - in - The y-coordinate of the video rectangle | ||
// @param width - in - The width of the video rectangle | ||
// @param height - in - The height of the video rectangle | ||
// @param type - in - The type of input device to set the video rectangle for | ||
virtual Core::hresult SetVideoRectangle(uint16_t x /* @in */, uint16_t y /* @in */, uint16_t width /* @in */, uint16_t height /* @in */, uint16_t type /* @in */) = 0; | ||
|
||
// @text currentVideoMode | ||
// @brief Returns the current video mode for the specified input device | ||
// @param currentVideoMode - out - The current video mode | ||
// @param message - out - A message indicating the status of the operation | ||
virtual Core::hresult CurrentVideoMode(string& currentVideoMode /* @out */, string& message /* @out */) = 0; | ||
|
||
// @text contentProtected | ||
// @brief Returns whether the content is protected for the specified input device | ||
// @param isContentProtected - out - A boolean indicating if the content is protected | ||
virtual Core::hresult ContentProtected(bool& isContentProtected /* @out */) = 0; | ||
|
||
// @text getSupportedGameFeatures | ||
// @brief Returns the supported game features for the specified input device | ||
// @param features - out - A list of supported game features | ||
virtual Core::hresult GetSupportedGameFeatures(Exchange::IAVInput::IStringIterator*& features /* @out */) = 0; | ||
|
||
// @text getGameFeatureStatus | ||
// @brief Returns the status of a specific game feature for the specified input device | ||
// @param feature - in - The game feature to check the status of | ||
// @param status - out - The status of the game feature | ||
virtual Core::hresult GetGameFeatureStatus(int id /* @in @optional */, const string& feature /* @in */, bool& mode /* @out */) = 0; | ||
}; | ||
} // namespace Exchange | ||
} // namespace WPEFramework |
pahearn73 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.