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

Side by Side Diff: media/mojo/services/mojo_video_decoder.cc

Issue 1800953002: Add MojoVideoDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « media/mojo/services/mojo_video_decoder.h ('k') | media/renderers/default_renderer_factory.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/mojo/services/mojo_audio_decoder.h" 5 #include "media/mojo/services/mojo_video_decoder.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/logging.h" 9 #include "base/logging.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
11 #include "base/thread_task_runner_handle.h" 11 #include "base/thread_task_runner_handle.h"
12 12
13 namespace media { 13 namespace media {
14 14
15 MojoAudioDecoder::MojoAudioDecoder() { 15 MojoVideoDecoder::MojoVideoDecoder() {
16 DVLOG(1) << __FUNCTION__; 16 DVLOG(1) << __FUNCTION__;
17 } 17 }
18 18
19 MojoAudioDecoder::~MojoAudioDecoder() { 19 MojoVideoDecoder::~MojoVideoDecoder() {
20 DVLOG(1) << __FUNCTION__; 20 DVLOG(1) << __FUNCTION__;
21 } 21 }
22 22
23 std::string MojoAudioDecoder::GetDisplayName() const { 23 std::string MojoVideoDecoder::GetDisplayName() const {
24 return "MojoAudioDecoder"; 24 return "MojoVideoDecoder";
25 } 25 }
26 26
27 void MojoAudioDecoder::Initialize(const AudioDecoderConfig& config, 27 void MojoVideoDecoder::Initialize(const VideoDecoderConfig& config,
28 bool low_delay,
28 CdmContext* cdm_context, 29 CdmContext* cdm_context,
29 const InitCB& init_cb, 30 const InitCB& init_cb,
30 const OutputCB& output_cb) { 31 const OutputCB& output_cb) {
31 DVLOG(1) << __FUNCTION__; 32 DVLOG(1) << __FUNCTION__;
32 task_runner_ = base::ThreadTaskRunnerHandle::Get(); 33 task_runner_ = base::ThreadTaskRunnerHandle::Get();
33 34
34 NOTIMPLEMENTED(); 35 NOTIMPLEMENTED();
35 36
36 // Pretend to be able to decode anything. 37 // Pretend to be able to decode anything.
37 task_runner_->PostTask(FROM_HERE, base::Bind(init_cb, true)); 38 task_runner_->PostTask(FROM_HERE, base::Bind(init_cb, true));
38 } 39 }
39 40
40 void MojoAudioDecoder::Decode(const scoped_refptr<DecoderBuffer>& buffer, 41 void MojoVideoDecoder::Decode(const scoped_refptr<DecoderBuffer>& buffer,
41 const DecodeCB& decode_cb) { 42 const DecodeCB& decode_cb) {
42 DVLOG(3) << __FUNCTION__; 43 DVLOG(3) << __FUNCTION__;
43 NOTIMPLEMENTED(); 44 NOTIMPLEMENTED();
44 45
45 // Actually we can't decode anything. 46 // Actually we can't decode anything.
46 task_runner_->PostTask(FROM_HERE, base::Bind(decode_cb, kDecodeError)); 47 task_runner_->PostTask(FROM_HERE, base::Bind(decode_cb, kDecodeError));
47 } 48 }
48 49
49 void MojoAudioDecoder::Reset(const base::Closure& closure) { 50 void MojoVideoDecoder::Reset(const base::Closure& closure) {
50 DVLOG(2) << __FUNCTION__; 51 DVLOG(2) << __FUNCTION__;
51 NOTIMPLEMENTED(); 52 NOTIMPLEMENTED();
52 } 53 }
53 54
54 bool MojoAudioDecoder::NeedsBitstreamConversion() const { 55 bool MojoVideoDecoder::NeedsBitstreamConversion() const {
55 DVLOG(1) << __FUNCTION__; 56 DVLOG(1) << __FUNCTION__;
56 NOTIMPLEMENTED(); 57 NOTIMPLEMENTED();
57 return false; 58 return false;
58 } 59 }
59 60
61 bool MojoVideoDecoder::CanReadWithoutStalling() const {
62 DVLOG(1) << __FUNCTION__;
63 NOTIMPLEMENTED();
64 return true;
65 }
66
67 int MojoVideoDecoder::GetMaxDecodeRequests() const {
68 DVLOG(1) << __FUNCTION__;
69 NOTIMPLEMENTED();
70 return 1;
71 }
72
60 } // namespace media 73 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_video_decoder.h ('k') | media/renderers/default_renderer_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698