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

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

Issue 743483002: Emit Media Source codec names as media_log events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the switces for android g++ Created 6 years, 1 month 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
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/filters/pipeline_integration_test.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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 base::Bind(&ChunkDemuxerTest::InitSegmentReceived, 166 base::Bind(&ChunkDemuxerTest::InitSegmentReceived,
167 base::Unretained(this)); 167 base::Unretained(this));
168 CreateNewDemuxer(); 168 CreateNewDemuxer();
169 } 169 }
170 170
171 void CreateNewDemuxer() { 171 void CreateNewDemuxer() {
172 base::Closure open_cb = 172 base::Closure open_cb =
173 base::Bind(&ChunkDemuxerTest::DemuxerOpened, base::Unretained(this)); 173 base::Bind(&ChunkDemuxerTest::DemuxerOpened, base::Unretained(this));
174 Demuxer::NeedKeyCB need_key_cb = 174 Demuxer::NeedKeyCB need_key_cb =
175 base::Bind(&ChunkDemuxerTest::DemuxerNeedKey, base::Unretained(this)); 175 base::Bind(&ChunkDemuxerTest::DemuxerNeedKey, base::Unretained(this));
176 demuxer_.reset( 176 demuxer_.reset(new ChunkDemuxer(open_cb, need_key_cb, base::Bind(&LogFunc),
177 new ChunkDemuxer(open_cb, need_key_cb, base::Bind(&LogFunc), true)); 177 scoped_refptr<MediaLog>(new MediaLog()),
178 true));
178 } 179 }
179 180
180 virtual ~ChunkDemuxerTest() { 181 virtual ~ChunkDemuxerTest() {
181 ShutdownDemuxer(); 182 ShutdownDemuxer();
182 } 183 }
183 184
184 void CreateInitSegment(int stream_flags, 185 void CreateInitSegment(int stream_flags,
185 bool is_audio_encrypted, 186 bool is_audio_encrypted,
186 bool is_video_encrypted, 187 bool is_video_encrypted,
187 scoped_ptr<uint8[]>* buffer, 188 scoped_ptr<uint8[]>* buffer,
(...skipping 3554 matching lines...) Expand 10 before | Expand all | Expand 10 after
3742 TEST_F(ChunkDemuxerTest, CuesBetweenClusters) { 3743 TEST_F(ChunkDemuxerTest, CuesBetweenClusters) {
3743 ASSERT_TRUE(InitDemuxer(HAS_AUDIO | HAS_VIDEO)); 3744 ASSERT_TRUE(InitDemuxer(HAS_AUDIO | HAS_VIDEO));
3744 3745
3745 AppendCluster(GenerateCluster(0, 0, 4)); 3746 AppendCluster(GenerateCluster(0, 0, 4));
3746 AppendData(kCuesHeader, sizeof(kCuesHeader)); 3747 AppendData(kCuesHeader, sizeof(kCuesHeader));
3747 AppendCluster(GenerateCluster(46, 66, 5)); 3748 AppendCluster(GenerateCluster(46, 66, 5));
3748 CheckExpectedRanges(kSourceId, "{ [0,115) }"); 3749 CheckExpectedRanges(kSourceId, "{ [0,115) }");
3749 } 3750 }
3750 3751
3751 } // namespace media 3752 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698