diff options
author | Andreas Huber <andih@google.com> | 2013-11-05 12:36:17 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2013-11-05 12:36:17 -0800 |
commit | 89b31a3f670d8bec87bed50aaad9bcd8edec66b6 (patch) | |
tree | 281e16d135a6c47364ca3ce8d4a4ed66e89cee9f /media/libstagefright | |
parent | 3ff5792adfdbf67662a5f8064315a55690d53944 (diff) | |
download | frameworks_av-89b31a3f670d8bec87bed50aaad9bcd8edec66b6.zip frameworks_av-89b31a3f670d8bec87bed50aaad9bcd8edec66b6.tar.gz frameworks_av-89b31a3f670d8bec87bed50aaad9bcd8edec66b6.tar.bz2 |
configure bitrate and bitrate mode at encoder initialization for VP8/9
Change-Id: I0389264db4102cabb0c6fcb4ca223d85cc9e86fb
related-to-bug: 11536167
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/ACodec.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 1adab38..f5c7a97 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -1909,6 +1909,11 @@ status_t ACodec::setupVideoEncoder(const char *mime, const sp<AMessage> &msg) { err = setupAVCEncoderParameters(msg); break; + case OMX_VIDEO_CodingVP8: + case OMX_VIDEO_CodingVP9: + err = setupVPXEncoderParameters(msg); + break; + default: break; } @@ -2240,6 +2245,17 @@ status_t ACodec::setupAVCEncoderParameters(const sp<AMessage> &msg) { return configureBitrate(bitrate, bitrateMode); } +status_t ACodec::setupVPXEncoderParameters(const sp<AMessage> &msg) { + int32_t bitrate; + if (!msg->findInt32("bitrate", &bitrate)) { + return INVALID_OPERATION; + } + + OMX_VIDEO_CONTROLRATETYPE bitrateMode = getBitrateMode(msg); + + return configureBitrate(bitrate, bitrateMode); +} + status_t ACodec::verifySupportForProfileAndLevel( int32_t profile, int32_t level) { OMX_VIDEO_PARAM_PROFILELEVELTYPE params; |