Permalink
Browse files

add other codecs

  • Loading branch information...
1 parent 66c8ddc commit e41f0047136caab98905f119d2b31cfa275a1606 @koying committed Dec 7, 2012
View
@@ -242,19 +242,35 @@ CDVDVideoCodec* CDVDFactoryCodec::CreateVideoCodec(CDVDStreamInfo &hint, unsigne
#if defined(HAVE_LIBOPENMAX)
if (g_guiSettings.GetBool("videoplayer.useomx") && !hint.software )
{
- if (hint.codec == CODEC_ID_H264 || hint.codec == CODEC_ID_MPEG2VIDEO || hint.codec == CODEC_ID_VC1)
+ switch(hint.codec)
{
- if ( (pCodec = OpenCodec(new CDVDVideoCodecOpenMax(), hint, options)) ) return pCodec;
+ case CODEC_ID_H264:
+ case CODEC_ID_MPEG2VIDEO:
+ case CODEC_ID_VC1:
+ case CODEC_ID_VP8:
+ if ( (pCodec = OpenCodec(new CDVDVideoCodecOpenMax(), hint, options)) ) return pCodec;
+ break;
+ default:
+ break;
}
}
#endif
#if defined(HAVE_LIBSTAGEFRIGHT)
if (g_guiSettings.GetBool("videoplayer.usestagefright") && !hint.software )
{
- if (hint.codec == CODEC_ID_H264)
+ switch(hint.codec)
{
- if ( (pCodec = OpenCodec(new CDVDVideoCodecStageFright(), hint, options)) ) return pCodec;
+ case CODEC_ID_H264:
+ case CODEC_ID_MPEG2VIDEO:
+ case CODEC_ID_MPEG4:
+ case CODEC_ID_WMV3:
+ case CODEC_ID_VC1:
+ case CODEC_ID_VP8:
+ if ( (pCodec = OpenCodec(new CDVDVideoCodecStageFright(), hint, options)) ) return pCodec;
+ break;
+ default:
+ break;
}
}
#endif
@@ -78,6 +78,9 @@ bool CDVDVideoCodecStageFright::Open(CDVDStreamInfo &hints, CDVDCodecOptions &op
case CODEC_ID_VP8:
m_pFormatName = "stf-vp8";
break;
+ case CODEC_ID_VC1:
+ m_pFormatName = "stf-vc1";
+ break;
default:
return false;
break;
@@ -89,6 +92,8 @@ bool CDVDVideoCodecStageFright::Open(CDVDStreamInfo &hints, CDVDCodecOptions &op
CLog::Log(LOGERROR,
"%s::%s - failed to open, codec(%d), profile(%d), level(%d)",
CLASSNAME, __func__, hints.codec, hints.profile, hints.level);
+ delete m_stf_decoder;
+ m_stf_decoder = NULL;
return false;
}
@@ -64,9 +64,10 @@
#include "DVDClock.h"
#define OMX_QCOM_COLOR_FormatYVU420SemiPlanar 0x7FA30C00
-//#define STAGEFRIGHT_DEBUG_VERBOSE 1
+#define STAGEFRIGHT_DEBUG_VERBOSE 1
#define CLASSNAME "CStageFrightVideo"
+const char *MEDIA_MIMETYPE_VIDEO_WMV = "video/x-ms-wmv";
using namespace android;
@@ -313,6 +314,9 @@ bool CStageFrightVideo::Open(CDVDStreamInfo &hints)
case CODEC_ID_VP8:
mimetype = MEDIA_MIMETYPE_VIDEO_VPX;
break;
+ case CODEC_ID_VC1:
+ mimetype = MEDIA_MIMETYPE_VIDEO_WMV;
+ break;
default:
return false;
break;

0 comments on commit e41f004

Please sign in to comment.