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

Unified Diff: media/filters/ffmpeg_demuxer_unittest.cc

Issue 23072043: Change NeedKeyCB to use std::vector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix seek_tester, demuxer_bench, and player_x11 Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/ffmpeg_demuxer.cc ('k') | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer_unittest.cc
diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc
index 4fa2ab271fe83c1756b23fd68210366da72c0f9d..f5b0e978fe4174b04afd192695c863600fe18938 100644
--- a/media/filters/ffmpeg_demuxer_unittest.cc
+++ b/media/filters/ffmpeg_demuxer_unittest.cc
@@ -81,7 +81,7 @@ class FFmpegDemuxerTest : public testing::Test {
CreateDataSource(name);
- media::FFmpegNeedKeyCB need_key_cb =
+ Demuxer::NeedKeyCB need_key_cb =
base::Bind(&FFmpegDemuxerTest::NeedKeyCB, base::Unretained(this));
demuxer_.reset(new FFmpegDemuxer(message_loop_.message_loop_proxy(),
data_source_.get(),
@@ -136,8 +136,9 @@ class FFmpegDemuxerTest : public testing::Test {
MOCK_METHOD3(NeedKeyCBMock, void(const std::string& type,
const uint8* init_data, int init_data_size));
void NeedKeyCB(const std::string& type,
- scoped_ptr<uint8[]> init_data, int init_data_size) {
- NeedKeyCBMock(type, init_data.get(), init_data_size);
+ const std::vector<uint8>& init_data) {
+ const uint8* init_data_ptr = init_data.empty() ? NULL : &init_data[0];
+ NeedKeyCBMock(type, init_data_ptr, init_data.size());
}
// Accessor to demuxer internals.
« no previous file with comments | « media/filters/ffmpeg_demuxer.cc ('k') | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698