OLD | NEW |
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 "media/mojo/services/mojo_demuxer_stream_adapter.h" | 5 #include "media/mojo/services/mojo_demuxer_stream_adapter.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "media/base/decoder_buffer.h" | 9 #include "media/base/decoder_buffer.h" |
10 #include "media/mojo/services/media_type_converters.h" | 10 #include "media/mojo/services/media_type_converters.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 bool MojoDemuxerStreamAdapter::SupportsConfigChanges() { | 60 bool MojoDemuxerStreamAdapter::SupportsConfigChanges() { |
61 return true; | 61 return true; |
62 } | 62 } |
63 | 63 |
64 VideoRotation MojoDemuxerStreamAdapter::video_rotation() { | 64 VideoRotation MojoDemuxerStreamAdapter::video_rotation() { |
65 NOTIMPLEMENTED(); | 65 NOTIMPLEMENTED(); |
66 return VIDEO_ROTATION_0; | 66 return VIDEO_ROTATION_0; |
67 } | 67 } |
68 | 68 |
| 69 int MojoDemuxerStreamAdapter::GetMemoryLimit() const { |
| 70 NOTIMPLEMENTED(); |
| 71 return 0; |
| 72 } |
| 73 |
| 74 void MojoDemuxerStreamAdapter::SetMemoryLimit(int memory_limit) { |
| 75 NOTIMPLEMENTED(); |
| 76 } |
| 77 |
69 // TODO(xhwang): Pass liveness here. | 78 // TODO(xhwang): Pass liveness here. |
70 void MojoDemuxerStreamAdapter::OnStreamReady( | 79 void MojoDemuxerStreamAdapter::OnStreamReady( |
71 mojo::DemuxerStream::Type type, | 80 mojo::DemuxerStream::Type type, |
72 mojo::ScopedDataPipeConsumerHandle pipe, | 81 mojo::ScopedDataPipeConsumerHandle pipe, |
73 mojo::AudioDecoderConfigPtr audio_config, | 82 mojo::AudioDecoderConfigPtr audio_config, |
74 mojo::VideoDecoderConfigPtr video_config) { | 83 mojo::VideoDecoderConfigPtr video_config) { |
75 DVLOG(1) << __FUNCTION__; | 84 DVLOG(1) << __FUNCTION__; |
76 DCHECK(pipe.is_valid()); | 85 DCHECK(pipe.is_valid()); |
77 DCHECK_EQ(DemuxerStream::UNKNOWN, type_); | 86 DCHECK_EQ(DemuxerStream::UNKNOWN, type_); |
78 | 87 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 case DemuxerStream::VIDEO: | 144 case DemuxerStream::VIDEO: |
136 DCHECK(video_config && !audio_config); | 145 DCHECK(video_config && !audio_config); |
137 video_config_ = video_config.To<VideoDecoderConfig>(); | 146 video_config_ = video_config.To<VideoDecoderConfig>(); |
138 break; | 147 break; |
139 default: | 148 default: |
140 NOTREACHED(); | 149 NOTREACHED(); |
141 } | 150 } |
142 } | 151 } |
143 | 152 |
144 } // namespace media | 153 } // namespace media |
OLD | NEW |