RDKEMW-12345: versioning update - #237
Open
dp0000 wants to merge 5 commits into
Open
Conversation
… plugin scan Reason for change : Plugin Scan was not initiated in SocInterface and the gsocPointer is not updated Priority : P0 Test steps : check all the apps on closed captions conditions/reboot sceanrios Signed off by: Deepikasri N Deepikasri_n@comcast.com
… plugin scan Reason for change : Plugin Scan was not initiated in SocInterface and the gsocPointer is not updated Priority : P0 Test steps : check all the apps on closed captions conditions/reboot sceanrios Signed off by: Deepikasri N Deepikasri_n@comcast.com
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces build-time version/Git metadata embedding and updates SoC platform initialization so the SocInterface singleton can be safely created early (device.properties only) and optionally re-detected later via GStreamer plugin scan. It also adjusts InterfacePlayerRDK to avoid caching SocInterface instances so platform re-detection/replacement can be observed by existing objects.
Changes:
- Add CMake-driven generation/installation of a
version.hheader (version + git revision/tag/branch) and a utility to print it. - Refactor
SocInterfaceinitialization into a two-phase flow with synchronization primitives and a plugin-scan “phase 2” entrypoint. - Update
InterfacePlayerRDK/helpers to resolve the SoC interface via the singleton each time (and adjust theFlushsignature).
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 template for generated build/version metadata header. |
| CMakeLists.txt | Captures Git metadata at configure time; generates + installs version.h. |
| PlayerUtils.h | Declares PrintPlayerInterfaceVersion(). |
| PlayerUtils.cpp | Includes generated version.h and implements version printing. |
| vendor/SocInterface.h | Declares phase-2 plugin-based platform initialization API. |
| vendor/SocInterface.cpp | Introduces synchronized two-phase singleton init and plugin-scan-based replacement. |
| SocUtils.cpp | Stops caching SocInterface pointer to allow runtime replacement visibility. |
| InterfacePlayerPriv.h | Removes cached socInterface member; adds GetSocInterface() accessor. |
| InterfacePlayerRDK.h | Updates Flush declaration (signature change). |
| InterfacePlayerRDK.cpp | Calls version print, triggers plugin init + SoC init, and routes calls via GetSocInterface(). |
Suppressed comments (1)
InterfacePlayerRDK.cpp:3510
- If SetStateWithWarnings() returns neither SUCCESS nor ASYNC, Pause() logs an error but still returns true. That hides state-change failures from callers.
else if (GST_STATE_CHANGE_SUCCESS != rc)
{
MW_LOG_ERR("InterfacePlayerRDK_Pause - gst_element_set_state - FAILED rc %d ", rc);
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+26
to
+30
| /* | ||
| * (all existing content unchanged — append below RawKeyToKeyId) | ||
| */ | ||
|
|
||
| #include "version.h" |
Comment on lines
+304
to
+312
| void PrintPlayerInterfaceVersion() | ||
| { | ||
| printf("###################################################\n"); | ||
| printf("[PlayerInterface] Version : %s\n", PLAYERINTERFACE_VERSION); | ||
| printf("[PlayerInterface] Git Rev : %s\n", PLAYERINTERFACE_GIT_REVISION); | ||
| printf("[PlayerInterface] Git Tag : %s\n", PLAYERINTERFACE_GIT_TAG); | ||
| printf("[PlayerInterface] Git Branch: %s\n", PLAYERINTERFACE_GIT_BRANCH); | ||
| printf("###################################################\n"); | ||
| } |
Comment on lines
3502
to
3505
| if (nextState != validateStateWithMsTimeout(this,nextState, 100)) | ||
| { | ||
| MW_LOG_ERR("InterfacePlayerRDK_Pause - validateStateWithMsTimeout - FAILED GstState %d ret-false", nextState); | ||
| retValue = false; | ||
| MW_LOG_ERR("InterfacePlayerRDK_Pause - validateStateWithMsTimeout - FAILED GstState %d", nextState); | ||
| } |
Comment on lines
739
to
+743
| * @param[in] shouldTearDown Whether to tear down the pipeline. | ||
| * @param[in] GstState The desired GStreamer pipeline state. | ||
| * @param[in] gstMediaFormat The media format for the pipeline. | ||
| * @param[in] keepPausedSeek true only for an explicit seek-with-keepPaused request | ||
| */ | ||
| bool Flush(double position, int rate, bool shouldTearDown, bool isAppSeek, bool keepPausedSeek); | ||
| bool Flush(double position, int rate, bool shouldTearDown, bool isAppSeek); |
Comment on lines
+43
to
+49
| 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 | ||
| ) |
Comment on lines
+25
to
+28
| # --------------------------------------------------------------------------- | ||
| # Player Interface build-time version / Git metadata | ||
| # Values are baked into version.h at compile time — no runtime git needed. | ||
| # --------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.