Skip to content

Add PlayerTelemetry2: object-based T2 telemetry with PLAYER_TELEMETRY_SUPPORT guards#119

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/replace-telemetry-send-event
Draft

Add PlayerTelemetry2: object-based T2 telemetry with PLAYER_TELEMETRY_SUPPORT guards#119
Copilot wants to merge 3 commits intomainfrom
copilot/replace-telemetry-send-event

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 26, 2026

Introduces a PlayerTelemetry2 module — replacing direct telemetry::send function calls with an object-based API — and gates the entire feature behind #ifdef PLAYER_TELEMETRY_SUPPORT / CMAKE_PLAYER_TELEMETRY_SUPPORT, consistent with how SUBTITLE_SUPPORTED and GST_SUBTEC_ENABLED are handled in this codebase.

New module: playerTelemetry/

  • PlayerTelemetryInitializer — manages T2 init/uninit lifecycle as a process-scoped static (destructor handles cleanup)
  • PlayerTelemetry2 — object-based send API backed by RDK T2 (t2_event_s), guarded by #ifndef PLAYER_SIMULATOR_BUILD for non-device builds
#ifdef PLAYER_TELEMETRY_SUPPORT
    std::map<std::string, int> intData;
    intData["err"] = errorCode;
    intData["cat"] = category;
    std::map<std::string, std::string> stringData;
    std::map<std::string, float> floatData;
    PlayerTelemetry2 t2("myApp");
    t2.send("VideoStartFailure", intData, stringData, floatData);
#endif

Build integration

  • playerTelemetry/CMakeLists.txt builds libplayertelemetry and propagates -DPLAYER_TELEMETRY_SUPPORT via target_compile_definitions PUBLIC
  • Main CMakeLists.txt: include_dirs, add_subdirectory, and target_link_libraries for playertelemetry are all inside if(CMAKE_PLAYER_TELEMETRY_SUPPORT) — opt-in, off by default
  • pkgconfig/libplayertelemetry.pc.in added for downstream consumers

Tests: test/utests/tests/PlayerTelemetryTests/

  • 7 unit tests covering both send() overloads (raw string, null, and typed-map variants)
  • Test binary defines both PLAYER_SIMULATOR_BUILD and PLAYER_TELEMETRY_SUPPORT; test bodies are wrapped in #ifdef PLAYER_TELEMETRY_SUPPORT so they compile cleanly with or without the feature enabled

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI changed the title [WIP] Replace telemetry::send event with object creation Add PlayerTelemetry2: object-based T2 telemetry event sending Mar 26, 2026
Copilot AI requested a review from dp0000 March 26, 2026 11:03
Copilot AI changed the title Add PlayerTelemetry2: object-based T2 telemetry event sending Add PlayerTelemetry2: object-based T2 telemetry with PLAYER_TELEMETRY_SUPPORT guards Mar 26, 2026
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.

2 participants