Pepper_47_C_interfaces
pp_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/pp_media_player_samsung.idl,
5  * modified Thu Sep 8 15:41:29 2016.
6  */
7 
8 #ifndef PPAPI_C_SAMSUNG_PP_MEDIA_PLAYER_SAMSUNG_H_
9 #define PPAPI_C_SAMSUNG_PP_MEDIA_PLAYER_SAMSUNG_H_
10 
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_macros.h"
13 #include "ppapi/c/pp_size.h"
14 #include "ppapi/c/pp_stdint.h"
15 #include "ppapi/c/pp_time.h"
17 
18 /**
19  * @file
20  * This file defines common structures used with the
21  * <code>PPB_MediaPlayer</code> interface.
22  *
23  * Part of Pepper Media Player interfaces (Samsung's extension).
24  * See comments in ppb_media_player_samsung.
25  */
26 
27 
28 /**
29  * @addtogroup Enums
30  * @{
31  */
32 /**
33  * List of media player states.
34  */
35 typedef enum {
36  /**
37  * Indicates invalid state for the player
38  */
40  /**
41  * Player has been created but no data sources hasn't been attached yet.
42  */
44  /**
45  * Player has been created and data sources has been attached.
46  * Playback is ready to be started.
47  */
49  /**
50  * Player is playing media. Media time is advancing.
51  */
53  /**
54  * Playback has been paused and can be resumed.
55  */
60 
61 /**
62  * List of errors which might be reported by the player.
63  */
64 typedef enum {
65  /** No error has occurred */
67  /** Input error has occured */
69  /** Network error has occurred */
71  /** Demuxer error has occured */
73  /** Decryptor error has occured */
75  /** Decoder error has occurred */
77  /** Rendering error has occurred */
79  /** Media is encoded using unsupported codec */
81  /** Container is not supported */
83  /** Resource error has occured (i.e. no space left on device, no such file) */
85  /** 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  *
149  * Remarks:
150  * This flag is deprecated. Value of this variable is undefined and should be
151  * ignored.
152  */
154  /**
155  * C style string representing language of text track
156  * encoded in IETF RFC 5646
157  */
158  char language[64];
159 };
161 /**
162  * @}
163  */
164 
165 /**
166  * @addtogroup Enums
167  * @{
168  */
169 /**
170  * List of supported types of DRM systems.
171  */
172 typedef enum {
173  /** Unknown DRM system */
175  /** Playready DRM system */
177  /** Marlin DRM system */
179  /** Verimatrix DRM system */
181  /** Widevine classic DRM system */
183  /** Widevine modular (used with MPEG-DASH) DRM system */
185  /** Securemedia DRM system */
187  /** SDRM system */
189  /** ClearKey system */
194 
195 /**
196  * List of possible DRM system operation.
197  */
198 typedef enum {
199  /**
200  * Setting properties of a DRM instance.
201  */
203  /**
204  * Enabling challenge message instead of DRM's
205  * connecting to a license server.
206  */
208  /**
209  * Installing a license into a DRM instance.
210  */
212  /**
213  * Deleting a license into a DRM instance.
214  */
216  /**
217  * Requesting key to DRM license server with the initiator information.
218  */
220  /**
221  * Querying the version of DRM system.
222  */
227 
228 /**
229  * Enum describing available streaming properties which can be set
230  * by the user.
231  */
232 typedef enum {
233  /**
234  * The cookie for streaming playback.
235  * This corresponds to a string (PP_VARTYPE_STRING)
236  */
238  /**
239  * The user agent for streaming playback.
240  * This corresponds to a string (PP_VARTYPE_STRING)
241  */
243  /**
244  * Sets adaptive streaming format specific properties.
245  *
246  * Eg. for smooth streaming (strings should be concatenated):
247  * "|BITRATES=50000~2500000"
248  * "|STARTBITRATE=150000"
249  * "|SKIPBITRATE=100000"
250  *
251  * Eg. for DRM (strings should be concatenated):
252  * "DEVICE_ID=null"
253  * "DEVICET_TYPE_ID=60"
254  * "DRM_URL=https://..."
255  *
256  * This corresponds to a string (PP_VARTYPE_STRING).
257  */
259  /**
260  * Sets streaming type.
261  *
262  * Eg. :
263  * "WIDEVINE"
264  * "HLS"
265  * "VUDU"
266  * "HAS"
267  * "SMOOTH"
268  *
269  * This corresponds to a string (PP_VARTYPE_STRING).
270  */
272  /**
273  * Gets available bitrates in bps (bits per second).
274  *
275  * Eg. (values are concatenated and separated by '|'):
276  * "100|500|1000"
277  *
278  * Result is a string (PP_VARTYPE_STRING).
279  */
281  /**
282  * Gets throughput in bps.
283  *
284  * Throughput is how much data actually does travel through
285  * the 'channel' successfully.
286  *
287  * Result is a string (PP_VARTYPE_STRING).
288  */
290  /**
291  * Gets duration of the clip in seconds.
292  *
293  * Result is a string (PP_VARTYPE_STRING).
294  */
296  /**
297  * Gets current bitrate in bps.
298  *
299  * Result is a string (PP_VARTYPE_STRING).
300  */
305 /**
306  * @}
307  */
308 
309 /**
310  * @addtogroup Structs
311  * @{
312  */
313 /**
314  * Structure describing Elementary Stream packet. It contains
315  * all necessary timing information to display sent packets in appropriate
316  * order and synchronize different streams.
317  */
318 struct PP_ESPacket {
319  /**
320  * Presentation Timestamp, indicates time relative to begging of
321  * the stream when packet must be rendered.
322  */
324  /**
325  * Decode Timestamp, indicates time relative to begging of the stream
326  * when packet must be sent to decoder.
327  *
328  * Usually equals to pts except rare cases like B-Frames.
329  */
331  /**
332  * Duration of the packet.
333  */
335  /**
336  * Whether the packet represents a key frame.
337  */
339  /**
340  * Size in bytes of packet data
341  */
342  uint32_t size;
343  /**
344  * Base address of buffer containing data of the packet.
345  */
346  void* buffer;
347 };
348 
349 /**
350  * Structure describing encrypted packet.
351  */
353  /**
354  * Size in bytes of the |key_id| field.
355  */
356  uint32_t key_id_size;
357  /**
358  * Base address of buffer containing id of the key needed to decrypt given
359  packet.
360  */
361  void* key_id;
362  /**
363  * Size in bytes of the |iv| field.
364  */
365  uint32_t iv_size;
366  /**
367  * Base address of buffer containing Initialization Vector (IV)
368  * needed to decrypt given packet.
369  */
370  void* iv;
371  /**
372  * Number of subsamples for given ES packet (sample).
373  */
374  uint32_t num_subsamples;
375  /**
376  * Description of subsamples of which given ES packet consists of.
377  * Size of the array is |num_subsamples|.
378  */
380 };
381 /**
382  * @}
383  */
384 
385 #endif /* PPAPI_C_SAMSUNG_PP_MEDIA_PLAYER_SAMSUNG_H_ */
386 
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_Bool
Definition: pp_bool.h:30
double PP_TimeDelta
Definition: pp_time.h:49