Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Side by Side Diff: media/filters/chunk_demuxer_unittest.cc

Issue 11280301: Roll FFMpeg for M26. Fix ffmpeg float audio decoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix DCHECK. Roll DEPS for fix. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "media/base/audio_decoder_config.h" 7 #include "media/base/audio_decoder_config.h"
8 #include "media/base/decoder_buffer.h" 8 #include "media/base/decoder_buffer.h"
9 #include "media/base/mock_demuxer_host.h" 9 #include "media/base/mock_demuxer_host.h"
10 #include "media/base/test_data_util.h" 10 #include "media/base/test_data_util.h"
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 ASSERT_TRUE(InitDemuxerWithEncryptionInfo( 776 ASSERT_TRUE(InitDemuxerWithEncryptionInfo(
777 has_audio, has_video, is_audio_encrypted, is_video_encrypted)); 777 has_audio, has_video, is_audio_encrypted, is_video_encrypted));
778 778
779 scoped_refptr<DemuxerStream> audio_stream = 779 scoped_refptr<DemuxerStream> audio_stream =
780 demuxer_->GetStream(DemuxerStream::AUDIO); 780 demuxer_->GetStream(DemuxerStream::AUDIO);
781 if (has_audio) { 781 if (has_audio) {
782 ASSERT_TRUE(audio_stream); 782 ASSERT_TRUE(audio_stream);
783 783
784 const AudioDecoderConfig& config = audio_stream->audio_decoder_config(); 784 const AudioDecoderConfig& config = audio_stream->audio_decoder_config();
785 EXPECT_EQ(kCodecVorbis, config.codec()); 785 EXPECT_EQ(kCodecVorbis, config.codec());
786 EXPECT_EQ(16, config.bits_per_channel()); 786 EXPECT_EQ(32, config.bits_per_channel());
787 EXPECT_EQ(CHANNEL_LAYOUT_STEREO, config.channel_layout()); 787 EXPECT_EQ(CHANNEL_LAYOUT_STEREO, config.channel_layout());
788 EXPECT_EQ(44100, config.samples_per_second()); 788 EXPECT_EQ(44100, config.samples_per_second());
789 EXPECT_TRUE(config.extra_data()); 789 EXPECT_TRUE(config.extra_data());
790 EXPECT_GT(config.extra_data_size(), 0u); 790 EXPECT_GT(config.extra_data_size(), 0u);
791 EXPECT_EQ(kSampleFormatPlanarF32, config.sample_format());
791 EXPECT_EQ(is_audio_encrypted, 792 EXPECT_EQ(is_audio_encrypted,
792 audio_stream->audio_decoder_config().is_encrypted()); 793 audio_stream->audio_decoder_config().is_encrypted());
793 } else { 794 } else {
794 EXPECT_FALSE(audio_stream); 795 EXPECT_FALSE(audio_stream);
795 } 796 }
796 797
797 scoped_refptr<DemuxerStream> video_stream = 798 scoped_refptr<DemuxerStream> video_stream =
798 demuxer_->GetStream(DemuxerStream::VIDEO); 799 demuxer_->GetStream(DemuxerStream::VIDEO);
799 if (has_video) { 800 if (has_video) {
800 EXPECT_TRUE(video_stream); 801 EXPECT_TRUE(video_stream);
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
2487 scoped_ptr<Cluster> cluster_a(kDefaultFirstCluster()); 2488 scoped_ptr<Cluster> cluster_a(kDefaultFirstCluster());
2488 ASSERT_TRUE(AppendData(cluster_a->data(), cluster_a->size())); 2489 ASSERT_TRUE(AppendData(cluster_a->data(), cluster_a->size()));
2489 demuxer_->EndOfStream(PIPELINE_OK); 2490 demuxer_->EndOfStream(PIPELINE_OK);
2490 2491
2491 scoped_ptr<Cluster> cluster_b(kDefaultSecondCluster()); 2492 scoped_ptr<Cluster> cluster_b(kDefaultSecondCluster());
2492 ASSERT_TRUE(AppendData(cluster_b->data(), cluster_b->size())); 2493 ASSERT_TRUE(AppendData(cluster_b->data(), cluster_b->size()));
2493 demuxer_->EndOfStream(PIPELINE_OK); 2494 demuxer_->EndOfStream(PIPELINE_OK);
2494 } 2495 }
2495 2496
2496 } // namespace media 2497 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698