| 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> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 8 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 9 #include "media/base/timestamp_constants.h" | 11 #include "media/base/timestamp_constants.h" |
| 10 | 12 |
| 11 namespace media { | 13 namespace media { |
| 12 | 14 |
| 13 static scoped_refptr<StreamParserBuffer> CopyBuffer( | 15 static scoped_refptr<StreamParserBuffer> CopyBuffer( |
| 14 const StreamParserBuffer& buffer) { | 16 const StreamParserBuffer& buffer) { |
| 15 if (buffer.end_of_stream()) | 17 if (buffer.end_of_stream()) |
| 16 return StreamParserBuffer::CreateEOSBuffer(); | 18 return StreamParserBuffer::CreateEOSBuffer(); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 std::make_pair(kInfiniteDuration(), base::TimeDelta())); | 235 std::make_pair(kInfiniteDuration(), base::TimeDelta())); |
| 234 } | 236 } |
| 235 | 237 |
| 236 void StreamParserBuffer::set_timestamp(base::TimeDelta timestamp) { | 238 void StreamParserBuffer::set_timestamp(base::TimeDelta timestamp) { |
| 237 DecoderBuffer::set_timestamp(timestamp); | 239 DecoderBuffer::set_timestamp(timestamp); |
| 238 if (preroll_buffer_.get()) | 240 if (preroll_buffer_.get()) |
| 239 preroll_buffer_->set_timestamp(timestamp); | 241 preroll_buffer_->set_timestamp(timestamp); |
| 240 } | 242 } |
| 241 | 243 |
| 242 } // namespace media | 244 } // namespace media |
| OLD | NEW |