2 * Copyright (C) 2015 The CyanogenMod Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef OMX_FFMPEG_Extn_h
18 #define OMX_FFMPEG_Extn_h
22 #endif /* __cplusplus */
24 enum OMX_FFMPEG_VIDEO_CODINGTYPE
26 OMX_VIDEO_CodingVC1 = 0x7F000001,
27 OMX_VIDEO_CodingFLV1 = 0x7F000002,
28 OMX_VIDEO_CodingDIVX = 0x7F000003,
34 typedef struct OMX_VIDEO_PARAM_FFMPEGTYPE {
36 OMX_VERSIONTYPE nVersion;
39 OMX_S32 eCodecId; /**< enum AVCodecID */
42 } OMX_VIDEO_PARAM_FFMPEGTYPE;
44 enum OMX_FFMPEG_AUDIO_CODINGTYPE
46 OMX_AUDIO_CodingMP2 = 0x7F000001,
47 OMX_AUDIO_CodingAC3 = 0x7F000002,
48 OMX_AUDIO_CodingAPE = 0x7F000003,
49 OMX_AUDIO_CodingDTS = 0x7F000004,
53 typedef struct OMX_AUDIO_PARAM_MP2TYPE {
54 OMX_U32 nSize; /**< size of the structure in bytes */
55 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
56 OMX_U32 nPortIndex; /**< port that this structure applies to */
57 OMX_U32 nChannels; /**< Number of channels */
58 OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable
59 rate or unknown bit rates */
60 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for
61 variable or unknown sampling rate. */
62 OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */
63 OMX_AUDIO_MP3STREAMFORMATTYPE eFormat; /**< MP3 stream format */
64 } OMX_AUDIO_PARAM_MP2TYPE;
67 typedef struct OMX_AUDIO_PARAM_AC3TYPE {
68 OMX_U32 nSize; /**< size of the structure in bytes */
69 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
70 OMX_U32 nPortIndex; /**< port that this structure applies to */
71 OMX_U32 nChannels; /**< Number of channels */
72 OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable
73 rate or unknown bit rates */
74 OMX_U32 nSamplingRate; /**< Sampling rate of the source data. Use 0 for
75 variable or unknown sampling rate. */
76 OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */
77 } OMX_AUDIO_PARAM_AC3TYPE;
80 typedef struct OMX_AUDIO_PARAM_APETYPE {
81 OMX_U32 nSize; /**< size of the structure in bytes */
82 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
83 OMX_U32 nPortIndex; /**< port that this structure applies to */
84 OMX_U32 nChannels; /**< Number of channels */
85 OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable
86 rate or unknown bit rates */
87 OMX_U32 nSamplingRate; /**< Sampling rate of the source data. Use 0 for
88 variable or unknown sampling rate. */
89 OMX_U32 nBitsPerSample; /**< Number of bits in each sample */
90 OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */
91 } OMX_AUDIO_PARAM_APETYPE;
94 typedef struct OMX_AUDIO_PARAM_DTSTYPE {
95 OMX_U32 nSize; /**< size of the structure in bytes */
96 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
97 OMX_U32 nPortIndex; /**< port that this structure applies to */
98 OMX_U32 nChannels; /**< Number of channels */
99 OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable
100 rate or unknown bit rates */
101 OMX_U32 nSamplingRate; /**< Sampling rate of the source data. Use 0 for
102 variable or unknown sampling rate. */
103 OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */
104 } OMX_AUDIO_PARAM_DTSTYPE;
106 /** FFMPEG Audio params */
107 typedef struct OMX_AUDIO_PARAM_FFMPEGTYPE {
109 OMX_VERSIONTYPE nVersion;
112 OMX_S32 eCodecId; /**< enum AVCodecID */
113 OMX_U32 nChannels; /**< Number of channels */
114 OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable
115 rate or unknown bit rates */
116 OMX_U32 nBitsPerSample; /**< Number of bits in each sample */
117 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for
118 variable or unknown sampling rate. */
119 OMX_U32 nBlockAlign; /**< is the block alignment, or block size, in bytes of the audio codec */
121 OMX_S32 eSampleFormat; /**< enum AVSampleFormat */
122 } OMX_AUDIO_PARAM_FFMPEGTYPE;
124 enum OMX_FFMPEG_INDEXTYPE
126 OMX_IndexParamAudioMp2 = 0x7FB0001, /**< reference: OMX_AUDIO_PARAM_MP2TYPE */
127 OMX_IndexParamAudioAc3 = 0x7FB0002, /**< reference: OMX_AUDIO_PARAM_AC3TYPE */
128 OMX_IndexParamAudioApe = 0x7FB0003, /**< reference: OMX_AUDIO_PARAM_APETYPE */
129 OMX_IndexParamAudioDts = 0x7FB0004, /**< reference: OMX_AUDIO_PARAM_DTSTYPE */
130 OMX_IndexParamVideoFFmpeg = 0x7FB0005, /**< reference: OMX_VIDEO_PARAM_FFMPEGTYPE */
131 OMX_IndexParamAudioFFmpeg = 0x7FB0006, /**< reference: OMX_AUDIO_PARAM_FFMPEGTYPE */
136 #endif /* __cplusplus */