summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/ACodec.cpp
diff options
context:
space:
mode:
authorPraveen Chavan <pchavan@codeaurora.org>2015-07-02 16:09:10 -0700
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:24:13 -0600
commitf48b75f9c6407a2e5b361ec57cefd812404eb02d (patch)
treeaa96592fc8aa8ced49ac374fbf57ab5601d07834 /media/libstagefright/ACodec.cpp
parent0eb0c1dadf6b5c9948b7e4c63a5cde1adfa48c53 (diff)
downloadframeworks_av-f48b75f9c6407a2e5b361ec57cefd812404eb02d.zip
frameworks_av-f48b75f9c6407a2e5b361ec57cefd812404eb02d.tar.gz
frameworks_av-f48b75f9c6407a2e5b361ec57cefd812404eb02d.tar.bz2
Stagefright: Make classes customizable and add AV extensions
Change access modifiers and qualify methods with virtual, to allow extensions. Add facility for loading customizations (Extended classes) dynamically. Conflicts: media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp Change-Id: Icc8965754fb1c73175a13a9ad24c19665ad60988
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r--media/libstagefright/ACodec.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index e3cc413..5f8453f 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -539,6 +539,10 @@ ACodec::ACodec()
ACodec::~ACodec() {
}
+status_t ACodec::setupCustomCodec(status_t err, const char *, const sp<AMessage> &) {
+ return err;
+}
+
void ACodec::setNotificationMessage(const sp<AMessage> &msg) {
mNotify = msg;
}
@@ -2125,6 +2129,8 @@ status_t ACodec::configureCodec(
} else {
err = setupEAC3Codec(encoder, numChannels, sampleRate);
}
+ } else {
+ err = setupCustomCodec(err, mime, msg);
}
if (err != OK) {
@@ -2841,7 +2847,7 @@ static const struct VideoCodingMapEntry {
{ MEDIA_MIMETYPE_VIDEO_VP9, OMX_VIDEO_CodingVP9 },
};
-static status_t GetVideoCodingTypeFromMime(
+status_t ACodec::GetVideoCodingTypeFromMime(
const char *mime, OMX_VIDEO_CODINGTYPE *codingType) {
for (size_t i = 0;
i < sizeof(kVideoCodingMapEntry) / sizeof(kVideoCodingMapEntry[0]);