Pepper_47_C++_interfaces
Public Member Functions | List of all members
pp::ESDataSource_Samsung Class Reference

#include <es_data_source_samsung.h>

Inheritance diagram for pp::ESDataSource_Samsung:
Inheritance graph
Collaboration diagram for pp::ESDataSource_Samsung:
Collaboration graph

Public Member Functions

 ESDataSource_Samsung (const InstanceHandle &instance)
 
 ESDataSource_Samsung (const ESDataSource_Samsung &other)
 
 ESDataSource_Samsung (PP_Resource resource)
 
 ESDataSource_Samsung (PassRef, PP_Resource resource)
 
ESDataSource_Samsungoperator= (const ESDataSource_Samsung &other)
 
virtual ~ESDataSource_Samsung ()
 
template<typename T >
int32_t AddStream (const CompletionCallbackWithOutput< T > &callback, ElementaryStreamListener_Samsung *listener=NULL)
 
int32_t SetDuration (PP_TimeDelta duration, const CompletionCallback &callback)
 
int32_t SetEndOfStream (const CompletionCallback &callback)
 
- Public Member Functions inherited from pp::MediaDataSource_Samsung
 MediaDataSource_Samsung (const MediaDataSource_Samsung &other)
 
MediaDataSource_Samsungoperator= (const MediaDataSource_Samsung &other)
 
virtual ~MediaDataSource_Samsung ()
 
- 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 ()
 

Additional Inherited Members

- Protected Member Functions inherited from pp::MediaDataSource_Samsung
 MediaDataSource_Samsung ()
 
 MediaDataSource_Samsung (const Resource &data_source)
 
 MediaDataSource_Samsung (PP_Resource resource)
 
 MediaDataSource_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

Data source handling appends of Elementary Streams.

It is a container for Elementary Streams (audio/video) and there can be at most one stream of given type (see PP_ElementaryStream_Type_Samsung). Basic usage (playback of clip containing audio and video):

  1. Create ESDataSource_Samsung object.
  2. Add audio stream using AddStream<T> with argument being callback accepting AudioElementryStream_Samsung.
  3. Configure audio stream, by setting codec, sampling rate, channels and other necessary information.
  4. Call ElementaryStream_Samsung.InitializeDone to confirm the configuration
  1. Add video stream using AddStream<T> with argument being callback accepting VideoElementryStream_Samsung.
  2. Configure video stream, by setting codec, frame rate, resolution and other necessary information.
  3. Call ElementaryStream_Samsung.InitializeDone to confirm the configuration.
  4. Attach data source to the player by calling MediaPlayer_Samsung.AttachMediaSource.
  5. Download and append Elementary Stream audio and video packets by calling ElementaryStream._SamsungAppendPacket

Signalize end of stream (clip) by calling SetEndOfStream

  1. Detach data source from the player by calling MediaPlayer_Samsung.AttachMediaSource with NULL object/resource.

Definition at line 300 of file es_data_source_samsung.h.

Constructor & Destructor Documentation

pp::ESDataSource_Samsung::ESDataSource_Samsung ( const InstanceHandle instance)
explicit
pp::ESDataSource_Samsung::ESDataSource_Samsung ( const ESDataSource_Samsung other)

Definition at line 479 of file es_data_source_samsung.cc.

pp::ESDataSource_Samsung::ESDataSource_Samsung ( PP_Resource  resource)
explicit

Definition at line 483 of file es_data_source_samsung.cc.

pp::ESDataSource_Samsung::ESDataSource_Samsung ( PassRef  ,
PP_Resource  resource 
)

Definition at line 487 of file es_data_source_samsung.cc.

pp::ESDataSource_Samsung::~ESDataSource_Samsung ( )
virtual

Definition at line 497 of file es_data_source_samsung.cc.

Member Function Documentation

template<typename T >
int32_t pp::ESDataSource_Samsung::AddStream ( const CompletionCallbackWithOutput< T > &  callback,
ElementaryStreamListener_Samsung listener = NULL 
)
inline

Factory method which adds stream of given type to the data source.

Type T must be one of concrete types inheriting form ElementaryStream_Samsung

This data source can handle at most one buffer of given time, so calling multiple times this method with the same buffer type will return the same resource as all previous calls.

Parameters
[in]callbackA CompletionCallbackWithOutput to be called upon completion with added elementary stream.
Returns
PP_OK on success, otherwise an error code from pp_errors.h. FIXME: remove listener default value once all related components will be updated to use new ElementaryStreamListener_Samsung listener.

Definition at line 420 of file es_data_source_samsung.h.

References pp::CompletionCallbackWithOutput< T >::output(), and PP_MEDIA_PLAYER_SAMSUNG_STATIC_ASSERT.

ESDataSource_Samsung & pp::ESDataSource_Samsung::operator= ( const ESDataSource_Samsung other)
int32_t pp::ESDataSource_Samsung::SetDuration ( PP_TimeDelta  duration,
const CompletionCallback callback 
)

Sets duration of the whole stream/container/clip.

Parameters
[in]durationA duration of played media.
[in]callbackA CompletionCallback to be called upon completion.
Returns
PP_OK on success, otherwise an error code from pp_errors.h.

Definition at line 500 of file es_data_source_samsung.cc.

References pp::CompletionCallback::MayForce(), pp::CompletionCallback::pp_completion_callback(), and pp::Resource::pp_resource().

int32_t pp::ESDataSource_Samsung::SetEndOfStream ( const CompletionCallback callback)

Signalizes end of the whole stream/container/clip.

Parameters
[in]callbackA CompletionCallback to be called upon completion.
Returns
PP_OK on success, otherwise an error code from pp_errors.h.

Definition at line 510 of file es_data_source_samsung.cc.

References pp::CompletionCallback::MayForce(), pp::CompletionCallback::pp_completion_callback(), and pp::Resource::pp_resource().


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