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

Side by Side Diff: media/formats/mp2t/mp2t_stream_parser_unittest.cc

Issue 2783703002: Declare intent to use sample-aes later in the stream. (Closed)
Patch Set: tweak needed for flush Created 3 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 | « media/formats/mp2t/mp2t_stream_parser.cc ('k') | media/formats/mp2t/ts_section_cat.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "media/formats/mp2t/mp2t_stream_parser.h" 5 #include "media/formats/mp2t/mp2t_stream_parser.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 } 497 }
498 audio_encryption_scheme = current_audio_config_.encryption_scheme(); 498 audio_encryption_scheme = current_audio_config_.encryption_scheme();
499 EXPECT_FALSE(audio_encryption_scheme.is_encrypted()); 499 EXPECT_FALSE(audio_encryption_scheme.is_encrypted());
500 for (size_t i = 0; i + 1 < audio_buffer_capture_.size(); i++) { 500 for (size_t i = 0; i + 1 < audio_buffer_capture_.size(); i++) {
501 const auto& buffer = audio_buffer_capture_[i]; 501 const auto& buffer = audio_buffer_capture_[i];
502 std::string unencrypted_audio_buffer( 502 std::string unencrypted_audio_buffer(
503 reinterpret_cast<const char*>(buffer->data()), buffer->data_size()); 503 reinterpret_cast<const char*>(buffer->data()), buffer->data_size());
504 EXPECT_EQ(decrypted_audio_buffers[i], unencrypted_audio_buffer); 504 EXPECT_EQ(decrypted_audio_buffers[i], unencrypted_audio_buffer);
505 } 505 }
506 } 506 }
507
508 TEST_F(Mp2tStreamParserTest, PrepareForHLSSampleAES) {
509 InitializeParser();
510 ParseMpeg2TsFile("bear-1280x720-hls-with-CAT.bin", 2048);
511 parser_->Flush();
512 EncryptionScheme video_encryption_scheme =
513 current_video_config_.encryption_scheme();
514 EXPECT_TRUE(video_encryption_scheme.is_encrypted());
515 EncryptionScheme audio_encryption_scheme =
516 current_audio_config_.encryption_scheme();
517 EXPECT_TRUE(audio_encryption_scheme.is_encrypted());
518 }
519
507 #endif 520 #endif
508 521
509 } // namespace mp2t 522 } // namespace mp2t
510 } // namespace media 523 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/mp2t/mp2t_stream_parser.cc ('k') | media/formats/mp2t/ts_section_cat.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698