| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 event.RunAndWaitForStatus(DEMUXER_ERROR_COULD_NOT_OPEN); | 285 event.RunAndWaitForStatus(DEMUXER_ERROR_COULD_NOT_OPEN); |
| 286 } | 286 } |
| 287 | 287 |
| 288 // TODO(acolwell): Uncomment this test when we discover a file that passes | 288 // TODO(acolwell): Uncomment this test when we discover a file that passes |
| 289 // avformat_open_input(), but has avformat_find_stream_info() fail. | 289 // avformat_open_input(), but has avformat_find_stream_info() fail. |
| 290 // | 290 // |
| 291 //TEST_F(FFmpegDemuxerTest, Initialize_ParseFails) { | 291 //TEST_F(FFmpegDemuxerTest, Initialize_ParseFails) { |
| 292 // ("find_stream_info_fail.webm"); | 292 // ("find_stream_info_fail.webm"); |
| 293 // demuxer_->Initialize( | 293 // demuxer_->Initialize( |
| 294 // &host_, NewExpectedStatusCB(DEMUXER_ERROR_COULD_NOT_PARSE)); | 294 // &host_, NewExpectedStatusCB(DEMUXER_ERROR_COULD_NOT_PARSE)); |
| 295 // message_loop_.RunUntilIdle(); | 295 // base::RunLoop().RunUntilIdle(); |
| 296 //} | 296 //} |
| 297 | 297 |
| 298 TEST_F(FFmpegDemuxerTest, Initialize_NoStreams) { | 298 TEST_F(FFmpegDemuxerTest, Initialize_NoStreams) { |
| 299 // Open a file with no streams whatsoever. | 299 // Open a file with no streams whatsoever. |
| 300 CreateDemuxer("no_streams.webm"); | 300 CreateDemuxer("no_streams.webm"); |
| 301 WaitableMessageLoopEvent event; | 301 WaitableMessageLoopEvent event; |
| 302 demuxer_->Initialize(&host_, event.GetPipelineStatusCB(), true); | 302 demuxer_->Initialize(&host_, event.GetPipelineStatusCB(), true); |
| 303 event.RunAndWaitForStatus(DEMUXER_ERROR_NO_SUPPORTED_STREAMS); | 303 event.RunAndWaitForStatus(DEMUXER_ERROR_NO_SUPPORTED_STREAMS); |
| 304 } | 304 } |
| 305 | 305 |
| (...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1390 | 1390 |
| 1391 const MediaTrack& audio_track = *(media_tracks_->tracks()[1]); | 1391 const MediaTrack& audio_track = *(media_tracks_->tracks()[1]); |
| 1392 EXPECT_EQ(audio_track.type(), MediaTrack::Audio); | 1392 EXPECT_EQ(audio_track.type(), MediaTrack::Audio); |
| 1393 EXPECT_EQ(audio_track.bytestream_track_id(), 2); | 1393 EXPECT_EQ(audio_track.bytestream_track_id(), 2); |
| 1394 EXPECT_EQ(audio_track.kind(), "main"); | 1394 EXPECT_EQ(audio_track.kind(), "main"); |
| 1395 EXPECT_EQ(audio_track.label(), ""); | 1395 EXPECT_EQ(audio_track.label(), ""); |
| 1396 EXPECT_EQ(audio_track.language(), ""); | 1396 EXPECT_EQ(audio_track.language(), ""); |
| 1397 } | 1397 } |
| 1398 | 1398 |
| 1399 } // namespace media | 1399 } // namespace media |
| OLD | NEW |