Pepper_56_C_interfaces
Pepper_56_C_interfaces
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
pp_media_common_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_common_samsung.idl,
5  * modified Mon May 29 08:34:28 2017.
6  */
7 
8 #ifndef PPAPI_C_SAMSUNG_PP_MEDIA_COMMON_SAMSUNG_H_
9 #define PPAPI_C_SAMSUNG_PP_MEDIA_COMMON_SAMSUNG_H_
10 
11 #include "ppapi/c/pp_macros.h"
12 #include "ppapi/c/pp_stdint.h"
13 
24 /* Describes time delta in microseconds */
25 typedef int64_t PP_MicrosecondsDelta;
26 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_MicrosecondsDelta, 8);
41 typedef enum {
64 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_ElementaryStream_Type_Samsung, 4);
65 
72 typedef enum {
101 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_StreamInitializationMode, 4);
110 /* The <code>PP_EncryptedSubsampleDescription</code> structure contains
111  * information to support subsample decryption.
112  *
113  * An input block can be split into several continuous subsamples.
114  * A <code>PP_DecryptSubsampleEntry</code> specifies the number of clear and
115  * cipher bytes in each subsample. For example, the following block has three
116  * subsamples:
117  *
118  * |<----- subsample1 ----->|<----- subsample2 ----->|<----- subsample3 ----->|
119  * | clear1 | cipher1 | clear2 | cipher2 | clear3 | cipher3 |
120  *
121  * For decryption, all of the cipher bytes in a block should be treated as a
122  * contiguous (in the subsample order) logical stream. The clear bytes should
123  * not be considered as part of decryption.
124  *
125  * Logical stream to decrypt: | cipher1 | cipher2 | cipher3 |
126  * Decrypted stream: | decrypted1| decrypted2 | decrypted3 |
127  *
128  * After decryption, the decrypted bytes should be copied over the position
129  * of the corresponding cipher bytes in the original block to form the output
130  * block. Following the above example, the decrypted block should be:
131  *
132  * |<----- subsample1 ----->|<----- subsample2 ----->|<----- subsample3 ----->|
133  * | clear1 | decrypted1| clear2 | decrypted2 | clear3 | decrypted3 |
134  */
136  /*
137  * Size in bytes of clear data in a subsample entry.
138  */
139  uint32_t clear_bytes;
140  /*
141  * Size in bytes of encrypted data in a subsample entry.
142  */
143  uint32_t cipher_bytes;
144 };
145 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_EncryptedSubsampleDescription, 8);
156 PP_INLINE double PP_MicrosecondsDeltaToSeconds(PP_MicrosecondsDelta value) {
157  return value / 1000000.0;
158 }
159 
161 PP_INLINE PP_MicrosecondsDelta PP_SecondsToMicrosecondsDelta(double value) {
162  return (int64_t)(value * 1000000.0 + 0.5);
163 }
164 
169 #endif /* PPAPI_C_SAMSUNG_PP_MEDIA_COMMON_SAMSUNG_H_ */
170 
Definition: pp_media_common_samsung.h:45
PP_StreamInitializationMode
Definition: pp_media_common_samsung.h:72
Definition: pp_media_common_samsung.h:57
Definition: pp_media_common_samsung.h:99
Definition: pp_media_common_samsung.h:135
Definition: pp_media_common_samsung.h:53
Definition: pp_media_common_samsung.h:49
PP_INLINE PP_MicrosecondsDelta PP_SecondsToMicrosecondsDelta(double value)
Definition: pp_media_common_samsung.h:161
PP_INLINE double PP_MicrosecondsDeltaToSeconds(PP_MicrosecondsDelta value)
Definition: pp_media_common_samsung.h:156
Definition: pp_media_common_samsung.h:79
PP_ElementaryStream_Type_Samsung
Definition: pp_media_common_samsung.h:41
Definition: pp_media_common_samsung.h:62