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

Side by Side Diff: media/filters/vpx_video_decoder.cc

Issue 1447533006: media: Pass SetCdmReadyCB in {Audio|Video}Decoder::Initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « media/filters/vpx_video_decoder.h ('k') | media/renderers/audio_renderer_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "media/filters/vpx_video_decoder.h" 5 #include "media/filters/vpx_video_decoder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 DCHECK(task_runner_->BelongsToCurrentThread()); 271 DCHECK(task_runner_->BelongsToCurrentThread());
272 CloseDecoder(); 272 CloseDecoder();
273 } 273 }
274 274
275 std::string VpxVideoDecoder::GetDisplayName() const { 275 std::string VpxVideoDecoder::GetDisplayName() const {
276 return "VpxVideoDecoder"; 276 return "VpxVideoDecoder";
277 } 277 }
278 278
279 void VpxVideoDecoder::Initialize(const VideoDecoderConfig& config, 279 void VpxVideoDecoder::Initialize(const VideoDecoderConfig& config,
280 bool low_delay, 280 bool low_delay,
281 const SetCdmReadyCB& /* set_cdm_ready_cb */,
281 const InitCB& init_cb, 282 const InitCB& init_cb,
282 const OutputCB& output_cb) { 283 const OutputCB& output_cb) {
283 DCHECK(task_runner_->BelongsToCurrentThread()); 284 DCHECK(task_runner_->BelongsToCurrentThread());
284 DCHECK(config.IsValidConfig()); 285 DCHECK(config.IsValidConfig());
285 DCHECK(decode_cb_.is_null()); 286 DCHECK(decode_cb_.is_null());
286 287
287 InitCB bound_init_cb = BindToCurrentLoop(init_cb); 288 InitCB bound_init_cb = BindToCurrentLoop(init_cb);
288 289
289 if (config.is_encrypted() || !ConfigureDecoder(config)) { 290 if (config.is_encrypted() || !ConfigureDecoder(config)) {
290 bound_init_cb.Run(false); 291 bound_init_cb.Run(false);
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 vpx_image->stride[VPX_PLANE_Y], vpx_image->d_h, video_frame->get()); 613 vpx_image->stride[VPX_PLANE_Y], vpx_image->d_h, video_frame->get());
613 return; 614 return;
614 } 615 }
615 CopyAPlane(vpx_image_alpha->planes[VPX_PLANE_Y], 616 CopyAPlane(vpx_image_alpha->planes[VPX_PLANE_Y],
616 vpx_image_alpha->stride[VPX_PLANE_Y], 617 vpx_image_alpha->stride[VPX_PLANE_Y],
617 vpx_image_alpha->d_h, 618 vpx_image_alpha->d_h,
618 video_frame->get()); 619 video_frame->get());
619 } 620 }
620 621
621 } // namespace media 622 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/vpx_video_decoder.h ('k') | media/renderers/audio_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698