Pepper_42_C_interfaces
Main Page
Modules
Classes
Files
File List
File Members
samsung
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 Feb 15 15:41:05 2016.
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
14
/**
15
* @file
16
* This file defines common structures used by Samsung media PPAPI interfaces.
17
*/
18
19
20
/**
21
* @addtogroup Typedefs
22
* @{
23
*/
24
/* Describes time delta in microseconds */
25
typedef
int64_t
PP_MicrosecondsDelta
;
26
PP_COMPILE_ASSERT_SIZE_IN_BYTES
(
PP_MicrosecondsDelta
, 8);
27
/**
28
* @}
29
*/
30
31
/**
32
* @addtogroup Enums
33
* @{
34
*/
35
/**
36
* List of elementary stream types of which played media container
37
* can consists of.
38
*
39
* Values of valid elementary streams can be used to index array.
40
*/
41
typedef
enum
{
42
/**
43
* Unknown Elementary Stream.
44
*/
45
PP_ELEMENTARYSTREAM_TYPE_SAMSUNG_UNKNOWN
= -1,
46
/**
47
* Video Elementary Stream.
48
*/
49
PP_ELEMENTARYSTREAM_TYPE_SAMSUNG_VIDEO
= 0,
50
/**
51
* Audio Elementary Stream.
52
*/
53
PP_ELEMENTARYSTREAM_TYPE_SAMSUNG_AUDIO
= 1,
54
/**
55
* Text/Subtitles Elementary Stream.
56
*/
57
PP_ELEMENTARYSTREAM_TYPE_SAMSUNG_TEXT
= 2,
58
/**
59
* Number of valid Elementary Streams, which can be
60
* used as an array size.
61
*/
62
PP_ELEMENTARYSTREAM_TYPE_SAMSUNG_MAX
= 3
63
}
PP_ElementaryStream_Type_Samsung
;
64
PP_COMPILE_ASSERT_SIZE_IN_BYTES
(
PP_ElementaryStream_Type_Samsung
, 4);
65
/**
66
* @}
67
*/
68
69
/**
70
* @addtogroup Structs
71
* @{
72
*/
73
/* The <code>PP_EncryptedSubsampleDescription</code> structure contains
74
* information to support subsample decryption.
75
*
76
* An input block can be split into several continuous subsamples.
77
* A <code>PP_DecryptSubsampleEntry</code> specifies the number of clear and
78
* cipher bytes in each subsample. For example, the following block has three
79
* subsamples:
80
*
81
* |<----- subsample1 ----->|<----- subsample2 ----->|<----- subsample3 ----->|
82
* | clear1 | cipher1 | clear2 | cipher2 | clear3 | cipher3 |
83
*
84
* For decryption, all of the cipher bytes in a block should be treated as a
85
* contiguous (in the subsample order) logical stream. The clear bytes should
86
* not be considered as part of decryption.
87
*
88
* Logical stream to decrypt: | cipher1 | cipher2 | cipher3 |
89
* Decrypted stream: | decrypted1| decrypted2 | decrypted3 |
90
*
91
* After decryption, the decrypted bytes should be copied over the position
92
* of the corresponding cipher bytes in the original block to form the output
93
* block. Following the above example, the decrypted block should be:
94
*
95
* |<----- subsample1 ----->|<----- subsample2 ----->|<----- subsample3 ----->|
96
* | clear1 | decrypted1| clear2 | decrypted2 | clear3 | decrypted3 |
97
*/
98
struct
PP_EncryptedSubsampleDescription
{
99
/*
100
* Size in bytes of clear data in a subsample entry.
101
*/
102
uint32_t
clear_bytes
;
103
/*
104
* Size in bytes of encrypted data in a subsample entry.
105
*/
106
uint32_t
cipher_bytes
;
107
};
108
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES
(
PP_EncryptedSubsampleDescription
, 8);
109
/**
110
* @}
111
*/
112
113
/**
114
* @addtogroup Functions
115
* @{
116
*/
117
118
/** Converts PP_MicrosecondsDelta to seconds */
119
PP_INLINE
double
PP_MicrosecondsDeltaToSeconds
(
PP_MicrosecondsDelta
value) {
120
return
value / 1000000.0;
121
}
122
123
/** Converts seconds to PP_MicrosecondsDelta */
124
PP_INLINE
PP_MicrosecondsDelta
PP_SecondsToMicrosecondsDelta
(
double
value) {
125
return
(int64_t)(value * 1000000.0 + 0.5);
126
}
127
128
/**
129
* @}
130
*/
131
132
#endif
/* PPAPI_C_SAMSUNG_PP_MEDIA_COMMON_SAMSUNG_H_ */
133
PP_ELEMENTARYSTREAM_TYPE_SAMSUNG_UNKNOWN
Definition:
pp_media_common_samsung.h:45
PP_INLINE
#define PP_INLINE
Definition:
pp_macros.h:46
PP_ELEMENTARYSTREAM_TYPE_SAMSUNG_TEXT
Definition:
pp_media_common_samsung.h:57
PP_MicrosecondsDelta
int64_t PP_MicrosecondsDelta
Definition:
pp_media_common_samsung.h:25
PP_COMPILE_ASSERT_SIZE_IN_BYTES
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_MicrosecondsDelta, 8)
PP_EncryptedSubsampleDescription
Definition:
pp_media_common_samsung.h:98
PP_ELEMENTARYSTREAM_TYPE_SAMSUNG_AUDIO
Definition:
pp_media_common_samsung.h:53
PP_ELEMENTARYSTREAM_TYPE_SAMSUNG_VIDEO
Definition:
pp_media_common_samsung.h:49
PP_SecondsToMicrosecondsDelta
PP_INLINE PP_MicrosecondsDelta PP_SecondsToMicrosecondsDelta(double value)
Definition:
pp_media_common_samsung.h:124
PP_MicrosecondsDeltaToSeconds
PP_INLINE double PP_MicrosecondsDeltaToSeconds(PP_MicrosecondsDelta value)
Definition:
pp_media_common_samsung.h:119
PP_EncryptedSubsampleDescription::cipher_bytes
uint32_t cipher_bytes
Definition:
pp_media_common_samsung.h:106
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_EncryptedSubsampleDescription, 8)
PP_EncryptedSubsampleDescription::clear_bytes
uint32_t clear_bytes
Definition:
pp_media_common_samsung.h:102
PP_ElementaryStream_Type_Samsung
PP_ElementaryStream_Type_Samsung
Definition:
pp_media_common_samsung.h:41
PP_ELEMENTARYSTREAM_TYPE_SAMSUNG_MAX
Definition:
pp_media_common_samsung.h:62
Generated on Wed Apr 20 2016 13:14:41 for Pepper_42_C_interfaces by
1.8.6