OLD | NEW |
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/base/stream_parser_buffer.h" | 5 #include "media/base/stream_parser_buffer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 const char* StreamParserBuffer::GetTypeName() const { | 128 const char* StreamParserBuffer::GetTypeName() const { |
129 switch (type()) { | 129 switch (type()) { |
130 case DemuxerStream::AUDIO: | 130 case DemuxerStream::AUDIO: |
131 return "audio"; | 131 return "audio"; |
132 case DemuxerStream::VIDEO: | 132 case DemuxerStream::VIDEO: |
133 return "video"; | 133 return "video"; |
134 case DemuxerStream::TEXT: | 134 case DemuxerStream::TEXT: |
135 return "text"; | 135 return "text"; |
136 case DemuxerStream::UNKNOWN: | 136 case DemuxerStream::UNKNOWN: |
137 return "unknown"; | 137 return "unknown"; |
| 138 case DemuxerStream::URL: |
138 case DemuxerStream::NUM_TYPES: | 139 case DemuxerStream::NUM_TYPES: |
139 // Fall-through to NOTREACHED(). | 140 // Fall-through to NOTREACHED(). |
140 break; | 141 break; |
141 } | 142 } |
142 NOTREACHED(); | 143 NOTREACHED(); |
143 return ""; | 144 return ""; |
144 } | 145 } |
145 | 146 |
146 void StreamParserBuffer::ConvertToSpliceBuffer( | 147 void StreamParserBuffer::ConvertToSpliceBuffer( |
147 const BufferQueue& pre_splice_buffers) { | 148 const BufferQueue& pre_splice_buffers) { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 std::make_pair(kInfiniteDuration(), base::TimeDelta())); | 236 std::make_pair(kInfiniteDuration(), base::TimeDelta())); |
236 } | 237 } |
237 | 238 |
238 void StreamParserBuffer::set_timestamp(base::TimeDelta timestamp) { | 239 void StreamParserBuffer::set_timestamp(base::TimeDelta timestamp) { |
239 DecoderBuffer::set_timestamp(timestamp); | 240 DecoderBuffer::set_timestamp(timestamp); |
240 if (preroll_buffer_.get()) | 241 if (preroll_buffer_.get()) |
241 preroll_buffer_->set_timestamp(timestamp); | 242 preroll_buffer_->set_timestamp(timestamp); |
242 } | 243 } |
243 | 244 |
244 } // namespace media | 245 } // namespace media |
OLD | NEW |