diff options
author | Lucian Cristian <lucian.cristian@gmail.com> | 2014-05-07 01:44:49 +0300 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2014-12-13 00:39:24 +0100 |
commit | cd622624be4d5414afe9419ddf3dd3d6a482f8cf (patch) | |
tree | c2d084fd1c7f2fd5e68622600a159a5695ec5607 | |
parent | 60d88dd27bc8fe128aa53cecf4057cfe6a1516a3 (diff) | |
download | device_samsung_tuna-cd622624be4d5414afe9419ddf3dd3d6a482f8cf.zip device_samsung_tuna-cd622624be4d5414afe9419ddf3dd3d6a482f8cf.tar.gz device_samsung_tuna-cd622624be4d5414afe9419ddf3dd3d6a482f8cf.tar.bz2 |
Enable use of FFMPEG codecs for extended formats
Add OMX_AUDIO_Coding and OMX_VIDEO_Coding
Copied from the stagefright-plugins project.
OMAP4 uses it's own OMX_Audio.h, OMX_Index.h, OMX_Video.h
Change-Id: I516f08b78298f5796325ec3ef12f5d7573a01b85
Conflicts:
media_codecs.xml
-rwxr-xr-x | domx/omx_core/inc/OMX_Audio.h | 79 | ||||
-rwxr-xr-x | domx/omx_core/inc/OMX_Index.h | 6 | ||||
-rwxr-xr-x | domx/omx_core/inc/OMX_Video.h | 17 |
3 files changed, 102 insertions, 0 deletions
diff --git a/domx/omx_core/inc/OMX_Audio.h b/domx/omx_core/inc/OMX_Audio.h index f4cb643..a217d13 100755 --- a/domx/omx_core/inc/OMX_Audio.h +++ b/domx/omx_core/inc/OMX_Audio.h @@ -109,6 +109,11 @@ typedef enum OMX_AUDIO_CODINGTYPE { OMX_AUDIO_CodingFLAC, /**< Any variant of FLAC encoded data */ OMX_AUDIO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ OMX_AUDIO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ + OMX_AUDIO_CodingMP2, /**< Any variant of MP2 encoded data */ + OMX_AUDIO_CodingAC3, /**< Any variant of AC3 encoded data */ + OMX_AUDIO_CodingAPE, /**< Any variant of APE encoded data */ + OMX_AUDIO_CodingDTS, /**< Any variant of DTS encoded data */ + OMX_AUDIO_CodingFFMPEG, /**< Any variant of FFMPEG encoded data */ OMX_AUDIO_CodingMax = 0x7FFFFFFF } OMX_AUDIO_CODINGTYPE; @@ -354,6 +359,80 @@ typedef struct OMX_AUDIO_PARAM_FLACTYPE { to 8 (highest compression */ } OMX_AUDIO_PARAM_FLACTYPE; +/** MP2 params */ +typedef struct OMX_AUDIO_PARAM_MP2TYPE { + OMX_U32 nSize; /**< size of the structure in bytes */ + OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ + OMX_U32 nPortIndex; /**< port that this structure applies to */ + OMX_U32 nChannels; /**< Number of channels */ + OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable + rate or unknown bit rates */ + OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for + variable or unknown sampling rate. */ + OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */ + OMX_AUDIO_MP3STREAMFORMATTYPE eFormat; /**< MP3 stream format */ +} OMX_AUDIO_PARAM_MP2TYPE; + + +/** AC3 params */ +typedef struct OMX_AUDIO_PARAM_AC3TYPE { + OMX_U32 nSize; /**< size of the structure in bytes */ + OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ + OMX_U32 nPortIndex; /**< port that this structure applies to */ + OMX_U32 nChannels; /**< Number of channels */ + OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable + rate or unknown bit rates */ + OMX_U32 nSamplingRate; /**< Sampling rate of the source data. Use 0 for + variable or unknown sampling rate. */ + OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */ +} OMX_AUDIO_PARAM_AC3TYPE; + + +/** APE params */ +typedef struct OMX_AUDIO_PARAM_APETYPE { + OMX_U32 nSize; /**< size of the structure in bytes */ + OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ + OMX_U32 nPortIndex; /**< port that this structure applies to */ + OMX_U32 nChannels; /**< Number of channels */ + OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable + rate or unknown bit rates */ + OMX_U32 nSamplingRate; /**< Sampling rate of the source data. Use 0 for + variable or unknown sampling rate. */ + OMX_U32 nBitsPerSample; /**< Number of bits in each sample */ + OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */ +} OMX_AUDIO_PARAM_APETYPE; + + +/** DTS params */ +typedef struct OMX_AUDIO_PARAM_DTSTYPE { + OMX_U32 nSize; /**< size of the structure in bytes */ + OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ + OMX_U32 nPortIndex; /**< port that this structure applies to */ + OMX_U32 nChannels; /**< Number of channels */ + OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable + rate or unknown bit rates */ + OMX_U32 nSamplingRate; /**< Sampling rate of the source data. Use 0 for + variable or unknown sampling rate. */ + OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */ +} OMX_AUDIO_PARAM_DTSTYPE; + +/** FFMPEG Audio params */ +typedef struct OMX_AUDIO_PARAM_FFMPEGTYPE { + OMX_U32 nSize; + OMX_VERSIONTYPE nVersion; + OMX_U32 nPortIndex; + + OMX_S32 eCodecId; /**< enum AVCodecID */ + OMX_U32 nChannels; /**< Number of channels */ + OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable + rate or unknown bit rates */ + OMX_U32 nBitsPerSample; /**< Number of bits in each sample */ + OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for + variable or unknown sampling rate. */ + OMX_U32 nBlockAlign; /**< is the block alignment, or block size, in bytes of the audio codec */ + + OMX_S32 eSampleFormat; /**< enum AVSampleFormat */ +} OMX_AUDIO_PARAM_FFMPEGTYPE; /** WMA Version */ typedef enum OMX_AUDIO_WMAFORMATTYPE { diff --git a/domx/omx_core/inc/OMX_Index.h b/domx/omx_core/inc/OMX_Index.h index bfb8739..0b76ca9 100755 --- a/domx/omx_core/inc/OMX_Index.h +++ b/domx/omx_core/inc/OMX_Index.h @@ -263,6 +263,12 @@ typedef enum OMX_INDEXTYPE { to 0x7FFFFFFE. This range is not broken out by vendor, so private indexes are not guaranteed unique and therefore should only be sent to the appropriate component. */ + OMX_IndexParamAudioMp2, /**< reference: OMX_AUDIO_PARAM_MP2TYPE */ + OMX_IndexParamAudioAc3, /**< reference: OMX_AUDIO_PARAM_AC3TYPE */ + OMX_IndexParamAudioApe, /**< reference: OMX_AUDIO_PARAM_APETYPE */ + OMX_IndexParamAudioDts, /**< reference: OMX_AUDIO_PARAM_DTSTYPE */ + OMX_IndexParamVideoFFmpeg, /**< reference: OMX_VIDEO_PARAM_FFMPEGTYPE */ + OMX_IndexParamAudioFFmpeg, /**< reference: OMX_AUDIO_PARAM_FFMPEGTYPE */ OMX_IndexMax = 0x7FFFFFFF diff --git a/domx/omx_core/inc/OMX_Video.h b/domx/omx_core/inc/OMX_Video.h index 89425e0..8529e1b 100755 --- a/domx/omx_core/inc/OMX_Video.h +++ b/domx/omx_core/inc/OMX_Video.h @@ -90,6 +90,10 @@ typedef enum OMX_VIDEO_CODINGTYPE { OMX_VIDEO_CodingHEVC, /**< ITU H.265/HEVC */ OMX_VIDEO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ OMX_VIDEO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ + OMX_VIDEO_CodingVC1, /**< VC1 */ + OMX_VIDEO_CodingFLV1, /**< Sorenson's H.263 */ + OMX_VIDEO_CodingDIVX, /**< DIVX */ + OMX_VIDEO_CodingFFMPEG, /**< FFMPEG */ OMX_VIDEO_CodingMax = 0x7FFFFFFF } OMX_VIDEO_CODINGTYPE; @@ -1070,6 +1074,19 @@ typedef struct OMX_VIDEO_CONFIG_NALSIZE { OMX_U32 nNaluBytes; } OMX_VIDEO_CONFIG_NALSIZE; +/** + * FFMPEG Video Params + */ +typedef struct OMX_VIDEO_PARAM_FFMPEGTYPE { + OMX_U32 nSize; + OMX_VERSIONTYPE nVersion; + OMX_U32 nPortIndex; + + OMX_S32 eCodecId; /**< enum AVCodecID */ + OMX_U32 nWidth; + OMX_U32 nHeight; +} OMX_VIDEO_PARAM_FFMPEGTYPE; + /** @} */ #ifdef __cplusplus |