Pepper_56_C++_interfaces
Pepper_56_C++_interfaces
|
#include <es_data_source_samsung.h>
Public Member Functions | |
ElementaryStream_Samsung (const ElementaryStream_Samsung &other) | |
ElementaryStream_Samsung & | operator= (const ElementaryStream_Samsung &other) |
virtual PP_ElementaryStream_Type_Samsung | GetStreamType () const =0 |
Retrieves stream type represented by this resource. | |
int32_t | InitializeDone (const CompletionCallback &callback) |
int32_t | InitializeDone (PP_StreamInitializationMode mode, const CompletionCallback &callback) |
int32_t | AppendPacket (const PP_ESPacket &packet, const CompletionCallback &callback) |
int32_t | AppendEncryptedPacket (const PP_ESPacket &packet, const PP_ESPacketEncryptionInfo &encryption_info, const CompletionCallback &callback) |
int32_t | AppendTrustZonePacket (const PP_ESPacket &packet, const PP_TrustZoneReference &handle, const CompletionCallback &callback) |
int32_t | Flush (const CompletionCallback &callback) |
int32_t | SetDRMInitData (uint32_t type_size, const void *type, uint32_t init_data_size, const void *init_data, const CompletionCallback &callback) |
int32_t | SetDRMInitData (const std::string &type, uint32_t init_data_size, const void *init_data, const CompletionCallback &callback) |
![]() | |
Resource () | |
The default constructor. | |
Resource (const Resource &other) | |
virtual | ~Resource () |
Destructor. | |
Resource & | operator= (const Resource &other) |
bool | is_null () const |
PP_Resource | pp_resource () const |
PP_Resource | detach () |
Protected Member Functions | |
ElementaryStream_Samsung (PP_Resource resource) | |
ElementaryStream_Samsung (const Resource &resource) | |
ElementaryStream_Samsung (PassRef, PP_Resource resource) | |
![]() | |
Resource (PP_Resource resource) | |
Resource (PassRef, PP_Resource resource) | |
void | PassRefFromConstructor (PP_Resource resource) |
void | Clear () |
Sets this resource to null. This releases ownership of the resource. | |
Interface representing common functionalities of elementary streams.
Basic usage:
ESDataSource_Samsung.AddStream
InitializeDone
AppendPacket
ESDataSource_Samsung.SetEndOfStream
int32_t pp::ElementaryStream_Samsung::AppendEncryptedPacket | ( | const PP_ESPacket & | packet, |
const PP_ESPacketEncryptionInfo & | encryption_info, | ||
const CompletionCallback & | callback | ||
) |
Appends Elementary Stream encrypted packet.
Before appending any packet to the buffer, it must be properly configured (see InitializeDone
).
[in] | packet | A PP_ESPacket containing Elementary Stream packet data and metadata. |
[in] | encryption_info | A PP_ESPacketEncryptionInfo containing packet encryption description. |
[in] | callback | A CompletionCallback to be called upon completion. |
pp_errors.h
. PP_ERROR_NOQUOTA
if internal buffer is full. PP_ERROR_FAILED
if InitializeDone()
has not successfully completed. int32_t pp::ElementaryStream_Samsung::AppendPacket | ( | const PP_ESPacket & | packet, |
const CompletionCallback & | callback | ||
) |
Appends Elementary Stream packet.
Before appending any packet to the buffer, it must be properly configured (see InitializeDone
).
[in] | packet | A PP_ESPacket containing Elementary Stream packet data and metadata. |
[in] | callback | A CompletionCallback to be called upon completion. |
pp_errors.h
. PP_ERROR_NOQUOTA
if internal buffer is full. PP_ERROR_FAILED
if InitializeDone()
has not successfully completed. int32_t pp::ElementaryStream_Samsung::AppendTrustZonePacket | ( | const PP_ESPacket & | packet, |
const PP_TrustZoneReference & | handle, | ||
const CompletionCallback & | callback | ||
) |
Appends Elementary Stream packet.
Before appending any packet to the buffer, it must be properly configured (see InitializeDone
).
Note: After successful append ownership of the TrustZone memory is transfered from the module to the browser and handle must not be released. But in case of any error (i.e. return code/callback call with status other than PP_OK) the module is responsible for releasing memory reference.
[in] | packet | A PP_ESPacket containing Elementary Stream metadata. Note: when using this method of appending packets size and buffer fields of PP_ESPacket struct must be set to 0 and nullptr. If they are not set to zero (nullptr), then PP_ERROR_BADARGUMENT will be returned. |
[in] | handle | A handle to TrustZone memory containing packet data which will be appended. |
[in] | callback | A PCompletionCallback to be called upon completion. |
pp_errors.h
. Returns PP_ERROR_FAILED if InitializeDone() has not successfully completed. Returns PP_ERROR_NOQUOTA if internal buffer is full. Returns PP_ERROR_BADARGUMENT if either size
or buffer
are not set to 0/nullptr. int32_t pp::ElementaryStream_Samsung::Flush | ( | const CompletionCallback & | callback | ) |
Flushes all appended, but not decoded or rendered packets to this buffer. This method is usually called during seek operations.
[in] | callback | A CompletionCallback to be called upon completion. |
pp_errors.h
. Returns PP_ERROR_FAILED if InitializeDone() has not successfully completed. int32_t pp::ElementaryStream_Samsung::InitializeDone | ( | const CompletionCallback & | callback | ) |
Call this method to confirm new/updated buffer config. This method will return PP_OK if set buffer config is valid or one of the error codes from pp_errors.h
otherwise.
This method assumes that all plugin provided all necessary Elementary Stream initialization metadata (see PP_STREAMINITIALIZATIONMODE_FULL
).
[in] | callback | A CompletionCallback to be called upon completion. |
pp_errors.h
. Method returns PP_ERROR_BADARGUMENT
when stream configuration is invalid. int32_t pp::ElementaryStream_Samsung::InitializeDone | ( | PP_StreamInitializationMode | mode, |
const CompletionCallback & | callback | ||
) |
Call this method to confirm new/updated buffer config. This method will return PP_OK if set buffer config is valid or one of the error codes from pp_errors.h
otherwise.
[in] | mode | A parameter indicating how much information regarding elementary stream configuration was extracted by the plugin (demuxer). |
[in] | callback | A CompletionCallback to be called upon completion. |
pp_errors.h
. Returns PP_ERROR_BADARGUMENT
when stream configuration is invalid. Returns PP_ERROR_NOTSUPPORTED
when given initialization mode is not supported by the browser. int32_t pp::ElementaryStream_Samsung::SetDRMInitData | ( | uint32_t | type_size, |
const void * | type, | ||
uint32_t | init_data_size, | ||
const void * | init_data, | ||
const CompletionCallback & | callback | ||
) |
Found DRM system initialization metadata. |type| describes type of the initialization data |init_data| associated with the stream.
[in] | type_size | A size of DRM specific |type| buffer |
[in] | type | A buffer containing DRM system specific description of type of an |init_data|. |
[in] | init_data_size | A size of DRM specific |init_data| buffer |
[in] | init_data | A buffer containing DRM system initialization data. |
[in] | callback | A CompletionCallback to be called upon completion. |
pp_errors.h
. int32_t pp::ElementaryStream_Samsung::SetDRMInitData | ( | const std::string & | type, |
uint32_t | init_data_size, | ||
const void * | init_data, | ||
const CompletionCallback & | callback | ||
) |
Found DRM system initialization metadata. |type| describes type of the initialization data |init_data| associated with the stream.
[in] | type | A string describing type of an |init_data|. Examples:
|
[in] | init_data_size | A size of DRM specific |init_data| buffer |
[in] | init_data | A buffer containing DRM system initialization data. |
[in] | callback | A CompletionCallback to be called upon completion. |
pp_errors.h
.