-
Notifications
You must be signed in to change notification settings - Fork 82
CPESP-9115 : Change sessionID from uint32 to string #490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
npoltorapavlo
wants to merge
1
commit into
rdkcentral:master
Choose a base branch
from
npoltorapavlo:topic/CPESP-9115
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+50
−57
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ | |
| namespace Thunder { | ||
| namespace Exchange { | ||
|
|
||
| // @json 1.0.0 | ||
| // @json 1.0.0 @text:keep | ||
| struct EXTERNAL IContentProtection : virtual public Core::IUnknown { | ||
| enum { ID = ID_CONTENTPROTECTION }; | ||
|
|
||
|
|
@@ -59,33 +59,29 @@ namespace Exchange { | |
| State state; | ||
| // @brief same as that returned by the SecManager. | ||
| // For other cases greater than 20000 (e.g. 2) | ||
| // @text failureReason | ||
| int32_t failureReason; | ||
| }; | ||
|
|
||
| // @alt onWatermarkStatusChanged | ||
| // @text onWatermarkStatusChanged | ||
| // @param sessionId session id for the content protection session | ||
| // (e.g. 930762523) | ||
| // (e.g. "930762523") | ||
| // @param appId application that should receive the notification | ||
| virtual void WatermarkStatusChanged( | ||
| uint32_t sessionId /* @text:sessionId */, | ||
| const string& appId /* @text:appId */, | ||
| const Status& status) | ||
| = 0; | ||
| virtual void WatermarkStatusChanged(const string& sessionId, | ||
| const string& appId, const Status& status) = 0; | ||
| }; | ||
|
|
||
| virtual uint32_t Register(INotification* notification) = 0; | ||
| virtual uint32_t Unregister(INotification* notification) = 0; | ||
| virtual Core::hresult Register(INotification* notification) = 0; | ||
| virtual Core::hresult Unregister(INotification* notification) = 0; | ||
|
|
||
| // @alt openDrmSession | ||
| // @text openDrmSession | ||
| // @param clientId client that establishes the playback session | ||
|
Comment on lines
+65
to
77
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need camelCase, keeping both names is not necessary |
||
| // (e.g. "com.comcast.vipa:1") | ||
| // @param appId application requesting the new watermarking session | ||
| // @param licenseRequest base64-encoded DRM license request | ||
| // @param initData video platform specific init data | ||
| // (e.g. "{\"sessionConfiguration\":{\"distributedTraceId\":\"...\"},\"accessToken\":\"...\",\"contentMetadata\":\"...\"}") | ||
| // @param sessionId generated by SecManager to track sessions | ||
| // (e.g. 930762523) | ||
| // (e.g. "930762523") | ||
| // @param response video platform specific response data | ||
| // (e.g. "{\"license\":\"...\",\"refreshDuration\":0}") | ||
| // @retval 21002 Invalid aspect dimension | ||
|
|
@@ -111,28 +107,23 @@ namespace Exchange { | |
| // @retval 23003 Watermark request timeout | ||
| // @retval 23012 Watermark memory allocation error | ||
| // @retval 23014 Watermark perceptibility error | ||
| virtual uint32_t OpenDrmSession( | ||
| const string& clientId /* @text:clientId */, | ||
| const string& appId /* @text:appId */, | ||
| KeySystem keySystem /* @text:keySystem */, | ||
| const string& licenseRequest /* @text:licenseRequest */, | ||
| const string& initData /* @text:initData */, | ||
| uint32_t& sessionId /* @text:sessionId @out */, | ||
| string& response /* @text:openSessionResponse @out */) | ||
| = 0; | ||
|
|
||
| // @alt setDrmSessionState | ||
| virtual Core::hresult OpenDrmSession( | ||
| const string& clientId, const string& appId, | ||
| KeySystem keySystem, | ||
| const string& licenseRequest, const string& initData, | ||
| string& sessionId /* @out */, | ||
| string& response /* @text:openSessionResponse @out */) = 0; | ||
|
|
||
| // @text setDrmSessionState | ||
| // @param sessionId sec manager generated playback session id | ||
| // (e.g. 930762523) | ||
| // (e.g. "930762523") | ||
| // @retval 21009 Invalid session id | ||
| virtual uint32_t SetDrmSessionState( | ||
| uint32_t sessionId /* @text:sessionId */, | ||
| State sessionState /* @text:sessionState */) | ||
| = 0; | ||
| virtual Core::hresult SetDrmSessionState(const string& sessionId, | ||
| State sessionState) = 0; | ||
|
|
||
| // @alt updateDrmSession | ||
| // @text updateDrmSession | ||
| // @param sessionId sec manager generated playback session id | ||
| // (e.g. 930762523) | ||
| // (e.g. "930762523") | ||
| // @param licenseRequest base64-encoded DRM license request | ||
| // @param initData video platform specific init data | ||
| // (e.g. "{\"sessionConfiguration\":{\"distributedTraceId\":\"...\"},\"accessToken\":\"...\",\"contentMetadata\":\"...\"}") | ||
|
|
@@ -161,43 +152,44 @@ namespace Exchange { | |
| // @retval 23003 Watermark request timeout | ||
| // @retval 23012 Watermark memory allocation error | ||
| // @retval 23014 Watermark perceptibility error | ||
| virtual uint32_t UpdateDrmSession( | ||
| uint32_t sessionId /* @text:sessionId */, | ||
| const string& licenseRequest /* @text:licenseRequest */, | ||
| const string& initData /* @text:initData */, | ||
| string& response /* @text:updateSessionResponse @out */) | ||
| = 0; | ||
|
|
||
| // @alt closeDrmSession | ||
| virtual Core::hresult UpdateDrmSession(const string& sessionId, | ||
| const string& licenseRequest, const string& initData, | ||
| string& response /* @text:updateSessionResponse @out */) = 0; | ||
|
|
||
| // @text closeDrmSession | ||
| // @param sessionId sec manager generated playback session id | ||
| // (e.g. 930762523) | ||
| // (e.g. "930762523") | ||
| // @param response video platform specific response data | ||
| // @retval 21009 Invalid session id | ||
| // @retval 21012 Invalid client id | ||
| virtual uint32_t CloseDrmSession( | ||
| uint32_t sessionId /* @text:sessionId */, | ||
| string& response /* @text:closeSessionResponse @out */) | ||
| = 0; | ||
| virtual Core::hresult CloseDrmSession(const string& sessionId, | ||
| string& response /* @text:closeSessionResponse @out */) = 0; | ||
|
|
||
| // @alt showWatermark | ||
| // @text showWatermark | ||
| // @param sessionId id returned on a call to openDrmSession | ||
| // (e.g. 930762523) | ||
| // (e.g. "930762523") | ||
| // @param show true when watermark has to be presented | ||
| virtual uint32_t ShowWatermark( | ||
| uint32_t sessionId /* @text:sessionId */, | ||
| bool show, | ||
| const uint8_t opacityLevel /* @text:opacityLevel @restrict:0..100 */) | ||
| = 0; | ||
| virtual Core::hresult ShowWatermark(const string& sessionId, | ||
| bool show, const uint8_t opacityLevel /* @restrict:0..100 */) = 0; | ||
|
|
||
| // @alt setPlaybackPosition | ||
| // @text setPlaybackPosition | ||
| // @param sessionId sec manager generated playback session id | ||
| // (e.g. 930762523) | ||
| // (e.g. "930762523") | ||
| // @param speed current playback speed | ||
| // @param position current playback position | ||
| virtual uint32_t SetPlaybackPosition( | ||
| uint32_t sessionId /* @text:sessionId */, | ||
| int32_t speed, long position) | ||
| = 0; | ||
| virtual Core::hresult SetPlaybackPosition(const string& sessionId, | ||
| int32_t speed, long position) = 0; | ||
| }; | ||
|
|
||
| // @json 1.0.0 @text:keep | ||
| struct EXTERNAL IErrorToString : virtual public Core::IUnknown { | ||
| enum { ID = ID_ERRORTOSTRING }; | ||
|
|
||
| ~IErrorToString() override = default; | ||
|
|
||
| // @text errorToString | ||
| virtual Core::hresult ErrorToString( | ||
| const int32_t code, string& result /* @out */) const = 0; | ||
|
|
||
| }; | ||
|
|
||
| } // namespace Exchange | ||
|
|
||
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all sides will be updated together , no IContentProtection2 is needed