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

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

Issue 610733002: Rename kWebMEncryptInitDataType to kWebMInitDataType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add back webm_crypto_helpers.h changes. Created 6 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
« no previous file with comments | « no previous file | media/filters/ffmpeg_demuxer.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 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 if ((!has_audio && is_audio_encrypted) || 1214 if ((!has_audio && is_audio_encrypted) ||
1215 (!has_video && is_video_encrypted)) { 1215 (!has_video && is_video_encrypted)) {
1216 continue; 1216 continue;
1217 } 1217 }
1218 1218
1219 CreateNewDemuxer(); 1219 CreateNewDemuxer();
1220 1220
1221 if (is_audio_encrypted || is_video_encrypted) { 1221 if (is_audio_encrypted || is_video_encrypted) {
1222 int need_key_count = (is_audio_encrypted ? 1 : 0) + 1222 int need_key_count = (is_audio_encrypted ? 1 : 0) +
1223 (is_video_encrypted ? 1 : 0); 1223 (is_video_encrypted ? 1 : 0);
1224 EXPECT_CALL(*this, NeedKeyMock(kWebMEncryptInitDataType, NotNull(), 1224 EXPECT_CALL(*this, NeedKeyMock(kWebMInitDataType, NotNull(),
1225 DecryptConfig::kDecryptionKeySize)) 1225 DecryptConfig::kDecryptionKeySize))
1226 .Times(Exactly(need_key_count)); 1226 .Times(Exactly(need_key_count));
1227 } 1227 }
1228 1228
1229 int stream_flags = 0; 1229 int stream_flags = 0;
1230 if (has_audio) 1230 if (has_audio)
1231 stream_flags |= HAS_AUDIO; 1231 stream_flags |= HAS_AUDIO;
1232 1232
1233 if (has_video) 1233 if (has_video)
1234 stream_flags |= HAS_VIDEO; 1234 stream_flags |= HAS_VIDEO;
(...skipping 2504 matching lines...) Expand 10 before | Expand all | Expand 10 after
3739 TEST_F(ChunkDemuxerTest, CuesBetweenClusters) { 3739 TEST_F(ChunkDemuxerTest, CuesBetweenClusters) {
3740 ASSERT_TRUE(InitDemuxer(HAS_AUDIO | HAS_VIDEO)); 3740 ASSERT_TRUE(InitDemuxer(HAS_AUDIO | HAS_VIDEO));
3741 3741
3742 AppendCluster(GenerateCluster(0, 0, 4)); 3742 AppendCluster(GenerateCluster(0, 0, 4));
3743 AppendData(kCuesHeader, sizeof(kCuesHeader)); 3743 AppendData(kCuesHeader, sizeof(kCuesHeader));
3744 AppendCluster(GenerateCluster(46, 66, 5)); 3744 AppendCluster(GenerateCluster(46, 66, 5));
3745 CheckExpectedRanges(kSourceId, "{ [0,115) }"); 3745 CheckExpectedRanges(kSourceId, "{ [0,115) }");
3746 } 3746 }
3747 3747
3748 } // namespace media 3748 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698