Skip to content

Commit

Permalink
fix: PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
lee.fordyce committed May 13, 2024
1 parent 921a7a7 commit b38aa61
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions packager/live_packager_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,7 @@ TEST_F(LivePackagerBaseTest, EditListAfterRepackage) {
ASSERT_TRUE(GetBox(init_seg, exp_moov));
media::mp4::Movie act_moov;
ASSERT_TRUE(GetBox(actual_buf, act_moov));
ASSERT_EQ(exp_moov.extends.header, act_moov.extends.header);

ASSERT_EQ(exp_moov.tracks.size(), act_moov.tracks.size());
for (size_t i(0); i < exp_moov.tracks.size(); ++i) {
Expand All @@ -902,33 +903,6 @@ TEST_F(LivePackagerBaseTest, EditListAfterRepackage) {
}
}

TEST_F(LivePackagerBaseTest, MehdBoxIncluded) {
std::vector<uint8_t> init_segment_buffer =
ReadTestDataFile("encrypted/prd_data/init.mp4");
ASSERT_FALSE(init_segment_buffer.empty());

LiveConfig live_config;
live_config.format = LiveConfig::OutputFormat::FMP4;
live_config.track_type = LiveConfig::TrackType::VIDEO;
live_config.protection_scheme = LiveConfig::EncryptionScheme::CENC;
live_config.decryption_key = HexStringToVector(kKeyHex);
live_config.decryption_key_id = HexStringToVector(kKeyIdHex);
SetupLivePackagerConfig(live_config);

SegmentData init_seg(init_segment_buffer.data(), init_segment_buffer.size());
SegmentBuffer actual_buf;
const auto status = live_packager_->PackageInit(init_seg, actual_buf);
ASSERT_EQ(Status::OK, status);
ASSERT_GT(actual_buf.Size(), 0);

media::mp4::Movie exp_moov;
ASSERT_TRUE(GetBox(init_seg, exp_moov));
media::mp4::Movie act_moov;
ASSERT_TRUE(GetBox(actual_buf, act_moov));

ASSERT_EQ(exp_moov.extends.header, act_moov.extends.header);
}

TEST_F(LivePackagerBaseTest, EncryptionFailure) {
std::vector<uint8_t> init_segment_buffer = ReadTestDataFile("input/init.mp4");
ASSERT_FALSE(init_segment_buffer.empty());
Expand Down

0 comments on commit b38aa61

Please sign in to comment.