Bug 1170589 - Force decoder to use all allocated buffers. r=bwu
authorJohn Lin <jolin@mozilla.com>
Wed, 14 Oct 2015 14:12:25 +0800
changeset 267959 3084c957440140b5a00859779f81e76887b7093d
parent 267958 2bdf262fcf4fa15e6e092b36e126521d66fc5e34
child 267960 b077decb629516239e8561ffb9766f2c70b9f08f
push id66657
push usercbook@mozilla.com
push dateFri, 16 Oct 2015 06:31:13 +0000
treeherdermozilla-inbound@3084c9574401 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbwu
bugs1170589
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1170589 - Force decoder to use all allocated buffers. r=bwu
dom/media/platforms/gonk/GonkVideoDecoderManager.cpp
--- a/dom/media/platforms/gonk/GonkVideoDecoderManager.cpp
+++ b/dom/media/platforms/gonk/GonkVideoDecoderManager.cpp
@@ -422,16 +422,19 @@ GonkVideoDecoderManager::codecReserved()
   sp<AMessage> format = new AMessage;
   sp<Surface> surface;
   status_t rv = OK;
   // Fixed values
   GVDM_LOG("Configure video mime type: %s, width:%d, height:%d", mMimeType.get(), mVideoWidth, mVideoHeight);
   format->setString("mime", mMimeType.get());
   format->setInt32("width", mVideoWidth);
   format->setInt32("height", mVideoHeight);
+  // Set the "moz-use-undequeued-bufs" to use the undeque buffers to accelerate
+  // the video decoding.
+  format->setInt32("moz-use-undequeued-bufs", 1);
   if (mNativeWindow != nullptr) {
     surface = new Surface(mNativeWindow->getBufferQueue());
   }
   mDecoder->configure(format, surface, nullptr, 0);
   mDecoder->Prepare();
 
   if (mMimeType.EqualsLiteral("video/mp4v-es")) {
     rv = mDecoder->Input(mCodecSpecificData->Elements(),