| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/callback.h" | 5 #include "base/callback.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/stl_util-inl.h" | 9 #include "base/stl_util-inl.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 | 53 |
| 54 // | 54 // |
| 55 // FFmpegDemuxerStream | 55 // FFmpegDemuxerStream |
| 56 // | 56 // |
| 57 FFmpegDemuxerStream::FFmpegDemuxerStream(FFmpegDemuxer* demuxer, | 57 FFmpegDemuxerStream::FFmpegDemuxerStream(FFmpegDemuxer* demuxer, |
| 58 AVStream* stream) | 58 AVStream* stream) |
| 59 : demuxer_(demuxer), | 59 : demuxer_(demuxer), |
| 60 stream_(stream), | 60 stream_(stream), |
| 61 type_(UNKNOWN), | 61 type_(UNKNOWN), |
| 62 discontinuous_(false), |
| 62 stopped_(false) { | 63 stopped_(false) { |
| 63 DCHECK(demuxer_); | 64 DCHECK(demuxer_); |
| 64 | 65 |
| 65 // Determine our media format. | 66 // Determine our media format. |
| 66 switch (stream->codec->codec_type) { | 67 switch (stream->codec->codec_type) { |
| 67 case CODEC_TYPE_AUDIO: | 68 case CODEC_TYPE_AUDIO: |
| 68 type_ = AUDIO; | 69 type_ = AUDIO; |
| 69 break; | 70 break; |
| 70 case CODEC_TYPE_VIDEO: | 71 case CODEC_TYPE_VIDEO: |
| 71 type_ = VIDEO; | 72 type_ = VIDEO; |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 read_event_.Wait(); | 701 read_event_.Wait(); |
| 701 return last_read_bytes_; | 702 return last_read_bytes_; |
| 702 } | 703 } |
| 703 | 704 |
| 704 void FFmpegDemuxer::SignalReadCompleted(size_t size) { | 705 void FFmpegDemuxer::SignalReadCompleted(size_t size) { |
| 705 last_read_bytes_ = size; | 706 last_read_bytes_ = size; |
| 706 read_event_.Signal(); | 707 read_event_.Signal(); |
| 707 } | 708 } |
| 708 | 709 |
| 709 } // namespace media | 710 } // namespace media |
| OLD | NEW |