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

Side by Side Diff: content/common/gpu/media/fake_video_decode_accelerator.cc

Issue 1485043002: Passed is_encrypted parameter to the VDA initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deleted erroneously added files Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/gpu/media/fake_video_decode_accelerator.h" 5 #include "content/common/gpu/media/fake_video_decode_accelerator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "media/base/bitstream_buffer.h" 10 #include "media/base/bitstream_buffer.h"
(...skipping 23 matching lines...) Expand all
34 make_context_current_(make_context_current), 34 make_context_current_(make_context_current),
35 gl_(gl), 35 gl_(gl),
36 frame_buffer_size_(size), 36 frame_buffer_size_(size),
37 flushing_(false), 37 flushing_(false),
38 weak_this_factory_(this) { 38 weak_this_factory_(this) {
39 } 39 }
40 40
41 FakeVideoDecodeAccelerator::~FakeVideoDecodeAccelerator() { 41 FakeVideoDecodeAccelerator::~FakeVideoDecodeAccelerator() {
42 } 42 }
43 43
44 bool FakeVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile, 44 bool FakeVideoDecodeAccelerator::Initialize(
45 Client* client) { 45 const media::VideoDecodeAccelerator::InitParams& params,
46 Client* client) {
46 DCHECK(child_task_runner_->BelongsToCurrentThread()); 47 DCHECK(child_task_runner_->BelongsToCurrentThread());
47 if (profile == media::VIDEO_CODEC_PROFILE_UNKNOWN) { 48 if (params.profile == media::VIDEO_CODEC_PROFILE_UNKNOWN) {
48 LOG(ERROR) << "unknown codec profile"; 49 LOG(ERROR) << "unknown codec profile";
49 return false; 50 return false;
50 } 51 }
51 // V4L2VideoDecodeAccelerator waits until first decode call to ask for buffers 52 // V4L2VideoDecodeAccelerator waits until first decode call to ask for buffers
52 // This class asks for it on initialization instead. 53 // This class asks for it on initialization instead.
53 client_ = client; 54 client_ = client;
54 client_->ProvidePictureBuffers(kNumBuffers, 55 client_->ProvidePictureBuffers(kNumBuffers,
55 frame_buffer_size_, 56 frame_buffer_size_,
56 kDefaultTextureTarget); 57 kDefaultTextureTarget);
57 return true; 58 return true;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Bitstream no longer needed. 167 // Bitstream no longer needed.
167 client_->NotifyEndOfBitstreamBuffer(bitstream_id); 168 client_->NotifyEndOfBitstreamBuffer(bitstream_id);
168 if (flushing_ && queued_bitstream_ids_.empty()) { 169 if (flushing_ && queued_bitstream_ids_.empty()) {
169 flushing_ = false; 170 flushing_ = false;
170 client_->NotifyFlushDone(); 171 client_->NotifyFlushDone();
171 } 172 }
172 } 173 }
173 } 174 }
174 175
175 } // namespace content 176 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698