OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |