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

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

Issue 11088047: Support encrypted audio stream in demuxer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 months 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
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <deque> 5 #include <deque>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "media/base/decoder_buffer.h" 10 #include "media/base/decoder_buffer.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 // Push in an EOS buffer. 56 // Push in an EOS buffer.
57 encoded_audio_.push_back(DecoderBuffer::CreateEOSBuffer()); 57 encoded_audio_.push_back(DecoderBuffer::CreateEOSBuffer());
58 58
59 config_.Initialize(kCodecVorbis, 59 config_.Initialize(kCodecVorbis,
60 16, 60 16,
61 CHANNEL_LAYOUT_STEREO, 61 CHANNEL_LAYOUT_STEREO,
62 44100, 62 44100,
63 vorbis_extradata_->GetData(), 63 vorbis_extradata_->GetData(),
64 vorbis_extradata_->GetDataSize(), 64 vorbis_extradata_->GetDataSize(),
65 false, // Not encrypted.
65 true); 66 true);
66 } 67 }
67 68
68 virtual ~FFmpegAudioDecoderTest() {} 69 virtual ~FFmpegAudioDecoderTest() {}
69 70
70 void Initialize() { 71 void Initialize() {
71 EXPECT_CALL(*demuxer_, audio_decoder_config()) 72 EXPECT_CALL(*demuxer_, audio_decoder_config())
72 .WillRepeatedly(ReturnRef(config_)); 73 .WillRepeatedly(ReturnRef(config_));
73 74
74 decoder_->Initialize(demuxer_, 75 decoder_->Initialize(demuxer_,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 172
172 EXPECT_CALL(*demuxer_, Read(_)) 173 EXPECT_CALL(*demuxer_, Read(_))
173 .WillOnce(InvokeReadPacket(this)); 174 .WillOnce(InvokeReadPacket(this));
174 Read(); 175 Read();
175 176
176 EXPECT_EQ(decoded_audio_.size(), 1u); 177 EXPECT_EQ(decoded_audio_.size(), 1u);
177 EXPECT_TRUE(decoded_audio_[0].get() == NULL); 178 EXPECT_TRUE(decoded_audio_[0].get() == NULL);
178 } 179 }
179 180
180 } // namespace media 181 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698