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

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 AFR. 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_callback.h" 9 #include "media/base/mock_callback.h"
10 #include "media/base/mock_demuxer_host.h" 10 #include "media/base/mock_demuxer_host.h"
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 ASSERT_TRUE(InitDemuxerWithEncryptionInfo( 777 ASSERT_TRUE(InitDemuxerWithEncryptionInfo(
778 has_audio, has_video, is_audio_encrypted, is_video_encrypted)); 778 has_audio, has_video, is_audio_encrypted, is_video_encrypted));
779 779
780 scoped_refptr<DemuxerStream> audio_stream = 780 scoped_refptr<DemuxerStream> audio_stream =
781 demuxer_->GetStream(DemuxerStream::AUDIO); 781 demuxer_->GetStream(DemuxerStream::AUDIO);
782 if (has_audio) { 782 if (has_audio) {
783 ASSERT_TRUE(audio_stream); 783 ASSERT_TRUE(audio_stream);
784 784
785 const AudioDecoderConfig& config = audio_stream->audio_decoder_config(); 785 const AudioDecoderConfig& config = audio_stream->audio_decoder_config();
786 EXPECT_EQ(kCodecVorbis, config.codec()); 786 EXPECT_EQ(kCodecVorbis, config.codec());
787 EXPECT_EQ(16, config.bits_per_channel()); 787 EXPECT_EQ(32, config.bits_per_channel());
788 EXPECT_EQ(CHANNEL_LAYOUT_STEREO, config.channel_layout()); 788 EXPECT_EQ(CHANNEL_LAYOUT_STEREO, config.channel_layout());
789 EXPECT_EQ(44100, config.samples_per_second()); 789 EXPECT_EQ(44100, config.samples_per_second());
790 EXPECT_TRUE(config.extra_data()); 790 EXPECT_TRUE(config.extra_data());
791 EXPECT_GT(config.extra_data_size(), 0u); 791 EXPECT_GT(config.extra_data_size(), 0u);
792 EXPECT_EQ(kSampleFormatFLTP, config.sample_format());
792 EXPECT_EQ(is_audio_encrypted, 793 EXPECT_EQ(is_audio_encrypted,
793 audio_stream->audio_decoder_config().is_encrypted()); 794 audio_stream->audio_decoder_config().is_encrypted());
794 } else { 795 } else {
795 EXPECT_FALSE(audio_stream); 796 EXPECT_FALSE(audio_stream);
796 } 797 }
797 798
798 scoped_refptr<DemuxerStream> video_stream = 799 scoped_refptr<DemuxerStream> video_stream =
799 demuxer_->GetStream(DemuxerStream::VIDEO); 800 demuxer_->GetStream(DemuxerStream::VIDEO);
800 if (has_video) { 801 if (has_video) {
801 EXPECT_TRUE(video_stream); 802 EXPECT_TRUE(video_stream);
(...skipping 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after
2428 2429
2429 scoped_ptr<Cluster> cluster_a(kDefaultFirstCluster()); 2430 scoped_ptr<Cluster> cluster_a(kDefaultFirstCluster());
2430 ASSERT_TRUE(AppendData(cluster_a->data(), cluster_a->size())); 2431 ASSERT_TRUE(AppendData(cluster_a->data(), cluster_a->size()));
2431 2432
2432 EXPECT_CALL(host_, SetDuration( 2433 EXPECT_CALL(host_, SetDuration(
2433 base::TimeDelta::FromMilliseconds(kDefaultFirstClusterEndTimestamp))); 2434 base::TimeDelta::FromMilliseconds(kDefaultFirstClusterEndTimestamp)));
2434 demuxer_->EndOfStream(PIPELINE_OK); 2435 demuxer_->EndOfStream(PIPELINE_OK);
2435 } 2436 }
2436 2437
2437 } // namespace media 2438 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698