RDKEMW-18010: Player Interface:Feature Additions, Metrics, Test Cases, and Quality Improvements - #173
RDKEMW-18010: Player Interface:Feature Additions, Metrics, Test Cases, and Quality Improvements#173dp0000 wants to merge 150 commits into
Conversation
Signed-off-by: nrames759 <Naren_Ramesh@comcast.com>
Signed-off-by: nrames759 <Naren_Ramesh@comcast.com>
…rash & LLAMA freeze issue Reason for change : Addressing the above changes in middleware-player-interface Test Steps : E2E testing to check regression . Signed-off by: Deepikasri Natarajan
RDKEMW-18010 Middleware-player-interface feature development and inalign with dev_sprint
…and inalign with dev_sprint"
…_pli Revert "RDKEMW-18010 Middleware-player-interface feature development and inalign with dev_sprint"
There was a problem hiding this comment.
Pull request overview
This PR is a broad refactor/cleanup across the middleware player interface, focused on consolidating/reshaping unit tests (including DRM/OCDM coverage and CMake/coverage wiring), simplifying some vendor SoC abstraction code paths (notably video PTS handling), and removing or relocating several legacy test suites and helpers.
Changes:
- Simplifies/adjusts SoC vendor interfaces (e.g.,
GetVideoPts) and related fake implementations. - Restructures unit tests: removes multiple legacy utest suites/runners, adds a new
DrmOcdmutest suite, and updates many utest CMake/coverage/link settings. - Refactors/adjusts DRM and plugin code paths (GStreamer decryptors, session manager behavior) and moves
MediaSampledefinition intoDemuxDataTypes.h.
Reviewed changes
Copilot reviewed 84 out of 184 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| vendor/SocInterface.h | Removes video-pts property probing helpers and updates GetVideoPts API comment. |
| vendor/SocInterface.cpp | Simplifies GetVideoPts implementation to directly query video-pts. |
| vendor/realtek/RealtekSocInterface.h | Removes Realtek overrides related to property discovery; updates GetVideoPts comment. |
| vendor/realtek/RealtekSocInterface.cpp | Changes Realtek GetVideoPts implementation to direct g_object_get. |
| test/utests/tests/WebVttSubtecParserTests/WebVttSubtecParserPlayer.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/WebVttSubtecParserTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/WebvttSubtecDevInterfaceTests/WebvttSubtecDevInterfacePlayer.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/WebvttSubtecDevInterfaceTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/VendorTests/PlayerVendorRun.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/VendorTests/CMakeLists.txt | Removes CMake target for vendor unit tests suite. |
| test/utests/tests/TtmlSubtecParser/TtmlSubtecParserPlayer.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/TtmlSubtecParser/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/TextStyleAttributes/CMakeLists.txt | Updates include/source/link/coverage wiring for this utest target. |
| test/utests/tests/SubtitleTests/SubtitleRun.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/SubtitleTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/SubtecTests/PlayerSubtecTests.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/SubtecTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/PluginsTests/CMakeLists.txt | Refactors plugin utest build to compile gst decryptor sources directly and adjusts linking/coverage. |
| test/utests/tests/PlayerUtilsTests/CMakeLists.txt | Adjusts include paths (including casing changes) and keeps utest target wiring. |
| test/utests/tests/PlayerLogManagerTests/PlayerLogManagerRun.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/PlayerLogManagerTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/PlayerJsonObjectTests/PlayerJsonObjectRun.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/PlayerJsonObjectTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/PlayerIsoBmffTests/PlayerIsoBmffTestRunner.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/PlayerIsoBmffTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/PlayerExternalsTests/PlayerRFCFun.cpp | Removes RFC externals unit tests source. |
| test/utests/tests/PlayerExternalsTests/PlayerMacros.h | Removes custom EXPECT_NO_THROW macro header. |
| test/utests/tests/PlayerExternalsTests/PlayerExternalUtilsFun.cpp | Removes externals utils unit tests source. |
| test/utests/tests/PlayerExternalsTests/PlayerExternalsRun.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/PlayerExternalsTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/PlayerCommonTests/PlayerCommonRun.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/PlayerCommonTests/gstPlayerTaskPoolFun.cpp | Removes task-pool unit test source. |
| test/utests/tests/PlayerCommonTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/OCDMSessionAdapter/CMakeLists.txt | Updates coverage wiring and target link libraries. |
| test/utests/tests/OcdmBasicSessionAdapterTests/FunctionalTests.cpp | Fixes mock setup ordering and minor matcher/expectation issues. |
| test/utests/tests/OcdmBasicSessionAdapterTests/CMakeLists.txt | Simplifies/normalizes include paths and updates coverage wiring. |
| test/utests/tests/GstPluginsTests/GstwidevinedecryptorFun.cpp | Removes gst plugin L1 test source. |
| test/utests/tests/GstPluginsTests/GstverimatrixdecryptorFun.cpp | Removes gst plugin L1 test source. |
| test/utests/tests/GstPluginsTests/GstPlugingRun.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/GstPluginsTests/GstplayreadydecryptorFun.cpp | Removes gst plugin L1 test source. |
| test/utests/tests/GstPluginsTests/GstclearkeydecryptorFun.cpp | Removes gst plugin L1 test source. |
| test/utests/tests/GstPluginsTests/GstcdmidecryptorFun.cpp | Removes gst plugin L1 test source. |
| test/utests/tests/GstPluginsTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/GstPlugingSubtecTests/GstvipertransformFun.cpp | Removes gst subtec plugin L1 test source. |
| test/utests/tests/GstPlugingSubtecTests/GstsubtecsinkFun.cpp | Removes gst subtec plugin L1 test source. |
| test/utests/tests/GstPlugingSubtecTests/Gstsubtecmp4transformFun.cpp | Removes gst subtec plugin L1 test source. |
| test/utests/tests/GstPlugingSubtecTests/GstsubtecbinFun.cpp | Removes gst subtec plugin L1 test source. |
| test/utests/tests/GstPlugingSubtecTests/GstPlugingSubtecRun.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/GstPlugingSubtecTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/GstPlayer/PauseOnPlaybackTests.cpp | Updates tests to match new ConfigurePipeline signature; adjusts frame-step property test setup. |
| test/utests/tests/GstPlayer/FunctionalTests.cpp | Updates tests to match new ConfigurePipeline signature. |
| test/utests/tests/GstPlayer/CMakeLists.txt | Refactors GstPlayer utest target build; updates coverage/linking and sources list. |
| test/utests/tests/GstHandlerControlTests/CMakeLists.txt | Removes unused includes and updates coverage wiring. |
| test/utests/tests/FireBoltTests/FireBoltRun.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/FireBoltTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/DrmUrlTests/CMakeLists.txt | Updates include roots and coverage/link wiring. |
| test/utests/tests/DrmTests/DrmTestsRun.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/DrmTests/DrmMemorySystemTests.cpp | Removes DRM memory system L1 tests source. |
| test/utests/tests/DrmTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/DrmSessionManagerTests/CMakeLists.txt | Updates include path casing and retains target wiring. |
| test/utests/tests/DrmSecureClient/CMakeLists.txt | Updates include path casing and simplifies link options/coverage wiring. |
| test/utests/tests/DrmOcdmTests/DrmOcdmTestsRun.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/DrmOcdmTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/DrmOcdm/DrmUtilsTests.cpp | Adds new DrmOcdm unit tests for URL resolution behavior. |
| test/utests/tests/DrmOcdm/DrmTestsRun.cpp | Adds new DrmOcdm utest runner main. |
| test/utests/tests/DrmOcdm/DrmHLSTests.cpp | Adds new DrmOcdm tests for HLS content protection parsing behavior. |
| test/utests/tests/DrmOcdm/CMakeLists.txt | Renames/repurposes suite target to DrmOcdm; adjusts sources, defs, and linking. |
| test/utests/tests/DrmHelperTests/DrmHelperTestsRun.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/DrmHelperTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/ContentsecuritymanagerTests/PlayerContentSecurityRun.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/ContentsecuritymanagerTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/CMakeLists.txt | Updates utests directory list: adds DrmOcdm and removes many retired suites. |
| test/utests/tests/ClosedCaptionsTests/PlayerCCTrackInfoTests.cpp | Removes closed captions L1 test source. |
| test/utests/tests/ClosedCaptionsTests/PlayerCCManagerTests.cpp | Removes standalone utest runner main for this suite. |
| test/utests/tests/ClosedCaptionsTests/CMakeLists.txt | Removes CMake target for this suite. |
| test/utests/tests/Base64PLAYER/CMakeLists.txt | Updates coverage wiring and link line normalization. |
| test/utests/run.sh | Adjusts lcov invocation (removes --ignore-errors mismatch). |
| test/utests/mocks/MockPacketSender.h | Removes mock packet sender header. |
| test/utests/mocks/MockHlsDrmSession.h | Removes mock HLS DRM session header. |
| test/utests/mocks/MockDrmSession.h | Adjusts mock DRM session API surface (constructor, methods). |
| test/utests/mocks/MockDrmCallbacks.h | Removes mock DRM callbacks header. |
| test/utests/fakes/FakeSubtecConnecter.cpp | Removes fake Subtec connector implementation. |
| test/utests/fakes/FakeSocUtils.cpp | Removes isGstSubtecEnabled() fake implementation. |
| test/utests/fakes/FakeSocInterface.cpp | Updates fake SoC interface PTS/master logic and string prefix helper behavior. |
| test/utests/fakes/FakeGStreamer.cpp | Removes several gst get_type stubs for subtec/verimatrix helpers. |
| test/utests/fakes/FakeGstHandlerControl.cpp | Simplifies fake waitForDone behavior. |
| test/utests/fakes/FakeCrypto.cpp | Removes OpenSSL fake shim. |
| test/utests/fakes/FakeContentProtectionFireBolt.cpp | Removes Firebolt content protection fake implementation. |
| test/utests/CMakeLists.txt | Removes player_utest_add_cov() helper function. |
| playerLogManager/PlayerLogManager.cpp | Adjusts Ethan logger formatting behavior around newline stripping. |
| playerisobmff/playerisobmffbuffer.h | Removes multiple buffer accessors and getChunkedBox() API; keeps only getChunkedfBox(). |
| playerisobmff/playerisobmffbuffer.cpp | Removes several accessors; changes getChunkedfBox() implementation. |
| playerisobmff/playerisobmffbox.cpp | Refactors SencIsoBmffBox::truncate() implementation. |
| MediaSample.h | Removes standalone MediaSample transport header. |
| InterfacePlayerRDK.h | Removes MediaSample.h include, removes live-latency flag from ConfigurePipeline, and removes GetVideoPosition(). |
| GstHandlerControl.cpp | Removes negative-delay early return/logging. |
| gst-plugins/drm/gst/gstwidevinedecryptor.cpp | Removes AC4 caps entries from Widevine decryptor templates. |
| gst-plugins/drm/gst/gstverimatrixdecryptor.cpp | Removes AC4 caps entries from Verimatrix decryptor templates. |
| gst-plugins/drm/gst/gstplayreadydecryptor.cpp | Removes AC4 caps entries from PlayReady decryptor templates. |
| gst-plugins/drm/gst/gstclearkeydecryptor.cpp | Removes AC4 caps entries from ClearKey decryptor templates. |
| gst-plugins/drm/gst/gstcdmidecryptor.cpp | Adjusts initialization locking and sink-event resource management behavior. |
| externals/rdk/PlayerExternalsRdkInterface.cpp | Simplifies exception handling/logging in device settings interactions. |
| externals/PlayerExternalsInterfaceBase.h | Changes base constructor initialization list. |
| externals/PlayerExternalsInterface.h | Removes many inline getters/setters from the fake externals interface. |
| externals/IFirebolt/FireboltInterface.cpp | Removes explicit initialization of connection fields in FIREBOLT_ENDPOINT error path. |
| externals/contentsecuritymanager/SecManagerThunder.cpp | Refactors license decode allocation/log/free ordering. |
| externals/contentsecuritymanager/PlayerMemoryUtils.cpp | Changes shared memory key generation approach. |
| externals/contentsecuritymanager/IFirebolt/ContentProtectionFirebolt.cpp | Fixes license request variable usage and refactors decode/free ordering. |
| externals/contentsecuritymanager/ContentSecurityManagerSession.h | Refactors locking in copy ctor/assignment. |
| drm/ocdm/OcdmGstSessionAdapter.cpp | Adjusts SEI extraction buffer mapping logic. |
| drm/HlsOcdmBridge.h | Inlines GetState() implementation. |
| drm/HlsOcdmBridge.cpp | Removes mutex-protected GetState() implementation from .cpp. |
| drm/HlsDrmSessionManager.h | Removes in-class nullptr initialization of mDrmSession. |
| drm/helper/VerimatrixHelper.cpp | Removes null guard and changes setData() argument casting style. |
| drm/DrmSessionManager.cpp | Refactors failed-session cleanup logic and lock usage. |
| drm/aes/Aes.cpp | Refactors logging/state access patterns and constructor init ordering. |
| DemuxDataTypes.h | Adds MediaSample definition (vector-backed) and includes <cstring>. |
| CMakeLists.txt | Removes global COVERAGE_ENABLED compiler/linker flag injection; removes MediaSample install entries. |
| baseConversion/_base64.cpp | Removes input guards in base64 encode/decode. |
| aamp_sync_cid.txt | Updates sync CID value. |
| .gitignore | Removes sync artifacts ignore rules. |
| .github/workflows/L1-tests.yml | Adjusts install script invocation arguments for native build step. |
Comments suppressed due to low confidence (1)
gst-plugins/drm/gst/gstcdmidecryptor.cpp:779
sinkpadwas changed fromg_autoptr(GstPad)to a raw pointer, but there are multiple earlybreak;paths in this case block (e.g., whensessionManageris NULL orgst_buffer_mapfails). These paths now leaksinkpad(and potentially other resources) becausegst_object_unref(sinkpad)is only reached at the end.
GstPad * sinkpad = gst_element_get_static_pad(
reinterpret_cast<GstElement*>(cdmidecryptor), "sink");
if(cdmidecryptor->sessionManager == NULL)
{
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…lopment and inalign with dev_sprint""
…/dev_sprint_pli Revert "Revert "RDKEMW-18010 Middleware-player-interface feature development and inalign with dev_sprint""
RDKEMW-19919 : No WebVTT subtitles shown on some channels when PTS restamping enabled
RDKEMW-19686 [Develop]Bringing RKDEMW-19683 , RDKEMW-19684, RDKEMW-19685 to middleware-player-interface
…n for libds Methods and Event Notifications Added check for containerized environments
…in for libds Methods and Event Notifications Reason for change : Link firebolt dependencies when iarm path is selected
Add mutex guard in RemoveEventHandlers Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…gin for libds Methods and Event Notifications Reason for change : Added SetHDMIStatus() function in fireboltinterface.cpp Priority: P1 Test Steps : Mentioned in ticket Signed off by : Nejuma T N <nejumatn28@gmail.com>
…gin for libds Methods and Event Notifications Reason for change : Resolve compilation errors Priority: P1 Test Steps : Mentioned in ticket Signed off by : Nejuma T N <nejumatn28@gmail.com>
…in for libds Methods and Event Notifications Reason for change : Update CMakeLists.txt
…in for libds Methods and Event Notifications Reason for change : Update CMakeLists.txt
…ethods and Event Notifications Reason for change: Update CMakeLists.txt
…gin for libds Methods and Event Notifications Reason for change : add mutex lock in DeviceFireboltInterface.cpp
…in for libds Methods and Event Notifications Reason for change : Update DeviceFireboltInterface.h
…in for libds Methods and Event Notifications Update CMakelists.txt
…gin for libds Methods and Event Notifications Reason for change : Address copilot review comments Priority : P1 Signed off by : nejumatn28@gmail.com
…gin for libds Methods and Event Notifications Reason for change : Remove iarm/firebolt compilation in case of native builds
…in for libds Methods and Event Notifications Reason for change: Remove redundant Firebolt init calls
…n for libds Methods and Event Notifications Added check for containerized environments
…in for libds Methods and Event Notifications Reason for change : Link firebolt dependencies when iarm path is selected
Add mutex guard in RemoveEventHandlers Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Reason for change: Added fix for use-after-free and copy instead of move issues Test procedure: As in ticket Risks: Medium
…in for libds Methods and Event Notifications USE_DS_EVENT_SUPPORTED should not be defined Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…gin for libds Methods and Event Notifications Native builds should not compile IARM Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
RDKEMW-23008: Fix remaining coverity issues
There was a problem hiding this comment.
🟡 Changes recommended
Confirmed build/behavior issues exist (case-mismatched unit-test include directories and redundant synchronous HDMI status handling that blocks the IARM dispatch thread).
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (3)
test/utests/tests/InterfacePlayerTests/InterfacePlayerFunctionTests.cpp:1920
- This PR removed the GetVideoPosition/GetVideoPTS unit tests (and the SocInterface-based PTS mock). A repo-wide search shows no remaining GetVideoPTS tests, so this is a net loss of coverage for PTS/position behavior (including the fallback path). Consider reintroducing those tests (possibly in a dedicated test file) to avoid regressions.
externals/rdk/IIarm/DeviceIARMInterface.cpp:448 HDMIEventHandlercallsSetHDMIStatus()synchronously here and also dispatches another call on a detached thread below. The synchronous call blocks the IARM dispatch thread (contrary to the comment) and duplicates work; it should be removed so updates happen only on the worker thread.
externals/rdk/IIarm/DeviceIARMInterface.cpp:464- Same issue as the HDMI_HOTPLUG case above:
SetHDMIStatus()is invoked synchronously here and then again on a detached worker thread, which both blocks the IARM dispatch thread and duplicates work. Remove the synchronous call and rely on the worker thread.
- Files reviewed: 78/95 changed files
- Comments generated: 4
- Review effort level: Lite
| include_directories(${PLAYER_ROOT}/subtec/subtecparser) | ||
| include_directories(${PLAYER_ROOT}/playerLogManager) | ||
| include_directories(${PLAYER_ROOT}/playerJsonObject) | ||
| include_directories(${PLAYER_ROOT}/playerjsonobject) |
| include_directories(${PLAYER_ROOT}/subtec/subtecparser) | ||
| include_directories(${PLAYER_ROOT}/playerLogManager) | ||
| include_directories(${PLAYER_ROOT}/playerJsonObject) | ||
| include_directories(${PLAYER_ROOT}/playerjsonobject) |
| include_directories(${PLAYER_ROOT}/subtec/subtecparser) | ||
| include_directories(${PLAYER_ROOT}/playerLogManager) | ||
| include_directories(${PLAYER_ROOT}/playerJsonObject) | ||
| include_directories(${PLAYER_ROOT}/playerjsonobject) |
| auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>( | ||
| std::chrono::steady_clock::now() - t0).count(); | ||
| std::cout << " ms_sleep(0) elapsed = " << elapsed << " ms (expected < 50 ms)" << std::endl; | ||
| EXPECT_LT(elapsed, 50); |
|
|
||
| if(sourceWidth != m_sourceWidth || sourceHeight != m_sourceHeight) { | ||
| MW_LOG_WARN("viddec (%p) --> says width %d, height %d", m_gstElement, sourceWidth, sourceHeight); | ||
| MW_LOG_WARN("viddec (%p) --> says width %d, height %d", element, sourceWidth, sourceHeight); |
Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…in for libds Methods and Event Notifications- #249 Reason for change : Dont pass USE_FIREBOLT=ON for native builds, fix use after free issue
RDKEMW-19159: Update AAMP (dsMgr Client) to Use Existing Thunder Plugin for libds Methods and Event Notifications
This ticket tracks all feature development, integration, bug fixes, and quality improvements associated with the feature/dev_sprint_pli branch of the middleware-player-interface repository. Key activities include:
Addition of new player interface features and public APIs
Implementation of metrics collection for API usage
Integration and migration of new L1 test cases
Resolution of native build-related issues and other reported bugs
Coverity scan fixes and automated code quality improvements
All changes targeting this branch aim to enhance the robustness, test coverage, and maintainability of the player interface.