Loading include/media/stagefright/SimpleDecodingSource.h +3 −1 Original line number Diff line number Diff line Loading @@ -43,9 +43,11 @@ public: // case the source will return empty buffers. // This source cannot be restarted (hence the name "Simple"), all reads are blocking, and // does not support secure input or pausing. // if |desiredCodec| is given, use this specific codec. static sp<SimpleDecodingSource> Create( const sp<IMediaSource> &source, uint32_t flags = 0, const sp<ANativeWindow> &nativeWindow = NULL); const sp<ANativeWindow> &nativeWindow = NULL, const char *desiredCodec = NULL); virtual ~SimpleDecodingSource(); Loading media/libstagefright/SimpleDecodingSource.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,8 @@ const int64_t kTimeoutWaitForOutputUs = 500000; // 0.5 seconds //static sp<SimpleDecodingSource> SimpleDecodingSource::Create( const sp<IMediaSource> &source, uint32_t flags, const sp<ANativeWindow> &nativeWindow) { const sp<IMediaSource> &source, uint32_t flags, const sp<ANativeWindow> &nativeWindow, const char *desiredCodec) { sp<Surface> surface = static_cast<Surface*>(nativeWindow.get()); const char *mime = NULL; sp<MetaData> meta = source->getFormat(); Loading @@ -55,6 +56,9 @@ sp<SimpleDecodingSource> SimpleDecodingSource::Create( for (size_t i = 0; i < matchingCodecs.size(); ++i) { const AString &componentName = matchingCodecs[i]; if (desiredCodec != NULL && componentName.compare(desiredCodec)) { continue; } ALOGV("Attempting to allocate codec '%s'", componentName.c_str()); Loading Loading
include/media/stagefright/SimpleDecodingSource.h +3 −1 Original line number Diff line number Diff line Loading @@ -43,9 +43,11 @@ public: // case the source will return empty buffers. // This source cannot be restarted (hence the name "Simple"), all reads are blocking, and // does not support secure input or pausing. // if |desiredCodec| is given, use this specific codec. static sp<SimpleDecodingSource> Create( const sp<IMediaSource> &source, uint32_t flags = 0, const sp<ANativeWindow> &nativeWindow = NULL); const sp<ANativeWindow> &nativeWindow = NULL, const char *desiredCodec = NULL); virtual ~SimpleDecodingSource(); Loading
media/libstagefright/SimpleDecodingSource.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,8 @@ const int64_t kTimeoutWaitForOutputUs = 500000; // 0.5 seconds //static sp<SimpleDecodingSource> SimpleDecodingSource::Create( const sp<IMediaSource> &source, uint32_t flags, const sp<ANativeWindow> &nativeWindow) { const sp<IMediaSource> &source, uint32_t flags, const sp<ANativeWindow> &nativeWindow, const char *desiredCodec) { sp<Surface> surface = static_cast<Surface*>(nativeWindow.get()); const char *mime = NULL; sp<MetaData> meta = source->getFormat(); Loading @@ -55,6 +56,9 @@ sp<SimpleDecodingSource> SimpleDecodingSource::Create( for (size_t i = 0; i < matchingCodecs.size(); ++i) { const AString &componentName = matchingCodecs[i]; if (desiredCodec != NULL && componentName.compare(desiredCodec)) { continue; } ALOGV("Attempting to allocate codec '%s'", componentName.c_str()); Loading