Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds build-time version/Git metadata for the Player-Interface component (to surface SRCREV/TAG details at runtime), and wires that information into the player’s startup path. It also refactors SoC interface initialization to support a two-phase platform detection flow (device.properties first, optional plugin scan later) and updates related call sites.
Changes:
- Generate and install a
version.hheader from CMake containing version, git revision, tag, and branch metadata. - Add
PrintPlayerInterfaceVersion()and invoke it during player construction to display the baked-in metadata. - Refactor
SocInterfaceinitialization into a guarded singleton with optional phase-2 platform detection and update call sites accordingly (plus a public API signature change toFlush()).
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| version.h.in | New CMake-configured header template for version/Git metadata macros. |
| CMakeLists.txt | Collect Git metadata at configure time, generate/install version.h, and expose build dir includes. |
| PlayerUtils.h | Declare PrintPlayerInterfaceVersion(). |
| PlayerUtils.cpp | Include generated version.h and implement version/Git metadata printing. |
| InterfacePlayerRDK.cpp | Call PrintPlayerInterfaceVersion() during construction; adjust SocInterface usage via accessor. |
| InterfacePlayerRDK.h | Update Flush() signature (removes keepPausedSeek). |
| InterfacePlayerPriv.h | Remove cached SocInterface pointer; add GetSocInterface() accessor; make using_westerossink atomic. |
| vendor/SocInterface.h | Add InitializePlatformFromPlugins() API for phase-2 initialization. |
| vendor/SocInterface.cpp | Implement two-phase singleton initialization with synchronization primitives. |
| SocUtils.cpp | Stop caching SocInterface in SocUtils and always resolve via CreateSocInterface(). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…e component Reason for change : Src rev is not been known in the sw loaded . Priority : P0 Test steps : check all the apps on the version info of player-interface component. Signed off by: Deepikasri N Deepikasri_n@comcast.com
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 10 changed files in this pull request and generated 3 comments.
Suppressed comments (3)
Previously missed (1) — in code that hasn't changed since the last review.
InterfacePlayerRDK.cpp:333
GetSocInterface()ultimately locksg_socMutexon every call. In this block it's called 3+ times back-to-back; caching the pointer locally avoids repeated locking and makes the logic easier to read.
bool useWesterosSink = m_gstConfigParam->useWesterosSink;
if (!useWesterosSink && !m_gstConfigParam->useRialtoSink && interfacePlayerPriv->GetSocInterface()->UseWesterosSink())
{
MW_LOG_WARN("Platform requires westerossink; correcting cached sink state");
useWesterosSink = true;
}
if(!useWesterosSink)
{
interfacePlayerPriv->gstPrivateContext->using_westerossink = false;
interfacePlayerPriv->GetSocInterface()->SetWesterosSinkState(false);
interfacePlayerPriv->gstPrivateContext->firstTuneWithWesterosSinkOff = interfacePlayerPriv->GetSocInterface()->IsFirstTuneWithWesteros();
}
CMakeLists.txt:49
git tag --points-at HEADcan return multiple tags separated by newlines; that newline will be embedded intoPLAYERINTERFACE_GIT_TAGand will break log formatting (and the generated header becomes harder to consume). Normalizing to a single-line value avoids this.
execute_process(
COMMAND ${GIT_EXECUTABLE} tag --points-at HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE PI_GIT_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
InterfacePlayerRDK.cpp:3510
- If
SetStateWithWarnings()fails (non-success, non-async), this still returnstrue. Returning failure here is important for error handling by API consumers.
else if (GST_STATE_CHANGE_SUCCESS != rc)
{
MW_LOG_ERR("InterfacePlayerRDK_Pause - gst_element_set_state - FAILED rc %d ", rc);
}
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The new version-printing path has correctness/behavior mismatches (commented-out fields and repeated logging) and the installed header name risks collisions, so the implementation should be adjusted before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
PlayerUtils.cpp:308
- PrintPlayerInterfaceVersion currently comments out the Version and Git Branch logs, which contradicts the function’s stated purpose; additionally, it can be called multiple times (e.g., per InterfacePlayerRDK construction) and will spam logs. Make the function idempotent and log all baked-in fields consistently.
MW_LOG_MIL("###################################################\n");
// MW_LOG_MIL("[PlayerInterface] Version : %s\n", PLAYERINTERFACE_VERSION);
MW_LOG_MIL("[PlayerInterface] Git Rev : %s\n", PLAYERINTERFACE_GIT_REVISION);
MW_LOG_MIL("[PlayerInterface] Git Tag : %s\n", PLAYERINTERFACE_GIT_TAG);
// MW_LOG_MIL("[PlayerInterface] Git Branch: %s\n", PLAYERINTERFACE_GIT_BRANCH);
- Files reviewed: 5/5 changed files
- Comments generated: 5
- Review effort level: Lite
| install(FILES "${CMAKE_CURRENT_BINARY_DIR}/version.h" | ||
| DESTINATION include) |
| #include "PlayerUtils.h" | ||
| #include "_base64.h" | ||
| #include <cstdio> | ||
|
|
||
| #include "version.h" |
|
|
||
| #include <PlayerLogManager.h> | ||
| //Delete non-array object |
| /** | ||
| * @fn PrintPlayerInterfaceVersion | ||
| * @brief Prints PlayerInterface version, git revision, tag and branch to stdout. | ||
| * Call once during library initialisation. | ||
| */ |
|
|
||
| /* |
RDKEMW-24194: [8.6_vipa]Display SRCREV/TAG details of Player-Interface component
Reason for change : Src rev is not been known in the sw loaded .
Priority : P0
Test steps : check all the apps on the version info of player-interface component.
Signed off by: Deepikasri N Deepikasri_n@comcast.com