This also changes the callbacks a bit to (a) avoid passing references
for already ref-counted types, and (b) don't pass PID since the
parent knows this and gives it to the child parser.
Issue #832
Change-Id: I7dd44436c8d1ad81d42a813d16f850175b85ad1a
This changes the default MP4 output to use TTML and adds a way to
choose which one is used. This is done with 'format=ttml+mp4' or
'format=vtt+mp4'.
This also fixes the boxes output in WebVTT in MP4.
Change-Id: Ieaa7fc44fbf4dc020a5bb70cfa3578ec10e088ce
This only supports TTML output; meaning the user can convert WebVTT
into TTML, but not the other way around. This will be useful for
DVB-sub subtitles that would be better supported within TTML.
This only adds text-based output; a follow-up will add MP4 support.
Change-Id: I0944b7df95d7765e55f203fc5e9a644f5c455dd8
This adds a new path when parsing MPEG2-TS streams to ignore unsupported
streams. This allows extracting supported streams when some of the
streams are unsupported. For example, you can extract audio from a
file that has unsupported video.
Change-Id: I608fcb19d0a573bfd35e9272f60b0b69346ae11a
This adds more generic settings for regions and CSS styles. These are
global settings, so they go on the StreamInfo object.
Change-Id: Ibb76c060206152ccf8e9a067c09877226f67c927
Now text cues are composed of nested fragments that can be individually
styled. This allows portions of the cue to be bold, etc. The
WebVTT parser doesn't parse the inputs, but the original tags are
preserved in WebVTT output. The WebVTT output will add tags if the
style elements are present in the cue object.
Change-Id: I6abba4175e376e4f753193f7d8cac63e958d3c89
Now the Cue settings are a generic object that is parsed in WebVTT.
This will allow setting the settings in different parsers without having
to use WebVTT-specifics.
Change-Id: I36689bec725bd2e515af962b7174fc5977f96fa2
This sets the groundwork for more generic text cues by having a more
generic object for the settings and the body. This also changes the
TextSample to be immutable and accepts the fields in the constructor
instead of using setters.
Change-Id: I76b09ce8e8471a49e6bf447e8c187f867728a4bf
Now text-based WebVTT also uses the generic media pipeline. This
converts the WebVttTextOutputHandler to a WebVttMuxer to be more
consistent with the other muxer types.
This also allows choosing between single-segment text and multi-segment.
Before, we would generate both and use single-segment for DASH and
multi-segment for HLS; but now you can choose between either and either
are supported in both DASH and HLS.
Change-Id: I6f7edda09e01b5f40e819290d3fe6e88677018d9
Now the same pipeline for handling the audio/videos streams will handle
the segmented text streams too. This doesn't apply to the text output,
only to the MP4 variants. This also fixes a bug where we added the
X-TIMESTAMP-MAP tag even when there wasn't TS streams; this doesn't
otherwise change the behavior around that tag.
Change-Id: I03f7cea56efa42e96311c00841330629a14aa053
The test added in the previous CL was broken due to a rebase on another
change. This subtly changed some of the byte offsets that broke the
test. This wasn't caught since I didn't rebase and re-run the tests
before merging.
Change-Id: Id7e4c7688278eae37da1a14f1648263b4dda98cd
This changes it from an OriginHandler to a MediaParser and moves the
handling of it to the Demuxer. This will allow more generic handling
of text by giving it the same abstractions as video/audio handling.
Change-Id: Ibbde3c84d228ec8e83af1ed266ea97dbc9589c24
In addition to the MediaSample handling of the MediaParser, this now
adds callbacks for TextSample. This allows reading text streams from
the media files.
Change-Id: I6c00e286e98bc9aafe05b99cf2f7ce6f89d167a9
Instead of having the text readers reading from the file directly, they
now accept the data as a stream.
Change-Id: Id1b32c867a8058a68ae7aab5c568f77672a4401d
The KeySource now only handles fetching the keys and loading any PSSH
info from the license; it will not handle generating new PSSH info
based on the config.
This will allow the PSSH generation to access to the full
EncryptionConfig so we can add additional options to it.
Issue #756
Change-Id: Ia67387aa3d5ec0d723b7f5f21fc517f64c840393
There were several enum types that all were used for key systems. This
combines them into one to make it more clear and only needing to update
one. This also uses a bit field to specify multiple key systems instead
of using a std::vector.
Change-Id: Ia88039835492a5bd47f449ba4b76187046deeec0
The resolution values are uninitialized when parsing AVC decoder
configuration record if it does not contain parameter sets (SPS/PPS),
thus they could contain undefined values.
Fixes#750.
Change-Id: I6d54ec9f8740acd45a67b4b7d69031e097fbacc1
Opening a named pipe can block until both ends are open, and we cannot
control when the other end will be open. Ideally, we would always
open files in a thread so that Packager can be used with piped inputs
from naive applications without a potential deadlock.
This change will defer opening WebVTT files until the parser Run()
method is called from a thread. This way, WebVTT files being sent in
from a pipe will never be able to block the main thread.
Previously, files were opened on the main thread before calling the
parser constructor, passing the open file to the constructor as an
argument. I also tried doing it in the parser's InitializeInternal()
method, but that is also called from the main thread.
Change-Id: I54cc68ed9d48a8dc697829119be84d4065b1ae1c
Under command line flag --mvex_before_trak.
This is needed to workaround Android MediaExtractor bug which
requires |mvex| to appear before |trak|.
Closes#711.
Change-Id: Id41d71af5c0016f59023dda6408bbf502e12ac55
Added --crypt_byte_block, --skip_byte_block to allow users to specify
protection pattern other than 1:9 for pattern based encryption scheme,
e.g. cbcs and cens.
Closes#710.
b/147307451
Change-Id: I9f64a7639170c737f138572689b28d17286325c7
AV1-ISOBMFF spec is updated recently to use start alignment instead of
end alignment for cbcs:
for the protected scheme cbcs:
- BytesOfProtectedData SHALL start on the first byte and end on the
last byte of the decode_tile structure (including any trailing bits).
- A subsample SHALL be created for each tile, even if its size is less
than 16 bytes.
- ...
cenc protection scheme is not affected.
Closes#698.
Change-Id: Ic83a478fb2602d830c30daf3206a1c2d2c238a08
Remove custom constructors, which is no longer needed with C++11. Use
C++ struct zero initialization instead.
Fixes#686.
Change-Id: I512da9f23a250e8b9ebf8bb8e0a39ad0f822d0d3
Added Dolby Vision backward compatible signalling, i.e. for Dolby Vision
profile 8, both base codec without Dolby Vision and HDR codec with Dolby
Vision are signalled.
This is achieved by using a new MuxerListener implementation
MultiCodecMuxerListener, which wraps multiple child MuxerListeners and
is able to delegate to the child MuxerListeners based on the codecs in
the stream.
Closes#341.
Change-Id: I1967bb1ed503087cdd011c364e5fb5647d516ca4
Call CRYPTO_library_init to properly initialize crypto engine, which
enables AES-NI (Hardware AES) if it is supported by CPU.
Also added a performance benchmark test.
Closes#198.
Change-Id: I962a2da588d2f4f6cbe00c83ecc9a832db0e6042
For MP4 files, mp4 parser tries to open and read the same file again
to handle trailing MOOV box.
Open FIFO again may result in packager hang.
Update the code to only attempt to load MOOV for local regular files,
as FIFO and remote files are unseekable anyway.
Fixes#664.
Change-Id: Ib286d2876d202cd5a248ffe70b13589b3cc74bc9
Calculate FRAME-RATE from sample duration as in the DASH solution.
Right now calculated frame-rate may not be accurate in some scenarios,
so we avoid setting the attribute in HLS unless it is more than 30
fps. We will set it unconditionally once it is fixed.
Fixes#634.
Change-Id: I87b6e9a047d959ae88dd4dcb2b4786527ba5c9fc
- Parse and extract transfer_characteristics from H264/H265 VUI
parameters.
- Set VIDEO-RANGE attribute in HLS according to HLS specification:
https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-02#section-4.4.4.2
- Also added an end to end test.
Fixes#632.
Change-Id: Iadf557d967b42ade321fb0b152e8e7b64fe9ff3e