From 35ff90757b77c26b961cfe379a1dcd8cbfb34981 Mon Sep 17 00:00:00 2001 From: Siddhesh Date: Thu, 29 Jan 2026 20:44:43 +0530 Subject: [PATCH 1/6] RDKEMW-12481 Fix PI-CLI build issues Reason for change : PI-CLI build process was failing due to auxFormat & forwardAudioToAux removed from ConfigurePipeline of PlayerInterface Test procedure: Run L2-tests-player-interface.yml with act command and check tests are executed and report posted in the Comment section of Player Interface's recent PR Risks: Low Signed-off-by: Siddhesh siddhesh_chavan@comcast.com --- test/pi-cli/CMakeLists.txt | 20 ++++++++++++++++++-- test/pi-cli/commandProcessing.cpp | 18 ++++++++++++++++-- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/test/pi-cli/CMakeLists.txt b/test/pi-cli/CMakeLists.txt index 30eb944a..8fe9a402 100644 --- a/test/pi-cli/CMakeLists.txt +++ b/test/pi-cli/CMakeLists.txt @@ -11,6 +11,14 @@ set(CMAKE_CXX_STANDARD_REQUIRED True) include_directories(${PI_ROOT}) +# Find GStreamer packages +find_package(PkgConfig REQUIRED) +pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0) +pkg_check_modules(GSTREAMERBASE REQUIRED gstreamer-app-1.0) + +include_directories(${GSTREAMER_INCLUDE_DIRS}) +include_directories(${GSTREAMERBASE_INCLUDE_DIRS}) + # Add the executable (now includes commandProcessing.cpp) add_executable(pi-cli main.cpp @@ -29,9 +37,17 @@ else() message(FATAL_ERROR "Readline library not found. Please install it.") endif() -target_link_libraries(pi-cli playergstinterface) +# Add OpenSSL requirement so we can link crypto/ssl symbols +find_package(OpenSSL REQUIRED) + +target_link_libraries(pi-cli playergstinterface OpenSSL::Crypto OpenSSL::SSL) +if(BUILD_WITH_COVERAGE) + target_compile_options(pi-cli PRIVATE --coverage) + target_link_options(pi-cli PRIVATE --coverage) + message(STATUS "pi-cli: Building with coverage instrumentation") +endif() # Additional warnings and flags for development if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") target_compile_options(pi-cli PRIVATE -Wall -Wextra -pedantic) -endif() \ No newline at end of file +endif() diff --git a/test/pi-cli/commandProcessing.cpp b/test/pi-cli/commandProcessing.cpp index a06fbc78..f8164bcd 100644 --- a/test/pi-cli/commandProcessing.cpp +++ b/test/pi-cli/commandProcessing.cpp @@ -208,8 +208,8 @@ void configurePipelineCommand(InterfacePlayerRDK& player, const std::vector& pa std::cout << "Pause executed. Result: " << (result ? "true" : "false") << "\n"; } +void resumeCommand(InterfacePlayerRDK& player, const std::vector& params) { + if (!params.empty()) { + std::cout << "Usage: resume\n"; + return; + } + bool result = player.Pause(false, false); + std::cout << "Resume executed. Success: " << (result ? "true" : "false") << "\n"; + if (result) { + std::cout << "Pipeline state: " << (player.IsPipelinePaused() ? "Paused" : "Playing") << "\n"; + std::cout << "Current position: " << player.GetPositionMilliseconds() << " ms\n"; + } +} + void resumeInjectorCommand(InterfacePlayerRDK& player, const std::vector& params) { player.ResumeInjector(); std::cout << "ResumeInjector executed.\n"; @@ -601,6 +614,7 @@ std::map initializeCommands(CommandExecutor& executor, Int commands.emplace("setaudiovolume", Command("setaudiovolume", "Set audio volume. Usage: setaudiovolume ", [&player](const std::vector& params) { setAudioVolumeCommand(player, params); })); commands.emplace("setupstream", Command("setupstream", "Setup stream. Usage: setupstream ", [&player](const std::vector& params) { setupStreamCommand(player, params); })); commands.emplace("pause", Command("pause", "Pause the pipeline. Usage: pause [pause(bool)] [forceStop(bool)]", [&player](const std::vector& params) { pauseCommand(player, params); })); + commands.emplace("resume", Command("resume", "Resume playback.\nUsage: resume", [&player](const std::vector& params) { resumeCommand(player, params); })); commands.emplace("resumeinjector", Command("resumeinjector", "Resume injector.", [&player](const std::vector& params) { resumeInjectorCommand(player, params); })); commands.emplace("stop", Command("stop", "Stop playback.", [&player](const std::vector& params) { stopCommand(player, params); })); commands.emplace("flush", Command("flush", "Flush pipeline.", [&player](const std::vector& params) { flushCommand(player, params); })); From dbc272f45d1c463d6644a43b5981ddc921cbd04d Mon Sep 17 00:00:00 2001 From: siddhesh-chavan-comcast Date: Wed, 18 Feb 2026 10:53:10 +0530 Subject: [PATCH 2/6] Update commandProcessing.cpp --- test/pi-cli/commandProcessing.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/pi-cli/commandProcessing.cpp b/test/pi-cli/commandProcessing.cpp index f8164bcd..2d9acbb6 100644 --- a/test/pi-cli/commandProcessing.cpp +++ b/test/pi-cli/commandProcessing.cpp @@ -185,8 +185,8 @@ void initializeSourceForPlayerCommand(InterfacePlayerRDK& player, const std::vec void configurePipelineCommand(InterfacePlayerRDK& player, const std::vector& params) { // The signature from InterfacePlayerRDK.h: // void ConfigurePipeline(int, int, int, int, bool, bool, bool, bool, int32_t, gint, const char *, int, bool, std::string url); - if (params.size() != 14) { - std::cout << "Usage: configurepipeline \n"; + if (params.size() != 12) { + std::cout << "Usage: configurepipeline \n"; return; } @@ -215,7 +215,7 @@ void configurePipelineCommand(InterfacePlayerRDK& player, const std::vector \n"; + std::cout << "Usage: configurepipeline \n"; } } @@ -608,7 +608,7 @@ std::map initializeCommands(CommandExecutor& executor, Int commands.emplace("setplayername", Command("setplayername", "Set player name. Usage: setplayername ", [&player](const std::vector& params) { setPlayerNameCommand(player, params); })); commands.emplace("setpreferreddrm", Command("setpreferreddrm", "Set preferred DRM. Usage: setpreferreddrm ", [&player](const std::vector& params) { setPreferredDRMCommand(player, params); })); commands.emplace("initializesourceforplayer", Command("initializesourceforplayer", "Initialize source. Usage: initializesourceforplayer ", [&player](const std::vector& params) { initializeSourceForPlayerCommand(player, params); })); - commands.emplace("configurepipeline", Command("configurepipeline", "Configure pipeline. Usage: configurepipeline ", [&player](const std::vector& params) { configurePipelineCommand(player, params); })); + commands.emplace("configurepipeline", Command("configurepipeline", "Configure pipeline. Usage: configurepipeline ", [&player](const std::vector& params) { configurePipelineCommand(player, params); })); commands.emplace("setpauseonstart", Command("setpauseonstart", "Enable/disable pause on start playback. Usage: setpauseonstart [true|false]", [&player](const std::vector& params) { setPauseOnStartCommand(player, params); })); commands.emplace("setplaybackrate", Command("setplaybackrate", "Set playback rate. Usage: setplaybackrate ", [&player](const std::vector& params) { setPlayBackRateCommand(player, params); })); commands.emplace("setaudiovolume", Command("setaudiovolume", "Set audio volume. Usage: setaudiovolume ", [&player](const std::vector& params) { setAudioVolumeCommand(player, params); })); From a9c2bd1e4dde9c6279659f4ac5f574e7d894ed55 Mon Sep 17 00:00:00 2001 From: siddhesh-chavan-comcast Date: Wed, 18 Feb 2026 10:54:14 +0530 Subject: [PATCH 3/6] Apply suggestion from @Copilot Added fallback for minimum cmake version Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- test/pi-cli/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/pi-cli/CMakeLists.txt b/test/pi-cli/CMakeLists.txt index 8fe9a402..fc0d9216 100644 --- a/test/pi-cli/CMakeLists.txt +++ b/test/pi-cli/CMakeLists.txt @@ -43,7 +43,12 @@ find_package(OpenSSL REQUIRED) target_link_libraries(pi-cli playergstinterface OpenSSL::Crypto OpenSSL::SSL) if(BUILD_WITH_COVERAGE) target_compile_options(pi-cli PRIVATE --coverage) - target_link_options(pi-cli PRIVATE --coverage) + if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.13") + target_link_options(pi-cli PRIVATE --coverage) + else() + # Fallback for older CMake versions that do not support target_link_options + set_target_properties(pi-cli PROPERTIES LINK_FLAGS "--coverage") + endif() message(STATUS "pi-cli: Building with coverage instrumentation") endif() From 74c21616114c6789ebf092d4c672e9f4f225d4dc Mon Sep 17 00:00:00 2001 From: Siddhesh Chavan Date: Wed, 18 Feb 2026 15:20:17 +0530 Subject: [PATCH 4/6] RDKEMW-12481 Fix PI-CLI build issues Reason for change : PI-CLI build process was failing due to auxFormat & forwardAudioToAux removed from ConfigurePipeline of PlayerInterface and optimisation of Github Workflow. Added test changes to remove auxFormat & forwardAudioToAux from ConfigurePipeline. Test procedure: Run L2-tests-player-interface.yml with act command and check tests are executed and report posted in the Comment section of Player Interface's recent PR. Risks: Low Signed-off-by: Siddhesh siddhesh_chavan@comcast.com --- test/pi-cli/CMakeLists.txt | 1 - test/pi-cli/commandProcessing.cpp | 24 +++++++++++------------- test/pi-cli/commandProcessing.h | 1 + 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/test/pi-cli/CMakeLists.txt b/test/pi-cli/CMakeLists.txt index fc0d9216..9c9057f3 100644 --- a/test/pi-cli/CMakeLists.txt +++ b/test/pi-cli/CMakeLists.txt @@ -26,7 +26,6 @@ add_executable(pi-cli ) # Use pkg-config to locate the readline library -find_package(PkgConfig REQUIRED) pkg_check_modules(READLINE REQUIRED readline) if (READLINE_FOUND) diff --git a/test/pi-cli/commandProcessing.cpp b/test/pi-cli/commandProcessing.cpp index 2d9acbb6..0817030b 100644 --- a/test/pi-cli/commandProcessing.cpp +++ b/test/pi-cli/commandProcessing.cpp @@ -184,7 +184,7 @@ void initializeSourceForPlayerCommand(InterfacePlayerRDK& player, const std::vec void configurePipelineCommand(InterfacePlayerRDK& player, const std::vector& params) { // The signature from InterfacePlayerRDK.h: - // void ConfigurePipeline(int, int, int, int, bool, bool, bool, bool, int32_t, gint, const char *, int, bool, std::string url); + if (params.size() != 12) { std::cout << "Usage: configurepipeline \n"; return; @@ -193,19 +193,17 @@ void configurePipelineCommand(InterfacePlayerRDK& player, const std::vector& params); void setupStreamCommand(InterfacePlayerRDK& player, const std::vector& params); void pauseCommand(InterfacePlayerRDK& player, const std::vector& params); +void resumeCommand(InterfacePlayerRDK& player, const std::vector& params) void resumeInjectorCommand(InterfacePlayerRDK& player, const std::vector& params); void stopCommand(InterfacePlayerRDK& player, const std::vector& params); void flushCommand(InterfacePlayerRDK& player, const std::vector& params); From c21c63eaa072c1c2dbd0c68c10926166fc29c55a Mon Sep 17 00:00:00 2001 From: siddhesh-chavan-comcast Date: Wed, 18 Feb 2026 16:05:00 +0530 Subject: [PATCH 5/6] Update commandProcessing.h --- test/pi-cli/commandProcessing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pi-cli/commandProcessing.h b/test/pi-cli/commandProcessing.h index 88ceabc4..4c5181dd 100644 --- a/test/pi-cli/commandProcessing.h +++ b/test/pi-cli/commandProcessing.h @@ -50,7 +50,7 @@ void setPlayBackRateCommand(InterfacePlayerRDK& player, const std::vector& params); void setupStreamCommand(InterfacePlayerRDK& player, const std::vector& params); void pauseCommand(InterfacePlayerRDK& player, const std::vector& params); -void resumeCommand(InterfacePlayerRDK& player, const std::vector& params) +void resumeCommand(InterfacePlayerRDK& player, const std::vector& params); void resumeInjectorCommand(InterfacePlayerRDK& player, const std::vector& params); void stopCommand(InterfacePlayerRDK& player, const std::vector& params); void flushCommand(InterfacePlayerRDK& player, const std::vector& params); From 0bb9a4b84ee24b5bf1b3c0df8083183b4b16961f Mon Sep 17 00:00:00 2001 From: siddhesh-chavan-comcast Date: Wed, 18 Feb 2026 16:25:47 +0530 Subject: [PATCH 6/6] Update test/pi-cli/commandProcessing.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- test/pi-cli/commandProcessing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pi-cli/commandProcessing.cpp b/test/pi-cli/commandProcessing.cpp index 0817030b..b47cd9b3 100644 --- a/test/pi-cli/commandProcessing.cpp +++ b/test/pi-cli/commandProcessing.cpp @@ -612,7 +612,7 @@ std::map initializeCommands(CommandExecutor& executor, Int commands.emplace("setaudiovolume", Command("setaudiovolume", "Set audio volume. Usage: setaudiovolume ", [&player](const std::vector& params) { setAudioVolumeCommand(player, params); })); commands.emplace("setupstream", Command("setupstream", "Setup stream. Usage: setupstream ", [&player](const std::vector& params) { setupStreamCommand(player, params); })); commands.emplace("pause", Command("pause", "Pause the pipeline. Usage: pause [pause(bool)] [forceStop(bool)]", [&player](const std::vector& params) { pauseCommand(player, params); })); - commands.emplace("resume", Command("resume", "Resume playback.\nUsage: resume", [&player](const std::vector& params) { resumeCommand(player, params); })); + commands.emplace("resume", Command("resume", "Resume playback. Usage: resume", [&player](const std::vector& params) { resumeCommand(player, params); })); commands.emplace("resumeinjector", Command("resumeinjector", "Resume injector.", [&player](const std::vector& params) { resumeInjectorCommand(player, params); })); commands.emplace("stop", Command("stop", "Stop playback.", [&player](const std::vector& params) { stopCommand(player, params); })); commands.emplace("flush", Command("flush", "Flush pipeline.", [&player](const std::vector& params) { flushCommand(player, params); }));