Bug 803471 - Part 5b - Change OmxDecode to use GonkNativeWindowClient. r=cdouble

This commit is contained in:
Sotaro Ikeda 2013-03-08 14:43:33 -05:00
parent b8ff00c62f
commit ecebfc145e
2 changed files with 5 additions and 1 deletions

View File

@ -19,6 +19,7 @@
#include "prlog.h"
#include "GonkNativeWindow.h"
#include "GonkNativeWindowClient.h"
#include "OmxDecoder.h"
#ifdef PR_LOGGING
@ -227,6 +228,7 @@ bool OmxDecoder::Init() {
int64_t totalDurationUs = 0;
mNativeWindow = new GonkNativeWindow();
mNativeWindowClient = new GonkNativeWindowClient(mNativeWindow);
// OMXClient::connect() always returns OK and abort's fatally if
// it can't connect.
@ -250,7 +252,7 @@ bool OmxDecoder::Init() {
videoTrack,
nullptr,
flags,
mNativeWindow);
mNativeWindowClient);
if (videoSource == nullptr) {
NS_WARNING("Couldn't create OMX video source");
return false;

View File

@ -3,6 +3,7 @@
#include <utils/RefBase.h>
#include "GonkNativeWindow.h"
#include "GonkNativeWindowClient.h"
#include "GonkIOSurfaceImage.h"
#include "MPAPI.h"
#include "MediaResource.h"
@ -81,6 +82,7 @@ class OmxDecoder : public RefBase {
AbstractMediaDecoder *mDecoder;
MediaResource *mResource;
sp<GonkNativeWindow> mNativeWindow;
sp<GonkNativeWindowClient> mNativeWindowClient;
sp<MediaSource> mVideoTrack;
sp<MediaSource> mVideoSource;
sp<MediaSource> mAudioTrack;