| Pepper_47_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 64 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_1::AddExternalSubtitles)(PP_Resource player, const char *file_path, const char *encoding, struct PP_TextTrackInfo *subtitles, struct PP_CompletionCallback callback) | 
Adds external subtitles. Returns PP_OK/code> in case of success and writes added text track information to |subtitles| param. After that newly added subtitles will be activated and PPB_SubtitleListener_Samsung will be notified about it's texts at the time those texts should be shown.
Please note that player is responsible only for subtitle file parsing. No subtitles are displayed by the player. Application can use PPB_SubtitleListener_Samsung to get subtitle texts at correct playback times and display them manually.
Constraints: Ability to add external subtitles after attaching data source is implementation dependent. If it is impossible to add external subtitles after data source is attached, this method will fail with PP_ERROR_NOTSUPPORTED error code. Therefore this method is guaranteed to succeed only before data source is attached.
| [in] | player | A PP_Resourceidentifying the media player. | 
| [in] | file_path | A path of the subtitles. | 
| [in] | encoding | Subtitle encoding. May be NULL or empty string, which will cause subtitles to be interpreted as UTF-8 text. | 
| [out] | subtitles | Added text/subtitles track information. | 
| [in] | callback | A PP_CompletionCallbackto be called upon completion. | 
pp_errors.h. Meaning of errors:PP_ERROR_FILENOTFOUND - if provided file_path is invalid.PP_ERROR_BADARGUMENT - if provided encoding is invalid.PP_ERROR_NOTSUPPORTED - if method was called after attaching a data source and such operation is not supported on the current implementation. Definition at line 552 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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_Resourceidentifying the media player. | 
| [in] | data_source | A PP_Resourceidentifying data source to be attached to the player. | 
| [in] | callback | A PP_CompletionCallbackto be called upon completion. | 
pp_errors.h. Definition at line 216 of file ppb_media_player_samsung.h.
| PP_Resource(* PPB_MediaPlayer_Samsung_1_1::Create)(PP_Instance instance) | 
Creates a new media player resource and binds it to the instance.
| [in] | instance | A PP_Instanceidentifying the instance with the media player. | 
PP_Resource corresponding to a media player if successful or 0 otherwise. Definition at line 74 of file ppb_media_player_samsung.h.
| PP_Resource(* PPB_MediaPlayer_Samsung_1_1::CreateWithoutBindingToInstance)(PP_Instance instance) | 
Creates a new media player resource without binding it to the instance.
| [in] | instance | A PP_Instanceidentifying the instance with the media player. | 
PP_Resource corresponding to a media player if successful or 0 otherwise. Definition at line 84 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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_Resourceidentifying the media player. | 
| [in] | output | A PP_ArrayOutputto receive list of the supportedPP_AudioTrackInfotracks descriptions. | 
| [in] | callback | A PP_CompletionCallbackto 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 440 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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_Resourceidentifying the media player. | 
| [out] | track_info | Retrieved audio track information. | 
| [in] | callback | A PP_CompletionCallbackto 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 422 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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_Resourceidentifying the media player. | 
| [out] | track_info | Retrieved video track information. | 
| [in] | callback | A PP_CompletionCallbackto 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 459 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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_Resourceidentifying the media player. | 
| [out] | duration | Retrieved current time/position of the media. | 
| [in] | callback | A PP_CompletionCallbackto 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 350 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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_Resourceidentifying the media player. | 
| [out] | track_info | Retrieved video track information. | 
| [in] | callback | A PP_CompletionCallbackto 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 385 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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_Resourceidentifying the media player. | 
| [out] | duration | Retrieved duration of the media. | 
| [in] | callback | A PP_CompletionCallbackto 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 327 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_1::GetPlayerState)(PP_Resource player, PP_MediaPlayerState *state, struct PP_CompletionCallback callback) | 
Retrieves current state the media player.
| [in] | player | A PP_Resourceidentifying the media player. | 
| [out] | state | Retrieved current state of the media player. | 
| [in] | callback | A PP_CompletionCallbackto be called upon completion. | 
pp_errors.h. Definition at line 365 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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.
| [in] | player | A PP_Resourceidentifying the media player. | 
| [in] | output | A PP_ArrayOutputto receive list of the supportedPP_TextTrackInfotracks descriptions. | 
| [in] | callback | A PP_CompletionCallbackto 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 477 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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_Resourceidentifying the media player. | 
| [in] | output | A PP_ArrayOutputto receive list of the supportedPP_VideoTrackInfotracks descriptions. | 
| [in] | callback | A PP_CompletionCallbackto 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 403 of file ppb_media_player_samsung.h.
| PP_Bool(* PPB_MediaPlayer_Samsung_1_1::IsMediaPlayer)(PP_Resource controller) | 
Determines if the given resource is a media player.
| [in] | resource | A PP_Resourceidentifying 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 94 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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_Resourceidentifying the media player. | 
| [in] | callback | A PP_CompletionCallbackto 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 251 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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_Resourceidentifying the media player. | 
| [in] | callback | A PP_CompletionCallbackto 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 235 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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. After calling Seek new packets should be sent to the player. Only after receiving a number of packets the player can complete a seek operation and run a callback.
| [in] | player | A PP_Resourceidentifying the media player. | 
| [in] | time | A time stamp from begging of the clip to from which playback should be resumed. | 
| [in] | callback | A PP_CompletionCallbackto 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 287 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_1::SelectTrack)(PP_Resource player, PP_ElementaryStream_Type_Samsung track_type, uint32_t track_index, struct PP_CompletionCallback callback) | 
Selects a track for the given stream type to be activated for media played from the attached data source.
Remarks: If activated track is a text track, it will be automatically activated and therefore it's subtitles will be delivered as events to the PPP_SubtitleListener_Samsung.
Constraints: An ability to handle multiple video tracks at a time is not guaranteed to be supported on all platforms, therefore calling this method with a PP_ElementaryStream_Type_Samsung_VIDEO as a stream type may result with a PP_ERROR_NOTSUPPORTED error code.
| [in] | player | A PP_Resourceidentifying 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_CompletionCallbackto 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.PP_ERROR_NOTSUPPORTED - if called with PP_ElementaryStream_Type_Samsung_VIDEO on a platform that supports only one video track at a time. Definition at line 512 of file ppb_media_player_samsung.h.
| PP_Bool(* PPB_MediaPlayer_Samsung_1_1::SetBufferingListener)(PP_Resource data_source, const struct PPP_BufferingListener_Samsung_1_0 *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 listeners will be called in the same thread. If this method was invoked in a thread with a running message loop, the listener will run in the current thread. Otherwise, it will run on the main thread.
| [in] | player | A PP_Resourceidentifying the media player. | 
| [in] | listener | A PPP_BufferingListener_Samsunginterface whose methods will be notified about subscribed events. PassingNULLwill 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 166 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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_Resourceidentifying the media player. | 
| [in] | rect | Video region in which video will be displayed. | 
| [in] | callback | A PP_CompletionCallbackto be called upon completion. | 
pp_errors.h. Definition at line 588 of file ppb_media_player_samsung.h.
| PP_Bool(* PPB_MediaPlayer_Samsung_1_1::SetDRMListener)(PP_Resource data_source, const struct PPP_DRMListener_Samsung_1_0 *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 listeners will be called in the same thread. If this method was invoked in a thread with a running message loop, the listener will run in the current thread. Otherwise, it will run on the main thread.
| [in] | player | A PP_Resourceidentifying the media player. | 
| [in] | listener | A PPP_DRMListener_Samsunginterface whose methods will be notified about subscribed events. PassingNULLwill 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 190 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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_Resourceidentifying 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_CompletionCallbackto 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 607 of file ppb_media_player_samsung.h.
| PP_Bool(* PPB_MediaPlayer_Samsung_1_1::SetMediaEventsListener)(PP_Resource player, const struct PPP_MediaEventsListener_Samsung_1_0 *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 listeners will be called in the same thread. If this method was invoked in a thread with a running message loop, the listener will run in the current thread. Otherwise, it will run on the main thread.
| [in] | player | A PP_Resourceidentifying the media player. | 
| [in] | listener | A PPP_MediaEventsListener_Samsunginterface whose methods will be notified about subscribed events. PassingNULLwill 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 115 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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_Resourceidentifying the media player. | 
| [in] | rate | A rate of the playback. | 
| [in] | callback | A PP_CompletionCallbackto 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 308 of file ppb_media_player_samsung.h.
| PP_Bool(* PPB_MediaPlayer_Samsung_1_1::SetSubtitleListener)(PP_Resource player, const struct PPP_SubtitleListener_Samsung_1_0 *listener, void *user_data) | 
Attaches PPP_SubtitleListener_Samsung to the player. After attaching plugin is notified about subtitle texts that are parsed by the internal player subtitle parser at the time when they should be displayed. Only notifications regarding texts that originate from active text track are delivered this way. Previously attached listener (if any) is detached.
All listeners will be called in the same thread. If this method was invoked in a thread with a running message loop, the listener will run in the current thread. Otherwise, it will run on the main thread.
| [in] | player | A PP_Resourceidentifying the media player. | 
| [in] | listener | A PPP_SubtitleListener_Samsunginterface whose methods will be notified about subscribed events. PassingNULLwill 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 142 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_1::SetSubtitlesDelay)(PP_Resource player, PP_TimeDelta delay, struct PP_CompletionCallback callback) | 
Sets subtitles (text stream) PPP_SubtitleListener_Samsung event emission delay regarding to the current media time.
| [in] | player | A PP_Resourceidentifying the media player. | 
| [in] | delay | A delay to be set. | 
| [in] | callback | A PP_CompletionCallbackto 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 571 of file ppb_media_player_samsung.h.
| int32_t(* PPB_MediaPlayer_Samsung_1_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_Resourceidentifying the media player. | 
| [in] | callback | A PP_CompletionCallbackto 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 267 of file ppb_media_player_samsung.h.
 1.8.6
 1.8.6