Pepper_42_C++_interfaces
Public Member Functions | Protected Member Functions | List of all members
pp::ElementaryStream_Samsung Class Referenceabstract

#include <es_data_source_samsung.h>

Inheritance diagram for pp::ElementaryStream_Samsung:
Inheritance graph
Collaboration diagram for pp::ElementaryStream_Samsung:
Collaboration graph

Public Member Functions

 ElementaryStream_Samsung (const ElementaryStream_Samsung &other)
 
ElementaryStream_Samsungoperator= (const ElementaryStream_Samsung &other)
 
virtual ~ElementaryStream_Samsung ()
 
virtual
PP_ElementaryStream_Type_Samsung 
GetStreamType () const =0
 Retrieves stream type represented by this resource. More...
 
int32_t InitializeDone (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 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)
 
- Public Member Functions inherited from pp::Resource
 Resource ()
 The default constructor. More...
 
 Resource (const Resource &other)
 
virtual ~Resource ()
 Destructor. More...
 
Resourceoperator= (const Resource &other)
 
bool is_null () const
 
PP_Resource pp_resource () const
 
PP_Resource detach ()
 

Protected Member Functions

 ElementaryStream_Samsung ()
 
 ElementaryStream_Samsung (PP_Resource resource)
 
 ElementaryStream_Samsung (const Resource &resource)
 
 ElementaryStream_Samsung (PassRef, PP_Resource resource)
 
- Protected Member Functions inherited from pp::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. More...
 

Detailed Description

Interface representing common functionalities of elementary streams.

Basic usage:

  1. Crate stream by calling 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 ESDataSource_Samsung.SetEndOfStream

Definition at line 35 of file es_data_source_samsung.h.

Constructor & Destructor Documentation

pp::ElementaryStream_Samsung::ElementaryStream_Samsung ( const ElementaryStream_Samsung other)
virtual pp::ElementaryStream_Samsung::~ElementaryStream_Samsung ( )
virtual
pp::ElementaryStream_Samsung::ElementaryStream_Samsung ( )
protected
pp::ElementaryStream_Samsung::ElementaryStream_Samsung ( PP_Resource  resource)
explicitprotected
pp::ElementaryStream_Samsung::ElementaryStream_Samsung ( const Resource resource)
explicitprotected
pp::ElementaryStream_Samsung::ElementaryStream_Samsung ( PassRef  ,
PP_Resource  resource 
)
explicitprotected

Member Function Documentation

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).

Parameters
[in]packetA PP_ESPacket containing Elementary Stream packet data and metadata.
[in]encryption_infoA PP_ESPacketEncryptionInfo containing packet encryption description.
[in]callbackA 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.
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).

Parameters
[in]packetA PP_ESPacket containing Elementary Stream packet data and metadata.
[in]callbackA 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.
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.

Parameters
[in]callbackA 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.
virtual PP_ElementaryStream_Type_Samsung pp::ElementaryStream_Samsung::GetStreamType ( ) const
pure virtual

Retrieves stream type represented by this resource.

Implemented in pp::VideoElementaryStream_Samsung, and pp::AudioElementaryStream_Samsung.

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.

Parameters
[in]callbackA CompletionCallback to be called upon completion.
Returns
PP_OK on success, otherwise an error code from pp_errors.h. Method returns PP_ERROR_BADARGUMENT when stream configuration is invalid.
ElementaryStream_Samsung& pp::ElementaryStream_Samsung::operator= ( const ElementaryStream_Samsung other)
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.

Parameters
[in]type_sizeA size of DRM specific |type| buffer
[in]typeA buffer containing DRM system specific description of type of an |init_data|.
[in]init_data_sizeA size of DRM specific |init_data| buffer
[in]init_dataA buffer containing DRM system initialization data.
[in]callbackA CompletionCallback to be called upon completion.
Returns
PP_OK on success, otherwise an error code from 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.

Parameters
[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 CompletionCallback to be called upon completion.
Returns
PP_OK on success, otherwise an error code from pp_errors.h.

The documentation for this class was generated from the following file: