Pepper_37_C_interfaces
pp_media_player_samsung.h
Go to the documentation of this file.
1 /* Copyright 2015 The Chromium Authors. All rights reserved.
2  * Use of this source code is governed by a BSD-style license that can be
3  * found in the LICENSE file.
4  */
5 
6 /* From samsung/pp_media_player_samsung.idl,
7  * modified Thu Sep 24 12:46:22 2015.
8  */
9 
10 #ifndef PPAPI_C_SAMSUNG_PP_MEDIA_PLAYER_SAMSUNG_H_
11 #define PPAPI_C_SAMSUNG_PP_MEDIA_PLAYER_SAMSUNG_H_
12 
13 #include "ppapi/c/pp_bool.h"
14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_size.h"
16 #include "ppapi/c/pp_stdint.h"
17 #include "ppapi/c/pp_time.h"
18 #include "ppapi/c/samsung/pp_media_common_samsung.h"
19 
20 /**
21  * @file
22  * This file defines common structures used with the
23  * <code>PPB_MediaPlayer</code> interface.
24  *
25  * Part of Pepper Media Player interfaces (Samsung's extension).
26  * See comments in ppb_media_player_samsung.
27  */
28 
29 
30 /**
31  * @addtogroup Enums
32  * @{
33  */
34 /**
35  * List of media player states.
36  */
37 typedef enum {
38  /**
39  * Indicates invalid state for the player
40  */
42  /**
43  * Player has been created but no data sources hasn't been attached yet.
44  */
46  /**
47  * Player has been created and data sources has been attached.
48  * Playback is ready to be started.
49  */
51  /**
52  * Player is playing media. Media time is advancing.
53  */
55  /**
56  * Playback has been paused and can be resumed.
57  */
61 
62 /**
63  * List of errors which might be reported by the player.
64  */
65 typedef enum {
66  /** No error has occurred */
68  /** Input error has occured */
70  /** Network error has occurred */
72  /** Demuxer error has occured */
74  /** Decryptor error has occured */
76  /** Decoder error has occurred */
78  /** Rendering error has occurred */
80  /** Media is encoded using unsupported codec */
82  /** Container is not supported */
84  /** Resource error has occured (i.e. no space left on device, no such file) */
86  /** Unknown error has occurred */
90 /**
91  * @}
92  */
93 
94 /**
95  * @addtogroup Structs
96  * @{
97  */
98 /**
99  * Structure describing video track from played media.
100  */
102  /**
103  * Index of the track in currently played media.
104  * Note this index is only valid for currently attached data source.
105  */
106  uint32_t index;
107  /**
108  * Minimal bandwidth (in bits per second - bps) of delivery channel
109  * required to deliver given video track.
110  */
111  uint32_t bitrate;
112  /**
113  * Decoded video frame size in pixels.
114  */
115  struct PP_Size size;
116 };
118 
119 /**
120  * Structure describing audio track from played media.
121  */
123  /**
124  * Index of the track in currently played media.
125  * Note this index is only valid for currently attached data source.
126  */
127  uint32_t index;
128  /**
129  * C style string representing language of audio track
130  * encoded in IETF RFC 5646
131  */
132  char language[64];
133 };
135 
136 /**
137  * Structure describing text/subtitles track from played media.
138  */
140  /**
141  * Index of the track in currently played media.
142  * Note this index is only valid for currently attached data source.
143  */
144  uint32_t index;
145  /**
146  * Is current text track internal (contained in media clip)
147  * or external (loaded from separate file)
148  */
150  /**
151  * C style string representing language of text track
152  * encoded in IETF RFC 5646
153  */
154  char language[64];
155 };
157 /**
158  * @}
159  */
160 
161 /**
162  * @addtogroup Enums
163  * @{
164  */
165 /**
166  * List of video display modes. Enumeration describes ways of scaling
167  * video content to match video output region.
168  */
169 typedef enum {
170  /**
171  * Unknown display mode.
172  */
174  /**
175  * Letterboxing - preserve film aspect ration adding mattes below and above.
176  */
178  /**
179  * Keep video's original size.
180  */
182  /**
183  * Display video in full screen.
184  */
186  /**
187  * Cropped full-screen
188  */
190  /**
191  * Zoom half.
192  */
194  /**
195  * Zoom three quarters.
196  */
198  /**
199  * Original size if surface size is larger than video size (width/height)
200  * or Letter box if video size (width/height) is larger than surface size/
201  */
203  /**
204  * Destination Region Of Interest (ROI) mode
205  */
207  /**
208  * Zoom to 16*9 - Sets the picture size to the 16:9 wide screen format.
209  */
211  /**
212  * Wide zoom - Magnifies 16:9 pictures vertically.
213  */
215  /**
216  * Custom zoom- Magnifies or shrinks 16:9 pictures vertically
217  * and/or horizontally.
218  */
222 
223 /**
224  * List of supported types of DRM systems.
225  */
226 typedef enum {
227  /** Unknown DRM system */
229  /** Playready DRM system */
231  /** Marlin DRM system */
233  /** Verimatrix DRM system */
235  /** Widevine classic DRM system */
237  /** Widevine modular (used with MPEG-DASH) DRM system */
239  /** Securemedia DRM system */
241  /** SDRM system */
245 
246 /**
247  * List of possible DRM system operation.
248  */
249 typedef enum {
250  /**
251  * Setting properties of a DRM instance.
252  */
254  /**
255  * Enabling challenge message instead of DRM's
256  * connecting to a license server.
257  */
259  /**
260  * Installing a license into a DRM instance.
261  */
263  /**
264  * Deleting a license into a DRM instance.
265  */
267  /**
268  * Requesting key to DRM license server with the initiator information.
269  */
271  /**
272  * Querying the version of DRM system.
273  */
277 
278 /**
279  * Enum describing available streaming properties which can be set
280  * by the user.
281  */
282 typedef enum {
283  /**
284  * The cookie for streaming playback.
285  * This corresponds to a string (PP_VARTYPE_STRING)
286  */
288  /**
289  * The user agent for streaming playback.
290  * This corresponds to a string (PP_VARTYPE_STRING)
291  */
293  /**
294  * Sets adaptive streaming format specific properties.
295  *
296  * Eg. for smooth streaming (strings should be concatenated):
297  * "|BITRATES=50000~2500000"
298  * "|STARTBITRATE=150000"
299  * "|SKIPBITRATE=100000"
300  *
301  * Eg. for DRM (strings should be concatenated):
302  * "DEVICE_ID=null"
303  * "DEVICET_TYPE_ID=60"
304  * "DRM_URL=https://..."
305  *
306  * This corresponds to a string (PP_VARTYPE_STRING).
307  */
309  /**
310  * Sets streaming type.
311  *
312  * Eg. :
313  * "WIDEVINE"
314  * "HLS"
315  * "VUDU"
316  * "HAS"
317  * "SMOOTH"
318  *
319  * This corresponds to a string (PP_VARTYPE_STRING).
320  */
322  /**
323  * Gets available bitrates.
324  *
325  * Eg. (values are concatenated and separated by '|'):
326  * "100|500|1000"
327  *
328  * Result is a string (PP_VARTYPE_STRING).
329  */
331  /**
332  * Gets current bandwidth in kbps.
333  *
334  * Result is a string (PP_VARTYPE_STRING).
335  */
337  /**
338  * Gets duration of the clip in seconds.
339  *
340  * Result is a string (PP_VARTYPE_STRING).
341  */
345 /**
346  * @}
347  */
348 
349 /**
350  * @addtogroup Structs
351  * @{
352  */
353 /**
354  * Structure describing Elementary Stream packet. It contains
355  * all necessary timing information to display sent packets in appropriate
356  * order and synchronize different streams.
357  */
358 struct PP_ESPacket {
359  /**
360  * Presentation Timestamp, indicates time relative to begging of
361  * the stream when packet must be rendered.
362  */
364  /**
365  * Decode Timestamp, indicates time relative to begging of the stream
366  * when packet must be sent to decoder.
367  *
368  * Usually equals to pts except rare cases like B-Frames.
369  */
371  /**
372  * Duration of the packet.
373  */
375  /**
376  * Whether the packet represents a key frame.
377  */
379  /**
380  * Size in bytes of packet data
381  */
382  uint32_t size;
383  /**
384  * Base address of buffer containing data of the packet.
385  */
386  void* buffer;
387 };
388 
389 /**
390  * Structure describing encrypted packet.
391  */
393  /**
394  * Size in bytes of the |key_id| field.
395  */
396  uint32_t key_id_size;
397  /**
398  * Base address of buffer containing id of the key needed to decrypt given
399  packet.
400  */
401  void* key_id;
402  /**
403  * Size in bytes of the |iv| field.
404  */
405  uint32_t iv_size;
406  /**
407  * Base address of buffer containing Initialization Vector (IV)
408  * needed to decrypt given packet.
409  */
410  void* iv;
411  /**
412  * Number of subsamples for given ES packet (sample).
413  */
414  uint32_t num_subsamples;
415  /**
416  * Description of subsamples of which given ES packet consists of.
417  * Size of the array is |num_subsamples|.
418  */
420 };
421 /**
422  * @}
423  */
424 
425 #endif /* PPAPI_C_SAMSUNG_PP_MEDIA_PLAYER_SAMSUNG_H_ */
426 
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_VideoTrackInfo, 16)
double PP_TimeTicks
Definition: pp_time.h:42
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_MediaPlayerState, 4)
PP_MediaPlayerDRMOperation
struct PP_EncryptedSubsampleDescription * subsamples
PP_MediaPlayerDisplayMode
PP_Bool
Definition: pp_bool.h:30
double PP_TimeDelta
Definition: pp_time.h:49