Now the Nalu data pointer points to the start of the NALU header
rather than pointing to the start code. Added a new method on
NaluReader to check whether the stream starts with a start code.
Change-Id: Ifaecbe0c911aa5cffdf0a966028e6cada8621cc3
For non-video slices, the data is not encrypted. This also skips the
frame headers for H.264; support for H.265 will be added later.
Issue #40
Change-Id: Id0cb0fb9ddb6adedf63ef4aef6b3a26260a21654
Removed the code for NALU splitting in the H.264 parser and moved
it to its own class. Also added support for length-prefixed
NALU splitting for use with the encrypting fragmenter.
Change-Id: I1e91266681f1b117fb2382cf80590651efc06619
Parse channel layout value from dec3 box. Pass it through audio stream
info. MPD builder forms audio channel configuration to signal ec-3
codec.
Specs: 1) ETSI TS 102 366 V1.3.1 Digital Audio Compression (AC-3,
Enhanced AC-3) Standard E.1.3.1.8.
2) DASH-IF Interoperability Points v3.0 9.2.1.2.
Issue #64
Change-Id: Ia2c22dd3d82e757ba5a88ba1de35c5d593f5005e
Before this change, the media file will fail to be parsed if it contains
non-wvtt text streams. This change allows demuxing of video and audio
streams in these media files even though the text stream is ignored.
Fixes#74.
Change-Id: I7ef108a51125c4965fe48c39efe9638f3a0e4759
This also changes the way frames are written in the WebM muxer. Now,
frames are stored and written on the next call to AddSample. So each
call to AddSample will write the previous frame. This is needed to
determine whether the given frame is the last one in the cluster.
Closes#70
Change-Id: Ic69ebad3c4729cdaa2017c9c7f497048501ac907
Create a new MacOSX configuration for curl:
- Add a curl_config.h created on MacOSX
- Add a find_curl_ca_bundle.sh that searches default folder from Homebrew and MacPorts for a ca bundle.
To find the files either install OpenSSL from Homebrew or MacPorts, or Curl from MacPorts.
When gyp is generating the ninja files a circular dependency error is reported:
packager/media/file/file.gyp -> packager/media/base/media_base.gyp -> packager/media/file/file.gyp
This isn't a problem with ninja, but presumably is a problem with Xcode.
Change gyp_packager.py to use "--no-circular-check" for all generators except xcode
When generating ninja files we end up with two libwebm targets.
packager/media/formats/webm/webm.gyp:webm -> becomes target libwebm
packager/third_party/libwebm/libwebm.gyp:libwebm -> becomes target libwebm
Solve this conflict by renaming libwebm.gyp:libwebm to mkvmuxer.
There is a target name conflict between packager/base/base.gyp:run_all_unittests and
media_test.gyp:run_all_unittests. Change to media_test.gyp:run_tests_with_atexit_manager to
resolve the conflict.
On Linux the generated ninja files use path/libbase.a as target name.
In the Mac ninja file the target is just libbase.a.
As we have two libbase.a (base/base.gyp and media/base/media_base.gyp) the linking stage fails to include both libs.
Solve by renaming media_base.gyp's base target to media_base
For WebM contents, it is possible that we may receive some NewSampleEvent
before receiving ParserInitEvent. This is because init event is fired
after analyzing a video block which could come after an audio block.
Also modified Flush() function to return a bool to indicate whether the
the flush is successful and whether the samples are handled correctly.
And added macro to ensure Flush() and Parse() results are handled.
Fixes#71
Change-Id: I2294d6f529f54e4578344916559bb1bc116c745a
Now outputs cenc:default_KID attributes on all ContentProtection
elements for non-MP4 streams. For MP4 streams, it will still output
the default ContentProtection element.
Closes#69
Change-Id: I38b24297aa3c2ccbcbde38b44279b56c37a388f7
- Also refactor decryptor management code out of mp4_media_parser.cc
- Move decryptor managment logic to DecryptorSource class to make it
available for webm as well
- Remove data_offset member from DecryptConfig which is not useful
- Add widevine_pssh_data.proto file
Closes#72
Change-Id: I1d32baf4013ebd3382b5372c7433fae5033a260e
- dts was not set earlier, although for WebM, we could assume that
dts is the same as pts.
- Calculate block duration with the difference with the next block
if duration is not encoded, even if track default_duration is set.
- Use track default_duration as a duration estimate for the last
block.
- This also removes opus duration computation from encoded data.
Issues #67, #68
Change-Id: Icaa2769dcb2a89269ae014f44ad6a9262770aed2
- Box definitions for box type DEC3.
- Parser/muxer changes to support Enhanced-AC3 audio codecs.
- MPD signaling will come in Part 3.
Issue #64
Change-Id: Ifcd5efa1f61b470ec225127925631e4329853259
This does not support key-rotation and will give an error. This is
because WebM does not have a way to indicate a change in key ID using
media segments.
b/22463551
Change-Id: I9b3dac818dc370302a5afc0d25d8a060b64d30cd
- Check if 'output_dir=' is already defined in GYP_GENERATOR_FLAGS
before appending the one generated in the script.
- Reusing out/ with different GYP_DEFINES causes everything to rebuild.
- This change allows the user to use different directories for different
GYP_DEFINES; it can make sanity checking faster for different
GYP_DEFINES.
Change-Id: Iffa6880381dabdd80a3aa7777a1d20cc3900f3e3
- From DASH spec 2014, MPD@publishTime and Period@id are required for
'dynamic' MPD.
- Period@id is always set to "0".
- MPD@publishTime is set to the time when the MPD is output.
Issue #55
Change-Id: I5e50aa11067176e69a2343fbc82ca42129703e1b
Added packager tests for WebM audio. Also now only outputs the
language if it's not empty. Fixed the packager tests for that.
b/26540606
Change-Id: Ica804bd710055bcaa2113f948d723dedd78ef909
- @width, @height, @frameRate for Representation element will not be
set if the attributes are set at AdaptationSet level.
Issue #55
Change-Id: Ib4e669142874f9e8f0ca773df9f87a3fef01b729
- Box definitions for box type DAC3.
- Parser/muxer changes to support AC3 audio codecs.
- EC3 audio sample entry will come in Part 2.
- MPD signaling will come in Part 3.
Issue #64
Change-Id: I790b46ae8179b933bb8f7da9cdd38591fe8da43d
ThreadedIoFile spawns a new thread for every new file. Thread
information is stored for tracking purpose by base::tracked_objects.
The tracking object remains even if the thread itself is destroyed.
This results in memory usage increased by a couple of bytes for every
new segment created in live mode (new segments spawns new threads).
Use WorkerPool instead to avoid spawning new threads.
Fixes Issue #61.
Change-Id: Id93283903c3ba8ebf172a0d58e19b082a72c6cf0
For mp4 outputs, a metadata box with version information is added to
moov box.
For mpd outputs, a text comment with version information is added in
the beginning of mpd file.
Issue #60
Change-Id: I783ba370781c0a8f77c910ff1172bad2e7edff75
- Another minor change in segmenter_test_base: scoped_refptr can
be passed by value, remove ".Pass".
Change-Id: I31f0cf74c5ad0aba8890d3b1845155d63d7326a0
* Changed Segmenters to accept StreamInfo rather than MediaStream
to help in testing.
* Changed MemoryFile behavior to mirror local file:
* Read non-existent file is an error.
* Write deletes any existing file.
* Fixed a bug in SingleSegmentSegmenter.
Change-Id: I339e35597ca4661b7a26c6fdbbfa2f9f511c7da0
Javascript/JSON does not support int64_t or unsigned numbers. asset_id,
if greater than 0x80000000 will be converted to negative number. Use
double to represent asset_id instead as 32-bit integer can be lossless
represented using double.
Bug: 26309000
Change-Id: I3e800c396a1231375776295154fb0d96156e980b