Pepper_37_C_interfaces
pp_stream_parser_samsung.h
Go to the documentation of this file.
1 /* Copyright (c) 2015 Samsung Electronics. All rights reserved.
2  */
3 
4 /* From samsung/pp_stream_parser_samsung.idl,
5  * modified Mon Jun 22 14:25:37 2015.
6  */
7 
8 #ifndef PPAPI_C_SAMSUNG_PP_STREAM_PARSER_SAMSUNG_H_
9 #define PPAPI_C_SAMSUNG_PP_STREAM_PARSER_SAMSUNG_H_
10 
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_macros.h"
13 #include "ppapi/c/pp_stdint.h"
14 #include "ppapi/c/pp_var.h"
15 #include "ppapi/c/samsung/pp_media_codecs_samsung.h"
16 #include "ppapi/c/samsung/pp_media_common_samsung.h"
17 
18 /**
19  * @file
20  *
21  * This file defines the common part of
22  * <code>PP[PB]_StreamParser_Samsung</code> interface.
23  */
24 
25 
26 /**
27  * @addtogroup Enums
28  * @{
29  */
30 /* Enum describing status of parser initialization. */
31 typedef enum {
36 
37 /* The PP_FrameFlags enum contains frame constants.
38  * This values can be OR'ed.
39  */
40 typedef enum {
46 
47 /* The PP_ParseResult enum contains status of parsing last buffer. */
48 typedef enum {
56 /**
57  * @}
58  */
59 
60 /**
61  * @addtogroup Structs
62  * @{
63  */
64 /* Width and height of video frame. */
65 struct PP_GFXSize {
66  int32_t width;
67  int32_t height;
68 };
70 
71 /* To describing rectangle, e.g. position and size. */
72 struct PP_GFXRect {
73  int32_t x;
74  int32_t y;
75  int32_t width;
76  int32_t height;
77 };
79 
80 /* Structure used to describing frame rate. */
81 struct PP_Rational {
82  int32_t num;
83  int32_t den;
84 };
86 
87 /*
88  * Structure describing audio stream configuration.
89  * Old version, deprecated since version 0.10
90  */
93  /* profile is optional, only for some codecs. */
99  int32_t bytes_per_frame;
103  /* |extra_data| is an extra information stored in the stream, and used
104  * to transmitt for example initialization vector for encryption.
105  * Its type is PP_VARTYPE_ARRAY_BUFFER or PP_VARTYPE_NULL in case when
106  * there is no extra data.
107  */
109 };
111 
112 /* Structure describing audio stream configuration
113  */
116  /* profile is optional, only for some codecs. */
123  int32_t bit_rate;
124  /* number of bytes per packet if constant. */
125  int32_t block_align;
126  /* codec id - four-character code. */
127  uint32_t codec_tag;
131  int32_t padding;
132  /* |extra_data| is an extra information stored in the stream, and used
133  * to transmit for example initialization vector for encryption.
134  * Its type is PP_VARTYPE_ARRAY_BUFFER or PP_VARTYPE_NULL in case when
135  * there is no extra data.
136  */
138 };
140 
141 /* Structure describing video stream configuration.
142  * Old version, deprecated since version 0.10
143  */
146  /* profile is optional, only for some codecs. */
153  /* |extra_data| is an extra information stored in the stream, and used
154  * to transmit for example initialization vector for encryption.
155  * Its type is PP_VARTYPE_ARRAY_BUFFER or PP_VARTYPE_NULL in case when
156  * there is no extra data.
157  */
159 };
161 
162 /* Structure describing video stream configuration.
163  */
166  /* profile is optional, only for some codecs. */
169  /* codec id - four-character code. */
170  uint32_t codec_tag;
176  int32_t padding;
177  /* |extra_data| is an extra information stored in the stream, and used
178  * to transmitt for example initialization vector for encryption.
179  * Its type is PP_VARTYPE_ARRAY_BUFFER or PP_VARTYPE_NULL in case when
180  * there is no extra data.
181  */
183 };
185 
186 /* Structure describing frames [obsolete from 0.10 interface version].
187  */
188 struct PP_Frames {
189  /* Size of frame data */
190  int32_t size;
191  /* Does buffer contain key frame */
193  /* Decompression Timestamp */
195  /* Presentation Timesatmp */
197  /* Duration of given packet */
199 };
201 
202 /*
203  * Structure describing samples [valid from 0.10 interface version]
204  */
205 struct PP_Sample {
206  /** Size of sample data */
207  uint32_t size;
208  /*
209  * Size in bytes of data to be skipped before applying the decryption.
210  */
211  uint32_t data_offset;
212  /*
213  * Frame flags.
214  * This field will containing OR'ed values from PP_FrameFlags enum.
215  */
216  uint32_t flags;
217  /*
218  * For encrypted samples, it is necessary to provide information required
219  * to decrypting it. For this case is necessary to provide:
220  *
221  * - |num_subsample| defines how many subsamples are provided in this sample.
222  * - |subsamples| array of relations between clear and encrypted fragments.
223  * - |iv_size| and |key_id_size| adequately describes the sizes of arrays |iv|
224  * and |key_id|, which contains unique pair of Initialization Vector and key
225  * id for this sample.
226  *
227  * Alternatively it is possible to provide global pair of key id and IV
228  * for whole buffer (in appropriate NewBuffers method), this alternative
229  * are taken in case of per sample pair are omitted.
230  *
231  * Mixing of global key id with local (per sample) IV (or vice versa) is
232  * not allowed.
233  * If sample isn't encrypted (corresponding bit in |flags| isn't set)
234  * all above informations are ignored.
235  */
236  uint8_t num_subsamples;
237  uint8_t iv_size;
238  uint16_t key_id_size;
240  /* Initialization Vector, described above */
241  uint8_t *iv;
242  uint8_t *key_id;
243  int32_t padding;
244  /* Decode Timestamp of this sample */
246  /* Presentation Timesatmp */
248  /* Duration of given packet */
250 };
251 /**
252  * @}
253  */
254 
255 #endif /* PPAPI_C_SAMSUNG_PP_STREAM_PARSER_SAMSUNG_H_ */
256 
PP_VideoCodec_Profile_Samsung profile
PP_MicrosecondsDelta dts
PP_AudioCodec_Profile_Samsung profile
PP_AudioCodec_Type_Samsung codec
PP_SampleFormat_Samsung sample_format
PP_MicrosecondsDelta pts
PP_ChannelLayout_Samsung channel_layout
PP_ChannelLayout_Samsung
int64_t PP_MicrosecondsDelta
PP_SampleFormat_Samsung sample_format
PP_VideoFrame_Format_Samsung format
PP_AudioCodec_Profile_Samsung
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Parser_InitStatus, 4)
PP_VideoFrame_Format_Samsung format
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_GFXSize, 8)
PP_VideoCodec_Profile_Samsung
PP_VideoCodec_Profile_Samsung profile
PP_MicrosecondsDelta dts
struct PP_EncryptedSubsampleDescription * subsamples
PP_AudioCodec_Type_Samsung
PP_SampleFormat_Samsung
PP_AudioCodec_Type_Samsung codec
PP_MicrosecondsDelta duration
Definition: pp_var.h:166
PP_MicrosecondsDelta duration
PP_AudioCodec_Profile_Samsung profile
PP_VideoFrame_Format_Samsung
PP_MicrosecondsDelta pts
PP_Bool
Definition: pp_bool.h:30
PP_VideoCodec_Type_Samsung codec
PP_VideoCodec_Type_Samsung
PP_VideoCodec_Type_Samsung codec
PP_ChannelLayout_Samsung channel_layout