Pepper_42_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 Mon Feb 15 15:48:23 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"
16 #include "ppapi/c/samsung/pp_media_common_samsung.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  */
59 
60 /**
61  * List of errors which might be reported by the player.
62  */
63 typedef enum {
64  /** No error has occurred */
66  /** Input error has occured */
68  /** Network error has occurred */
70  /** Demuxer error has occured */
72  /** Decryptor error has occured */
74  /** Decoder error has occurred */
76  /** Rendering error has occurred */
78  /** Media is encoded using unsupported codec */
80  /** Container is not supported */
82  /** Resource error has occured (i.e. no space left on device, no such file) */
84  /** Unknown error has occurred */
88 /**
89  * @}
90  */
91 
92 /**
93  * @addtogroup Structs
94  * @{
95  */
96 /**
97  * Structure describing video track from played media.
98  */
100  /**
101  * Index of the track in currently played media.
102  * Note this index is only valid for currently attached data source.
103  */
104  uint32_t index;
105  /**
106  * Minimal bandwidth (in bits per second - bps) of delivery channel
107  * required to deliver given video track.
108  */
109  uint32_t bitrate;
110  /**
111  * Decoded video frame size in pixels.
112  */
113  struct PP_Size size;
114 };
116 
117 /**
118  * Structure describing audio track from played media.
119  */
121  /**
122  * Index of the track in currently played media.
123  * Note this index is only valid for currently attached data source.
124  */
125  uint32_t index;
126  /**
127  * C style string representing language of audio track
128  * encoded in IETF RFC 5646
129  */
130  char language[64];
131 };
133 
134 /**
135  * Structure describing text/subtitles track from played media.
136  */
138  /**
139  * Index of the track in currently played media.
140  * Note this index is only valid for currently attached data source.
141  */
142  uint32_t index;
143  /**
144  * Is current text track internal (contained in media clip)
145  * or external (loaded from separate file)
146  */
148  /**
149  * C style string representing language of text track
150  * encoded in IETF RFC 5646
151  */
152  char language[64];
153 };
155 /**
156  * @}
157  */
158 
159 /**
160  * @addtogroup Enums
161  * @{
162  */
163 /**
164  * List of supported types of DRM systems.
165  */
166 typedef enum {
167  /** Unknown DRM system */
169  /** Playready DRM system */
171  /** Marlin DRM system */
173  /** Verimatrix DRM system */
175  /** Widevine classic DRM system */
177  /** Widevine modular (used with MPEG-DASH) DRM system */
179  /** Securemedia DRM system */
181  /** SDRM system */
183  /** ClearKey system */
187 
188 /**
189  * List of possible DRM system operation.
190  */
191 typedef enum {
192  /**
193  * Setting properties of a DRM instance.
194  */
196  /**
197  * Enabling challenge message instead of DRM's
198  * connecting to a license server.
199  */
201  /**
202  * Installing a license into a DRM instance.
203  */
205  /**
206  * Deleting a license into a DRM instance.
207  */
209  /**
210  * Requesting key to DRM license server with the initiator information.
211  */
213  /**
214  * Querying the version of DRM system.
215  */
219 
220 /**
221  * Enum describing available streaming properties which can be set
222  * by the user.
223  */
224 typedef enum {
225  /**
226  * The cookie for streaming playback.
227  * This corresponds to a string (PP_VARTYPE_STRING)
228  */
230  /**
231  * The user agent for streaming playback.
232  * This corresponds to a string (PP_VARTYPE_STRING)
233  */
235  /**
236  * Sets adaptive streaming format specific properties.
237  *
238  * Eg. for smooth streaming (strings should be concatenated):
239  * "|BITRATES=50000~2500000"
240  * "|STARTBITRATE=150000"
241  * "|SKIPBITRATE=100000"
242  *
243  * Eg. for DRM (strings should be concatenated):
244  * "DEVICE_ID=null"
245  * "DEVICET_TYPE_ID=60"
246  * "DRM_URL=https://..."
247  *
248  * This corresponds to a string (PP_VARTYPE_STRING).
249  */
251  /**
252  * Sets streaming type.
253  *
254  * Eg. :
255  * "WIDEVINE"
256  * "HLS"
257  * "VUDU"
258  * "HAS"
259  * "SMOOTH"
260  *
261  * This corresponds to a string (PP_VARTYPE_STRING).
262  */
264  /**
265  * Gets available bitrates in bps (bits per second).
266  *
267  * Eg. (values are concatenated and separated by '|'):
268  * "100|500|1000"
269  *
270  * Result is a string (PP_VARTYPE_STRING).
271  */
273  /**
274  * Gets throughput in bps.
275  *
276  * Throughput is how much data actually does travel through
277  * the 'channel' successfully.
278  *
279  * Result is a string (PP_VARTYPE_STRING).
280  */
282  /**
283  * Gets duration of the clip in seconds.
284  *
285  * Result is a string (PP_VARTYPE_STRING).
286  */
288  /**
289  * Gets current bitrate in bps.
290  *
291  * Result is a string (PP_VARTYPE_STRING).
292  */
296 /**
297  * @}
298  */
299 
300 /**
301  * @addtogroup Structs
302  * @{
303  */
304 /**
305  * Structure describing Elementary Stream packet. It contains
306  * all necessary timing information to display sent packets in appropriate
307  * order and synchronize different streams.
308  */
309 struct PP_ESPacket {
310  /**
311  * Presentation Timestamp, indicates time relative to begging of
312  * the stream when packet must be rendered.
313  */
315  /**
316  * Decode Timestamp, indicates time relative to begging of the stream
317  * when packet must be sent to decoder.
318  *
319  * Usually equals to pts except rare cases like B-Frames.
320  */
322  /**
323  * Duration of the packet.
324  */
326  /**
327  * Whether the packet represents a key frame.
328  */
330  /**
331  * Size in bytes of packet data
332  */
333  uint32_t size;
334  /**
335  * Base address of buffer containing data of the packet.
336  */
337  void* buffer;
338 };
339 
340 /**
341  * Structure describing encrypted packet.
342  */
344  /**
345  * Size in bytes of the |key_id| field.
346  */
347  uint32_t key_id_size;
348  /**
349  * Base address of buffer containing id of the key needed to decrypt given
350  packet.
351  */
352  void* key_id;
353  /**
354  * Size in bytes of the |iv| field.
355  */
356  uint32_t iv_size;
357  /**
358  * Base address of buffer containing Initialization Vector (IV)
359  * needed to decrypt given packet.
360  */
361  void* iv;
362  /**
363  * Number of subsamples for given ES packet (sample).
364  */
365  uint32_t num_subsamples;
366  /**
367  * Description of subsamples of which given ES packet consists of.
368  * Size of the array is |num_subsamples|.
369  */
371 };
372 /**
373  * @}
374  */
375 
376 #endif /* PPAPI_C_SAMSUNG_PP_MEDIA_PLAYER_SAMSUNG_H_ */
377 
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