Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Unified Diff: chrome/renderer/media/ipc_video_decoder.cc

Issue 3215008: Connect GpuVideoDecodeServiceHost with ggl::Context and CommandBufferProxy (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fixed comments Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/media/ipc_video_decoder.cc
diff --git a/chrome/renderer/media/ipc_video_decoder.cc b/chrome/renderer/media/ipc_video_decoder.cc
index cb0035e42ece41cc718979169f35c7c91292681c..205e857d904867335b968b1d1825582584eea4f1 100644
--- a/chrome/renderer/media/ipc_video_decoder.cc
+++ b/chrome/renderer/media/ipc_video_decoder.cc
@@ -6,6 +6,7 @@
#include "chrome/renderer/media/ipc_video_decoder.h"
#include "base/task.h"
+#include "chrome/renderer/ggl/ggl.h"
#include "media/base/callback.h"
#include "media/base/filters.h"
#include "media/base/filter_host.h"
@@ -47,6 +48,8 @@ void IpcVideoDecoder::Initialize(DemuxerStream* demuxer_stream,
initialize_callback_.reset(callback);
// We require bit stream converter for openmax hardware decoder.
+ // TODO(hclam): This is a wrong place to initialize the demuxer stream's
+ // bitstream converter.
demuxer_stream->EnableBitstreamConverter();
// Get the AVStream by querying for the provider interface.
@@ -61,15 +64,14 @@ void IpcVideoDecoder::Initialize(DemuxerStream* demuxer_stream,
width_ = av_stream->codec->width;
height_ = av_stream->codec->height;
- // Create hardware decoder instance.
- GpuVideoServiceHost* gpu_video_service_host = GpuVideoServiceHost::get();
- gpu_video_decoder_host_ = gpu_video_service_host->CreateVideoDecoder(this);
+ // TODO(hclam): Pass an actual context instead of NULL.
+ gpu_video_decoder_host_ = ggl::CreateVideoDecoder(NULL);
// Initialize hardware decoder.
GpuVideoDecoderInitParam param = {0};
param.width_ = width_;
param.height_ = height_;
- if (!gpu_video_decoder_host_->Initialize(param)) {
+ if (!gpu_video_decoder_host_->Initialize(this, param)) {
GpuVideoDecoderInitDoneParam param;
OnInitializeDone(false, param);
}
@@ -344,4 +346,3 @@ bool IpcVideoDecoder::IsMediaFormatSupported(const MediaFormat& format) {
}
} // namespace media
-
« chrome/renderer/gpu_video_service_host.h ('K') | « chrome/renderer/media/ipc_video_decoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698