Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/L1-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: L1 tests

on:
pull_request:
branches: [develop, main]
branches: [ develop , main , feature/dev_sprint_pli ]
paths: ['**/*.c', '**/*.cpp', '**/*.cc', '**/*.cxx', '**/*.h', '**/*.hpp', '**/*.sh']
workflow_dispatch:

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/native-full-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Build Component in Native Environment

on:
pull_request:
branches: [ develop , main ]
branches: [ develop , main , feature/dev_sprint_pli ]
paths: ['**/*.c', '**/*.cpp', '**/*.cc', '**/*.cxx', '**/*.h', '**/*.hpp', '**/*.sh']
workflow_dispatch:

jobs:
build-player-interface-on-pr:
Expand Down
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
### Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [0.1.1](https://github.com/rdkcentral/middleware-player-interface/compare/0.1.0...0.1.1)

- RDKEMW-14777 : L1 coverage failure fix [`#87`](https://github.com/rdkcentral/middleware-player-interface/pull/87)
- RDKEMW-13297:Player-interface component separation phase1 [`#75`](https://github.com/rdkcentral/middleware-player-interface/pull/75)
- main merge [`#80`](https://github.com/rdkcentral/middleware-player-interface/pull/80)
- RDKEMW-14084:Enable L1 tests trigger-able manually [`#77`](https://github.com/rdkcentral/middleware-player-interface/pull/77)
- RDKEMW-13781:Create ISSUES_TEMPLATE for middleware-player-interface [`#74`](https://github.com/rdkcentral/middleware-player-interface/pull/74)
- RDKEMW-11934 : Fix build failure in MAC [`#64`](https://github.com/rdkcentral/middleware-player-interface/pull/64)
- RDKEMW-9809 : Latest AAMP sync [`#49`](https://github.com/rdkcentral/middleware-player-interface/pull/49)
- player-interface component separation phase1 [`b5b95a9`](https://github.com/rdkcentral/middleware-player-interface/commit/b5b95a99abf0b4389ccd894d2599d72c3729486d)
- Add include path for taglib compatibility header and resolve sssl package issue [`03052c7`](https://github.com/rdkcentral/middleware-player-interface/commit/03052c7c4dd531472444c05986695796c8e210ea)
- ISSUES TEMPLATE [`b3b2802`](https://github.com/rdkcentral/middleware-player-interface/commit/b3b280201c96de276ed162af9592b432c05d3614)

#### 0.1.0

> 13 December 2025

- RDKEMW-9809 : Latest AAMP code sync [`#52`](https://github.com/rdkcentral/middleware-player-interface/pull/52)
- resolve L1 failure [`#51`](https://github.com/rdkcentral/middleware-player-interface/pull/51)
- Cleaned up cmakelist [`#37`](https://github.com/rdkcentral/middleware-player-interface/pull/37)
- Deploy fossid_integration_stateless_diffscan_target_repo action [`#41`](https://github.com/rdkcentral/middleware-player-interface/pull/41)
- Deploy cla action [`#40`](https://github.com/rdkcentral/middleware-player-interface/pull/40)
- RDKEMW-7909 Generation of L1 coverage report with github script [`#36`](https://github.com/rdkcentral/middleware-player-interface/pull/36)
- L1 test cases from LLM team is merged [`#32`](https://github.com/rdkcentral/middleware-player-interface/pull/32)
- Revert "Release/1.0.0" [`#34`](https://github.com/rdkcentral/middleware-player-interface/pull/34)
- Release/1.0.0 [`#33`](https://github.com/rdkcentral/middleware-player-interface/pull/33)
- Feature/rdkemw 7076 [`#27`](https://github.com/rdkcentral/middleware-player-interface/pull/27)
- RDKEMW-6985 : NEED TO BUILD THE PLAYER INTERFACE AS PART OF INSTALL SCRIPT [`#24`](https://github.com/rdkcentral/middleware-player-interface/pull/24)
- Feature/rdk 58340 [`#14`](https://github.com/rdkcentral/middleware-player-interface/pull/14)
- RDKEMW-6568 : Merge feature/RDKEMW-6561 to develop [`#16`](https://github.com/rdkcentral/middleware-player-interface/pull/16)
- RDKEMW-5868 Native build workflow added for coverity [`#15`](https://github.com/rdkcentral/middleware-player-interface/pull/15)
- Rebasing [`#22`](https://github.com/rdkcentral/middleware-player-interface/pull/22)
- dev sync [`#18`](https://github.com/rdkcentral/middleware-player-interface/pull/18)
- RDKEMW-6667 PI-CLI fix initial problems [`#17`](https://github.com/rdkcentral/middleware-player-interface/pull/17)
- RDKEMW-6103 Create initial player interface CLI program [`#9`](https://github.com/rdkcentral/middleware-player-interface/pull/9)
- Feature/rdkemw 5868 - Workflow added for native build . Native build will be provided as input for coverity scan [`#11`](https://github.com/rdkcentral/middleware-player-interface/pull/11)
- RDKEMW-5974 Build Player Integration Interface on MacOS [`#8`](https://github.com/rdkcentral/middleware-player-interface/pull/8)
- Create CODEOWNERS [`#5`](https://github.com/rdkcentral/middleware-player-interface/pull/5)
- init commit [`60b2b1a`](https://github.com/rdkcentral/middleware-player-interface/commit/60b2b1a549c963587d03578507118a8ac9202424)
- integerate DrmSessionManagerTest file [`8b6fb66`](https://github.com/rdkcentral/middleware-player-interface/commit/8b6fb6601fbb7abadf60ca8e434c01bf41b22dac)
- test revert to develop [`d9b6fd3`](https://github.com/rdkcentral/middleware-player-interface/commit/d9b6fd378b11f52b91aec3d79a49732f94c4673c)
26 changes: 23 additions & 3 deletions test/pi-cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@ 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
commandProcessing.cpp
)

# Use pkg-config to locate the readline library
find_package(PkgConfig REQUIRED)
pkg_check_modules(READLINE REQUIRED readline)

if (READLINE_FOUND)
Expand All @@ -29,9 +36,22 @@ 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)
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()

# 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()
endif()
50 changes: 31 additions & 19 deletions test/pi-cli/commandProcessing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,38 +184,36 @@ void initializeSourceForPlayerCommand(InterfacePlayerRDK& player, const std::vec

void configurePipelineCommand(InterfacePlayerRDK& player, const std::vector<std::string>& 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 <int> <int> <int> <int> <bool> <bool> <bool> <bool> <int32> <gint> <pipelineName> <int> <bool> <url>\n";

if (params.size() != 12) {
std::cout << "Usage: configurepipeline <int> <int> <int> <bool> <bool> <bool> <int32> <gint> <pipelineName> <int> <bool> <url>\n";
return;
}

try {
int format = std::stoi(params[0]);
int audioFormat = std::stoi(params[1]);
int auxFormat = std::stoi(params[2]);
int subFormat = std::stoi(params[3]);
bool bESChangeStatus = (params[4] == "1" || params[4] == "true");
bool forwardAudioToAux = (params[5] == "1" || params[5] == "true");
bool setReadyAfterPipelineCreation = (params[6] == "1" || params[6] == "true");
bool isSubEnable = (params[7] == "1" || params[7] == "true");
int32_t trackId = std::stoi(params[8]);
gint rate = std::stoi(params[9]);
std::string pipelineNameStr = params[10];
int subFormat = std::stoi(params[2]);
bool bESChangeStatus = (params[3] == "1" || params[3] == "true");
bool setReadyAfterPipelineCreation = (params[4] == "1" || params[4] == "true");
bool isSubEnable = (params[5] == "1" || params[5] == "true");
int32_t trackId = std::stoi(params[6]);
gint rate = std::stoi(params[7]);
std::string pipelineNameStr = params[8];
const char* pipelineName = pipelineNameStr.c_str();
int PipelinePriority = std::stoi(params[11]);
bool subBool = (params[12] == "1" || params[12] == "true");
std::string url = params[13];
int PipelinePriority = std::stoi(params[9]);
bool subBool = (params[10] == "1" || params[10] == "true");
std::string url = params[11];

player.ConfigurePipeline(
format, audioFormat, auxFormat, subFormat,
bESChangeStatus, forwardAudioToAux, setReadyAfterPipelineCreation, isSubEnable,
format, audioFormat, subFormat,
bESChangeStatus, setReadyAfterPipelineCreation, isSubEnable,
trackId, rate, pipelineName, PipelinePriority, subBool, url
);
std::cout << "ConfigurePipeline executed.\n";
} catch (const std::exception& e) {
std::cout << "Error parsing parameters: " << e.what() << "\n";
std::cout << "Usage: configurepipeline <int> <int> <int> <int> <bool> <bool> <bool> <bool> <int32> <gint> <pipelineName> <int> <bool> <url>\n";
std::cout << "Usage: configurepipeline <int> <int> <int> <bool> <bool> <bool> <int32> <gint> <pipelineName> <int> <bool> <url>\n";
}
}

Expand Down Expand Up @@ -279,6 +277,19 @@ void pauseCommand(InterfacePlayerRDK& player, const std::vector<std::string>& pa
std::cout << "Pause executed. Result: " << (result ? "true" : "false") << "\n";
}

void resumeCommand(InterfacePlayerRDK& player, const std::vector<std::string>& 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<std::string>& params) {
player.ResumeInjector();
std::cout << "ResumeInjector executed.\n";
Expand Down Expand Up @@ -595,12 +606,13 @@ std::map<std::string, Command> initializeCommands(CommandExecutor& executor, Int
commands.emplace("setplayername", Command("setplayername", "Set player name. Usage: setplayername <name>", [&player](const std::vector<std::string>& params) { setPlayerNameCommand(player, params); }));
commands.emplace("setpreferreddrm", Command("setpreferreddrm", "Set preferred DRM. Usage: setpreferreddrm <drmID>", [&player](const std::vector<std::string>& params) { setPreferredDRMCommand(player, params); }));
commands.emplace("initializesourceforplayer", Command("initializesourceforplayer", "Initialize source. Usage: initializesourceforplayer <playerInstance(int)> <source(int)> <mediaType>", [&player](const std::vector<std::string>& params) { initializeSourceForPlayerCommand(player, params); }));
commands.emplace("configurepipeline", Command("configurepipeline", "Configure pipeline. Usage: configurepipeline <int> <int> <int> <int> <bool> <bool> <bool> <bool> <int32> <gint> <pipelineName> <int> <bool> <url>", [&player](const std::vector<std::string>& params) { configurePipelineCommand(player, params); }));
commands.emplace("configurepipeline", Command("configurepipeline", "Configure pipeline. Usage: configurepipeline <int> <int> <int> <bool> <bool> <bool> <int32> <gint> <pipelineName> <int> <bool> <url>", [&player](const std::vector<std::string>& params) { configurePipelineCommand(player, params); }));
commands.emplace("setpauseonstart", Command("setpauseonstart", "Enable/disable pause on start playback. Usage: setpauseonstart [true|false]", [&player](const std::vector<std::string>& params) { setPauseOnStartCommand(player, params); }));
commands.emplace("setplaybackrate", Command("setplaybackrate", "Set playback rate. Usage: setplaybackrate <rate>", [&player](const std::vector<std::string>& params) { setPlayBackRateCommand(player, params); }));
commands.emplace("setaudiovolume", Command("setaudiovolume", "Set audio volume. Usage: setaudiovolume <volume>", [&player](const std::vector<std::string>& params) { setAudioVolumeCommand(player, params); }));
commands.emplace("setupstream", Command("setupstream", "Setup stream. Usage: setupstream <streamId> <playerInstance(int)> <url>", [&player](const std::vector<std::string>& params) { setupStreamCommand(player, params); }));
commands.emplace("pause", Command("pause", "Pause the pipeline. Usage: pause [pause(bool)] [forceStop(bool)]", [&player](const std::vector<std::string>& params) { pauseCommand(player, params); }));
commands.emplace("resume", Command("resume", "Resume playback. Usage: resume", [&player](const std::vector<std::string>& params) { resumeCommand(player, params); }));
commands.emplace("resumeinjector", Command("resumeinjector", "Resume injector.", [&player](const std::vector<std::string>& params) { resumeInjectorCommand(player, params); }));
commands.emplace("stop", Command("stop", "Stop playback.", [&player](const std::vector<std::string>& params) { stopCommand(player, params); }));
commands.emplace("flush", Command("flush", "Flush pipeline.", [&player](const std::vector<std::string>& params) { flushCommand(player, params); }));
Expand Down
1 change: 1 addition & 0 deletions test/pi-cli/commandProcessing.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ void setPlayBackRateCommand(InterfacePlayerRDK& player, const std::vector<std::s
void setAudioVolumeCommand(InterfacePlayerRDK& player, const std::vector<std::string>& params);
void setupStreamCommand(InterfacePlayerRDK& player, const std::vector<std::string>& params);
void pauseCommand(InterfacePlayerRDK& player, const std::vector<std::string>& params);
void resumeCommand(InterfacePlayerRDK& player, const std::vector<std::string>& params);
void resumeInjectorCommand(InterfacePlayerRDK& player, const std::vector<std::string>& params);
void stopCommand(InterfacePlayerRDK& player, const std::vector<std::string>& params);
void flushCommand(InterfacePlayerRDK& player, const std::vector<std::string>& params);
Expand Down
Loading