Adding all the code needed to allow the webvtt to mp4 converter to
send empty vtt cues. This change does everything except writing the
mp4 box.
Bug: #324
Change-Id: I16188e6357632b2ed06f7e9bab7844f093266696
Instead of always tracking segments with an index, this change makes a struct
that will act as the segment and track which segments are in it. Each
segment will store all the samples in the order they were given, it will
avoid any sorting.
Closes: 72867775
Change-Id: Ic5829161510fe8f3320d960c3bc4a276c26ff3be
Create WebVtt test that shows that the current implementation of the
webvtt segmenter does not respect the input order of cues.
Bug: 72867775
Change-Id: I811b3a93c10650e0cf9290c9c0c1680f562deb30
Took the same logic for DEFAULT and AUTOSELECT used by audio and
applied it to text. Combined the build tag logic for audio and
text as they were the same expect for a couple fields.
Bug: #205
Change-Id: I75ecbf4b25cd559b826982d12a5b132e70b83b69
The master playlist and media playlist did not have implementations
for handling text streams. This change adds support for both.
Bug: #205
Change-Id: I1329b8cc2585f15b89959071db9dd16d35847cba
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
In the master play list, use a class called variant to build
the video tags.
The variant list will always have one entry. In the case that there
are no audio streams, the variant list will have a null entry.
Bug: #205
Change-Id: I6e4acd83a31cd267c173e4f4c910f93781fe6efd
According to the HLS+WebVTT spec, if there is no text in a segment
a webvtt file with no cues can be added to the manifest. By outputting
empty segments it allows the accumulated duration in the Master Playlist
to better represent the duration of the text stream.
Spec Reference: //tools.ietf.org/html/draft-pantos-http-live-streaming-23
Section 3.5. WebVTT
Bug: #205
Change-Id: I5de01200fd9fa99c57949c773e8ee926b0f6ba8a
It was the same code to make the media playlists for each test, so this
change moves that logic into common functions.
Change-Id: Ifb8680247ad4335332251815a2db5d56d28151aa
- Removed SetError, Swap, Matches functions, which are not used
- Added moveable version of Update function
- Added VLOG(1) warning in Status for non-ok status
- Replaced OS_WIN with _WIN32 as OS_WIN may not have been defined.
Change-Id: Ib6b7aab6e6fee270937b150f1e4bf993e914a568
Moved the file copy out of StreamInfoToTextMediaInfo as the file
copy is only needed by the MPD output but the Media Info is needed
by MPD output and media info dump.
Bug: 36138902
Change-Id: Id233f2041b3e72345b8f709791c6b6070484222f
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
There could be rounding errors in MSE which could cut the first key
frame of the representation and thus cut all the frames until the next
key frame, which then leads to a big gap in presentation
timeline which stalls playback.
Adjusting presentationTimeOffset (PTO) by -1, i.e. backing off PTO by 1
to compensate for the possible rounding error. It should not cause any
playback issues as it is small enough. The workaround can be removed
once the problem is handled in all players.
The PTO adjustment is configurable with command line flag:
--pto_adjustment, with value set to -1 by default.
b/71808910
Change-Id: I9c4d1e2ee84008b859a3638a8146c910cead1f15
Instead of using next segment start time, as CueEvent time may not
align with segment start time exactly.
Also remove the incorrect DCHECK in ChunkingHandler when processing
kScte35Event.
Change-Id: I4987740c99c8d0d25c9b99bddc5e557e45d308e0
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
When transmuxing from TS to MP4 if there is emulation prevention
bytes in general_profile_tier_level_data.
Fixes#312
Change-Id: I48857046c1ea4bed4f455d03d060551e3ef4bec8
Added new path to allow webvtt text input to be written as
webvtt mp4. This will happen when the input is a vtt file and
the output path is a mp4 path or the output format is mp4.
Missing test content for this.
Close: 70990714
Change-Id: Idbb4023db4a126a560528e73801f762cc45f4685
Moved muxer listener creation into a factory so that it can be
initialized once and then the factory only needs to be passed
around rather than all the parameters.
Change-Id: Ibf7df66c08debddbe6f6ff8995e7910b9ad17f3f
Use a mock muxer listener so that we can verify that the webvtt
output handlers will write to a manifest correctly.
Change-Id: I0294a998bfaf06a6d8f7d4c287fb014839b38f73
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
Connected the WebVtt Pipeline together to test that the parser,
segmenter, and output all work together as expected.
Change-Id: I07138f7b5b1318f84c27c5b607d8df207c57ddb3
Also added Period::GetAdaptationSets and
AdaptationSet::GetRepresentations.
Instead of implementing GetDurationSeconds in all MpdBuilder classes
(MpdBuilder/Period/Adaptation/Representation) like what we used to do
with GetEarliestTimestamp, the two new functions allows MpdBuilder to
iterate through the Representations to get durations.
Also updates GetEarliestTimestamp functions to use the same iteration
method.
Change-Id: I682b70c07c248c0f6511ec3d9019086f986ee10e
Linked together all the handlers to create the HLS text pipeline.
This change does not include tests for the pipeline.
Bug: 36138902
Change-Id: I32e7a7cefae1e7c74ec6d0bdc6335c0d65e5e79c
Changed muxer listener to use "default" instead of {}
when defining its constructor and destructor in its
header file.
Change-Id: I3c80e808aa624293c3d7720ac6a47b470a663312
This change adds the missing code for passing mp4 text through
the pipeline.
This introduces the MuxerFactory to simplify creating muxers.
Change-Id: Ic7be1a2e0ff4b720a01061edb43aded946d05a47
- Update curl to 7.57.0
- Roll clang, which is needed due to MacOS / XCode update
- Fixes and suppress compilation errors due to clang update
Fixes#285
Change-Id: Ibac3288c641861605c3c0500d34d27373e6eecfe
This change introduces handlers to output WebVtt text files. There is
only one output but there is a common base to support others.
WebVttOutputHandler which handles all communication with other handlers
and WebVttSegmentedOutputHandler is responsible for listening for events
and choosing when and where to write cues and headers.
Bug: 36138902
Change-Id: I2b13a94262554398e66fee8cf024aa21041ddbab
Instead of having multiple char readers, one for strings and
one for files, just have one for files and use memory files
when testing.
Change-Id: Id1a2230046ba540ddf69ca10edb3edc74d2419b6
To better align with the Chunking Handler, the Text Segmenter
now outputs the SegmentInfo at the end of the segment rather
than the start.
Change-Id: If69ab951947d00779b4b63a52c4b6662bbdc4c0d