summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/OMXCodec.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-09-15 16:20:42 -0700
committerAndreas Huber <andih@google.com>2010-09-16 09:44:40 -0700
commitaae3516293e58c0b015d4109bde58c11d503433c (patch)
tree71b773f376b9b1f630cad001ac82ac9f86353408 /media/libstagefright/OMXCodec.cpp
parent70fb57d15b829e3f20224727311f945e3bb13f3b (diff)
downloadframeworks_av-aae3516293e58c0b015d4109bde58c11d503433c.zip
frameworks_av-aae3516293e58c0b015d4109bde58c11d503433c.tar.gz
frameworks_av-aae3516293e58c0b015d4109bde58c11d503433c.tar.bz2
A ThreadedSource wraps around an existing MediaSource and reads output buffers on a separate thread. It's now used for the vpx decoder to decode frames ahead of time to improve playback performance.
Change-Id: I57a798b00adeb2c8056e85aab29a2b57aef00b63
Diffstat (limited to 'media/libstagefright/OMXCodec.cpp')
-rw-r--r--media/libstagefright/OMXCodec.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index fd23b61..3d25a4b 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -52,6 +52,8 @@
#include <OMX_Audio.h>
#include <OMX_Component.h>
+#include "include/ThreadedSource.h"
+
namespace android {
static const int OMX_QCOM_COLOR_FormatYVU420SemiPlanar = 0x7FA30C00;
@@ -134,6 +136,10 @@ static sp<MediaSource> InstantiateSoftwareCodec(
for (size_t i = 0;
i < sizeof(kFactoryInfo) / sizeof(kFactoryInfo[0]); ++i) {
if (!strcmp(name, kFactoryInfo[i].name)) {
+ if (!strcmp(name, "VPXDecoder")) {
+ return new ThreadedSource(
+ (*kFactoryInfo[i].CreateFunc)(source));
+ }
return (*kFactoryInfo[i].CreateFunc)(source);
}
}