OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/string_util.h" | 5 #include "base/string_util.h" |
6 #include "base/time.h" | 6 #include "base/time.h" |
7 #include "media/base/filter_host.h" | 7 #include "media/base/filter_host.h" |
8 #include "media/filters/ffmpeg_common.h" | 8 #include "media/filters/ffmpeg_common.h" |
9 #include "media/filters/ffmpeg_demuxer.h" | 9 #include "media/filters/ffmpeg_demuxer.h" |
10 #include "media/filters/ffmpeg_glue.h" | 10 #include "media/filters/ffmpeg_glue.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 DCHECK(packet); | 22 DCHECK(packet); |
23 SetTimestamp(timestamp); | 23 SetTimestamp(timestamp); |
24 SetDuration(duration); | 24 SetDuration(duration); |
25 } | 25 } |
26 | 26 |
27 virtual ~AVPacketBuffer() { | 27 virtual ~AVPacketBuffer() { |
28 av_free_packet(packet_.get()); | 28 av_free_packet(packet_.get()); |
29 } | 29 } |
30 | 30 |
31 // Buffer implementation. | 31 // Buffer implementation. |
32 virtual const char* GetData() const { | 32 virtual const uint8* GetData() const { |
33 return reinterpret_cast<const char*>(packet_->data); | 33 return reinterpret_cast<const uint8*>(packet_->data); |
34 } | 34 } |
35 | 35 |
36 virtual size_t GetDataSize() const { | 36 virtual size_t GetDataSize() const { |
37 return static_cast<size_t>(packet_->size); | 37 return static_cast<size_t>(packet_->size); |
38 } | 38 } |
39 | 39 |
40 private: | 40 private: |
41 scoped_ptr<AVPacket> packet_; | 41 scoped_ptr<AVPacket> packet_; |
42 | 42 |
43 DISALLOW_COPY_AND_ASSIGN(AVPacketBuffer); | 43 DISALLOW_COPY_AND_ASSIGN(AVPacketBuffer); |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 StreamVector::iterator iter; | 272 StreamVector::iterator iter; |
273 for (iter = streams_.begin(); iter != streams_.end(); ++iter) { | 273 for (iter = streams_.begin(); iter != streams_.end(); ++iter) { |
274 if ((*iter)->HasPendingReads()) { | 274 if ((*iter)->HasPendingReads()) { |
275 return true; | 275 return true; |
276 } | 276 } |
277 } | 277 } |
278 return false; | 278 return false; |
279 } | 279 } |
280 | 280 |
281 } // namespace media | 281 } // namespace media |
OLD | NEW |