This also ensures that it does not violate std::sort() requirement on
strict ordering, which is enforced in gcc/g++ though not in clang.
std::sort() strict ordering requirement:
std::sort() need a comparator that return true iff the first argument is
strictly lower than the second one. That is: must return false when they
are equal.
Change-Id: I781cf4ed4125fcad212eba5430a264f3a3d71c16
This is recommended by Apple and other content providers:
https://apple.co/2uTTAc4
- Set default --clear_lead to 12 seconds, i.e. about 2 segments.
- Set default --fragment_duration to 0 so fragment (sub-segment) is not
generated by default.
Change-Id: Ie6ec3ab6f0ce973547989c663a92b637a2fdc47c
It is possible to see a negative timestamp if the input mp4 file
contains EditList.
Also increase the queue size for EncryptionKey to be able to handle
smaller crypto_period_duration during testing.
Change-Id: I68278bf482d6662e771d9b80f4d5409605065aac
Configurable with --transport_stream_offset_ms.
This is needed to compensate for possible negative timestamps in
inputs, which could happen on ISO-BMFF with EditLists.
Issue #112.
Change-Id: I0fce8766c9df2911b9bb859c1e54052a8ed2abfb
In some ISO-BMFF files, there is an initial non-zero composition offset,
but there is no EditList present.
This is against ISO-BMFF spec recommentation [1] and we believe in most
cases it is just missing the EditList.
[1] 14496-12:2015 8.6.6.1
It is recommended that such an edit be used to establish a presentation
time of 0 for the first presented sample, when composition offsets are
used.
Issue: #112.
Fixes: b/110782437.
Change-Id: I23d33810ce536b09a1e22a2644828d824c1314f5
- EditLists in input files are parsed and applied to sample timestamps.
- An EditList will be inserted in the ISO-BMFF output if
- There is an offset between the initial presentation timestamp (pts)
and decoding timestamp (dts). Chrome, as of M67, still uses dts in
buffered range API [1], which creates various problems when buffered
range by pts does not align with buffered range by dts. There is
another bug in Chrome that applies EditList to pts only [2]. This
means that we can insert an EditList to align pts range and dts range.
- MediaSamples have negative timestamps (e.g. for Audio Priming).
You may notice the below change on some contents:
- Some media duration is reduced by one or two frames. This is because
EditList in the input file was ignored in the previous code, so video
streams start with a zero dts and a non-zero pts; the smaller of dts
and pts was used as the starting timestamp (related to the earlier
workaround for Chrome's dts bug), so the calculated duration was
actually a bit larger than the actual duration. Now with EditList
applied, the initial pts is reduced to zero, so the media duration is
also reduced to reflect the actual and correct media duration.
It may also result in negative timestamps in TS/HLS Packed Audio, which
will be addressed in a follow up CL.
Fixes#112.
Partially address b/110782437.
[1] https://crbug.com/718641, fixed but behind MseBufferByPts.
[2] https://crbug.com/354518. Chrome is planning to enable the fix for
[1] before addressing this bug, so we are safe.
Change-Id: I59317740ad3807ca66fa74b3a18fdf7f32c96aeb
MPD cannot be validated right now since we do not generate deterministic
mpd with multiple inputs due to thread racing.
Exclude mpd comparison in this case.
Change-Id: I03b68b4969a39e20927c8a9b1475f72493682696
I.e. enable --generate_dash_if_iop_compliant_mpd in mpd_generator by
default.
It was enabled in the main packager binary in v1.6.1.
Change-Id: Icfb19758c52c107e8ab17d3fb581923fa291cc0a
- Support decryption verification in _CheckTestResults
- Allow diff_files in _CheckTestResults
- Update all functional tests to use _CheckTestResults
Change-Id: I3f9c02f35808eba787becf9b1e5c1ce9238f943e
Instead, caclulating average bandwidth by dividing the sum of the
sizes of every segment by the sum of the durations of every segment.
This aligns with the requirement in HLS spec:
https://tools.ietf.org/html/draft-pantos-http-live-streaming-23 4.1.
BandwidthEstimator is also simplified to handle all blocks only.
Fixes#361
Change-Id: I89e7d415a841f4d4048f199de8dae7ffa250467b
This flag was designed for two purpose:
- Grouping fragments into subsegments, achieving three level hierarchy:
segment < subsegment < fragment.
- Indicate whether to generate 'sidx' box in media segments (when the
value is set to a negative number).
There are no practical use case for the first purpose. Removing it to
simplify the code and reduce the confusion.
Introduce another flag --generate_sidx_in_media_segments for the second
purpose.
Change-Id: I4be7cd42662fb324c1158b978e05768ee49dd048
It was implemented to workaround Chromium's DTS
https://crbug.com/398130, but the workaround does not really work in
all situations.
Remove it now as we already have another workaround available.
Change-Id: I291f559d78120fb743a6679b7d927e5bbc5b6b4e
DTS was used in ChunkingHandler. As a result, SegmentInfo contained
timestamp in DTS. MP4Muxer has a logic to change SegmentInfo to use
PTS but not in other muxers.
Benefits of using PTS in ChunkingHandler:
- De-dup the redundant logic in MP4Muxer
- Ensure consistent behavior in different output containers
- Consistent with other timestamps, e.g. Ad Cue timestamps
Issue #413
Change-Id: Ib671badf144e0c0866d60f4ff0ac0cbbdd33817e
Having "wvtt" in the codec string (in the master playlist) causes
errors on some older Apple products. As including it is optional,
we are opted to omit it to ensure support for all Apple products.
Close#402
Change-Id: Ib1072bcc26a3ff66e3a6d3204789c0c8c678d4db
Configurable under flag --use_legacy_vp9_codec_string, which defaults
to false as all major browsers and platforms support new style vp09
codec string already.
Closes#406.
Change-Id: I22e917777f9d66db815ff9d55eb47b6d55806269
EPT (earliest presentation time) may be adjusted not to be lower than
the decoding timestamp (dts), but the adjustment should only be done
on the first file when there is one file per Representation per Period.
The second file and onwards should not be adjusted otherwise a GAP
would be created.
Closes#384
Closes b/78517422
Change-Id: I56771ad8fbbe6a87b832ec58854cfbf37d5f1817
The previous text to mp4 webvtt pipeline was incomplete. It
did not insert ad cues and it could only insert a segment
after a sample ended.
Now the pipeline supports ad cue insert and segment insertion
mid text sample. This required the pipeline to use the text
chunker (to split samples and insert segments) and required
a major overhaul of the text to mp4 converter.
Before the converter came before the chunker. This meant that
the converter only expected to see stream info and text samples.
Moving the converter after the cue aligner and chunker means
that the convert had to be aware of segments and cues.
The general approach is the same, however the converter will
convert the samples per-segment as the chunker will introduce
duplicate samples if a sample spans across segments.
Closes#362Closes#382
Change-Id: I0f54a40524c36a602ad3804a0da26e80851c92fd
Allow the output file to contain template identifiers like $Number$,
$Time$ etc. Unlike the actual template used in SegmentTemplate, the
identifiers in output will be populated before pushing to the DASH
manifest.
Issue: #384
Change-Id: Ife1caadb6fccd32167fa1bc83fe2afcb2d2ad087
- Add command line flag --test_packager_version to inject packager
version; packager_main.cc is also updated to use the same flag.
- Also add a MpdGenerator test in packager_test.py.
Change-Id: I9a11a0ee5502ba30a8acc4d44ebbfaabbe0f2f6e
Previously for the last iframe in a segment, we wait for the next
segment to arrive before writing the EXTINF tag. If an Ad Cue comes
in before the next segment, the EXT-X-PLACEMENT_OPPORTUNITY tag would
be inserted before the iframe in previous segment.
Fixes#378, #396.
Change-Id: I1ede72a4d4edca94781c7b05bc25397d67916d1a
- Added a new --enable_entitlement_license flag, which sets
'enable_entitlement_license' in Widevine CommonEncryptionRequest;
- Support 'boxes' in Widevine CommonEncryptionResponse.
b/78171767
Change-Id: Id399fc7fcb2948c571e12c8af7687cfcfcef41fe
Requiring output format determined from 'output' to be consistent with
output format determined from 'segment_template'.
Change-Id: I32cbd63fcd6e2a4272dd0db531c1d5b385315445
Make sure to use the output format when given when setting up our
tests. Not doing so results in text always being set to "vtt" when
the output format is "mp4".
Change-Id: I11c5f861091598a67fc76dc19b1b16a9a773a2e0
Problem : Text samples have variable length and therefore act
more like continuous samples whereas audio and video
act more like discrete samples. Since we use sample
start time, a cue event could be inserted after the
start time of the last text sample and never get
inserted as there are no more samples.
Change : After all streams have requested flushing, we make sure
to collect all remaining cue events from the sync point
queue and insert them into each stream.
Issue #362
Change-Id: Id8f136f7ef53531f7a7f412613eac352324e0130
Create an end-to-end test for ad cues. This test's final result is not
correct but illustrates the problem we have in the cue insertion and will
be fixed by a later CL.
Change-Id: Ia8b43a53848941be52cf9ade018668e6477e8df2
In H265Parser::ParseSliceHeader, the parser does not handle
byte_alignment() from the spec. byte_alignment() reportedly contains
at least one bit, which is not handled right now.
See Section 7.3.2.12 Rec. ITU-T H.265 v3 (04/2015).
Also added a few size sanity checks in H265Parser to make sure the
code does not crash if an invalid input is provided.
Fixes#383.
Change-Id: I33b31396058fc5ba67a0fc119be5fe56ec9443b0
Packager uses ThreadedIO to write media segments and manifest /
playlists. There was a possibility that media segments write being
delayed and scheduled after updating manifest / playlists.
This CL fixes the race condition.
Also added a note on how segments can be synced to cloud storage to
avoid the race condition during file sync.
Also added a live WebM test.
Fixes#386.
Change-Id: Icf9c38cdec715fa3dc2836eab1511131e129fe41
The number of preserved segments outside live window can be
configured using flag --preserved_segments_outside_live_window,
which is default to 50, i.e. 5 minutes for 6s segment.
Note that the segment removal will be disabled if it is set to 0.
Only HLS live playlist and DASH dynamic MPD are affected by this flag.
- Also add end to end tests.
Fixes#223.
Change-Id: I8a566efebe2f1552c7d9509ab017bade5a4a1c98
It is not always possible to align segment duration to target duration
exactly. For example, for AAC with sampling rate of 44100, there are
always 1024 audio frames per sample, so the sample duration is
1024/44100. For a target duration of 2 seconds, the closest segment
duration would be 1.984 or 2.00533.
This feature allows MPD generator to treat these segments as having
the same duration, thus allows MPD generator to generate less
SegmentTimeline entries and potentially no SegmentTimeline entries
(replaced with SegmentTemplate@duration instead if
--segment_template_constant_duration flag is enabled).
Under flag --allow_approximate_segment_timeline. Disabled by default.
Fixes#330.
Change-Id: I5044eaa348ebbf45bf792a2af53fc95a115ae21b
- Allow including Widevine and Common SystemID PSSH boxes
for PlayReadyKeySource.
- --playready_key_id and --playready_key flags are deprecated.
- --enable_raw_key_encryption already supports playready PSSH generation.
Addresses issue #245
Change-Id: I072d4f43a3239875959e4c5b1eb6854415d7367e
Removed the logic in MuxerListener to estimate bandwidth from file
size and duration, since it is not compliant to the spec.
MpdBuilder will estimate bandwidth from segment size and duration
if bandwidth is not specified in MediaInfo.
Here is the statement from DASH spec (23009-1:2014):
Consider a hypothetical constant bitrate channel of
bandwidth with the value of this attribute in bits per second
(bps). Then, if the Representation is continuously delivered
at this bitrate, starting at any SAP that is indicated either by
@startwithsap or by any Segment Index box, a client can
be assured of having enough data for continuous playout
providing playout begins after @minbuffertime *
@bandwidth bits have been received (i.e. at time
@minbuffertime after the first bit is received).
For dependent Representations this value specifies the
bandwidth according to the above definition for the
aggregation of this Representation and all complementary
Representations.
Fixes#376.
Change-Id: I0fddce39e709d0cded0a4c9ae59adbbcc97ec5ea
The file_name fields will be used to solely indicate file paths on the
designated file system, and they are used to do normal file operations,
including file creation, file updating and file removal if needed;
added new xxx_url fields, for the URLs that should appear on DASH
manifest or HLS playlists.
xxx_url are the URIs of the media in the manifest. The fields are
converted from file_name fields but adjusted to be relative to DASH
manifest path or HLS playlist path, optionally with base_url prepended.
Previously the file_name fields are converted in place to indicate
URLs when passing to manifest / playlist builders. The original file
names were lost, which made it difficult to remove files outside of
live window.
Now that the input file names are preserved. File system APIs can
operate on the original file names while manifest / playlist generation
functions can operate on URLs.
Issue: #233
Change-Id: I36a64f16e3d1261ce91783a86588f24ad1371662
According to DASH spec (23009-1:2014):
Consider a hypothetical constant bitrate channel of
bandwidth with the value of this attribute in bits per second
(bps). Then, if the Representation is continuously delivered
at this bitrate, starting at any SAP that is indicated either by
@startwithsap or by any Segment Index box, a client can
be assured of having enough data for continuous playout
providing playout begins after @minbuffertime *
@bandwidth bits have been received (i.e. at time
@minbuffertime after the first bit is received).
For dependent Representations this value specifies the
bandwidth according to the above definition for the
aggregation of this Representation and all complementary
Representations.
This suggests that max bitrate should be used instead of average
bitrate.
Also cleaned up BandwidthEstimator code.
Fixes#376.
Change-Id: Ibf5896394c5c6bb820849771a2129c59202d2273
Two-character ISO-639 code in --default_language was ignored due to
a bug in language code matching as the language code in stream is
always converted to 3-character code.
Fixes#371.
Change-Id: I8618938af583a417446636ff9efe1c72ce822c33
This flag was introduced to workaround a rounding error in Chrome
(probably in other browsers too).
Also although this flag avoids the first frame of a Period to be
dropped due to rounding error but it could cause the last frame of a
Period to be dropped.
Now that we use a high precision Period@duration, we do not expect to
see rounding errors any more. The player would be a better place for
the workaround even if it is still needed.
Related issue: #368.
Change-Id: I3bd517ecc6d548ff62e0c13394edb49d4bc68e8f
Instead, the actual earliest presentation time is used except for
the first segment if there is an offset between presentation time
(pts) and decoding time (dts).
Chrome (as of v66) reports dts instead of pts in buffered ranges in
MSE API. To avoid breaking Chrome, the earliest_presentation_time
of the first segment is set to its dts as Chrome does not like negative
values for
adjusted dts = dts + Period@start (0 for the first period)
- presentationTimeOffset (earliest_presentation_time).
Fixes#303.
Change-Id: I5ca80e05d5570961400499436f2bcc01f06e69e0
UTCTiming schemeIdUri and value pairs can be provided to packager using
--utc_timings flag. It should be comma separated list of
schemeIdUri=value pairs.
Note that urn:mpeg:dash:utc:direct:2014 scheme is not supported as it
requires the MPD to be dynamically generated on the fly when MPD is
served to client.
Fixes#311.
Change-Id: Ibc07af8a6d8b2b6261ba3ecd2c02f23809f96614
Chrome internally uses time accurate to microseconds, which is
implemented per MSE spec (https://www.w3.org/TR/media-source/).
Generate Period@duration with better precision to avoid possible
buffered range gaps in Chrome (possibly other browsers too), which
may lead to other problems like playback stall.
b/74238961
Fixes#368.
Change-Id: I357a0f62b67f75c7ca044bb99ea4e3c8bbb6fecd
Created a media handler to come after parsers that will handle filling
in gaps between text samples. The padder takes a min duration, and if
the samples do not cover the min duration when flushed, one last empty
sample will be injected so that the samples will go up to the min duration.
Change-Id: I88605059664d09279676edac418ff3d4990d7556
It is now managed in SimpleMpdNotifier.
This avoids unnecessary increment in AdaptationSet id counter.
Also makes sure the AdaptationSet is sorted by id in XML output.
Change-Id: Ibcd0b047a71c19cd30ad7d8af9a2ed0bb05e043e
This changes almost all encrypted tests to use DiffDir. The remaining
un-updated tests are tests that won't match every time.
Change-Id: I858bbaa0beea34887cc3100eb784aa2aecd5a0a5
Change MediaInfo media paths in test output to only use the filename so
that they can be compared between test runs.
Change-Id: I26bb3f5ce79a83400b8a162c61cf5b54e41f9c70
iframe playlists will be given a name based on the output name of
the main stream. This is done to ensure unique filenames between
different video output streams.
Change-Id: Id0de9c5834599e9d896243e30569c55f34e7cd68
Instead of using the test file's index in a list to create the output
name, use the original filename and the descriptor.
This caused some problems with file name collisions when some tests
were using the same name. That was fixed by changing the names. This
will go away once they are transitioned to use DiffDir like the other
tests.
Change-Id: I0a4c480406705ca63fcea61c86c67d4a5f739295
This is called when reaching end of the file of the media. The duration
of the media is updated.
Fixes#340.
Change-Id: I446f2d341b02125d4a7d8c958bda269b5403cb9c
Created a method to compare test output for live tests. This wraps
CheckTestResults but first replaces the times that would diff between
manifests.
Change-Id: Iafb51a28a9bcb9f32b210c6d76bf23e2b9a3e0d6
This require a change to the update gold method as it would not
create nested directories. Instead it deletes the old directory
and copies the whole new directory over. This made the code simplier
and far-less error prone.
Change-Id: I1da5d9bda171b0f106d1425b204139dfbcb39b42
To make working with file names easier in packager_test.py _GetStream
the full path is not created until needed so that multiple paths can
use the same root filename.
Change-Id: I23a9231433b22ab5cef9b88bd6359f351da56eda
Changed all output file names (not paths) to follow the pattern that
any qualifier (e.g. trick play) will be join the current name using '-'
but will use '_' within itself (e.g. trick_play_1).
Change-Id: Ib0247bf1ca6d94815fedaaf73d3a400d31c20c40
Prefer timestamps from Video AdaptationSets if available - this avoids
possible video playback jitters due to gaps.
presentationTimeOffset is not applied to the first period as it may in
negative dts which Chrome does not like: https://crbug.com/398141.
It is safe to apply to subsequent periods as the actual offset applied
takes Period@start into consideration:
offset = Period@start - presentationTimeOffset
The result timestamp with offset applied is close to Period@start, so
it is unlikely to result in a negative dts value.
Closes b/73899306.
Change-Id: If8361f5469610093b3aac6675754536ad7e83c4c
This change has the hls master playlist add the text codec string
to the list of codecs in a variant.
Bug: 72942756
Change-Id: Ib25bb2064a291d10d7b1d261a4307991df62220c
Updated as many tests as we easily could. The tests that were not updated
all use live manifests or encryption that all require some "help", either
by dealing with times differing or with verifying decryption.
Bug: 73830478
Change-Id: I6803c2d960b71b459eb57b7a5e562164bb713e2a
Created GetStream, a function used to get the stream descriptor for a
single stream. This allows for finer control over the stream compared
to the batch GetStreams.
Added "trick_play_factor" to GetStream so that the trick play factor
did not have to be added the stream descriptor value and "injected"
into the stream.
Change-Id: Ifbde64b961a673aafa5f6d21f33a68d02fb46610
Created end-to-end tests for the segmented webvtt text in HLS. The
text stream is longer than both audio and video, so there are more
text segments than video/audio.
Change-Id: Ib860ccd3f2ac0048983fdeebe3847a0b9dcbc160
Created a method to diff the output dir against the golden copy
of the output dir. The goal with this is to simplify our end-to-end
test structure by removing the need to track the output files within
the test runner.
With all the golden output in one directory, this makes it easier to
setup end-to-end tests and even allows the golden files to be playable.
This should not affect the repo size too much as duplicate files will
only be stored in the git object store once.
Tests will migrate to this in separate CLs.
Change-Id: Id1be9f8f60c9e362b9b615445dd8ca7da996af4c
Changed the "live" setting in _GetStreams to be "segmented" so that it
make sense in a more general sense.
Change-Id: I2ceaad67653e1e2237533b68fccbc9fe3fabfc9b
Looks like Safari does not like v0 tenc box.
- Use v1 tenc box for cbcs and cens protection_scheme as required by
CENCv3 spec.
- Set crypt_byte_block and skip_byte_block to 0 for full sample
encryption cbcs and cens.
Fixes#326
Change-Id: I5581cd856fffc4ff104d950f3ca19b9337d57a78
Create a StreamDescriptor class that can be used to build the stream
descriptor command line argument.
Change-Id: Ifcba4f37d69a1a36c4add51a2a10c3f0c8b2ccd7
The old vtt sample data has the header as "WEBVTT FILE" which does
not reflect what the spec says it should be.
This changes it to "WEBVTT" as described in the WebVTT spec.
Change-Id: Ib54396a8b937501a835dafe966bf05b95b0b22c4
- Add empty lines between different types of renditions to improve
readability.
- Group variants with the same audio/text group together, as it is
where the Adaptation occurs.
- Write master playlist after writing media playlists. This makes
more sense and it is also necessary to have the bandwidth of
the last iframe playist segment correctly computed.
- For fMP4, I-Frame segment must include the 'moof' header.
- Fix a problem that hls_iframe_playlist_name is not passed to
MuxerListenerFactory.
Issue: #287
Change-Id: Icf37c5de1dc29f85ae3f419cbc3264d04ca491a4
If no hls group name is given, we would default to "audio" but as
we are working to support text, this won't make sense to see
GROUP="audio" on a text stream.
Instead default to "default-audio-group" for audio streams. A specific
text default will be added later.
Bug: #205
Change-Id: Iefc8bfd35708286619d0004348294d98f2c38482
The IV was incorrectly updated across samples.
Created a new cryptor SampleAesEc3Cryptor specially for SAMPLE-AES
EC3 encryption / decryption. The new cryptor uses constant-iv, and
makes sure the IV is reset to the initial value at the beginning
of each audio frame and chained across syncframes within the the
audio frame.
Also added E-AC3 end to end test.
Fixes#279
Change-Id: I0aa60c17836daeef5ba433a05e5ff0906191d9ac
According to HLS spec: https://goo.gl/MiqjNd 4.3.4.1.1. Rendition Groups
- A Group MUST NOT have more than one member with a DEFAULT attribute of
YES.
- Each EXT-X-MEDIA tag with an AUTOSELECT=YES attribute SHOULD have a
combination of LANGUAGE[RFC5646], ASSOC-LANGUAGE, FORCED, and
CHARACTERISTICS attributes that is distinct from those of other
AUTOSELECT=YES members of its Group.
We tag the first rendition with a particular language in an audio group
with 'AUTOSELECT'; it is tagged with 'DEFAULT' too if the language
matches --default_language.
Fixes#315
Change-Id: Iacc0bc8c89ebffce8717fa65e82d6daf5a1f6adc
To remove the direct dependencies between packager.cc and the different
muxer implementations, this change remove the muxer factory to its
own file.
Change-Id: I4a1503c493f0f4d10a67e78461f96da3f4238944
- Add --time_shift_buffer_depth to HLS doc.
- Fix a problem in HLS tutorial
Partially address #304, fixes#305
Change-Id: I60bc1eb659a30beb0a6ab73433f4cc99a7deab07
Moved all code dealing with jobs into its own class so that the
packager code does not need to worry about initializing, running,
or stopping jobs.
Change-Id: I3e9ef1f22bd93d671f77d59ad15f23d1239078cf
As specified in HLS spec (https://tools.ietf.org/html/rfc8216):
All audio EXT-X-MEDIA tags SHOULD have a CHANNELS attribute. If a
Master Playlist contains two Renditions encoded with the same
codec but a different number of channels, then the CHANNELS
attribute is REQUIRED; otherwise, it is OPTIONAL.
Fixes#299
Change-Id: Ic2308c39b170178b11cb0d94c3a8083c8b5f3353
The keys can be specified in --keys option, with the form of
label=<label>:key_id=<32-digit hex string>:key=<32-digit hex string>,label=...
There can be multiple "label=..." block. The DRM label can be one
of "AUDIO, SD, HD, UHD1, UHD2" or a custom label.
Mark --key and --key_id as deprecated. We can achieve the same result
with --keys=label=:key_id=<key_id>:key=<key>.
Also add a new optional field in stream descriptor: drm_label, which
is used to overwrite the internally generated DRM label for the stream.
If not provided, the DRM label is generated automatically based on
audio/video information, e.g. resolution.
Code changes:
- Merged RawKeyEncryptionParams and RawKeyDecryptionParams into
RawKeyParams.
- Make FixedKeySource accepts RawKeyParams as input.
Change-Id: Ic8c2f071cc71188e13f14bc6396fc2b3ffa5cac6
This fixes shared_library not able to compile problem.
Also removed StreamDescriptorList and replaced with expicit
comparison to make the code clearer.
Also removed an out-dated DCHECK that mpd_notifier and hls_notifier
does not co-exist.
Change-Id: I3d04b8880741fecf0931a764cc12e50aa5e392b9
Before the trick play handler would have one input and multiple
outputs. The normal media handler API for adding handlers had to
be ignored when setting-up the trick play handler.
This changes the trick play handler to have one input and one output.
It uses the standard AddHandler method calls. When initialized, the
trick play factor must be provided.
This included a run of 'clang-format' over all edited files.
Change-Id: I7b3cdf0a2472e2f89ab194867c4b984e26f18f24
Moved build instructions and docker instructions to separate docs.
Removed command samples which are no longer needed as we have better
tutorials now.
Change-Id: I340c5653a6553158325970dd86d76fa11e69bcbd
- Remove the TS key rotation not supported check as there is nothing
to be done for key rotation in TS for SAMPLE-AES.
- Fix IV updated problem in new segments even if crypto period does
not change.
- Avoid duplicate EXT-X-KEY tags if it does not change.
- Make EXT-X-DISCONTINUITY-SEQUENCE match with number of removed
EXT-X-DISCONTINUITY.
- Added end to end test for HLS with key rotation.
Change-Id: I73cb82e9f5575fcdf63ee643228efe78e6766302
The HLS manifests output by the packager did not have the RESOLUTION
attribute on EXT-X-STREAM-INF tags. This change adds the resolution
tag when resolution values are present.
Close#235
Change-Id: I15ca6de47cb34793cf6a940123d593261627baa4
Shared libpackager can be built by setting libpackager_type to
shared_library, e.g.
GYP_DEFINES='libpackager_type=shared_library' gclient runhooks
ninja -C out/Debug
will generate libpackager.so in out/Debug/lib directory.
Here is a few other changes to make shared_library builds and
tests pass:
- Add several test parameters to packager.h, which is needed for
testing.
- Create a protoc.gypi from build/protoc.gypi but depending on
protobuf_full_do_not_use instead of protobuf_lite, since we need
protobuf_full_do_not_use for text parsing and generation of media
info proto. Somehow shared_library build does not allow mixed use
of protobuf_full_do_not_use and protobuf_lite.
- Remove the use of LazyInstance in version/version.cc and use static
variable directly. This is because LazyInstance needs AtExitManager
which may not be easy to setup when calling GetVersion.
- Allow skipping testPackageWvmInputWithoutStrippingParameterSetNalus
with flag --shared_library, which is needed as shared_library build
does not support --strip_parameter_set_nalus flag yet.
Fixes#227
Change-Id: Iff05a50baa28134faa7218664c96114cb9e70329
'availability_time_offset' is not an attribute in MPD specification,
but used to calculate availability_start_time to adjust segment
availability time. A similar effect can be achieved with standard
blessed suggested_presentation_delay flag.
If suggested_presentation_delay is not set, player is expected to
choose a suitable value.
Change-Id: I1d540bd4347b4f04b6cc5ec0778e1a5392009b09