Pepper_37_C_interfaces
|
#include <ppb_media_player_samsung.h>
Interface representing player and providing functionality of playback control and attaching data source feeding player.
Assumptions:
PPB_Instance.BindGraphics
). Application must set proper CSS style for embed element with NaCl application (mostly transparent background). Definition at line 63 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::AddExternalSubtitles)(PP_Resource player, const char *file_path, struct PP_TextTrackInfo *subtitles, struct PP_CompletionCallback callback) |
Returns PP_OK in case of success and writes added text track information to |subtitles| argument. After that subtitles can be selected by calling SelectTrack
and passing |track_index| field from |output| structure.
Constraints: Calling this method before calling Play
will set subtitles.index
to -1
. However such subtitles will be returned by call to GetTextTrackList
after starting playback and they will have is_external
flag set.
[in] | player | A PP_Resource identifying the media player. |
[in] | file_path | A path of the subtitles. |
[out] | subtitles | Added text/subtitles track information. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player. Definition at line 525 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::AttachDataSource)(PP_Resource player, PP_Resource data_source, struct PP_CompletionCallback callback) |
Attaches given PPB_MediaDataSource
to the player.
You can pass a NULL
resource as buffer to detach currently attached data source. Reattaching data source will return PP_OK
and do nothing.
Attached data source must be valid. Otherwise PP_ERROR_BADARGUMENT
will be returned. Attaching data source to the player will cause:
[in] | player | A PP_Resource identifying the media player. |
[in] | data_source | A PP_Resource identifying data source to be attached to the player. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Definition at line 194 of file ppb_media_player_samsung.h.
PP_Resource(* PPB_MediaPlayer_Samsung_0_1::Create)(PP_Instance instance) |
Creates a new media player resource.
[in] | instance | A PP_Instance identifying the instance with the media player. |
PP_Resource
corresponding to a media player if successful or 0 otherwise. Definition at line 73 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::GetAudioTracksList)(PP_Resource player, struct PP_ArrayOutput output, struct PP_CompletionCallback callback) |
Retrieves information of all audio tracks from the media played from attached data source.
[in] | player | A PP_Resource identifying the media player. |
[in] | output | A PP_ArrayOutput to receive list of the supported PP_AudioTrackInfo tracks descriptions. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player. Definition at line 415 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::GetCurrentAudioTrackInfo)(PP_Resource player, struct PP_AudioTrackInfo *track_info, struct PP_CompletionCallback callback) |
Retrieves information of current audio track from the media played from attached data source.
[in] | player | A PP_Resource identifying the media player. |
[out] | track_info | Retrieved audio track information. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player.PP_ERROR_NOTSUPPORTED
- if no audio track is available in media played from attached data source. Definition at line 397 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::GetCurrentTextTrackInfo)(PP_Resource player, struct PP_TextTrackInfo *track_info, struct PP_CompletionCallback callback) |
Retrieves information of current text/subtitles track from the media played from attached data source.
[in] | player | A PP_Resource identifying the media player. |
[out] | track_info | Retrieved video track information. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player.PP_ERROR_NOTSUPPORTED
- if no text/subtitles track is available in media played from attached data source. Definition at line 434 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::GetCurrentTime)(PP_Resource player, PP_TimeTicks *time, struct PP_CompletionCallback callback) |
Retrieves current time/position of the media played from attached data source.
This operation can be performed only for media player in PP_MEDIAPLAYERSTATE_PLAYING
or PP_MEDIAPLAYERSTATE_PAUSED
states.
[in] | player | A PP_Resource identifying the media player. |
[out] | duration | Retrieved current time/position of the media. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player.PP_ERROR_NOTSUPPORTED
- if data can't be retrieved due to invalid player state. Definition at line 325 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::GetCurrentVideoTrackInfo)(PP_Resource player, struct PP_VideoTrackInfo *track_info, struct PP_CompletionCallback callback) |
Retrieves information of current video track from the media played from attached data source.
[in] | player | A PP_Resource identifying the media player. |
[out] | track_info | Retrieved video track information. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player.PP_ERROR_NOTSUPPORTED
- if no video track is available in media played from attached data source. Definition at line 360 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::GetDuration)(PP_Resource player, PP_TimeDelta *duration, struct PP_CompletionCallback callback) |
Retrieves duration of the media played from attached data source.
[in] | player | A PP_Resource identifying the media player. |
[out] | duration | Retrieved duration of the media. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player.PP_ERROR_NOTSUPPORTED
- if given operation is not supported by attached data source (e.g. live content playback). Definition at line 302 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::GetPlayerState)(PP_Resource player, PP_MediaPlayerState *state, struct PP_CompletionCallback callback) |
Retrieves current state the media player.
[in] | player | A PP_Resource identifying the media player. |
[out] | state | Retrieved current state of the media player. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Definition at line 340 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::GetTextTracksList)(PP_Resource player, struct PP_ArrayOutput output, struct PP_CompletionCallback callback) |
Retrieves information of all text/subtitles tracks from the media played from attached data source.
If there are external subtitles tracks attached using AddExternalSubtitles
they will be added to this list.
[in] | player | A PP_Resource identifying the media player. |
[in] | output | A PP_ArrayOutput to receive list of the supported PP_TextTrackInfo tracks descriptions. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player. Definition at line 455 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::GetVideoTracksList)(PP_Resource player, struct PP_ArrayOutput output, struct PP_CompletionCallback callback) |
Retrieves information of all video tracks from the media played from attached data source.
[in] | player | A PP_Resource identifying the media player. |
[in] | output | A PP_ArrayOutput to receive list of the supported PP_VideoTrackInfo tracks descriptions. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player. Definition at line 378 of file ppb_media_player_samsung.h.
PP_Bool(* PPB_MediaPlayer_Samsung_0_1::IsMediaPlayer)(PP_Resource controller) |
Determines if the given resource is a media player.
[in] | resource | A PP_Resource identifying a resource. |
PP_TRUE
if the resource is a PPB_MediaPlayer_Samsung
, PP_FALSE
if the resource is invalid or some other type. Definition at line 83 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::Pause)(PP_Resource player, struct PP_CompletionCallback callback) |
Requests to pause playback of media from data source attached to the media player.
[in] | player | A PP_Resource identifying the media player. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player.PP_ERROR_NOTSUPPORTED
- if given operation is not supported by attached data source. Definition at line 229 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::Play)(PP_Resource player, struct PP_CompletionCallback callback) |
Requests to start playback of media from data source attached to the media player.
[in] | player | A PP_Resource identifying the media player. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player.PP_ERROR_NOTSUPPORTED
- if given operation is not supported by attached data source. Definition at line 213 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::Seek)(PP_Resource player, PP_TimeTicks time, struct PP_CompletionCallback callback) |
Requests to seek media from attached data source to the given time stamp.
[in] | player | A PP_Resource identifying the media player. |
[in] | time | A time stamp from begging of the clip to from which playback should be resumed. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player.PP_ERROR_NOTSUPPORTED
- if given operation is not supported by attached data source. Definition at line 262 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::SelectTrack)(PP_Resource player, PP_ElementaryStream_Type_Samsung track_type, uint32_t track_index, struct PP_CompletionCallback callback) |
Selects track for given stream type to by activated from media played from attached data source.
[in] | player | A PP_Resource identifying the media player. |
[in] | track_type | A type of the stream for which activate track. |
[in] | track_index | An index of the track which has to be activated. Valid track index can be obtained from one of PP_*TrackInfo structures returned by corresponding call to Get*TracksInfo. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player or passed |track_type| or |track_index| are not valid. Definition at line 476 of file ppb_media_player_samsung.h.
PP_Bool(* PPB_MediaPlayer_Samsung_0_1::SetBufferingListener)(PP_Resource data_source, const struct PPP_BufferingListener_Samsung_0_1 *listener, void *user_data) |
Attaches PPP_BufferingListener_Samsung
to the player. After attaching plugin is notified about initial media buffering events. Previously attached listener (if any) is detached.
All listener will be called in the same thread as was this method invoked.
[in] | player | A PP_Resource identifying the media player. |
[in] | listener | A PPP_BufferingListener_Samsung interface whose methods will be notified about subscribed events. Passing NULL will detach currently set listener. |
[in] | user_data | A pointer to user data which will be passed to the listeners during method invocation (optional). |
PP_TRUE
if listener has been successfully attached, PP_FALSE
otherwise. This method will return false only when called on resource not representing PPB_MediaPlayer_Samsung
. Definition at line 146 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::SetDisplayMode)(PP_Resource player, PP_MediaPlayerDisplayMode display_mode, struct PP_CompletionCallback callback) |
Sets display mode used to scale video to output area if necessary.
[in] | player | A PP_Resource identifying the media player. |
[in] | display_mode | A display/scaling mode to be used. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Definition at line 558 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::SetDisplayRect)(PP_Resource player, const struct PP_Rect *rect, struct PP_CompletionCallback callback) |
Sets display region in which video will be displayed. Passed position is relative to the embed/object element of WebPage associated with given plugin.
[in] | player | A PP_Resource identifying the media player. |
[in] | rect | Video region in which video will be displayed. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Definition at line 574 of file ppb_media_player_samsung.h.
PP_Bool(* PPB_MediaPlayer_Samsung_0_1::SetDRMListener)(PP_Resource data_source, const struct PPP_DRMListener_Samsung_0_1 *listener, void *user_data) |
Attaches PPP_DRMListener_Samsung
to the player. After attaching plugin is notified about DRM related events. Previously attached listener (if any) is detached.
All listener will be called in the same thread as was this method invoked.
[in] | player | A PP_Resource identifying the media player. |
[in] | listener | A PPP_DRMListener_Samsung interface whose methods will be notified about subscribed events. Passing NULL will detach currently set listener. |
[in] | user_data | A pointer to user data which will be passed to the listeners during method invocation (optional). |
PP_TRUE
if listener has been successfully attached, PP_FALSE
otherwise. This method will return false only when called on resource not representing PPB_MediaPlayer_Samsung
. Definition at line 168 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::SetDRMSpecificData)(PP_Resource player, PP_MediaPlayerDRMType drm_type, PP_MediaPlayerDRMOperation drm_operation, uint32_t drm_data_size, const void *drm_data, struct PP_CompletionCallback callback) |
Calls DRM system specific operation.
[in] | player | A PP_Resource identifying the media player. |
[in] | drm_type | A DRM system to be used |
[in] | drm_operation | A DRM specific operation to be performed. |
[in] | drm_data_size | A size of data buffer passed to DRM system. |
[in] | drm_data | A data buffer passed to DRM system. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player. Definition at line 593 of file ppb_media_player_samsung.h.
PP_Bool(* PPB_MediaPlayer_Samsung_0_1::SetMediaEventsListener)(PP_Resource player, const struct PPP_MediaEventsListener_Samsung_0_1 *listener, void *user_data) |
Attaches PPP_MediaEventsListener_Samsung
to the player. After attaching plugin is notified about media playback related event. Previously attached listener (if any) is detached.
All listener will be called in the same thread as was this method invoked.
[in] | player | A PP_Resource identifying the media player. |
[in] | listener | A PPP_MediaEventsListener_Samsung interface whose methods will be notified about subscribed events. Passing NULL will detach currently set listener. |
[in] | user_data | A pointer to user data which will be passed to the listeners during method invocation (optional). |
PP_TRUE
if listener has been successfully attached, PP_FALSE
otherwise. This method will return false only when called on resource not representing PPB_MediaPlayer_Samsung
. Definition at line 102 of file ppb_media_player_samsung.h.
PP_Bool(* PPB_MediaPlayer_Samsung_0_1::SetMetadataListener)(PP_Resource data_source, const struct PPP_MediaMetadataListener_Samsung_0_1 *listener, void *user_data) |
Attaches PPP_MediaMetadataListener_Samsung
to the player. After attaching plugin is notified about media metadata changes events. Previously attached listener (if any) is detached.
All listener will be called in the same thread as was this method invoked.
[in] | player | A PP_Resource identifying the media player. |
[in] | listener | A PPP_MediaMetadataListener_Samsung interface whose methods will be notified about subscribed events. Passing NULL will detach currently set listener. |
[in] | user_data | A pointer to user data which will be passed to the listeners during method invocation (optional). |
PP_TRUE
if listener has been successfully attached, PP_FALSE
otherwise. This method will return false only when called on resource not representing PPB_MediaPlayer_Samsung
. Definition at line 124 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::SetPlaybackRate)(PP_Resource player, double rate, struct PP_CompletionCallback callback) |
Sets playback rate, pass: |rate| == 1.0 to mark normal playback 0.0 < |rate| < 1.0 to mark speeds slower than normal |rate| > 1.0 to mark speeds faster than normal
[in] | player | A PP_Resource identifying the media player. |
[in] | rate | A rate of the playback. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player.PP_ERROR_NOTSUPPORTED
- if given operation is not supported by attached data source. Definition at line 283 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::SetSubtitlesDelay)(PP_Resource player, PP_TimeDelta delay, struct PP_CompletionCallback callback) |
Sets subtitles (text stream) display delay regarding to the current media time.
[in] | player | A PP_Resource identifying the media player. |
[in] | delay | A delay to be set. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player. Definition at line 543 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::SetSubtitlesVisible)(PP_Resource player, PP_Bool subtitles_visible, struct PP_CompletionCallback callback) |
Sets subtitles (text stream) visibility flag. Note - when subtitles are not displayed changing text track (by calling SelectTrack
) will not automatically toggle this flag.
Passing PP_TRUE
will cause that subtitles will be displayed and PP_FALSE
will hide them.
[in] | player | A PP_Resource identifying the media player. |
[in] | subtitles_visible | visibility of the subtitles. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player. Definition at line 499 of file ppb_media_player_samsung.h.
int32_t(* PPB_MediaPlayer_Samsung_0_1::Stop)(PP_Resource player, struct PP_CompletionCallback callback) |
Requests to stop playback of media from data source attached to the media player.
[in] | player | A PP_Resource identifying the media player. |
[in] | callback | A PP_CompletionCallback to be called upon completion. |
pp_errors.h
. Meaning of errors:PP_ERROR_BADARGUMENT
- if no data source is connected to the media player.PP_ERROR_NOTSUPPORTED
- if given operation is not supported by attached data source. Definition at line 245 of file ppb_media_player_samsung.h.