Pepper_42_C_interfaces
ppb_media_player_samsung.h
Go to the documentation of this file.
1 /* Copyright (c) 2016 Samsung Electronics. All rights reserved.
2  */
3 
4 /* From samsung/ppb_media_player_samsung.idl,
5  * modified Tue Mar 22 13:34:15 2016.
6  */
7 
8 #ifndef PPAPI_C_SAMSUNG_PPB_MEDIA_PLAYER_SAMSUNG_H_
9 #define PPAPI_C_SAMSUNG_PPB_MEDIA_PLAYER_SAMSUNG_H_
10 
11 #include "ppapi/c/pp_array_output.h"
12 #include "ppapi/c/pp_bool.h"
13 #include "ppapi/c/pp_completion_callback.h"
14 #include "ppapi/c/pp_instance.h"
15 #include "ppapi/c/pp_macros.h"
16 #include "ppapi/c/pp_point.h"
17 #include "ppapi/c/pp_rect.h"
18 #include "ppapi/c/pp_resource.h"
19 #include "ppapi/c/pp_size.h"
20 #include "ppapi/c/pp_stdint.h"
21 #include "ppapi/c/pp_time.h"
22 #include "ppapi/c/samsung/pp_media_common_samsung.h"
23 #include "ppapi/c/samsung/pp_media_player_samsung.h"
24 #include "ppapi/c/samsung/ppp_media_player_samsung.h"
25 
26 #define PPB_MEDIAPLAYER_SAMSUNG_INTERFACE_1_0 "PPB_MediaPlayer_Samsung;1.0"
27 #define PPB_MEDIAPLAYER_SAMSUNG_INTERFACE PPB_MEDIAPLAYER_SAMSUNG_INTERFACE_1_0
28 
29 /**
30  * @file
31  * This file defines the <code>PPB_MediaPlayer_Samsung</code> interface,
32  * which provides multimedia streaming, playback control capabilities.
33  *
34  * Part of Pepper Media Player interfaces (Samsung's extension).
35  *
36  * Basic idea:
37  * - <code>PPB_MediaPlayer_Samsung</code> is interface allowing application
38  * to control playback state, inquire about playback state and to
39  * set listeners for various playback related events (see
40  * <code>PPP_MediaEventsListener_Samsung</code>). It's also responsible for
41  * assigning data source which will feed player with media data.
42  *
43  * For full description of Data Sources see ppb_media_data_source_samsung.idl.
44  */
45 
46 
47 /**
48  * @addtogroup Interfaces
49  * @{
50  */
51 /**
52  * Interface representing player and providing functionality of playback
53  * control and attaching data source feeding player.
54  *
55  * Assumptions:
56  * - Video is displayed in area of embed/object element of HTML page
57  * in which plugin is embedded.
58  * - Video and graphics from module can be displayed simultaneously.
59  * (see <code>PPB_Instance.BindGraphics</code>). Application must
60  * set proper CSS style for embed element with NaCl application
61  * (mostly transparent background).
62  */
64  /**
65  * Creates a new media player resource.
66  *
67  * @param[in] instance A <code>PP_Instance</code> identifying the instance
68  * with the media player.
69  *
70  * @return A <code>PP_Resource</code> corresponding to a media player if
71  * successful or 0 otherwise.
72  */
74  /**
75  * Determines if the given resource is a media player.
76  *
77  * @param[in] resource A <code>PP_Resource</code> identifying a resource.
78  *
79  * @return <code>PP_TRUE</code> if the resource is a
80  * <code>PPB_MediaPlayer_Samsung</code>, <code>PP_FALSE</code>
81  * if the resource is invalid or some other type.
82  */
84  /**
85  * Attaches <code>PPP_MediaEventsListener_Samsung</code> to the player.
86  * After attaching plugin is notified about media playback related event.
87  * Previously attached listener (if any) is detached.
88  *
89  * All listener will be called in the same thread as was this method invoked.
90  *
91  * @param[in] player A <code>PP_Resource</code> identifying the media player.
92  * @param[in] listener A <code>PPP_MediaEventsListener_Samsung</code>
93  * interface whose methods will be notified about subscribed events.
94  * Passing <code>NULL</code> will detach currently set listener.
95  * @param[in] user_data A pointer to user data which will be passed
96  * to the listeners during method invocation (optional).
97  *
98  * @return <code>PP_TRUE</code> if listener has been successfully attached,
99  * <code>PP_FALSE</code> otherwise. This method will return false only when
100  * called on resource not representing <code>PPB_MediaPlayer_Samsung</code>.
101  */
103  PP_Resource player,
104  const struct PPP_MediaEventsListener_Samsung_1_0* listener,
105  void* user_data);
106  /**
107  * Attaches <code>PPP_SubtitleListener_Samsung</code> to the player.
108  * After attaching plugin is notified about subtitle texts that are parsed by
109  * the internal player subtitle parser at the time when they should be
110  * displayed. Only notifications regarding texts that originate from active
111  * text track are delivered this way.
112  * Previously attached listener (if any) is detached.
113  *
114  * All listener will be called in the same thread as was this method invoked.
115  *
116  * @param[in] player A <code>PP_Resource</code> identifying the media player.
117  * @param[in] listener A <code>PPP_SubtitleListener_Samsung</code>
118  * interface whose methods will be notified about subscribed events.
119  * Passing <code>NULL</code> will detach currently set listener.
120  * @param[in] user_data A pointer to user data which will be passed
121  * to the listeners during method invocation (optional).
122  *
123  * @return <code>PP_TRUE</code> if listener has been successfully attached,
124  * <code>PP_FALSE</code> otherwise. This method will return false only when
125  * called on resource not representing <code>PPB_MediaPlayer_Samsung</code>.
126  */
128  PP_Resource player,
129  const struct PPP_SubtitleListener_Samsung_1_0* listener,
130  void* user_data);
131  /**
132  * Attaches <code>PPP_BufferingListener_Samsung</code> to the player.
133  * After attaching plugin is notified about initial media buffering events.
134  * Previously attached listener (if any) is detached.
135  *
136  * All listener will be called in the same thread as was this method invoked.
137  *
138  * @param[in] player A <code>PP_Resource</code> identifying the media player.
139  * @param[in] listener A <code>PPP_BufferingListener_Samsung</code>
140  * interface whose methods will be notified about subscribed events.
141  * Passing <code>NULL</code> will detach currently set listener.
142  * @param[in] user_data A pointer to user data which will be passed
143  * to the listeners during method invocation (optional).
144  *
145  * @return <code>PP_TRUE</code> if listener has been successfully attached,
146  * <code>PP_FALSE</code> otherwise. This method will return false only when
147  * called on resource not representing <code>PPB_MediaPlayer_Samsung</code>.
148  */
150  PP_Resource data_source,
151  const struct PPP_BufferingListener_Samsung_1_0* listener,
152  void* user_data);
153  /**
154  * Attaches <code>PPP_DRMListener_Samsung</code> to the player.
155  * After attaching plugin is notified about DRM related events.
156  * Previously attached listener (if any) is detached.
157  *
158  * All listener will be called in the same thread as was this method invoked.
159  *
160  * @param[in] player A <code>PP_Resource</code> identifying the media player.
161  * @param[in] listener A <code>PPP_DRMListener_Samsung</code>
162  * interface whose methods will be notified about subscribed events.
163  * Passing <code>NULL</code> will detach currently set listener.
164  * @param[in] user_data A pointer to user data which will be passed
165  * to the listeners during method invocation (optional).
166  *
167  * @return <code>PP_TRUE</code> if listener has been successfully attached,
168  * <code>PP_FALSE</code> otherwise. This method will return false only when
169  * called on resource not representing <code>PPB_MediaPlayer_Samsung</code>.
170  */
172  const struct PPP_DRMListener_Samsung_1_0* listener,
173  void* user_data);
174  /**
175  * Attaches given <code>PPB_MediaDataSource</code> to the player.
176  *
177  * You can pass a <code>NULL</code> resource as buffer to detach currently
178  * attached data source. Reattaching data source will return
179  * <code>PP_OK</code> and do nothing.
180  *
181  * Attached data source must be valid. Otherwise
182  * <code>PP_ERROR_BADARGUMENT</code> will be returned. Attaching data source
183  * to the player will cause:
184  * 1. Detaching currently attached data source
185  * 2. Performing initialization of newly bound data source (this step
186  * is specific to data source which is being bound).
187  *
188  * @param[in] player A <code>PP_Resource</code> identifying the media player.
189  * @param[in] data_source A <code>PP_Resource</code> identifying data source
190  * to be attached to the player.
191  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
192  * completion.
193  *
194  * @return PP_OK on success, otherwise an error code from
195  * <code>pp_errors.h</code>.
196  */
197  int32_t (*AttachDataSource)(PP_Resource player,
198  PP_Resource data_source,
199  struct PP_CompletionCallback callback);
200  /* Playback control */
201  /**
202  * Requests to start playback of media from data source attached to the
203  * media player.
204  *
205  * @param[in] player A <code>PP_Resource</code> identifying the media player.
206  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
207  * completion.
208  *
209  * @return PP_OK on success, otherwise an error code from
210  * <code>pp_errors.h</code>. Meaning of errors:
211  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
212  * to the media player.
213  * - <code>PP_ERROR_NOTSUPPORTED</code> - if given operation is not
214  * supported by attached data source.
215  */
216  int32_t (*Play)(PP_Resource player, struct PP_CompletionCallback callback);
217  /**
218  * Requests to pause playback of media from data source attached to the
219  * media player.
220  *
221  * @param[in] player A <code>PP_Resource</code> identifying the media player.
222  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
223  * completion.
224  *
225  * @return PP_OK on success, otherwise an error code from
226  * <code>pp_errors.h</code>. Meaning of errors:
227  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
228  * to the media player.
229  * - <code>PP_ERROR_NOTSUPPORTED</code> - if given operation is not
230  * supported by attached data source.
231  */
232  int32_t (*Pause)(PP_Resource player, struct PP_CompletionCallback callback);
233  /**
234  * Requests to stop playback of media from data source attached to the
235  * media player.
236  *
237  * @param[in] player A <code>PP_Resource</code> identifying the media player.
238  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
239  * completion.
240  *
241  * @return PP_OK on success, otherwise an error code from
242  * <code>pp_errors.h</code>. Meaning of errors:
243  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
244  * to the media player.
245  * - <code>PP_ERROR_NOTSUPPORTED</code> - if given operation is not
246  * supported by attached data source.
247  */
248  int32_t (*Stop)(PP_Resource player, struct PP_CompletionCallback callback);
249  /**
250  * Requests to seek media from attached data source to the given time stamp.
251  *
252  * @param[in] player A <code>PP_Resource</code> identifying the media player.
253  * @param[in] time A time stamp from begging of the clip to from which
254  * playback should be resumed.
255  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
256  * completion.
257  *
258  * @return PP_OK on success, otherwise an error code from
259  * <code>pp_errors.h</code>. Meaning of errors:
260  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
261  * to the media player.
262  * - <code>PP_ERROR_NOTSUPPORTED</code> - if given operation is not
263  * supported by attached data source.
264  */
265  int32_t (*Seek)(PP_Resource player,
266  PP_TimeTicks time,
267  struct PP_CompletionCallback callback);
268  /**
269  * Sets playback rate, pass:
270  * |rate| == 1.0 to mark normal playback
271  * 0.0 < |rate| < 1.0 to mark speeds slower than normal
272  * |rate| > 1.0 to mark speeds faster than normal
273  *
274  * @param[in] player A <code>PP_Resource</code> identifying the media player.
275  * @param[in] rate A rate of the playback.
276  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
277  * completion.
278  *
279  * @return PP_OK on success, otherwise an error code from
280  * <code>pp_errors.h</code>. Meaning of errors:
281  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
282  * to the media player.
283  * - <code>PP_ERROR_NOTSUPPORTED</code> - if given operation is not
284  * supported by attached data source.
285  */
286  int32_t (*SetPlaybackRate)(PP_Resource player,
287  double rate,
288  struct PP_CompletionCallback callback);
289  /* Playback time info */
290  /**
291  * Retrieves duration of the media played from attached data source.
292  *
293  * @param[in] player A <code>PP_Resource</code> identifying the media player.
294  * @param[out] duration Retrieved duration of the media.
295  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
296  * completion.
297  *
298  * @return PP_OK on success, otherwise an error code from
299  * <code>pp_errors.h</code>. Meaning of errors:
300  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
301  * to the media player.
302  * - <code>PP_ERROR_NOTSUPPORTED</code> - if given operation is not
303  * supported by attached data source (e.g. live content playback).
304  */
305  int32_t (*GetDuration)(PP_Resource player,
306  PP_TimeDelta* duration,
307  struct PP_CompletionCallback callback);
308  /**
309  * Retrieves current time/position of the media played from attached
310  * data source.
311  *
312  * This operation can be performed only for media player in
313  * <code>PP_MEDIAPLAYERSTATE_PLAYING</code> or
314  * <code>PP_MEDIAPLAYERSTATE_PAUSED</code> states.
315  *
316  * @param[in] player A <code>PP_Resource</code> identifying the media player.
317  * @param[out] duration Retrieved current time/position of the media.
318  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
319  * completion.
320  *
321  * @return PP_OK on success, otherwise an error code from
322  * <code>pp_errors.h</code>. Meaning of errors:
323  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
324  * to the media player.
325  * - <code>PP_ERROR_NOTSUPPORTED</code> - if data can't be retrieved
326  * due to invalid player state.
327  */
328  int32_t (*GetCurrentTime)(PP_Resource player,
329  PP_TimeTicks* time,
330  struct PP_CompletionCallback callback);
331  /* Playback state info */
332  /**
333  * Retrieves current state the media player.
334  *
335  * @param[in] player A <code>PP_Resource</code> identifying the media player.
336  * @param[out] state Retrieved current state of the media player.
337  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
338  * completion.
339  *
340  * @return PP_OK on success, otherwise an error code from
341  * <code>pp_errors.h</code>.
342  */
343  int32_t (*GetPlayerState)(PP_Resource player,
344  PP_MediaPlayerState* state,
345  struct PP_CompletionCallback callback);
346  /* Tracks info */
347  /**
348  * Retrieves information of current video track from the media played from
349  * attached data source.
350  *
351  * @param[in] player A <code>PP_Resource</code> identifying the media player.
352  * @param[out] track_info Retrieved video track information.
353  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
354  * completion.
355  *
356  * @return PP_OK on success, otherwise an error code from
357  * <code>pp_errors.h</code>. Meaning of errors:
358  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
359  * to the media player.
360  * - <code>PP_ERROR_NOTSUPPORTED</code> - if no video track is available
361  * in media played from attached data source.
362  */
364  struct PP_VideoTrackInfo* track_info,
365  struct PP_CompletionCallback callback);
366  /**
367  * Retrieves information of all video tracks from the media played from
368  * attached data source.
369  *
370  * @param[in] player A <code>PP_Resource</code> identifying the media player.
371  * @param[in] output A <code>PP_ArrayOutput</code> to receive list of the
372  * supported <code>PP_VideoTrackInfo</code> tracks descriptions.
373  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
374  * completion.
375  *
376  * @return If >= 0, the number of the tracks is returned, otherwise an
377  * error code from <code>pp_errors.h</code>. Meaning of errors:
378  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
379  * to the media player.
380  */
381  int32_t (*GetVideoTracksList)(PP_Resource player,
382  struct PP_ArrayOutput output,
383  struct PP_CompletionCallback callback);
384  /**
385  * Retrieves information of current audio track from the media played from
386  * attached data source.
387  *
388  * @param[in] player A <code>PP_Resource</code> identifying the media player.
389  * @param[out] track_info Retrieved audio track information.
390  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
391  * completion.
392  *
393  * @return PP_OK on success, otherwise an error code from
394  * <code>pp_errors.h</code>. Meaning of errors:
395  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
396  * to the media player.
397  * - <code>PP_ERROR_NOTSUPPORTED</code> - if no audio track is available
398  * in media played from attached data source.
399  */
401  struct PP_AudioTrackInfo* track_info,
402  struct PP_CompletionCallback callback);
403  /**
404  * Retrieves information of all audio tracks from the media played from
405  * attached data source.
406  *
407  * @param[in] player A <code>PP_Resource</code> identifying the media player.
408  * @param[in] output A <code>PP_ArrayOutput</code> to receive list of the
409  * supported <code>PP_AudioTrackInfo</code> tracks descriptions.
410  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
411  * completion.
412  *
413  * @return If >= 0, the number of the tracks is returned, otherwise an
414  * error code from <code>pp_errors.h</code>. Meaning of errors:
415  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
416  * to the media player.
417  */
418  int32_t (*GetAudioTracksList)(PP_Resource player,
419  struct PP_ArrayOutput output,
420  struct PP_CompletionCallback callback);
421  /**
422  * Retrieves information of current text/subtitles track from the media played
423  * from attached data source.
424  *
425  * @param[in] player A <code>PP_Resource</code> identifying the media player.
426  * @param[out] track_info Retrieved video track information.
427  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
428  * completion.
429  *
430  * @return PP_OK on success, otherwise an error code from
431  * <code>pp_errors.h</code>. Meaning of errors:
432  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
433  * to the media player.
434  * - <code>PP_ERROR_NOTSUPPORTED</code> - if no text/subtitles track
435  * is available in media played from attached data source.
436  */
438  struct PP_TextTrackInfo* track_info,
439  struct PP_CompletionCallback callback);
440  /**
441  * Retrieves information of all text/subtitles tracks from the media played
442  * from attached data source.
443  *
444  * @param[in] player A <code>PP_Resource</code> identifying the media player.
445  * @param[in] output A <code>PP_ArrayOutput</code> to receive list of the
446  * supported <code>PP_TextTrackInfo</code> tracks descriptions.
447  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
448  * completion.
449  *
450  * @return If >= 0, the number of the tracks is returned, otherwise an
451  * error code from <code>pp_errors.h</code>. Meaning of errors:
452  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
453  * to the media player.
454  */
455  int32_t (*GetTextTracksList)(PP_Resource player,
456  struct PP_ArrayOutput output,
457  struct PP_CompletionCallback callback);
458  /**
459  * Selects a track for the given stream type to be activated for media
460  * played from the attached data source.
461  *
462  * Remarks:
463  * If activated track is a text track, it will be automatically activated and
464  * therefore it's subtitles will be delivered as events to the
465  * <code>PPP_SubtitleListener_Samsung</code>.
466  *
467  * @param[in] player A <code>PP_Resource</code> identifying the media player.
468  * @param[in] track_type A type of the stream for which activate track.
469  * @param[in] track_index An index of the track which has to be activated.
470  * Valid track index can be obtained from one of PP_*TrackInfo structures
471  * returned by corresponding call to Get*TracksInfo.
472  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
473  * completion.
474  *
475  * @return PP_OK on success, otherwise an error code from
476  * <code>pp_errors.h</code>. Meaning of errors:
477  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
478  * to the media player or passed |track_type| or |track_index| are
479  * not valid.
480  */
481  int32_t (*SelectTrack)(PP_Resource player,
483  uint32_t track_index,
484  struct PP_CompletionCallback callback);
485  /* Subtitles (text track) control */
486  /**
487  * Adds external subtitles.
488  * Returns <code>PP_OK/code> in case of success and writes added text track
489  * information to |subtitles| param. After that newly added subtitles will be
490  * activated and <code>PPB_SubtitleListener_Samsung</code> will be
491  * notified about it's texts at the time those texts should be shown.
492  *
493  * Please note that player is responsible only for subtitle file parsing. No
494  * subtitles are displayed by the player. Application can use
495  * <code>PPB_SubtitleListener_Samsung</code> to get subtitle texts at correct
496  * playback times and display them manually.
497  *
498  * Constraints:
499  * Ability to add external subtitles after attaching data source is
500  * implementation dependent. If it is impossible to add external subtitles
501  * after data source is attached, this method will fail with
502  * <code>PP_ERROR_NOTSUPPORTED</code> error code. Therefore this method is
503  * guaranteed to succeed only before data source is attached.
504  *
505  * @param[in] player A <code>PP_Resource</code> identifying the media player.
506  * @param[in] file_path A path of the subtitles.
507  * @param[in] encoding Subtitle encoding. May be NULL or empty string, which
508  * will cause subtitles to be interpreted as UTF-8 text.
509  * @param[out] subtitles Added text/subtitles track information.
510  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
511  * completion.
512  *
513  * @return PP_OK on success, otherwise an error code from
514  * <code>pp_errors.h</code>. Meaning of errors:
515  * - <code>PP_ERROR_FILENOTFOUND</code> - if provided file_path is invalid.
516  * - <code>PP_ERROR_BADARGUMENT</code> - if provided encoding is invalid.
517  * - <code>PP_ERROR_NOTSUPPORTED</code> - if method was called after attaching
518  * a data source and such operation is not supported on the current
519  * implementation.
520  */
522  const char* file_path,
523  const char* encoding,
524  struct PP_TextTrackInfo* subtitles,
525  struct PP_CompletionCallback callback);
526  /**
527  * Sets subtitles (text stream) <code>PPP_SubtitleListener_Samsung</code>
528  * event emission delay regarding to the current media time.
529  *
530  * @param[in] player A <code>PP_Resource</code> identifying the media player.
531  * @param[in] delay A delay to be set.
532  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
533  * completion.
534  *
535  * @return PP_OK on success, otherwise an error code from
536  * <code>pp_errors.h</code>. Meaning of errors:
537  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
538  * to the media player.
539  */
540  int32_t (*SetSubtitlesDelay)(PP_Resource player,
541  PP_TimeDelta delay,
542  struct PP_CompletionCallback callback);
543  /* Other - player control */
544  /**
545  * Sets display region in which video will be displayed. Passed position
546  * is relative to the embed/object element of WebPage associated with given
547  * plugin.
548  *
549  * @param[in] player A <code>PP_Resource</code> identifying the media player.
550  * @param[in] rect Video region in which video will be displayed.
551  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
552  * completion.
553  *
554  * @return PP_OK on success, otherwise an error code from
555  * <code>pp_errors.h</code>.
556  */
557  int32_t (*SetDisplayRect)(PP_Resource player,
558  const struct PP_Rect* rect,
559  struct PP_CompletionCallback callback);
560  /**
561  * Calls DRM system specific operation.
562  *
563  * @param[in] player A <code>PP_Resource</code> identifying the media player.
564  * @param[in] drm_type A DRM system to be used
565  * @param[in] drm_operation A DRM specific operation to be performed.
566  * @param[in] drm_data_size A size of data buffer passed to DRM system.
567  * @param[in] drm_data A data buffer passed to DRM system.
568  * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
569  * completion.
570  *
571  * @return PP_OK on success, otherwise an error code from
572  * <code>pp_errors.h</code>. Meaning of errors:
573  * - <code>PP_ERROR_BADARGUMENT</code> - if no data source is connected
574  * to the media player.
575  */
576  int32_t (*SetDRMSpecificData)(PP_Resource player,
577  PP_MediaPlayerDRMType drm_type,
578  PP_MediaPlayerDRMOperation drm_operation,
579  uint32_t drm_data_size,
580  const void* drm_data,
581  struct PP_CompletionCallback callback);
582 };
583 
585 /**
586  * @}
587  */
588 
589 #endif /* PPAPI_C_SAMSUNG_PPB_MEDIA_PLAYER_SAMSUNG_H_ */
590 
int32_t(* GetCurrentVideoTrackInfo)(PP_Resource player, struct PP_VideoTrackInfo *track_info, struct PP_CompletionCallback callback)
int32_t(* GetAudioTracksList)(PP_Resource player, struct PP_ArrayOutput output, struct PP_CompletionCallback callback)
PP_Bool(* SetMediaEventsListener)(PP_Resource player, const struct PPP_MediaEventsListener_Samsung_1_0 *listener, void *user_data)
int32_t(* AddExternalSubtitles)(PP_Resource player, const char *file_path, const char *encoding, struct PP_TextTrackInfo *subtitles, struct PP_CompletionCallback callback)
int32_t(* Pause)(PP_Resource player, struct PP_CompletionCallback callback)
PP_Resource(* Create)(PP_Instance instance)
int32_t(* SetSubtitlesDelay)(PP_Resource player, PP_TimeDelta delay, struct PP_CompletionCallback callback)
int32_t(* SetDisplayRect)(PP_Resource player, const struct PP_Rect *rect, struct PP_CompletionCallback callback)
int32_t(* GetDuration)(PP_Resource player, PP_TimeDelta *duration, struct PP_CompletionCallback callback)
PP_Bool(* SetDRMListener)(PP_Resource data_source, const struct PPP_DRMListener_Samsung_1_0 *listener, void *user_data)
int32_t(* Stop)(PP_Resource player, struct PP_CompletionCallback callback)
int32_t(* GetCurrentTime)(PP_Resource player, PP_TimeTicks *time, struct PP_CompletionCallback callback)
int32_t PP_Resource
Definition: pp_resource.h:40
int32_t(* AttachDataSource)(PP_Resource player, PP_Resource data_source, struct PP_CompletionCallback callback)
double PP_TimeTicks
Definition: pp_time.h:42
PP_MediaPlayerDRMOperation
int32_t(* GetPlayerState)(PP_Resource player, PP_MediaPlayerState *state, struct PP_CompletionCallback callback)
int32_t(* GetCurrentAudioTrackInfo)(PP_Resource player, struct PP_AudioTrackInfo *track_info, struct PP_CompletionCallback callback)
int32_t(* GetCurrentTextTrackInfo)(PP_Resource player, struct PP_TextTrackInfo *track_info, struct PP_CompletionCallback callback)
int32_t(* GetVideoTracksList)(PP_Resource player, struct PP_ArrayOutput output, struct PP_CompletionCallback callback)
int32_t(* 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)
int32_t(* Seek)(PP_Resource player, PP_TimeTicks time, struct PP_CompletionCallback callback)
int32_t(* SelectTrack)(PP_Resource player, PP_ElementaryStream_Type_Samsung track_type, uint32_t track_index, struct PP_CompletionCallback callback)
int32_t(* SetPlaybackRate)(PP_Resource player, double rate, struct PP_CompletionCallback callback)
int32_t(* Play)(PP_Resource player, struct PP_CompletionCallback callback)
PP_Bool(* IsMediaPlayer)(PP_Resource controller)
int32_t PP_Instance
Definition: pp_instance.h:34
PP_Bool
Definition: pp_bool.h:30
int32_t(* GetTextTracksList)(PP_Resource player, struct PP_ArrayOutput output, struct PP_CompletionCallback callback)
double PP_TimeDelta
Definition: pp_time.h:49
PP_Bool(* SetSubtitleListener)(PP_Resource player, const struct PPP_SubtitleListener_Samsung_1_0 *listener, void *user_data)
PP_ElementaryStream_Type_Samsung
PP_Bool(* SetBufferingListener)(PP_Resource data_source, const struct PPP_BufferingListener_Samsung_1_0 *listener, void *user_data)