Tizen WASM Player
Tizen TV WebAssembly Media Player extension allowing for a low-level elementary media stream playback.
|
Class representing an instance of media keys used to decrypt content. More...
#include <media_key.h>
Public Types | |
using | SetupFinishedCallback = std::function< void(OperationResult, MediaKey)> |
Public Member Functions | |
MediaKey () | |
MediaKey (const MediaKey &)=delete | |
MediaKey (MediaKey &&other) | |
MediaKey & | operator= (const MediaKey &)=delete |
MediaKey & | operator= (MediaKey &&) |
~MediaKey () | |
bool | IsValid () const |
Static Public Member Functions | |
static Result< void > | SetupEncryption (const DRMConfig &config, SetupFinishedCallback on_finished) |
Friends | |
class | ElementaryMediaTrack |
Class representing an instance of media keys used to decrypt content.
Definition at line 71 of file media_key.h.
using samsung::wasm::MediaKey::SetupFinishedCallback = std::function<void(OperationResult, MediaKey)> |
Definition at line 73 of file media_key.h.
samsung::wasm::MediaKey::MediaKey | ( | ) |
Default constructor, creates an invalid MediaKey
object. A valid MediaKey
object can be created with MediaKey::SetupEncryption()
.
|
delete |
samsung::wasm::MediaKey::MediaKey | ( | MediaKey && | other | ) |
samsung::wasm::MediaKey::~MediaKey | ( | ) |
bool samsung::wasm::MediaKey::IsValid | ( | ) | const |
Returns true
if this instance is valid. This method should be called after constructor to ensure the object was initialized properly. If object is invalid all method calls will fail.
true
if this instance is valid, otherwise false
.
|
static |
Asynchronously creates MediaKey
instance and passes it as an argument to on_finished
. If setting up the encryption fails, media keys won't be valid.
[in] | config | An object containing DRM's configuration. |
[in] | on_finished | A callback notifying end of encryption setup. The callback receives OperationResult informing of the result of the operation and a newly created MediaKeys object if no error occurred. |
Result<void>
with operation_result
field set to OperationResult::kSuccess
on success, otherwise a code describing the error.
|
friend |
Definition at line 114 of file media_key.h.