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 size_t MojoDemuxerStreamAdapter::GetMemoryLimit() const { |
| 70 // TODO: Implement getting/setting memory limits for demuxer streams in Mojo. |
| 71 NOTIMPLEMENTED(); |
| 72 return 0; |
| 73 } |
| 74 |
| 75 void MojoDemuxerStreamAdapter::SetMemoryLimit(size_t memory_limit) { |
| 76 // TODO: Implement getting/setting memory limits for demuxer streams in Mojo. |
| 77 NOTIMPLEMENTED(); |
| 78 } |
| 79 |
69 // TODO(xhwang): Pass liveness here. | 80 // TODO(xhwang): Pass liveness here. |
70 void MojoDemuxerStreamAdapter::OnStreamReady( | 81 void MojoDemuxerStreamAdapter::OnStreamReady( |
71 mojo::DemuxerStream::Type type, | 82 mojo::DemuxerStream::Type type, |
72 mojo::ScopedDataPipeConsumerHandle pipe, | 83 mojo::ScopedDataPipeConsumerHandle pipe, |
73 mojo::AudioDecoderConfigPtr audio_config, | 84 mojo::AudioDecoderConfigPtr audio_config, |
74 mojo::VideoDecoderConfigPtr video_config) { | 85 mojo::VideoDecoderConfigPtr video_config) { |
75 DVLOG(1) << __FUNCTION__; | 86 DVLOG(1) << __FUNCTION__; |
76 DCHECK(pipe.is_valid()); | 87 DCHECK(pipe.is_valid()); |
77 DCHECK_EQ(DemuxerStream::UNKNOWN, type_); | 88 DCHECK_EQ(DemuxerStream::UNKNOWN, type_); |
78 | 89 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 case DemuxerStream::VIDEO: | 146 case DemuxerStream::VIDEO: |
136 DCHECK(video_config && !audio_config); | 147 DCHECK(video_config && !audio_config); |
137 video_config_ = video_config.To<VideoDecoderConfig>(); | 148 video_config_ = video_config.To<VideoDecoderConfig>(); |
138 break; | 149 break; |
139 default: | 150 default: |
140 NOTREACHED(); | 151 NOTREACHED(); |
141 } | 152 } |
142 } | 153 } |
143 | 154 |
144 } // namespace media | 155 } // namespace media |
OLD | NEW |