Pepper_47_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, 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) |
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 224 of file ppb_media_data_source_samsung.h.
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.
[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. |
[in] | listener | A PPP_ElementaryStreamListener_Samsung listener which is required to notify application about data related events. Cannot be NULL. |
[in] | user_data | A pointer to user data which will be passed to the listeners during method invocation (optional). |
[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 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.
[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 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.
[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 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.
[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 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.
[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 306 of file ppb_media_data_source_samsung.h.