Uses EXPECT_NEAR for comparison with an acceptable error bound. Also
increases error bound to 50ms.
Change-Id: I8fc61b3b915a50f8fe33b9ea72e123aefee25a80
- Neither live with or without key rotation did not output the right
result.
- No key rotation: did not produce any ContentProtection element.
- With key rotation: did not have DRM specific ContentProtection.
- To get key rotation working with shaka player, <cenc:pssh> elements
are removed.
Change-Id: I1f34d303ae1f3ea81820e3368ab66b8420498372
- Added --iv to inject iv for fixed key encryption.
- Added support for key rotation in fixed key encryption.
- Added --use_fake_clock_for_muxer to set timestamp to 0 in the output.
Also updates stream info dump message:
- Modified pixel_width: %d\n pixel_height: %d to pixel aspect ratio: %d:%d
- Removed language from video stream info.
These flags should only be used for testing.
Change-Id: Iedf8d6d6492226219f49fe44d932645f557010e4
- ContentProtection elements were missing when using MpdWriter,
therefore mpd_generator also did not generate ContentProtection.
- MpdWriter uses MpdNotifier now, instead of directly using MpdBuiler.
- Add mock_mpd_notifier.{h,cc} to be shared by several tests.
Change-Id: Id0f6213aa0c80e50294cd4193962054b0b5c2492
Cropping is necessary if width/height are not exactly disivible by 16 due
to 16x16 macroblock size.
The width and height fields in VisualSampleEntry must correctly document
the cropped frame dimentions (visual presentation size) of the AVC stream
that is described by that entry.
Also fixes width/height in input mp4 and wvm streams if the values in
VisualSampleEntry / metadata do not match with the values in
AVCDecoderConfigurationRecord (SPS).
Issue: 39
Change-Id: Id55c5acf245bee3f4e66302b2042eb7d9c488c19
- Because MpdBuilder no longer sets ContentProtection, live was broken.
- For key-rotation, <cenc:pssh> element is updated.
Change-Id: I45bb80a12faff39ccf5deb82439c0732ed9cea59
- Without the Flush() method the implementation had to do writes in
almost all methods. Usually the user of the notifier knows when to
write out the MPD.
Change-Id: Ic165d4594f01357a8ac7e8501eefa0f85c08d32f
- SimpleMpdNotifier didn't register the container ID to its map for VOD.
- AddContentProtection() was not implemented.
Change-Id: I5f1412c785ee5ad3d00910755ff283c404dd895c
Quotient reduction to minimal form does not work well in practice due to
rounding of the inputs.
Bug: 23432995
Change-Id: If333ab48accb7f6a3fac6ba4eb48ca7b9cee9826
This fixes a circular dependency of media_base depends on filter and
filter depends on media_base.
Also added code to extract sar in WvmMediaParser if it is not yet
extracted when setting extra_data.
Change-Id: I1b5aef2444e4134c9b6663911ac5e5c4c220404a
- subSegmentAlignment logic assumed that all Representations were
added before calling Representations::AddNewSegment() on any
Representation in an AdaptationSet. It is not a valid assumption
for VOD and is removed.
Change-Id: Ifb7e34ee103ee30027e45a804427baf281f3137c
- Width/Height in tkhd box should be display resolution instead of
coded resolution.
- pasp was not generated earlier.
- Assuming SAR as 1:1 if it failed to be extracted successfully.
- Also update test files for mp4_media_parser_unittest.
This fixes Issue #35.
Change-Id: Iedbe6a44465aac6723b6ea2de30aed180821eccd
- Call NotifyNewSegment() in MpdNotifyMuxerListener::OnMediaEnd() to
notify subsegments.
- This is necessary for MpdBuilder to calculate subsegmentAlignment.
Change-Id: I9359c408da4f616e543a6d9e568b010a90c90185
The segment duration was not reset after segment was finalized. It
was reset after adding one sample. This new sample was added to the
new fragment but was not recorded in the new segment, which resulted
in off-by-one error in the segment generation.
Change-Id: I1f9e00591be6b897773bf6caf94409b4bcd2277f
- Saves sample_duration in the media_info protobuf.
- When MpdNotifyMuxerListener::OnMediaEnd() is called, media_info passed
to MpdNotifier::NotifyNewContainer() should contain the sample
duration.
- Add tests for MpdNotifyMuxerListener.
- Moved common code from vod_media_info_dump_muxer_listener_unittest.cc
and mpd_notify_muxer_listener_unittest.cc to
muxer_listener_test_helper.cc.
Change-Id: Ibf2340076d45828d26f1af54a1ed8e95e5884c23
- AdaptationSet::OnNewSegmentForRepresentation() calculates whether the
Representations are aligned by looking at the start time and duration.
(Except that duration is not used in this implementation).
- Add RepresentationStateChangeListener to callback
AdaptationSet::OnNewSegmentForRepresentation() from Representation.
Change-Id: I3c30bd6652880dabb9d5c619d8a733ffc789eec9
- The tests couldn't run in parallel using gtest-parallel
(https://github.com/google/gtest-parallel) because all the tests
used the same file.
Change-Id: I9a3d2c20c290fbf4bee2a1d79c4ce9bf802aefcf
- ContentProtection elements should be added explicitly by the
AddContentProtection() methods.
- This is because some MPDs should have ContentProtection at
AdaptationSet level instead of Representation.
- Change SimpleMpdNotifier, which uses MpdBuilder, to add
ContentProtectionElements. The logic is moved from MuxerListener.
- Add Element class for specifying subelements for
ContentProtectionElement.
Change-Id: I9bedfb3e5a5ac0b3d5c702f1e6e4a8608c978d1d
- The UUID and DRM name can be fetched from KeySource.
- Add ProtectedContent message to MediaInfo. The message contains basic
information for the protected content, such as the default key ID for
the content.
- The message is required to separate Representations with different
content protection information into different AdaptationSets.
Change-Id: Ib9dc834ae0abf93b7ca0acdf52a865b1394a4816
- Pass pixel_height and pixel_width from VideoStreamInfo to MediaInfo.
- par can only be set if all the Representations have the same
picture aspect ratio. That is the ratio of sar_x*width:sar_y*height
should all be the same.
- If there is a Representation that does not have the sar attribute set,
par is also not set.
Change-Id: Id34c95e4a99da9ce028a9f35737cfe5bca9e5697
- Adding YCM configuration file for edash packager.
- For now the developer has to do a Debug build before YCM starts
working.
- Also PATH must be set to where 'clang' is so that the system headers
are included (e.g. for classes in std namespace).
Change-Id: I934f69fa6d70b930bde3fd684fa5d6a8204c5631
- Added logic to container parsers to extract pixel width and height.
- If the container doesn't contain the pixel width and height of the
stream and the stream is H264, this parses the SPS to get the
sar_width and sar_height.
- If extracted sar_width and sar_height are 0s then they imply 1s.
- Add hb2_v_frag.mp4 for test media. This does not have a
'pasp' box and has sar_width = 8 sar_height = 9.
Change-Id: I4a06ce95582547bec19adb7905e7612c5a1f359e
- The fields used to be repeated but there is no use case at the moment.
- DASH IOP explicitly disallows segments with multiple tracks.
Change-Id: Ia0af2048210c546dfaa178735605a81052ea1123
- DASH IOP requires AdaptationSets with video Representations to have:
@maxWidth (or @width if all the Representations have the same width).
@maxHeight (or @height if all the Representations have the same width).
@maxFrameRate (or @frameRate if all the Representations have the same
frame rate).
Change-Id: I1247b7461237255aeb70b7fb40f78d4439f9c529
- Get the first sample duration in Segmenter.
- Pass the value all the way to Representation thru MuxerListener.
Change-Id: I76fd970f8140d359863363dc347958f680cca5ae
BoringSSL removes the variants that had been used, in which the hash
is given a default value. This change makes the code more compatible
with BoringSSL.
Change-Id: I665084c2e71593db1afd6baf182224fe0d23c944