Pepper_47_C_interfaces
Public Attributes | List of all members
PPB_ESDataSource_Samsung_1_0 Struct Reference

#include <ppb_media_data_source_samsung.h>

Collaboration diagram for PPB_ESDataSource_Samsung_1_0:
Collaboration graph

Public Attributes

PP_Resource(* Create )(PP_Instance instance)
 
PP_Bool(* IsESDataSource )(PP_Resource resource)
 
int32_t(* AddStream )(PP_Resource data_source, PP_ElementaryStream_Type_Samsung stream_type, const struct PPP_ElementaryStreamListener_Samsung_1_0 *listener, void *user_data, PP_Resource *stream, struct PP_CompletionCallback callback)
 
int32_t(* SetDuration )(PP_Resource data_source, PP_TimeDelta duration, struct PP_CompletionCallback callback)
 
int32_t(* SetEndOfStream )(PP_Resource data_source, struct PP_CompletionCallback callback)
 

Detailed Description

Data source handling appends of Elementary Streams, derives from PPB_MediaDataSource_Samsung.

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 resource using Create.
  2. Add audio stream using AddStream with PP_ELEMENTARYSTREAM_TYPE_SAMSUNG_AUDIO type.
  3. Configure audio stream, by setting codec, sampling rate, channels and other necessary information.
  4. Call PPB_ElementaryStream_Samsung.InitializeDone to confirm the configuration
  5. Add video stream using AddStream with PP_ELEMENTARYSTREAM_TYPE_SAMSUNG_VIDEO type.
  6. Configure video stream, by setting codec, frame rate, resolution and other necessary information.
  7. Call PPB_ElementaryStream_Samsung.InitializeDone to confirm the configuration.
  8. Attach data source to the player by calling PPB_MediaPlayer_Samsung.AttachMediaSource.
  9. Download and append Elementary Stream audio and video packets by calling PPB_ElementaryStream_Samsung.AppendPacket

Signalize end of stream (clip) by calling SetEndOfStream

  1. Detach data source from the player by calling PPB_MediaPlayer_Samsung.AttachMediaSource with NULL resource.

Definition at line 224 of file ppb_media_data_source_samsung.h.

Member Data Documentation

int32_t(* PPB_ESDataSource_Samsung_1_0::AddStream)(PP_Resource data_source, PP_ElementaryStream_Type_Samsung stream_type, const struct PPP_ElementaryStreamListener_Samsung_1_0 *listener, void *user_data, PP_Resource *stream, struct PP_CompletionCallback callback)

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

This data source can handle at most one buffer of given type, so calling multiple times this method with the same buffer type will return the same resource as all previous calls. Specified listener will be ignored if buffer is already created.

Listener methods will be called in the same thread as was this method invoked.

Parameters
[in]data_sourceA PP_Resource identifying the ES data source to which add new stream.
[in]stream_typeA PP_ElementaryStream_Type_Samsung identifying the stream type which will be added.
[in]listenerA PPP_ElementaryStreamListener_Samsung listener which is required to notify application about data related events. Cannot be NULL.
[in]user_dataA pointer to user data which will be passed to the listeners during method invocation (optional).
[out]streamA PP_Resource identifying the added stream of requested type.
[in]callbackA PP_CompletionCallback to be called upon completion.
Returns
PP_OK on success, otherwise an error code from pp_errors.h.

Definition at line 273 of file ppb_media_data_source_samsung.h.

PP_Resource(* PPB_ESDataSource_Samsung_1_0::Create)(PP_Instance instance)

Creates a new ES data source resource.

Parameters
[in]instanceA PP_Instance identifying the instance with the ES data source.
Returns
A PP_Resource corresponding to a media player if successful or 0 otherwise.

Definition at line 234 of file ppb_media_data_source_samsung.h.

PP_Bool(* PPB_ESDataSource_Samsung_1_0::IsESDataSource)(PP_Resource resource)

Determines if the given resource is a ES Data Source.

Parameters
[in]resourceA PP_Resource identifying a resource.
Returns
PP_TRUE if the resource is a PPB_ESDataSource_Samsung, PP_FALSE if the resource is invalid or some other type.

Definition at line 244 of file ppb_media_data_source_samsung.h.

int32_t(* PPB_ESDataSource_Samsung_1_0::SetDuration)(PP_Resource data_source, PP_TimeDelta duration, struct PP_CompletionCallback callback)

Sets duration of the whole media stream/container/clip.

Parameters
[in]data_sourceA PP_Resource identifying the ES data source to which add new stream.
[in]durationA duration of played media.
[in]callbackA PP_CompletionCallback to be called upon completion.
Returns
PP_OK on success, otherwise an error code from pp_errors.h.

Definition at line 292 of file ppb_media_data_source_samsung.h.

int32_t(* PPB_ESDataSource_Samsung_1_0::SetEndOfStream)(PP_Resource data_source, struct PP_CompletionCallback callback)

Signalizes end of the whole stream/container/clip.

Parameters
[in]data_sourceA PP_Resource identifying the ES data source which has ended.
[in]callbackA PP_CompletionCallback to be called upon completion.
Returns
PP_OK on success, otherwise an error code from pp_errors.h.

Definition at line 306 of file ppb_media_data_source_samsung.h.


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