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

Unified Diff: content/common/gpu/media/android_video_decode_accelerator.cc

Issue 170843004: Pass Client pointer in Initialize() for VDA/VEA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 50e826de Rebase. Created 6 years, 10 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: content/common/gpu/media/android_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/android_video_decode_accelerator.cc b/content/common/gpu/media/android_video_decode_accelerator.cc
index d08cb1f432fc24e7a1ad98ddd3977c01af4d634e..9999130c6eb7ed73f6b73ed857d9e29f35e87bf5 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.cc
+++ b/content/common/gpu/media/android_video_decode_accelerator.cc
@@ -65,27 +65,27 @@ static inline const base::TimeDelta NoWaitTimeOut() {
}
AndroidVideoDecodeAccelerator::AndroidVideoDecodeAccelerator(
- media::VideoDecodeAccelerator::Client* client,
const base::WeakPtr<gpu::gles2::GLES2Decoder> decoder,
const base::Callback<bool(void)>& make_context_current)
- : client_(client),
+ : client_(NULL),
make_context_current_(make_context_current),
codec_(media::kCodecH264),
state_(NO_ERROR),
surface_texture_id_(0),
picturebuffers_requested_(false),
- gl_decoder_(decoder) {
-}
+ gl_decoder_(decoder) {}
AndroidVideoDecodeAccelerator::~AndroidVideoDecodeAccelerator() {
DCHECK(thread_checker_.CalledOnValidThread());
}
-bool AndroidVideoDecodeAccelerator::Initialize(
- media::VideoCodecProfile profile) {
+bool AndroidVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
+ Client* client) {
DCHECK(!media_codec_);
DCHECK(thread_checker_.CalledOnValidThread());
+ client_ = client;
+
if (!media::MediaCodecBridge::IsAvailable())
return false;

Powered by Google App Engine
This is Rietveld 408576698