#include <ppb_media_data_source_samsung.h>
|
PP_Bool(* | IsElementaryStream )(PP_Resource resource) |
|
PP_ElementaryStream_Type_Samsung(* | GetStreamType )(PP_Resource resource) |
|
int32_t(* | InitializeDone )(PP_Resource stream, PP_StreamInitializationMode mode, struct PP_CompletionCallback callback) |
|
int32_t(* | AppendPacket )(PP_Resource stream, const struct PP_ESPacket *packet, struct PP_CompletionCallback callback) |
|
int32_t(* | AppendEncryptedPacket )(PP_Resource stream, const struct PP_ESPacket *packet, const struct PP_ESPacketEncryptionInfo *encryption_info, struct PP_CompletionCallback callback) |
|
int32_t(* | AppendTrustZonePacket )(PP_Resource stream, const struct PP_ESPacket *packet, const struct PP_TrustZoneReference *handle, struct PP_CompletionCallback callback) |
|
int32_t(* | Flush )(PP_Resource stream, struct PP_CompletionCallback callback) |
|
int32_t(* | SetDRMInitData )(PP_Resource stream, const char *type, uint32_t init_data_size, const void *init_data, struct PP_CompletionCallback callback) |
|
Interface representing common functionalities of elementary streams.
Basic usage:
- Crate stream by calling
PPB_ESDataSource_Samsung.AddStream
- Initialize buffer specific information (audio/video config)
- Call
InitializeDone
- Attach Data Source to the player
- Appends Elementary Stream packets by calling
AppendPacket
- Signalize end of stream (clip) by calling
PPB_ESDataSource_Samsung.SetEndOfStream
Appends Elementary Stream encrypted packet.
Before appending any packet to the buffer, it must be properly configured (see InitializeDone
).
- Parameters
-
[in] | stream | A PP_Resource identifying the elementary stream. |
[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 PP_CompletionCallback to be called upon completion. |
- Returns
- PP_OK on success, otherwise an error code from
pp_errors.h
. Returns PP_ERROR_FAILED if InitializeDone() has not successfully completed. Returns PP_ERROR_NOQUOTA if internal buffer is full.
Appends Elementary Stream packet.
Before appending any packet to the buffer, it must be properly configured (see InitializeDone
).
- Parameters
-
[in] | stream | A PP_Resource identifying the elementary stream. |
[in] | packet | A PP_ESPacket containing Elementary Stream packet data and metadata. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
- Returns
- PP_OK on success, otherwise an error code from
pp_errors.h
. Returns PP_ERROR_FAILED if InitializeDone() has not successfully completed. Returns PP_ERROR_NOQUOTA if internal buffer is full.
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.
- Parameters
-
[in] | stream | A PP_Resource identifying the elementary stream. |
[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 NULL. If they are not set to zero and NULL PP_ERROR_BADARGUMENT will be returned. |
[in] | handle | A handle to TrustZone memory containing packet data which will be appended. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
- Returns
- PP_OK on success, otherwise an error code from
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.
Flushes all appended, but not decoded or rendered packets to this buffer. This method is usually called during seek operations.
- Parameters
-
[in] | stream | A PP_Resource identifying the elementary stream. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
- Returns
- PP_OK on success, otherwise an error code from
pp_errors.h
. Returns PP_ERROR_FAILED if InitializeDone() has not successfully completed.
Retrieves stream type represented by this resource.
- Parameters
-
[in] | resource | A PP_Resource identifying a resource. |
- Returns
PP_ElementaryStream_Type_Samsung
represented by this resource or PP_ELEMENTARYSTREAM_TYPE_SAMSUNG_UNKNOWN
when this resource doesn't represent any stream type.
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.
- Parameters
-
[in] | stream | A PP_Resource identifying the elementary stream. |
[in] | mode | A parameter indicating how much information regarding elementary stream configuration was extracted by the plugin (demuxer). |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
- Returns
- PP_OK on success, otherwise an error code from
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.
Determines if the given resource is a media player.
- Parameters
-
[in] | resource | A PP_Resource identifying a resource. |
- Returns
PP_TRUE
if the resource is a PPB_MediaPlayer_Samsung
, PP_FALSE
if the resource is invalid or some other type.
int32_t(* PPB_ElementaryStream_Samsung_1_1::SetDRMInitData)(PP_Resource stream, const char *type, uint32_t init_data_size, const void *init_data, struct PP_CompletionCallback callback) |
Found DRM system initialization metadata. |type| describes type of the initialization data |init_data| associated with the stream.
- Parameters
-
[in] | stream | A PP_Resource identifying the elementary stream. |
[in] | type | A string describing type of an |init_data|. Examples:
- "cenc:pssh" - |init_data| will contain PSSH box as described by Common Encryption specifiacation
- "mspr:pro" - |init_data| will contain Microsoft PlayReady Object Header (PRO).
|
[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 PP_CompletionCallback to be called upon completion. |
- Returns
- PP_OK on success, otherwise an error code from
pp_errors.h
.
The documentation for this struct was generated from the following file: