| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <deque> | 6 #include <deque> |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 void CreateDemuxer(const std::string& name) { | 60 void CreateDemuxer(const std::string& name) { |
| 61 CreateDemuxer(name, false); | 61 CreateDemuxer(name, false); |
| 62 } | 62 } |
| 63 | 63 |
| 64 void CreateDemuxer(const std::string& name, bool disable_file_size) { | 64 void CreateDemuxer(const std::string& name, bool disable_file_size) { |
| 65 CHECK(!demuxer_); | 65 CHECK(!demuxer_); |
| 66 | 66 |
| 67 EXPECT_CALL(host_, SetTotalBytes(_)).Times(AnyNumber()); | 67 EXPECT_CALL(host_, SetTotalBytes(_)).Times(AnyNumber()); |
| 68 EXPECT_CALL(host_, AddBufferedByteRange(_, _)).Times(AnyNumber()); | 68 EXPECT_CALL(host_, AddBufferedByteRange(_, _)).Times(AnyNumber()); |
| 69 EXPECT_CALL(host_, AddBufferedTimeRange(_, _)).Times(AnyNumber()); |
| 69 | 70 |
| 70 CreateDataSource(name, disable_file_size); | 71 CreateDataSource(name, disable_file_size); |
| 71 demuxer_ = new FFmpegDemuxer(&message_loop_, data_source_); | 72 demuxer_ = new FFmpegDemuxer(&message_loop_, data_source_); |
| 72 } | 73 } |
| 73 | 74 |
| 74 MOCK_METHOD1(CheckPoint, void(int v)); | 75 MOCK_METHOD1(CheckPoint, void(int v)); |
| 75 | 76 |
| 76 void InitializeDemuxer() { | 77 void InitializeDemuxer() { |
| 77 EXPECT_CALL(host_, SetDuration(_)); | 78 EXPECT_CALL(host_, SetDuration(_)); |
| 78 demuxer_->Initialize(&host_, NewExpectedStatusCB(PIPELINE_OK)); | 79 demuxer_->Initialize(&host_, NewExpectedStatusCB(PIPELINE_OK)); |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { | 774 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { |
| 774 CreateDemuxer("vorbis_audio_wmv_video.mkv"); | 775 CreateDemuxer("vorbis_audio_wmv_video.mkv"); |
| 775 InitializeDemuxer(); | 776 InitializeDemuxer(); |
| 776 | 777 |
| 777 // Ensure the expected streams are present. | 778 // Ensure the expected streams are present. |
| 778 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); | 779 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); |
| 779 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); | 780 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); |
| 780 } | 781 } |
| 781 | 782 |
| 782 } // namespace media | 783 } // namespace media |
| OLD | NEW |