Conversation
…rface - Add TelemetryMarkers.h with macro definitions for all 17 telemetry event names - Add PlayerTelemetry.h with sendEvent() overloads backed by MW_LOG_MIL - Instrument InterfacePlayerRDK.cpp with 19 PlayerTelemetry::sendEvent() calls: lifecycle (init/shutdown), playback (started/paused/resumed/stopped/completed), buffering (started/ended), seek (started/completed), error (generic/network/decode), pipeline state change failure, EOS detected, and track switched Co-authored-by: dp0000 <53818367+dp0000@users.noreply.github.com> Agent-Logs-Url: https://github.com/rdkcentral/middleware-player-interface/sessions/568b6714-9c63-4663-9966-49cffd3749de
Copilot
AI
changed the title
[WIP] Implement runtime telemetry event emission in player interface
Add runtime telemetry event emission to InterfacePlayerRDK
Mar 25, 2026
…l subsystems - TelemetryMarkers.h: add 10 new markers for DRM/OCDM/HDCP/handler failures - GstHandlerControl.cpp: emit HANDLER_TIMEOUT when waitForDone() times out - drm/DrmSessionManager.cpp: emit DRM_HELPER_NOT_FOUND, DRM_PSSH_PARSE_FAILED, DRM_SESSION_CREATE_FAILED, and DRM_SESSION_INIT_FAILED (3 variants) - drm/ocdm/opencdmsessionadapter.cpp: emit OCDM_SYSTEM_CREATE_FAILED and OCDM_SESSION_CREATE_FAILED with key system and error code payload - gst-plugins/drm/gst/gstcdmidecryptor.cpp: emit HDCP_PROTECTION_FAILURE, HDCP_COMPLIANCE_FAILURE, and DECRYPT_FAILURE at threshold-breach points Co-authored-by: dp0000 <53818367+dp0000@users.noreply.github.com> Agent-Logs-Url: https://github.com/rdkcentral/middleware-player-interface/sessions/00222964-3d85-4630-8c0d-e2154ccb0f98
Copilot
AI
changed the title
Add runtime telemetry event emission to InterfacePlayerRDK
Add runtime telemetry emission across player, DRM, OCDM, HDCP, and handler subsystems
Mar 25, 2026
PlayerTelemetry.h: split into two #ifdef PLAYER_TELEMETRY_SUPPORT branches - Active branch: includes <map>, MW_LOG_MIL emission (compiled when flag set) - No-op stub branch: empty inline sendEvent() overloads (zero overhead when flag absent); call sites need no per-call #ifdef guards in either case CMakeLists.txt: add CMAKE_PLAYER_TELEMETRY_SUPPORT option that appends -DPLAYER_TELEMETRY_SUPPORT to LIBPLAYERGSTINTERFACE_DEFINES, following the same pattern used by CMAKE_GST_SUBTEC_ENABLED and similar feature flags Co-authored-by: dp0000 <53818367+dp0000@users.noreply.github.com> Agent-Logs-Url: https://github.com/rdkcentral/middleware-player-interface/sessions/22158a4c-70d9-474e-9d28-e435b129b1de
Copilot
AI
changed the title
Add runtime telemetry emission across player, DRM, OCDM, HDCP, and handler subsystems
Add critical-error telemetry across DRM, OCDM, HDCP, and handler subsystems; gate behind PLAYER_TELEMETRY_SUPPORT
Mar 26, 2026
…ble support
PlayerTelemetry.h:
- Add TelemetryPayload builder class with add() overloads for std::string,
int, long, float, double — numeric values are auto-converted to string so
call sites need no std::to_string()
- Replace sendEvent(name, map) with sendEvent(name, TelemetryPayload)
- Add matching no-op TelemetryPayload stub in #else branch (non-telemetry
builds compile and link without change)
All inline {{"key", value}} map arguments replaced with named TelemetryPayload
objects in:
InterfacePlayerRDK.cpp (10 call sites)
GstHandlerControl.cpp (1 call site)
drm/DrmSessionManager.cpp (6 call sites)
drm/ocdm/opencdmsessionadapter.cpp (2 call sites)
gst-plugins/drm/gst/gstcdmidecryptor.cpp (3 call sites)
Redundant std::to_string() and unnecessary static_cast<int> removed at all
affected call sites.
Co-authored-by: dp0000 <53818367+dp0000@users.noreply.github.com>
Agent-Logs-Url: https://github.com/rdkcentral/middleware-player-interface/sessions/0277cd52-920d-4e51-915b-f4020683330e
Copilot
AI
changed the title
Add critical-error telemetry across DRM, OCDM, HDCP, and handler subsystems; gate behind PLAYER_TELEMETRY_SUPPORT
Telemetry: named TelemetryPayload builder with int/float support; gate all telemetry behind PLAYER_TELEMETRY_SUPPORT
Mar 26, 2026
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.
Two issues addressed: all telemetry code was unconditionally compiled (pulling in
<map>and logging headers everywhere), andsendEventonly acceptedstd::map<string,string>forcingstd::to_string()noise at every call site with numeric values. Additionally, all call sites used anonymous inline initializer lists instead of named objects.PlayerTelemetry.h
#ifdef PLAYER_TELEMETRY_SUPPORT; a no-op stub class compiles in the#elsebranch — no per-call#ifdefguards needed at call sitesstd::map<string,string>parameter with a newTelemetryPayloadbuilder class exposingadd()overloads forstd::string,int,long,float, anddouble— numeric values are converted internallysendEvent(name, TelemetryPayload)replacessendEvent(name, map)TelemetryPayloadstub in#elsebranch has matchingadd()signatures so all call sites compile unchanged in non-telemetry buildsCMakeLists.txt
CMAKE_PLAYER_TELEMETRY_SUPPORToption appends-DPLAYER_TELEMETRY_SUPPORTtoLIBPLAYERGSTINTERFACE_DEFINES, following the same pattern asCMAKE_GST_SUBTEC_ENABLEDCall sites (6 files, 22 sites)
All anonymous
{{"key", value}}inline map arguments replaced with explicit namedTelemetryPayloadobjects.std::to_string()and redundantstatic_cast<int>on implicitly-promotable types (gushort,int32_t) removed.Files changed:
InterfacePlayerRDK.cpp(10 sites),GstHandlerControl.cpp(1),drm/DrmSessionManager.cpp(6),drm/ocdm/opencdmsessionadapter.cpp(2),gst-plugins/drm/gst/gstcdmidecryptor.cpp(3).Original prompt
Implement runtime telemetry event emission throughout the player interface.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: provide some telemetry event markers for this repo
Assistant: Here are some example telemetry event markers suitable for the rdkcentral/middleware-player-interface repository, especially considering it is a C++-heavy interface for media player components (like aamp) to interact with RDK middleware:
Usage:
Customization:
Would you like example C++ code integrating these markers with a logging/telemetry function?
User: pls check RDKEMW-13310 for added telemetry in InterfacePlayerRDK.cpp and implement similar telemetry event markers
Assistant: There are currently no telemetry event markers or telemetry code found in InterfacePlayerRDK.cpp within the rdkcentral/middleware-player-interface repository, according to a search for telemetry-related terms.
If you can provide the code or commit changes from RDKEMW-13310, I can help you implement similar telemetry event markers. Otherwise, if you have a different file or more details, please let me know!
User: https://github.com/rdkcentral/middleware-player-interface/tree/feature/RDKEMW-13310
Assistant: Here are telemetry event markers inspired by the actual implementation strategy used in InterfacePlayerRDK.cpp from feature/RDKEMW-13310:
"MW_PIPELINE_STATE_CHANGE_FAILURE"(see line ~1306) sent via aPlayerTelemetry2instance with numeric and string fields, such as state transitions and element names.You should implement event markers consistent with this usage as follows: