Skip to content
Permalink
Browse files

av: Missing changes for STE OMX multimedia

Change-Id: Id5064e2785e43969372d699bea155d5b88668ebe
  • Loading branch information...
Eskuero committed Jul 25, 2013
1 parent 46b3fb5 commit d8f7a185d0c541edcc229a21fce3661becdbab59
Showing with 28 additions and 6 deletions.
  1. +6 −1 include/media/stagefright/MediaDefs.h
  2. +6 −1 media/libstagefright/MediaDefs.cpp
  3. +16 −4 media/libstagefright/OMXCodec.cpp
@@ -27,9 +27,14 @@ extern const char *MEDIA_MIMETYPE_VIDEO_VPX;
extern const char *MEDIA_MIMETYPE_VIDEO_AVC;
extern const char *MEDIA_MIMETYPE_VIDEO_MPEG4;
extern const char *MEDIA_MIMETYPE_VIDEO_H263;
#ifdef STE_HARDWARE
extern const char *MEDIA_MIMETYPE_VIDEO_H263_SW;
#endif
extern const char *MEDIA_MIMETYPE_VIDEO_MPEG2;
extern const char *MEDIA_MIMETYPE_VIDEO_RAW;

#ifdef STE_HARDWARE
extern const char *MEDIA_MIMETYPE_VIDEO_VC1;
#endif
extern const char *MEDIA_MIMETYPE_AUDIO_AMR_NB;
extern const char *MEDIA_MIMETYPE_AUDIO_AMR_WB;
extern const char *MEDIA_MIMETYPE_AUDIO_MPEG; // layer III
@@ -25,9 +25,14 @@ const char *MEDIA_MIMETYPE_VIDEO_VPX = "video/x-vnd.on2.vp8";
const char *MEDIA_MIMETYPE_VIDEO_AVC = "video/avc";
const char *MEDIA_MIMETYPE_VIDEO_MPEG4 = "video/mp4v-es";
const char *MEDIA_MIMETYPE_VIDEO_H263 = "video/3gpp";
#ifdef STE_HARDWARE
const char *MEDIA_MIMETYPE_VIDEO_H263_SW = "video/3gpp-sw";
#endif
const char *MEDIA_MIMETYPE_VIDEO_MPEG2 = "video/mpeg2";
const char *MEDIA_MIMETYPE_VIDEO_RAW = "video/raw";

#ifdef STE_HARDWARE
const char *MEDIA_MIMETYPE_VIDEO_VC1 = "video/vc1";
#endif
const char *MEDIA_MIMETYPE_AUDIO_AMR_NB = "audio/3gpp";
const char *MEDIA_MIMETYPE_AUDIO_AMR_WB = "audio/amr-wb";
const char *MEDIA_MIMETYPE_AUDIO_MPEG = "audio/mpeg";
@@ -273,6 +273,8 @@ uint32_t OMXCodec::OmxToHALFormat(OMX_COLOR_FORMATTYPE omxValue) {
switch (omxValue) {
case OMX_STE_COLOR_FormatYUV420PackedSemiPlanarMB:
return HAL_PIXEL_FORMAT_YCBCR42XMBN;
case OMX_COLOR_FormatYUV420Planar:
return HAL_PIXEL_FORMAT_YCbCr_420_P;
default:
ALOGI("Unknown OMX pixel format (0x%X), passing it on unchanged", omxValue);
return omxValue;
@@ -312,6 +314,12 @@ uint32_t OMXCodec::getComponentQuirks(
index, "input-buffer-sizes-are-bogus")) {
quirks |= kInputBufferSizesAreBogus;
}
#ifdef STE_HARDWARE
if (list->codecHasQuirk(
index, "requires-store-metadata-before-idle")) {
quirks |= kRequiresStoreMetaDataBeforeIdle;
}
#endif
#ifdef QCOM_HARDWARE
if (list->codecHasQuirk(
index, "requires-global-flush")) {
@@ -1783,6 +1791,10 @@ void OMXCodec::setComponentRole(
"video_decoder.mpeg4", "video_encoder.mpeg4" },
{ MEDIA_MIMETYPE_VIDEO_H263,
"video_decoder.h263", "video_encoder.h263" },
#ifdef STE_HARDWARE
{ MEDIA_MIMETYPE_VIDEO_VC1,
"video_decoder.vc1", "video_encoder.vc1" },
#endif
{ MEDIA_MIMETYPE_VIDEO_VPX,
"video_decoder.vpx", "video_encoder.vpx" },
{ MEDIA_MIMETYPE_AUDIO_RAW,
@@ -2184,8 +2196,12 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
#endif
#ifdef QCOM_HARDWARE
format
#else
#ifdef STE_HARDWARE
OmxToHALFormat(def.format.video.eColorFormat)
#else
def.format.video.eColorFormat
#endif
#endif
);
#else
@@ -2227,11 +2243,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
mNativeWindow.get(),
def.format.video.nFrameWidth,
def.format.video.nFrameHeight,
#ifdef STE_HARDWARE
OmxToHALFormat(def.format.video.eColorFormat));
#else
eColorFormat);
#endif
#endif

if (err != 0) {

0 comments on commit d8f7a18

Please sign in to comment.
You can’t perform that action at this time.