Loading include/media/stagefright/ACodec.h +1 −1 Original line number Diff line number Diff line Loading @@ -238,7 +238,7 @@ private: status_t setSupportedOutputFormat(); status_t setupVideoDecoder( const char *mime, int32_t width, int32_t height); const char *mime, const sp<AMessage> &msg); status_t setupVideoEncoder( const char *mime, const sp<AMessage> &msg); Loading media/libstagefright/ACodec.cpp +22 −9 Original line number Diff line number Diff line Loading @@ -1267,13 +1267,7 @@ status_t ACodec::configureCodec( if (encoder) { err = setupVideoEncoder(mime, msg); } else { int32_t width, height; if (!msg->findInt32("width", &width) || !msg->findInt32("height", &height)) { err = INVALID_OPERATION; } else { err = setupVideoDecoder(mime, width, height); } err = setupVideoDecoder(mime, msg); } } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_MPEG)) { int32_t numChannels, sampleRate; Loading Loading @@ -1883,7 +1877,13 @@ static status_t GetMimeTypeForVideoCoding( } status_t ACodec::setupVideoDecoder( const char *mime, int32_t width, int32_t height) { const char *mime, const sp<AMessage> &msg) { int32_t width, height; if (!msg->findInt32("width", &width) || !msg->findInt32("height", &height)) { return INVALID_OPERATION; } OMX_VIDEO_CODINGTYPE compressionFormat; status_t err = GetVideoCodingTypeFromMime(mime, &compressionFormat); Loading @@ -1898,7 +1898,20 @@ status_t ACodec::setupVideoDecoder( return err; } int32_t tmp; if (msg->findInt32("color-format", &tmp)) { OMX_COLOR_FORMATTYPE colorFormat = static_cast<OMX_COLOR_FORMATTYPE>(tmp); err = setVideoPortFormatType( kPortIndexOutput, OMX_VIDEO_CodingUnused, colorFormat); if (err != OK) { ALOGW("[%s] does not support color format %d", mComponentName.c_str(), colorFormat); err = setSupportedOutputFormat(); } } else { err = setSupportedOutputFormat(); } if (err != OK) { return err; Loading Loading
include/media/stagefright/ACodec.h +1 −1 Original line number Diff line number Diff line Loading @@ -238,7 +238,7 @@ private: status_t setSupportedOutputFormat(); status_t setupVideoDecoder( const char *mime, int32_t width, int32_t height); const char *mime, const sp<AMessage> &msg); status_t setupVideoEncoder( const char *mime, const sp<AMessage> &msg); Loading
media/libstagefright/ACodec.cpp +22 −9 Original line number Diff line number Diff line Loading @@ -1267,13 +1267,7 @@ status_t ACodec::configureCodec( if (encoder) { err = setupVideoEncoder(mime, msg); } else { int32_t width, height; if (!msg->findInt32("width", &width) || !msg->findInt32("height", &height)) { err = INVALID_OPERATION; } else { err = setupVideoDecoder(mime, width, height); } err = setupVideoDecoder(mime, msg); } } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_MPEG)) { int32_t numChannels, sampleRate; Loading Loading @@ -1883,7 +1877,13 @@ static status_t GetMimeTypeForVideoCoding( } status_t ACodec::setupVideoDecoder( const char *mime, int32_t width, int32_t height) { const char *mime, const sp<AMessage> &msg) { int32_t width, height; if (!msg->findInt32("width", &width) || !msg->findInt32("height", &height)) { return INVALID_OPERATION; } OMX_VIDEO_CODINGTYPE compressionFormat; status_t err = GetVideoCodingTypeFromMime(mime, &compressionFormat); Loading @@ -1898,7 +1898,20 @@ status_t ACodec::setupVideoDecoder( return err; } int32_t tmp; if (msg->findInt32("color-format", &tmp)) { OMX_COLOR_FORMATTYPE colorFormat = static_cast<OMX_COLOR_FORMATTYPE>(tmp); err = setVideoPortFormatType( kPortIndexOutput, OMX_VIDEO_CodingUnused, colorFormat); if (err != OK) { ALOGW("[%s] does not support color format %d", mComponentName.c_str(), colorFormat); err = setSupportedOutputFormat(); } } else { err = setSupportedOutputFormat(); } if (err != OK) { return err; Loading