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