Pepper_37_C_interfaces
|
#include <ppb_media_data_source_samsung.h>
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, 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) |
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):
Create.
Add audio stream using AddStream with PP_ELEMENTARYSTREAM_TYPE_SAMSUNG_AUDIO type.
Configure audio stream, by setting codec, sampling rate, channels and other necessary information.
Call PPB_ElementaryStream_Samsung.InitializeDone
to confirm the configuration
Add video stream using AddStream with PP_ELEMENTARYSTREAM_TYPE_SAMSUNG_VIDEO type.
Configure video stream, by setting codec, frame rate, resolution and other necessary information.
Call PPB_ElementaryStream_Samsung.InitializeDone
to confirm the configuration.
Attach data source to the player by calling PPB_MediaPlayer_Samsung.AttachMediaSource
.
Download and append Elementary Stream audio and video packets by calling PPB_ElementaryStream_Samsung.AppendPacket
Signalize end of stream (clip) by calling
SetEndOfStream
PPB_MediaPlayer_Samsung.AttachMediaSource
with NULL
resource. Definition at line 231 of file ppb_media_data_source_samsung.h.
int32_t(* PPB_ESDataSource_Samsung_0_1::AddStream)(PP_Resource data_source, PP_ElementaryStream_Type_Samsung stream_type, 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 time, so calling multiple times this method with the same buffer type will return the same resource as all previous calls.
[in] | data_source | A PP_Resource identifying the ES data source to which add new stream. |
[in] | stream_type | A PP_ElementaryStream_Type_Samsung identifying the stream type which will be added. |
[out] | stream | A PP_Resource identifying the added stream of requested type. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Definition at line 271 of file ppb_media_data_source_samsung.h.
PP_Resource(* PPB_ESDataSource_Samsung_0_1::Create)(PP_Instance instance) |
Creates a new ES data source resource.
[in] | instance | A PP_Instance identifying the instance with the ES data source. |
PP_Resource
corresponding to a media player if successful or 0 otherwise. Definition at line 241 of file ppb_media_data_source_samsung.h.
PP_Bool(* PPB_ESDataSource_Samsung_0_1::IsESDataSource)(PP_Resource resource) |
Determines if the given resource is a ES Data Source.
[in] | resource | A PP_Resource identifying a resource. |
PP_TRUE
if the resource is a PPB_ESDataSource_Samsung
, PP_FALSE
if the resource is invalid or some other type. Definition at line 251 of file ppb_media_data_source_samsung.h.
int32_t(* PPB_ESDataSource_Samsung_0_1::SetDuration)(PP_Resource data_source, PP_TimeDelta duration, struct PP_CompletionCallback callback) |
Sets duration of the whole media stream/container/clip.
[in] | data_source | A PP_Resource identifying the ES data source to which add new stream. |
[in] | duration | A duration of played media. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Definition at line 287 of file ppb_media_data_source_samsung.h.
int32_t(* PPB_ESDataSource_Samsung_0_1::SetEndOfStream)(PP_Resource data_source, struct PP_CompletionCallback callback) |
Signalizes end of the whole stream/container/clip.
[in] | data_source | A PP_Resource identifying the ES data source which has ended. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Definition at line 301 of file ppb_media_data_source_samsung.h.