Repository navigation
Conversation
- PlayerScheduler::ScheduleTask: move the by-value PlayerAsyncTaskObj into the queue instead of copying it. - DrmSessionManager::IsKeyIdProcessed and initializeDrmSession: take const references; both are read-only over the parameter. - DrmHelper::transformLicenseResponse (ClearKeyHelper, VerimatrixHelper): take const std::shared_ptr<DrmData>& to avoid an atomic ref-count bump per license-response transform. - GetAudioTracksOta / GetTextTracksOta: changed to non-const out-references. These were passed by value but filled inside; the populated track data never reached callers and every call copied. - PlayerThunderAccess::StartRmf url param: read-only, now const ref. - BusMessageCallback typedef: pass BusEventData by const ref, avoiding a copy of the event payload on every GStreamer bus-message dispatch. StartOta intentionally left by value: its parameters are forwarded with std::move into the SetPreferredAudioLanguages_OTA sink, so the by-value + move idiom is already optimal there. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Outdated overrides break compilation, and reused output vectors can retain stale tracks and produce incorrect results.
5 open issues
What changed in this PR
This PR aims to reduce unnecessary copies across scheduling, DRM, and Thunder integration, while allowing over-the-air track queries to populate caller-owned vectors.
Changes:
- Uses const references for read-only DRM parameters, RMF URLs, and bus-event payloads.
- Changes audio and text track vectors to output references across Thunder interfaces.
- Adds
std::movewhen enqueueing scheduled tasks.
| File | Description |
|---|---|
test/utests/fakes/FakePlayerThunderInterface.cpp |
Aligns fake method signatures with the interface changes. |
PlayerScheduler.cpp |
Adds move syntax when enqueueing tasks. |
InterfacePlayerRDK.h |
Passes bus-event payloads by const reference. |
externals/rdk/PlayerThunderAccess.h |
Updates track-output and RMF URL declarations. |
externals/rdk/PlayerThunderAccess.cpp |
Applies reference parameters to Thunder implementations. |
externals/PlayerThunderInterface.h |
Exposes the updated reference-based signatures. |
externals/PlayerThunderInterface.cpp |
Forwards track vectors and URLs by reference. |
externals/PlayerThunderAccessBase.h |
Updates the abstract Thunder contract. |
drm/helper/VerimatrixHelper.h |
Updates the license-response parameter declaration. |
drm/helper/VerimatrixHelper.cpp |
Receives the license-response pointer by const reference. |
drm/helper/DrmHelper.h |
Updates the virtual license-response signature. |
drm/helper/ClearKeyHelper.h |
Aligns the ClearKey override declaration. |
drm/helper/ClearKeyHelper.cpp |
Receives the license-response pointer by const reference. |
drm/DrmSessionManager.h |
Declares const-reference key and helper parameters. |
drm/DrmSessionManager.cpp |
Applies const references to key lookup and session initialization. |
Review effort: Balanced
| * @param licenseResponse license response from the server to transform | ||
| */ | ||
| virtual void transformLicenseResponse(std::shared_ptr<DrmData> licenseResponse) const {} | ||
| virtual void transformLicenseResponse(const std::shared_ptr<DrmData> &licenseResponse) const {} |
| * @return string of current track pk | ||
| */ | ||
| virtual std::string GetAudioTracksOta(std::vector<PlayerAudioData> audData) = 0; | ||
| virtual std::string GetAudioTracksOta(std::vector<PlayerAudioData> &audData) = 0; |
Comment on lines
+717
to
718
| std::string PlayerThunderAccess::GetAudioTracksOta(std::vector<PlayerAudioData> &audData) | ||
| { |
Comment on lines
+792
to
793
| bool PlayerThunderAccess::GetTextTracksOta(std::vector<PlayerTextData> &txtData) | ||
| { |
| } | ||
| obj.mId = id; | ||
| mTaskQueue.push_back(obj); | ||
| mTaskQueue.push_back(std::move(obj)); |
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.


StartOta intentionally left by value: its parameters are forwarded with std::move into the SetPreferredAudioLanguages_OTA sink, so the by-value + move idiom is already optimal there.