Bug 1031500: Increase number of buffers for webrtc OMX H.264 decode r=sotaro

This commit is contained in:
Randell Jesup 2014-06-27 21:49:24 -04:00
parent a8d4195694
commit 5b6b6f382d
2 changed files with 8 additions and 1 deletions

View File

@ -283,7 +283,11 @@ public:
if (mNativeWindow.get()) {
// listen to buffers queued by MediaCodec::RenderOutputBufferAndRelease().
mNativeWindow->setNewFrameCallback(this);
surface = new Surface(mNativeWindow->getBufferQueue());
// XXX remove buffer changes after a better solution lands - bug 1009420
sp<GonkBufferQueue> bq = mNativeWindow->getBufferQueue();
// More spare buffers to avoid OMX decoder waiting for native window
bq->setMaxAcquiredBufferCount(WEBRTC_OMX_H264_MIN_DECODE_BUFFERS);
surface = new Surface(bq);
}
status_t result = mCodec->configure(config, surface, nullptr, 0);
if (result == OK) {

View File

@ -24,6 +24,9 @@ namespace mozilla {
class WebrtcOMXDecoder;
class OMXOutputDrain;
// XXX see if we can reduce this
#define WEBRTC_OMX_H264_MIN_DECODE_BUFFERS 10
class WebrtcOMXH264VideoEncoder : public WebrtcVideoEncoder
{
public: