From 02c14c1fbc9e0ce3bc7883cf46497d51cf1602cf Mon Sep 17 00:00:00 2001 From: "aishwariya.bhaskar" Date: Tue, 22 Oct 2024 12:09:20 +0000 Subject: [PATCH 1/7] Composite VideoMode update --- AVInput/AVInput.cpp | 72 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 16 deletions(-) diff --git a/AVInput/AVInput.cpp b/AVInput/AVInput.cpp index 1794343369..1c311ec12f 100644 --- a/AVInput/AVInput.cpp +++ b/AVInput/AVInput.cpp @@ -168,6 +168,10 @@ void AVInput::InitializeIARM() IARM_BUS_DSMGR_NAME, IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_STATUS, dsAVStatusEventHandler)); + IARM_CHECK(IARM_Bus_RegisterEventHandler( + IARM_BUS_DSMGR_NAME, + IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_VIDEO_MODE_UPDATE, + dsAVVideoModeEventHandler)); IARM_CHECK(IARM_Bus_RegisterEventHandler( IARM_BUS_DSMGR_NAME, IARM_BUS_DSMGR_EVENT_HDMI_IN_AVI_CONTENT_TYPE, @@ -204,6 +208,9 @@ void AVInput::DeinitializeIARM() IARM_BUS_DSMGR_NAME, IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_STATUS, dsAVStatusEventHandler)); IARM_CHECK(IARM_Bus_RemoveEventHandler( + IARM_BUS_DSMGR_NAME, + IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_VIDEO_MODE_UPDATE, dsAVVideoModeEventHandler)); + IARM_CHECK(IARM_Bus_RemoveEventHandler( IARM_BUS_DSMGR_NAME, IARM_BUS_DSMGR_EVENT_HDMI_IN_AVI_CONTENT_TYPE, dsAviContentTypeEventHandler)); } @@ -750,17 +757,18 @@ void AVInput::AVInputStatusChange( int port , bool isPresented, int type) * @param[in] port HDMI In port id. * @param[dsVideoPortResolution_t] video resolution data */ -void AVInput::AVInputVideoModeUpdate( int port , dsVideoPortResolution_t resolution) +void AVInput::AVInputVideoModeUpdate( int port , dsVideoPortResolution_t resolution, int type) { LOGWARN("AVInputVideoModeUpdate [%d]", port); JsonObject params; params["id"] = port; std::stringstream locator; - locator << "hdmiin://localhost/deviceid/" << port; - params["locator"] = locator.str(); + if(type == HDMI){ + + locator << "hdmiin://localhost/deviceid/" << port; + switch(resolution.pixelResolution) { - switch(resolution.pixelResolution) { case dsVIDEO_PIXELRES_720x480: params["width"] = 720; params["height"] = 480; @@ -776,7 +784,7 @@ void AVInput::AVInputVideoModeUpdate( int port , dsVideoPortResolution_t resolut params["height"] = 720; break; - case dsVIDEO_PIXELRES_1920x1080: + case dsVIDEO_PIXELRES_1920x1080: params["width"] = 1920; params["height"] = 1080; break; @@ -795,10 +803,31 @@ void AVInput::AVInputVideoModeUpdate( int port , dsVideoPortResolution_t resolut params["width"] = 1920; params["height"] = 1080; break; + } + params["progressive"] = (!resolution.interlaced); } + else if(type == COMPOSITE) + { + locator << "cvbsin://localhost/deviceid/" << port; + switch(resolution.pixelResolution) { + case dsVIDEO_PIXELRES_720x480: + params["width"] = 720; + params["height"] = 480; + break; + case dsVIDEO_PIXELRES_720x576: + params["width"] = 720; + params["height"] = 576; + break; + default: + params["width"] = 720; + params["height"] = 576; + break; + } - params["progressive"] = (!resolution.interlaced); + params["progressive"] = true; + } + params["locator"] = locator.str(); switch(resolution.frameRate) { case dsVIDEO_FRAMERATE_24: params["frameRateN"] = 24000; @@ -851,16 +880,17 @@ void AVInput::AVInputVideoModeUpdate( int port , dsVideoPortResolution_t resolut void AVInput::dsAviContentTypeEventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len) { - if(!AVInput::_instance) - return; + if(!AVInput::_instance) + return; - if (IARM_BUS_DSMGR_EVENT_HDMI_IN_AVI_CONTENT_TYPE == eventId) - { - IARM_Bus_DSMgr_EventData_t *eventData = (IARM_Bus_DSMgr_EventData_t *)data; - int hdmi_in_port = eventData->data.hdmi_in_content_type.port; - int avi_content_type = eventData->data.hdmi_in_content_type.aviContentType; - LOGINFO("Received IARM_BUS_DSMGR_EVENT_HDMI_IN_AVI_CONTENT_TYPE event port: %d, Content Type : %d", hdmi_in_port,avi_content_type); -AVInput::_instance->hdmiInputAviContentTypeChange(hdmi_in_port, avi_content_type); + if (IARM_BUS_DSMGR_EVENT_HDMI_IN_AVI_CONTENT_TYPE == eventId) + { + IARM_Bus_DSMgr_EventData_t *eventData = (IARM_Bus_DSMgr_EventData_t *)data; + int hdmi_in_port = eventData->data.hdmi_in_content_type.port; + int avi_content_type = eventData->data.hdmi_in_content_type.aviContentType; + LOGINFO("Received IARM_BUS_DSMGR_EVENT_HDMI_IN_AVI_CONTENT_TYPE event port: %d, Content Type : %d", hdmi_in_port,avi_content_type); + + AVInput::_instance->hdmiInputAviContentTypeChange(hdmi_in_port, avi_content_type); } } @@ -943,7 +973,17 @@ void AVInput::dsAVVideoModeEventHandler(const char *owner, IARM_EventId_t eventI resolution.interlaced = eventData->data.hdmi_in_video_mode.resolution.interlaced; resolution.frameRate = eventData->data.hdmi_in_video_mode.resolution.frameRate; LOGWARN("Received IARM_BUS_DSMGR_EVENT_HDMI_IN_VIDEO_MODE_UPDATE event port: %d, pixelResolution: %d, interlaced : %d, frameRate: %d \n", hdmi_in_port,resolution.pixelResolution, resolution.interlaced, resolution.frameRate); - AVInput::_instance->AVInputVideoModeUpdate(hdmi_in_port, resolution); + AVInput::_instance->AVInputVideoModeUpdate(hdmi_in_port, resolution,HDMI); + } + else if (IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_VIDEO_MODE_UPDATE == eventId) { + IARM_Bus_DSMgr_EventData_t *eventData = (IARM_Bus_DSMgr_EventData_t *)data; + int composite_in_port = eventData->data.composite_in_video_mode.port; + dsVideoPortResolution_t resolution = {}; + resolution.pixelResolution = eventData->data.composite_in_video_mode.resolution.pixelResolution; + resolution.interlaced = eventData->data.composite_in_video_mode.resolution.interlaced; + resolution.frameRate = eventData->data.composite_in_video_mode.resolution.frameRate; + LOGWARN("Received IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_VIDEO_MODE_UPDATE event port: %d, pixelResolution: %d, interlaced : %d, frameRate: %d \n", composite_in_port,resolution.pixelResolution, resolution.interlaced, resolution.frameRate); + AVInput::_instance->AVInputVideoModeUpdate(composite_in_port, resolution,COMPOSITE); } } From 43708d2fa176bb33a0c8789af5076108fd9f60a2 Mon Sep 17 00:00:00 2001 From: "aishwariya.bhaskar" Date: Tue, 22 Oct 2024 12:09:20 +0000 Subject: [PATCH 2/7] Composite VideoMode update --- AVInput/AVInput.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AVInput/AVInput.h b/AVInput/AVInput.h index 288cb7b2b1..043c973205 100644 --- a/AVInput/AVInput.h +++ b/AVInput/AVInput.h @@ -107,7 +107,7 @@ class AVInput: public PluginHost::IPlugin, public PluginHost::JSONRPC void AVInputStatusChange( int port , bool isPresented, int type); static void dsAVStatusEventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len); - void AVInputVideoModeUpdate( int port , dsVideoPortResolution_t resolution); + void AVInputVideoModeUpdate( int port , dsVideoPortResolution_t resolution, int type); static void dsAVVideoModeEventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len); void AVInputALLMChange( int port , bool allmMode); From c15a96572ea1aa9bc90fa6f03d38adbe78e6cf75 Mon Sep 17 00:00:00 2001 From: "aishwariya.bhaskar" Date: Tue, 22 Oct 2024 12:09:20 +0000 Subject: [PATCH 3/7] Composite VideoMode update --- AVInput/AVInput.cpp | 37 ++++++++++++++++++------------- AVInput/AVInput.h | 4 ++-- CompositeInput/CompositeInput.cpp | 20 +++++++++++++++++ CompositeInput/CompositeInput.h | 2 +- HdmiInput/HdmiInput.cpp | 20 +++++++++++++++++ HdmiInput/HdmiInput.h | 1 + 6 files changed, 65 insertions(+), 19 deletions(-) diff --git a/AVInput/AVInput.cpp b/AVInput/AVInput.cpp index 1c311ec12f..3d4293934c 100644 --- a/AVInput/AVInput.cpp +++ b/AVInput/AVInput.cpp @@ -219,7 +219,7 @@ void AVInput::DeinitializeIARM() void AVInput::RegisterAll() { Register(_T(AVINPUT_METHOD_NUMBER_OF_INPUTS), &AVInput::endpoint_numberOfInputs, this); - Register(_T(AVINPUT_METHOD_CURRENT_VIDEO_MODE), &AVInput::endpoint_currentVideoMode, this); + Register(_T(AVINPUT_METHOD_CURRENT_VIDEO_MODE), &AVInput::currentVideoModeWrapper, this); Register(_T(AVINPUT_METHOD_CONTENT_PROTECTED), &AVInput::endpoint_contentProtected, this); Register(_T(AVINPUT_METHOD_GET_INPUT_DEVICES), &AVInput::getInputDevicesWrapper, this); Register(_T(AVINPUT_METHOD_WRITE_EDID), &AVInput::writeEDIDWrapper, this); @@ -286,19 +286,6 @@ uint32_t AVInput::endpoint_numberOfInputs(const JsonObject ¶meters, JsonObje returnResponse(success); } -uint32_t AVInput::endpoint_currentVideoMode(const JsonObject ¶meters, JsonObject &response) -{ - LOGINFOMETHOD(); - - bool success = false; - - auto result = currentVideoMode(success); - if (success) { - response[_T("currentVideoMode")] = result; - } - - returnResponse(success); -} uint32_t AVInput::endpoint_contentProtected(const JsonObject ¶meters, JsonObject &response) { @@ -326,12 +313,15 @@ int AVInput::numberOfInputs(bool &success) return result; } -string AVInput::currentVideoMode(bool &success) +string AVInput::currentVideoMode(bool &success,int type) { string result; try { - result = device::HdmiInput::getInstance().getCurrentVideoMode(); + if(type == HDMI) + result = device::HdmiInput::getInstance().getCurrentVideoMode(); + else + result = device::CompositeInput::getInstance().getCurrentVideoMode(); success = true; } catch (...) { @@ -343,6 +333,21 @@ string AVInput::currentVideoMode(bool &success) } +uint32_t AVInput::currentVideoModeWrapper(const JsonObject ¶meters, JsonObject &response) +{ + LOGINFOMETHOD(); + + bool success = false; + string sType = parameters["typeOfInput"].String(); + int type = getTypeOfInput (sType); + auto result = currentVideoMode(success,type); + if (success) { + response[_T("currentVideoMode")] = result; + } + + returnResponse(success); +} + uint32_t AVInput::startInput(const JsonObject& parameters, JsonObject& response) { LOGINFOMETHOD(); diff --git a/AVInput/AVInput.h b/AVInput/AVInput.h index 043c973205..c12d811349 100644 --- a/AVInput/AVInput.h +++ b/AVInput/AVInput.h @@ -62,12 +62,11 @@ class AVInput: public PluginHost::IPlugin, public PluginHost::JSONRPC void UnregisterAll(); uint32_t endpoint_numberOfInputs(const JsonObject ¶meters, JsonObject &response); - uint32_t endpoint_currentVideoMode(const JsonObject ¶meters, JsonObject &response); uint32_t endpoint_contentProtected(const JsonObject ¶meters, JsonObject &response); private: static int numberOfInputs(bool &success); - static string currentVideoMode(bool &success); + static string currentVideoMode(bool &success,int type); //Begin methods uint32_t getInputDevicesWrapper(const JsonObject& parameters, JsonObject& response); @@ -79,6 +78,7 @@ class AVInput: public PluginHost::IPlugin, public PluginHost::JSONRPC uint32_t getEdidVersionWrapper(const JsonObject& parameters, JsonObject& response); uint32_t setEdid2AllmSupportWrapper(const JsonObject& parameters, JsonObject& response); uint32_t getEdid2AllmSupportWrapper(const JsonObject& parameters, JsonObject& response); + uint32_t getCurrentVideoModeWrapper(const JsonObject ¶meters, JsonObject &response); uint32_t startInput(const JsonObject& parameters, JsonObject& response); uint32_t stopInput(const JsonObject& parameters, JsonObject& response); uint32_t setVideoRectangleWrapper(const JsonObject& parameters, JsonObject& response); diff --git a/CompositeInput/CompositeInput.cpp b/CompositeInput/CompositeInput.cpp index 0e3a67081e..d688afa9da 100644 --- a/CompositeInput/CompositeInput.cpp +++ b/CompositeInput/CompositeInput.cpp @@ -38,6 +38,7 @@ #define COMPOSITEINPUT_METHOD_START_COMPOSITE_INPUT "startCompositeInput" #define COMPOSITEINPUT_METHOD_STOP_COMPOSITE_INPUT "stopCompositeInput" #define COMPOSITEINPUT_METHOD_SCALE_COMPOSITE_INPUT "setVideoRectangle" +#define COMPOSITEINPUT_METHOD_CURRENT_VIDEO_MODE "currentVideoMode" #define COMPOSITEINPUT_EVENT_ON_DEVICES_CHANGED "onDevicesChanged" #define COMPOSITEINPUT_EVENT_ON_SIGNAL_CHANGED "onSignalChanged" @@ -76,6 +77,7 @@ namespace WPEFramework Register(COMPOSITEINPUT_METHOD_START_COMPOSITE_INPUT, &CompositeInput::startCompositeInput, this); Register(COMPOSITEINPUT_METHOD_STOP_COMPOSITE_INPUT, &CompositeInput::stopCompositeInput, this); Register(COMPOSITEINPUT_METHOD_SCALE_COMPOSITE_INPUT, &CompositeInput::setVideoRectangleWrapper, this); + Register(COMPOSITEINPUT_METHOD_CURRENT_VIDEO_MODE, &CompositeInput::getCurrentVideoMode, this); } CompositeInput::~CompositeInput() @@ -223,6 +225,24 @@ namespace WPEFramework } + uint32_t CompositeInput::getCurrentVideoMode(const JsonObject& parameters, JsonObject& response) + { + bool success; + string result; + try { + result = device::CompositeInput::getInstance().getCurrentVideoMode(); + success = true; + response["currentVideoMode"]=result; + } + catch (...) { + LOGERR("Exception caught"); + success = false; + } + + returnResponse(success); + + } + bool CompositeInput::setVideoRectangle(int x, int y, int width, int height) { bool ret = true; diff --git a/CompositeInput/CompositeInput.h b/CompositeInput/CompositeInput.h index 19be2d10cd..28e632e0af 100644 --- a/CompositeInput/CompositeInput.h +++ b/CompositeInput/CompositeInput.h @@ -53,7 +53,7 @@ namespace WPEFramework { uint32_t getCompositeInputDevicesWrapper(const JsonObject& parameters, JsonObject& response); uint32_t startCompositeInput(const JsonObject& parameters, JsonObject& response); uint32_t stopCompositeInput(const JsonObject& parameters, JsonObject& response); - + uint32_t getCurrentVideoMode(const JsonObject& parameters, JsonObject& response); uint32_t setVideoRectangleWrapper(const JsonObject& parameters, JsonObject& response); //End methods diff --git a/HdmiInput/HdmiInput.cpp b/HdmiInput/HdmiInput.cpp index e45efa093b..53e76280e3 100644 --- a/HdmiInput/HdmiInput.cpp +++ b/HdmiInput/HdmiInput.cpp @@ -47,6 +47,7 @@ #define HDMIINPUT_METHOD_SCALE_HDMI_INPUT "setVideoRectangle" #define HDMIINPUT_METHOD_SUPPORTED_GAME_FEATURES "getSupportedGameFeatures" #define HDMIINPUT_METHOD_GAME_FEATURE_STATUS "getHdmiGameFeatureStatus" +#define HDMIINPUT_METHOD_CURRENT_VIDEO_MODE "currentVideoMode" #define HDMIINPUT_EVENT_ON_DEVICES_CHANGED "onDevicesChanged" #define HDMIINPUT_EVENT_ON_SIGNAL_CHANGED "onSignalChanged" @@ -123,6 +124,7 @@ namespace WPEFramework registerMethod(HDMIINPUT_METHOD_STOP_HDMI_INPUT, &HdmiInput::stopHdmiInput, this); registerMethod(HDMIINPUT_METHOD_SCALE_HDMI_INPUT, &HdmiInput::setVideoRectangleWrapper, this); registerMethod(HDMIINPUT_METHOD_SET_MIXER_LEVELS, &HdmiInput::setMixerLevels, this); + registerMethod(HDMIINPUT_METHOD_CURRENT_VIDEO_MODE, &HdmiInput::getCurrentVideoMode, this); registerMethod(HDMIINPUT_METHOD_SUPPORTED_GAME_FEATURES, &HdmiInput::getSupportedGameFeatures, this); registerMethod(HDMIINPUT_METHOD_GAME_FEATURE_STATUS, &HdmiInput::getHdmiGameFeatureStatusWrapper, this); registerMethod(HDMIINPUT_METHOD_GET_AV_LATENCY, &HdmiInput::getAVLatency, this); @@ -295,6 +297,24 @@ namespace WPEFramework returnResponse(success); } + uint32_t HdmiInput::getCurrentVideoMode(const JsonObject& parameters, JsonObject& response) + { + bool success; + string result; + try { + result = device::HdmiInput::getInstance().getCurrentVideoMode(); + success = true; + response["currentVideoMode"]=result; + + } + catch (...) { + LOGERR("Exception caught"); + success = false; + } + + returnResponse(success); + + } uint32_t HdmiInput::setMixerLevels(const JsonObject& parameters, JsonObject& response) { returnIfParamNotFound(parameters, "primaryVolume"); diff --git a/HdmiInput/HdmiInput.h b/HdmiInput/HdmiInput.h index ff93202e52..5e5e4e4f51 100644 --- a/HdmiInput/HdmiInput.h +++ b/HdmiInput/HdmiInput.h @@ -73,6 +73,7 @@ namespace WPEFramework { uint32_t getAVLatency(const JsonObject& parameters, JsonObject& response); uint32_t getTVLowLatencyMode(const JsonObject& parameters, JsonObject& response); uint32_t getHdmiVersionWrapper(const JsonObject& parameters, JsonObject& response); + uint32_t getCurrentVideoMode(const JsonObject& parameters, JsonObject& response); //End methods JsonArray getHDMIInputDevices(); From 7d6d4ce0d4ca024552ab733f58e3bad35c3b9ce7 Mon Sep 17 00:00:00 2001 From: "aishwariya.bhaskar" Date: Tue, 22 Oct 2024 12:09:20 +0000 Subject: [PATCH 4/7] Revert "Composite VideoMode update" This reverts commit c15a96572ea1aa9bc90fa6f03d38adbe78e6cf75. --- AVInput/AVInput.cpp | 37 +++++++++++++------------------ AVInput/AVInput.h | 4 ++-- CompositeInput/CompositeInput.cpp | 20 ----------------- CompositeInput/CompositeInput.h | 2 +- HdmiInput/HdmiInput.cpp | 20 ----------------- HdmiInput/HdmiInput.h | 1 - 6 files changed, 19 insertions(+), 65 deletions(-) diff --git a/AVInput/AVInput.cpp b/AVInput/AVInput.cpp index 3d4293934c..1c311ec12f 100644 --- a/AVInput/AVInput.cpp +++ b/AVInput/AVInput.cpp @@ -219,7 +219,7 @@ void AVInput::DeinitializeIARM() void AVInput::RegisterAll() { Register(_T(AVINPUT_METHOD_NUMBER_OF_INPUTS), &AVInput::endpoint_numberOfInputs, this); - Register(_T(AVINPUT_METHOD_CURRENT_VIDEO_MODE), &AVInput::currentVideoModeWrapper, this); + Register(_T(AVINPUT_METHOD_CURRENT_VIDEO_MODE), &AVInput::endpoint_currentVideoMode, this); Register(_T(AVINPUT_METHOD_CONTENT_PROTECTED), &AVInput::endpoint_contentProtected, this); Register(_T(AVINPUT_METHOD_GET_INPUT_DEVICES), &AVInput::getInputDevicesWrapper, this); Register(_T(AVINPUT_METHOD_WRITE_EDID), &AVInput::writeEDIDWrapper, this); @@ -286,6 +286,19 @@ uint32_t AVInput::endpoint_numberOfInputs(const JsonObject ¶meters, JsonObje returnResponse(success); } +uint32_t AVInput::endpoint_currentVideoMode(const JsonObject ¶meters, JsonObject &response) +{ + LOGINFOMETHOD(); + + bool success = false; + + auto result = currentVideoMode(success); + if (success) { + response[_T("currentVideoMode")] = result; + } + + returnResponse(success); +} uint32_t AVInput::endpoint_contentProtected(const JsonObject ¶meters, JsonObject &response) { @@ -313,15 +326,12 @@ int AVInput::numberOfInputs(bool &success) return result; } -string AVInput::currentVideoMode(bool &success,int type) +string AVInput::currentVideoMode(bool &success) { string result; try { - if(type == HDMI) - result = device::HdmiInput::getInstance().getCurrentVideoMode(); - else - result = device::CompositeInput::getInstance().getCurrentVideoMode(); + result = device::HdmiInput::getInstance().getCurrentVideoMode(); success = true; } catch (...) { @@ -333,21 +343,6 @@ string AVInput::currentVideoMode(bool &success,int type) } -uint32_t AVInput::currentVideoModeWrapper(const JsonObject ¶meters, JsonObject &response) -{ - LOGINFOMETHOD(); - - bool success = false; - string sType = parameters["typeOfInput"].String(); - int type = getTypeOfInput (sType); - auto result = currentVideoMode(success,type); - if (success) { - response[_T("currentVideoMode")] = result; - } - - returnResponse(success); -} - uint32_t AVInput::startInput(const JsonObject& parameters, JsonObject& response) { LOGINFOMETHOD(); diff --git a/AVInput/AVInput.h b/AVInput/AVInput.h index c12d811349..043c973205 100644 --- a/AVInput/AVInput.h +++ b/AVInput/AVInput.h @@ -62,11 +62,12 @@ class AVInput: public PluginHost::IPlugin, public PluginHost::JSONRPC void UnregisterAll(); uint32_t endpoint_numberOfInputs(const JsonObject ¶meters, JsonObject &response); + uint32_t endpoint_currentVideoMode(const JsonObject ¶meters, JsonObject &response); uint32_t endpoint_contentProtected(const JsonObject ¶meters, JsonObject &response); private: static int numberOfInputs(bool &success); - static string currentVideoMode(bool &success,int type); + static string currentVideoMode(bool &success); //Begin methods uint32_t getInputDevicesWrapper(const JsonObject& parameters, JsonObject& response); @@ -78,7 +79,6 @@ class AVInput: public PluginHost::IPlugin, public PluginHost::JSONRPC uint32_t getEdidVersionWrapper(const JsonObject& parameters, JsonObject& response); uint32_t setEdid2AllmSupportWrapper(const JsonObject& parameters, JsonObject& response); uint32_t getEdid2AllmSupportWrapper(const JsonObject& parameters, JsonObject& response); - uint32_t getCurrentVideoModeWrapper(const JsonObject ¶meters, JsonObject &response); uint32_t startInput(const JsonObject& parameters, JsonObject& response); uint32_t stopInput(const JsonObject& parameters, JsonObject& response); uint32_t setVideoRectangleWrapper(const JsonObject& parameters, JsonObject& response); diff --git a/CompositeInput/CompositeInput.cpp b/CompositeInput/CompositeInput.cpp index d688afa9da..0e3a67081e 100644 --- a/CompositeInput/CompositeInput.cpp +++ b/CompositeInput/CompositeInput.cpp @@ -38,7 +38,6 @@ #define COMPOSITEINPUT_METHOD_START_COMPOSITE_INPUT "startCompositeInput" #define COMPOSITEINPUT_METHOD_STOP_COMPOSITE_INPUT "stopCompositeInput" #define COMPOSITEINPUT_METHOD_SCALE_COMPOSITE_INPUT "setVideoRectangle" -#define COMPOSITEINPUT_METHOD_CURRENT_VIDEO_MODE "currentVideoMode" #define COMPOSITEINPUT_EVENT_ON_DEVICES_CHANGED "onDevicesChanged" #define COMPOSITEINPUT_EVENT_ON_SIGNAL_CHANGED "onSignalChanged" @@ -77,7 +76,6 @@ namespace WPEFramework Register(COMPOSITEINPUT_METHOD_START_COMPOSITE_INPUT, &CompositeInput::startCompositeInput, this); Register(COMPOSITEINPUT_METHOD_STOP_COMPOSITE_INPUT, &CompositeInput::stopCompositeInput, this); Register(COMPOSITEINPUT_METHOD_SCALE_COMPOSITE_INPUT, &CompositeInput::setVideoRectangleWrapper, this); - Register(COMPOSITEINPUT_METHOD_CURRENT_VIDEO_MODE, &CompositeInput::getCurrentVideoMode, this); } CompositeInput::~CompositeInput() @@ -225,24 +223,6 @@ namespace WPEFramework } - uint32_t CompositeInput::getCurrentVideoMode(const JsonObject& parameters, JsonObject& response) - { - bool success; - string result; - try { - result = device::CompositeInput::getInstance().getCurrentVideoMode(); - success = true; - response["currentVideoMode"]=result; - } - catch (...) { - LOGERR("Exception caught"); - success = false; - } - - returnResponse(success); - - } - bool CompositeInput::setVideoRectangle(int x, int y, int width, int height) { bool ret = true; diff --git a/CompositeInput/CompositeInput.h b/CompositeInput/CompositeInput.h index 28e632e0af..19be2d10cd 100644 --- a/CompositeInput/CompositeInput.h +++ b/CompositeInput/CompositeInput.h @@ -53,7 +53,7 @@ namespace WPEFramework { uint32_t getCompositeInputDevicesWrapper(const JsonObject& parameters, JsonObject& response); uint32_t startCompositeInput(const JsonObject& parameters, JsonObject& response); uint32_t stopCompositeInput(const JsonObject& parameters, JsonObject& response); - uint32_t getCurrentVideoMode(const JsonObject& parameters, JsonObject& response); + uint32_t setVideoRectangleWrapper(const JsonObject& parameters, JsonObject& response); //End methods diff --git a/HdmiInput/HdmiInput.cpp b/HdmiInput/HdmiInput.cpp index 53e76280e3..e45efa093b 100644 --- a/HdmiInput/HdmiInput.cpp +++ b/HdmiInput/HdmiInput.cpp @@ -47,7 +47,6 @@ #define HDMIINPUT_METHOD_SCALE_HDMI_INPUT "setVideoRectangle" #define HDMIINPUT_METHOD_SUPPORTED_GAME_FEATURES "getSupportedGameFeatures" #define HDMIINPUT_METHOD_GAME_FEATURE_STATUS "getHdmiGameFeatureStatus" -#define HDMIINPUT_METHOD_CURRENT_VIDEO_MODE "currentVideoMode" #define HDMIINPUT_EVENT_ON_DEVICES_CHANGED "onDevicesChanged" #define HDMIINPUT_EVENT_ON_SIGNAL_CHANGED "onSignalChanged" @@ -124,7 +123,6 @@ namespace WPEFramework registerMethod(HDMIINPUT_METHOD_STOP_HDMI_INPUT, &HdmiInput::stopHdmiInput, this); registerMethod(HDMIINPUT_METHOD_SCALE_HDMI_INPUT, &HdmiInput::setVideoRectangleWrapper, this); registerMethod(HDMIINPUT_METHOD_SET_MIXER_LEVELS, &HdmiInput::setMixerLevels, this); - registerMethod(HDMIINPUT_METHOD_CURRENT_VIDEO_MODE, &HdmiInput::getCurrentVideoMode, this); registerMethod(HDMIINPUT_METHOD_SUPPORTED_GAME_FEATURES, &HdmiInput::getSupportedGameFeatures, this); registerMethod(HDMIINPUT_METHOD_GAME_FEATURE_STATUS, &HdmiInput::getHdmiGameFeatureStatusWrapper, this); registerMethod(HDMIINPUT_METHOD_GET_AV_LATENCY, &HdmiInput::getAVLatency, this); @@ -297,24 +295,6 @@ namespace WPEFramework returnResponse(success); } - uint32_t HdmiInput::getCurrentVideoMode(const JsonObject& parameters, JsonObject& response) - { - bool success; - string result; - try { - result = device::HdmiInput::getInstance().getCurrentVideoMode(); - success = true; - response["currentVideoMode"]=result; - - } - catch (...) { - LOGERR("Exception caught"); - success = false; - } - - returnResponse(success); - - } uint32_t HdmiInput::setMixerLevels(const JsonObject& parameters, JsonObject& response) { returnIfParamNotFound(parameters, "primaryVolume"); diff --git a/HdmiInput/HdmiInput.h b/HdmiInput/HdmiInput.h index 5e5e4e4f51..ff93202e52 100644 --- a/HdmiInput/HdmiInput.h +++ b/HdmiInput/HdmiInput.h @@ -73,7 +73,6 @@ namespace WPEFramework { uint32_t getAVLatency(const JsonObject& parameters, JsonObject& response); uint32_t getTVLowLatencyMode(const JsonObject& parameters, JsonObject& response); uint32_t getHdmiVersionWrapper(const JsonObject& parameters, JsonObject& response); - uint32_t getCurrentVideoMode(const JsonObject& parameters, JsonObject& response); //End methods JsonArray getHDMIInputDevices(); From dc8d97a8e3d8a2ca0d73a4219028e7fcb485d8cd Mon Sep 17 00:00:00 2001 From: "aishwariya.bhaskar" Date: Thu, 7 Nov 2024 13:41:46 +0000 Subject: [PATCH 5/7] "Composite VideoMode update" --- AVInput/AVInput.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AVInput/AVInput.h b/AVInput/AVInput.h index 043c973205..288cb7b2b1 100644 --- a/AVInput/AVInput.h +++ b/AVInput/AVInput.h @@ -107,7 +107,7 @@ class AVInput: public PluginHost::IPlugin, public PluginHost::JSONRPC void AVInputStatusChange( int port , bool isPresented, int type); static void dsAVStatusEventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len); - void AVInputVideoModeUpdate( int port , dsVideoPortResolution_t resolution, int type); + void AVInputVideoModeUpdate( int port , dsVideoPortResolution_t resolution); static void dsAVVideoModeEventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len); void AVInputALLMChange( int port , bool allmMode); From f30e366132778d98a86654a839f5664301383b69 Mon Sep 17 00:00:00 2001 From: "aishwariya.bhaskar" Date: Thu, 7 Nov 2024 13:41:46 +0000 Subject: [PATCH 6/7] "Composite VideoMode update" --- AVInput/AVInput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AVInput/AVInput.cpp b/AVInput/AVInput.cpp index 1c311ec12f..38cc9023e7 100644 --- a/AVInput/AVInput.cpp +++ b/AVInput/AVInput.cpp @@ -824,7 +824,7 @@ void AVInput::AVInputVideoModeUpdate( int port , dsVideoPortResolution_t resolut break; } - params["progressive"] = true; + params["progressive"] = false; } params["locator"] = locator.str(); From 3cbbbc3b381d69d4144d509dd63388838b705152 Mon Sep 17 00:00:00 2001 From: "aishwariya.bhaskar" Date: Thu, 7 Nov 2024 13:41:46 +0000 Subject: [PATCH 7/7] "Composite VideoMode update" --- AVInput/AVInput.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AVInput/AVInput.h b/AVInput/AVInput.h index 288cb7b2b1..22b618277f 100644 --- a/AVInput/AVInput.h +++ b/AVInput/AVInput.h @@ -107,7 +107,7 @@ class AVInput: public PluginHost::IPlugin, public PluginHost::JSONRPC void AVInputStatusChange( int port , bool isPresented, int type); static void dsAVStatusEventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len); - void AVInputVideoModeUpdate( int port , dsVideoPortResolution_t resolution); + void AVInputVideoModeUpdate( int port , dsVideoPortResolution_t resolution,int type); static void dsAVVideoModeEventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len); void AVInputALLMChange( int port , bool allmMode);