mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1222923 - Enable MOZ_FMP4 on gonk L r=jolin
This commit is contained in:
parent
bac426bd63
commit
f41a0f2a4b
@ -278,7 +278,7 @@ if test -n "$gonkdir" ; then
|
||||
AC_DEFINE(MOZ_OMX_ENCODER)
|
||||
AC_SUBST(MOZ_AUDIO_OFFLOAD)
|
||||
AC_DEFINE(MOZ_AUDIO_OFFLOAD)
|
||||
MOZ_FMP4=
|
||||
MOZ_FMP4=1
|
||||
MOZ_B2G_CAMERA=1
|
||||
if test -d "$gonkdir/system/bluetoothd"; then
|
||||
MOZ_B2G_BT=1
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <gui/Surface.h>
|
||||
#include <ICrypto.h>
|
||||
#include "GonkVideoDecoderManager.h"
|
||||
#include "GrallocImages.h"
|
||||
#include "MediaDecoderReader.h"
|
||||
#include "ImageContainer.h"
|
||||
#include "VideoUtils.h"
|
||||
@ -45,7 +46,6 @@ GonkVideoDecoderManager::GonkVideoDecoderManager(
|
||||
const VideoInfo& aConfig)
|
||||
: mImageContainer(aImageContainer)
|
||||
, mColorConverterBufferSize(0)
|
||||
, mNativeWindow(nullptr)
|
||||
, mPendingReleaseItemsLock("GonkVideoDecoderManager::mPendingReleaseItemsLock")
|
||||
, mNeedsCopyBuffer(false)
|
||||
{
|
||||
@ -122,7 +122,13 @@ GonkVideoDecoderManager::Init()
|
||||
uint32_t capability = MediaCodecProxy::kEmptyCapability;
|
||||
if (mDecoder->getCapability(&capability) == OK && (capability &
|
||||
MediaCodecProxy::kCanExposeGraphicBuffer)) {
|
||||
#if ANDROID_VERSION >= 21
|
||||
sp<IGonkGraphicBufferConsumer> consumer;
|
||||
GonkBufferQueue::createBufferQueue(&mGraphicBufferProducer, &consumer);
|
||||
mNativeWindow = new GonkNativeWindow(consumer);
|
||||
#else
|
||||
mNativeWindow = new GonkNativeWindow();
|
||||
#endif
|
||||
}
|
||||
|
||||
mVideoCodecRequest.Begin(mDecoder->AsyncAllocateVideoMediaCodec()
|
||||
@ -604,7 +610,11 @@ GonkVideoDecoderManager::codecReserved()
|
||||
// the video decoding.
|
||||
format->setInt32("moz-use-undequeued-bufs", 1);
|
||||
if (mNativeWindow != nullptr) {
|
||||
#if ANDROID_VERSION >= 21
|
||||
surface = new Surface(mGraphicBufferProducer);
|
||||
#else
|
||||
surface = new Surface(mNativeWindow->getBufferQueue());
|
||||
#endif
|
||||
}
|
||||
mDecoder->configure(format, surface, nullptr, 0);
|
||||
mDecoder->Prepare();
|
||||
|
@ -116,6 +116,10 @@ private:
|
||||
size_t mColorConverterBufferSize;
|
||||
|
||||
android::sp<android::GonkNativeWindow> mNativeWindow;
|
||||
#if ANDROID_VERSION >= 21
|
||||
android::sp<android::IGraphicBufferProducer> mGraphicBufferProducer;
|
||||
#endif
|
||||
|
||||
enum {
|
||||
kNotifyPostReleaseBuffer = 'nprb',
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user