Skip to content

Add Player Interface CLI simulator - #322

Open
TanujSharma369 wants to merge 1 commit into
developfrom
feature/Simulator
Open

TanujSharma369 wants to merge 1 commit into
developfrom
feature/Simulator

Conversation

@TanujSharma369

Copy link
Copy Markdown

Add the FFmpeg-backed pi-cli test player, playback controls, DASH support, and usage documentation.

@TanujSharma369
TanujSharma369 added this pull request to stack #323 November 1, 2026 12:51
Copilot AI lite review requested due to automatic review settings November 1, 2026 12:51
@TanujSharma369
TanujSharma369 requested a review from a team as a code owner November 1, 2026 12:51
@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 2 files pending identification.

  • Protex Server Path: /home/blackduck/github/middleware-player-interface/322/rdkcentral/middleware-player-interface

  • Commit: 3061175

Report detail: gist'

@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 2 files pending identification.

  • Protex Server Path: /home/blackduck/github/middleware-player-interface/322/rdkcentral/middleware-player-interface

  • Commit: 6b6c3f6

Report detail: gist'

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Approval is blocked by an active build-configuration failure and a critical cleanup path that can terminate the process by destroying a joinable thread.

2 open issues
What changed in this PR

Adds an FFmpeg-backed pi-player-simulator CLI for exercising InterfacePlayerRDK with HLS and DASH streams, including playback controls, track selection, trick play, ABR, and DASH resource handling.

Changes:

  • Adds FFmpeg demuxing, sample normalization, bounded queues, seeking, source switching, and playback controls.
  • Adds DASH manifest filtering, track cataloging, segment prefetching/caching, and bandwidth-based ABR.
  • Replaces the legacy CLI and Docker workflow with standalone build/run scripts, documentation, and an implementation plan.

This pull request requires changes.

File Description
test/​pi-cli/​src/​main.cpp Validates the stream URL and launches the simulator.
test/​pi-cli/​src/​console/​ConsolePlayer.h Declares the console frontend.
test/​pi-cli/​src/​console/​ConsolePlayer.cpp Implements command parsing, playback controls, status output, and input polling.
test/​pi-cli/​src/​backend/​PlayerBackend.h Defines playback state and source-management interfaces.
test/​pi-cli/​src/​backend/​MediaTrackCatalog.h Defines media track metadata and catalog structures.
test/​pi-cli/​src/​backend/​MediaTrackCatalog.cpp Discovers and selects DASH and FFmpeg tracks.
test/​pi-cli/​src/​backend/​FfmpegDemuxSource.h Declares FFmpeg demuxing, queueing, seeking, and sample delivery.
test/​pi-cli/​src/​backend/​FfmpegDemuxSource.cpp Implements HLS/DASH ingest, packet normalization, seeking, and bounded queues.
test/​pi-cli/​src/​backend/​DashResourceProxy.h Declares the in-memory DASH resource proxy.
test/​pi-cli/​src/​backend/​DashResourceProxy.cpp Implements DASH filtering, segment prefetching, caching, loopback serving, and bandwidth measurement.
test/​pi-cli/​src/​backend/​AbrController.h Defines ABR decision state and controller APIs.
test/​pi-cli/​src/​backend/​AbrController.cpp Implements bandwidth-based representation selection.
test/​pi-cli/​run.sh Configures runtime library paths and launches the simulator.
test/​pi-cli/​README.md Documents architecture, controls, setup, limitations, and validation.
test/​pi-cli/​main.cpp Removes the obsolete CLI entry point.
test/​pi-cli/​Dockerfile Removes the obsolete Docker-based workflow.
test/​pi-cli/​commandProcessing.h Removes legacy command declarations.
test/​pi-cli/​commandProcessing.cpp Removes the legacy command executor and implementations.
test/​pi-cli/​CMakeLists.txt Defines the simulator target and native dependencies.
test/​pi-cli/​build.sh Checks dependencies and builds the simulator.
PLAYER-SIMULATOR-PLAN.md Documents simulator goals, design, implementation phases, and validation gates.
DemuxDataTypes.h Updates MediaCodecInfo initialization.

Review effort: Lite

StopTrickModePrewarming();
if (player_ != nullptr && !stopped_) {
player_->Stop(true);
stopped_ = true;
add_executable(pi-cli
main.cpp
commandProcessing.cpp
pkg_check_modules(PLAYERGSTINTERFACE REQUIRED IMPORTED_TARGET libplayergstinterface)
Copilot AI lite review requested due to automatic review settings November 1, 2026 12:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Critical build integration and thread-linking failures, along with a moderate audio-switch deadlock, remain unresolved.

4 open issues

Review effort: Lite

Comment on lines +30 to +35
target_link_libraries(pi-player-simulator PRIVATE
PkgConfig::PLAYERGSTINTERFACE
PkgConfig::GLIB
PkgConfig::FFMPEG
PkgConfig::LIBXML2
)
Comment on lines +827 to +829
if (!playing_ || source_ == nullptr) {
return;
}
Copilot AI lite review requested due to automatic review settings November 1, 2026 13:14
@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/middleware-player-interface/322/rdkcentral/middleware-player-interface

  • Commit: 2f93a2d

Report detail: gist'

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Several unresolved critical issues can cause build failures, dangling-reference crashes, incomplete worker teardown, continued invalid feeding after pipeline errors, and unrestricted non-HTTP resource access.

8 open issues

Review effort: Lite

Comment on lines +504 to +505
[this, &source](int mediaType, uint64_t seekGeneration) {
if (seekGeneration != source.GetSeekGeneration()) {
Comment on lines +2716 to +2723
switch (event.msgType) {
case MESSAGE_ERROR:
LogStartupMilestone("player-interface-error: " + event.msg +
" | debug: " + event.dbg_info);
statusMessage_ = event.msg.empty() ? "Playback error" : event.msg;
pendingPlayerEos_ = false;
endOfStream_ = false;
playing_ = false;
Comment on lines +113 to +121
std::string ResolveHttpUrl(const std::string& baseUrl,
const std::string& reference)
{
if (reference.empty()) {
return baseUrl;
}
if (reference.find("://") != std::string::npos) {
return reference;
}
Comment on lines +259 to +265
for (xmlNodePtr child = adaptationSet->children;
child != nullptr;
child = child->next) {
if (child->type == XML_ELEMENT_NODE &&
xmlStrEqual(child->name, BAD_CAST "Representation")) {
selectedRepresentation = child;
break;
Copilot AI lite review requested due to automatic review settings November 1, 2026 13:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot AI lite review requested due to automatic review settings November 1, 2026 13:25
@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/middleware-player-interface/322/rdkcentral/middleware-player-interface

  • Commit: 7b5f397

Report detail: gist'

Add the FFmpeg-backed pi-cli test player, playback controls, DASH support, and usage documentation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +2005 to +2009
(track.packets.size() < kMaximumQueuedPackets &&
(track.queuedBytes == 0 ||
packet.data.size() <=
kMaximumQueuedBytes -
std::min(track.queuedBytes, kMaximumQueuedBytes)));
Copilot AI lite review requested due to automatic review settings November 1, 2026 13:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +1024 to +1026
return dashResourceProxy_ == nullptr
? 0
: dashResourceProxy_->GetEstimatedBandwidthBitsPerSecond();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants