Pepper_56_C_interfaces
Pepper_56_C_interfaces
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
PPB_ElementaryStream_Samsung_1_1 Struct Reference

#include <ppb_media_data_source_samsung.h>

Public Attributes

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)
 

Detailed Description

Interface representing common functionalities of elementary streams.

Basic usage:

  1. Crate stream by calling PPB_ESDataSource_Samsung.AddStream
  2. Initialize buffer specific information (audio/video config)
  3. Call InitializeDone
  4. Attach Data Source to the player
  5. Appends Elementary Stream packets by calling AppendPacket
  6. Signalize end of stream (clip) by calling PPB_ESDataSource_Samsung.SetEndOfStream

Member Data Documentation

int32_t(* PPB_ElementaryStream_Samsung_1_1::AppendEncryptedPacket)(PP_Resource stream, const struct PP_ESPacket *packet, const struct PP_ESPacketEncryptionInfo *encryption_info, struct PP_CompletionCallback callback)

Appends Elementary Stream encrypted packet.

Before appending any packet to the buffer, it must be properly configured (see InitializeDone).

Parameters
[in]streamA PP_Resource identifying the elementary stream.
[in]packetA PP_ESPacket containing Elementary Stream packet data and metadata.
[in]encryption_infoA PP_ESPacketEncryptionInfo containing packet encryption description.
[in]callbackA 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.
int32_t(* PPB_ElementaryStream_Samsung_1_1::AppendPacket)(PP_Resource stream, const struct PP_ESPacket *packet, struct PP_CompletionCallback callback)

Appends Elementary Stream packet.

Before appending any packet to the buffer, it must be properly configured (see InitializeDone).

Parameters
[in]streamA PP_Resource identifying the elementary stream.
[in]packetA PP_ESPacket containing Elementary Stream packet data and metadata.
[in]callbackA 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.
int32_t(* PPB_ElementaryStream_Samsung_1_1::AppendTrustZonePacket)(PP_Resource stream, const struct PP_ESPacket *packet, const struct PP_TrustZoneReference *handle, struct PP_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.

Parameters
[in]streamA PP_Resource identifying the elementary stream.
[in]packetA 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]handleA handle to TrustZone memory containing packet data which will be appended.
[in]callbackA 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.
int32_t(* PPB_ElementaryStream_Samsung_1_1::Flush)(PP_Resource stream, struct PP_CompletionCallback callback)

Flushes all appended, but not decoded or rendered packets to this buffer. This method is usually called during seek operations.

Parameters
[in]streamA PP_Resource identifying the elementary stream.
[in]callbackA 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.
PP_ElementaryStream_Type_Samsung(* PPB_ElementaryStream_Samsung_1_1::GetStreamType)(PP_Resource resource)

Retrieves stream type represented by this resource.

Parameters
[in]resourceA 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.
int32_t(* PPB_ElementaryStream_Samsung_1_1::InitializeDone)(PP_Resource stream, PP_StreamInitializationMode mode, struct PP_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.

Parameters
[in]streamA PP_Resource identifying the elementary stream.
[in]modeA parameter indicating how much information regarding elementary stream configuration was extracted by the plugin (demuxer).
[in]callbackA 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.
PP_Bool(* PPB_ElementaryStream_Samsung_1_1::IsElementaryStream)(PP_Resource resource)

Determines if the given resource is a media player.

Parameters
[in]resourceA 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]streamA PP_Resource identifying the elementary stream.
[in]typeA 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_sizeA size of DRM specific |init_data| buffer
[in]init_dataA buffer containing DRM system initialization data.
[in]callbackA 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: