Commit Graph

1531 Commits

Author SHA1 Message Date
Rintaro Kuroiwa beaea71946 Add tests that check the 'id' attributes.
Change-Id: I487ec7c658fd5a3a8bae03800e23b37cc44066f4
2014-05-22 14:18:27 -07:00
KongQun Yang b0e26ff297 Implement SimpleMpdNotifier
SimpleMpdNotifier listens to muxer events and generates MPD file.

Change-Id: I19304cdb9eba65fd01328aa0fd5e6d280cc5714e
2014-05-22 10:38:41 -07:00
KongQun Yang f6a54c289f Rename VodMpdNotifyMuxerListener to MpdNotifyMuxerListener
Change-Id: Ia23e127cc840f8b332c76cbac8c610c255c78ce5
2014-05-22 10:29:02 -07:00
KongQun Yang e7fe62763d Add 'pssh' box for clear lead fragments as well
This is to workaround a Chrome limitation that CDM must be initialized
before starting the playback. CDM can only be initialized with a valid
'pssh'.

Change-Id: Ia34e90dac42abbcdf0193fe4e3c971c87debdd42
2014-05-15 10:59:46 -07:00
KongQun Yang b25834a910 Implement EncryptingFragmenter from Fragmenter
Extract encryption related handlings from Fragmenter and move into new
class EncrpytingFragmenter.

Change-Id: Id42493cd321fd7e306f8ce522c7ff04990965256
2014-05-15 16:55:01 +00:00
Thomas Inskip 3f0454eced Merge "Added implementation of UdpFile for UDP unicast/multicast capture." 2014-05-14 22:59:21 +00:00
KongQun Yang 49dd6e49bb Always generate version 1 SampleGroupDescription box
Version 0 is obsoleted. Also fixes unittest typos.

Change-Id: I0e536ba316ac07ce939dae71752e00db19e3db58
2014-05-08 22:34:22 +00:00
KongQun Yang 80a60b7ef2 Support 64 bit mdat box size
Change-Id: I38be77d2d13eceaeeda6f3ff270c8d7cd1d2a300
2014-05-08 21:55:55 +00:00
KongQun Yang 815b90753f Use OpenSSL RAND_bytes for random IV generation
base::RandBytes may not be cryptographically strong.

Bug: 13658504
Change-Id: Id5dcd4e512f05c2f06302654277f2fd11a53f2b7
2014-05-07 17:34:11 -07:00
Kongqun Yang 1f315ba921 Support key rotation in widevine encryption key source
Change-Id: I05ded15fa666119c86a1d3f1c99123b9cda60b49
2014-05-07 18:37:01 +00:00
Thomas Inskip 2eb40fef65 Added implementation of UdpFile for UDP unicast/multicast capture.
Change-Id: Ie11b86821d34f6b93cd8d00c1709572d1a46e72b
2014-05-05 17:44:47 -07:00
Kongqun Yang 1773d08b8d Add new flag max_sd_pixels to determine SD or HD track
Change-Id: If841af98345177cf1832b9e5b91148168b000f44
2014-05-05 11:35:44 -07:00
Kongqun Yang 53287e5fe7 Add m2ts and audio tests in packager_test
Change-Id: I11cc65a2baa69bc5e3bc022027bca6712f810f1a
2014-05-02 22:16:21 +00:00
KongQun Yang e8e83cc37c Fix packager_main crash in Debug mode muxing clear video
Change-Id: I8bef6a2ebbfc47c7f60fbd2f549ba20cb1daf99c
2014-05-01 12:35:24 -07:00
Kongqun Yang 30cb6948e5 Add MediaParser::Flush to flush the parser
Change-Id: Ic12a045dda47ccd270c8c3e9e83768e04a53ad58
2014-04-29 20:33:04 +00:00
Thomas Inskip 77e9302aa9 Cleaned up TODOs from MPEG-2 code. 2014-04-29 11:51:28 -07:00
Thomas Inskip 67bdd89ba2 Implemented H.264 byte stream to unit stream conversion and other components
needed for MPEG-2 TS h.264 video demux and transmux.

Change-Id: I878cdd141140cfd6833d75c7133301b1d65f1da0
2014-04-24 18:27:47 +00:00
Thomas Inskip 4a39a0fc98 Renamed mp2t::MediaParser to mp2t::Mp2tMediaParser, removed filters namespace.
Change-Id: Ib4de2863d5e746b32703d49e721473a2ff6c8de7
2014-04-24 10:17:23 -07:00
Thomas Inskip faa12bd191 Merge "Added ADTS header parsing, removal, and conversion to AudioSpecificConfig. Hooked up mp2t media parser, audio transmux now working." 2014-04-23 20:39:05 +00:00
Kongqun Yang 50ed026751 Support key rotation when generating MP4 fragments
Change-Id: I472e03a2d41ee450c12c0fe3012904628d6893e7
2014-04-23 12:54:40 -07:00
Kongqun Yang 9076411044 Rename EncryptorSource to EncryptionKeySource
Change-Id: I0a3d0e205922bbb4015955e04d51b7a9a4fa86e1
2014-04-23 12:45:18 -07:00
Kongqun Yang f059d926d7 Update client of EncryptorSource due to refactoring
This CL also includes two related changes:
  1. Support serialization of raw PSSH box;
  2. Refactor segmenter interface a bit.

Change-Id: I668aa01a5a5ff524ad6fe74976339a3fd499120a
2014-04-23 12:35:52 -07:00
Kongqun Yang 107145c693 Refactor EncryptorSource to prepare for live support
Remove Initialize() and Add AddKey().

Also remove fixed_encryptor_source.* and move the functionality to
encryptor_source.*.

Change-Id: I4fb61013177874a8b81854f10b2deda83accc683
2014-04-23 12:34:13 -07:00
Thomas Inskip 71a425799d Added ADTS header parsing, removal, and conversion to AudioSpecificConfig.
Hooked up mp2t media parser, audio transmux now working.

Change-Id: Idc92a51d25fa6ed2f74627131d53919e52394119
2014-04-22 18:34:36 -07:00
Thomas Inskip c5f1e5eb7a Modified mp2t::MediaParser to work with the packaging SDK.
Added transport stream test data.

Change-Id: I2f20d0a67eb5a1157ceed08af67368895016170c
2014-04-22 13:32:36 -07:00
Thomas Inskip 20e66b2109 Renamed mp2t_stream_parser* to mp2t_media_parser* .
Change-Id: I4e72dadadeadcb890056fb8540e498a9bb0d06ab
2014-04-22 19:51:58 +00:00
Thomas Inskip cbf4978ffa Modified H.264 elementary stream parsing code to work with remux framework.
Change-Id: I81dfe0952073c4a5cd6f5fcaf14fe21050d26cb6
2014-04-22 12:49:41 -07:00
Kongqun Yang 8df0e1ad0a Fix flaky MultiThreadProducerConsumerQueueStopTest
The main thread may run ahead of the closure thread. In this case,
Stop() could have been called before the first Push() call.

Change-Id: Ib6d94d451a8215fff572ea13f9567ba786d77fa5
2014-04-21 13:59:32 -07:00
Thomas Inskip a7c91ca7dd Modified audio elementary stream parsing to work with packager remux.
Change-Id: Ice95102640e5cbb0382dc4c604c0af013103da99
2014-04-21 19:16:32 +00:00
Thomas Inskip 30b51506c4 Check-in of unmodified audio elementary stream parsing code.
Source of media/base/*:
    http://src.chromium.org/chrome/trunk/src/media/base@262934
Source of media/formats/mpeg/*:
    http://src.chromium.org/chrome/trunk/src/media/formats/mpeg@257932

Change-Id: Icd56b6f496befcd0c9f4eec2460fb2e998ae8bd2
2014-04-21 19:16:09 +00:00
Thomas Inskip 5557ce7677 Filters library and unit test builds.
Added filters gyp file.

Some tweaks to get the h.264 related filters library and unit tests building
in the packager source tree.

Change-Id: Ib79ffe307d3357b4b38f13ee87cbd93f0f93b1cc
2014-04-21 19:15:30 +00:00
Thomas Inskip 0ad332896e Check-in of unmodified MPEG-2 and H.264 parsers.
Source of media/formats/mp2t:
    http://src.chromium.org/chrome/trunk/src/media/formats/mp2t@260741

Source of media/filters:
    http://src.chromium.org/chrome/trunk/src/media/filters@260719

Change-Id: Ib4c72553f0213cb6dd25fa3dcc0367d96cdd094a
2014-04-21 12:05:58 -07:00
Thomas Inskip 5f99651223 Moved mp4 code to new "formats" directory to match Chromium source tree.
(second attempt due to conflicts).

Change-Id: I2143921bcacdbaa6cfcaf59602713294b4b1f6ee
2014-04-21 12:05:32 -07:00
Kongqun Yang c51c6b2731 Fix ClosureThread unittest crash in release build
The crash happens if the thread is created but never started. An
improper Join triggered the crash. We should not call Join if the thread
is not started.

Change-Id: Icace740889089d3b2e15cf6c76c2b0887eb84535
2014-04-18 18:48:41 -07:00
Kongqun Yang 7fd94950d4 ProducerConsumerQueue unittest
Change-Id: I7cbd830e9bf93e1a5da75870f7a7a596708e5d5d
2014-04-18 18:35:41 -07:00
Kongqun Yang 7e9b8aa5a4 A thread safe producer consumer queue implementation
Change-Id: I827d8959d9c7c398178d083d01fafdb1779805da
2014-04-18 18:28:02 -07:00
Kongqun Yang 3f8b37a377 Implement ClosureThread
ClosureThread runs a Closure in a platform thread. Chromium Thread class
involves message loop, so we choose to implement our own based on the
lower level SimpleThread which wraps PlatformThread.

Change-Id: Ibb759f7debcc027c0764195ca93506f9a202110b
2014-04-19 01:03:29 +00:00
Kongqun Yang 2c8418fd22 Add 'sbgp' and 'sgpd' box definitions
sbgp: Sample to Group box
sgpd: Sample Group Descripton box

They are required for DASH Live support.

Change-Id: I2f3b55843c5148db60c7c3a6891ba825b59934ce
2014-04-19 00:57:39 +00:00
Kongqun Yang beac7bae62 Add AUTHORS, CONTRIBUTORS, CONTRIBUTING.md, and README.md
CONTRIBUTING.md and README.md use GitHub Flavored Markdown, tested @
http://md.mouse.vc/

Change-Id: Ib01b9bcd8c7dac240de6d25ff443e7cdc296d780
2014-04-19 00:05:38 +00:00
Kongqun Yang f849630113 Clean up packager_main exiting message
The message will be printed only if output is missing and
dump_stream_info is false.

Change-Id: Ia3ecca961d84b15e45182e19fd90501156e1aa9c
2014-04-18 15:32:44 -07:00
Kongqun Yang 2169c12e0d Add Chromium license
Change-Id: I199fae983e3613f6ab6361c3f3ef7ba779335b19
2014-04-10 19:58:08 +00:00
Kongqun Yang 833f27f687 Make Muxer::Initialize and Muxer::Finalize private
User should not need to care about how and when to call these APIs.
Internal code should call them automatically.

Change-Id: Ibc85a709d4e82ecc7b477986cabf09dcfc2e100c
2014-04-10 19:56:35 +00:00
Kongqun Yang 2498da675a Rename MP4GeneralSegmenter and MP4VODSegmenter
Rename MP4GeneralSegmenter to MultiSegmentSegmenter and MP4VODSegmenter
to SingleSegmentSegmenter.

Also drop MP4 from MP4Fragmenter and MP4Segmenter.

Change-Id: I5cefb88164516ec3588e0e3333a16f05b6277e7b
2014-04-09 20:27:16 +00:00
Kongqun Yang b34b997bcb Some more clean ups in media/base
1. Use size_t for MediaSample size;
2. Get rid of stringstream in media_sample.cc and media_stream.cc.

Change-Id: I11fe650305a732ae6a18546ac68692e03ecedae4
2014-04-09 18:39:51 +00:00
Kongqun Yang f9ae38f717 Doxygen documentation for media/base
Change-Id: I6a63bd762e9f32655baf9b40db32ababb6aa3b54
2014-04-07 18:09:23 -07:00
Rintaro Kuroiwa e5aea1b016 Doxygen doc for MPD generation classes.
Change-Id: I8d28d05395732684f8c8fc73a8a40656ffa26a74
2014-04-07 14:48:05 -07:00
Kongqun Yang e4a6cf4edd Add AES signing support to packager_main app
Add two new command line arguments: --aes_signing_key for AES signing
key (in hex) and --aes_signing_iv for AES signing iv (in hex). Also
change --signing_key_path to --rsa_signing_key_path.

Bug: 13582970

Change-Id: I66ba330a1a05e0f5def7987ac41d396dc92005ae
2014-04-01 18:19:31 +00:00
Kongqun Yang adeb1f16ec Doxygen comments for media/file
Change-Id: Iba142c50efe9eac169f1ebd016035e070865e742
2014-04-01 10:52:22 -07:00
Kongqun Yang 25b1038f5d Enable warnings and warnings-as-errors
The warnings and warnings-as-errors are enabled by set chromium_code to
1. Chromium build disables warnings and warnings-as-errors by default
on external contents.

And fix the errors with them enabled. Mostly defined but not used,
sign-unsign comparison, unsigned string formatting, and return value not
used etc.

Change-Id: I305b63924955a84172e98e0ebfe5aba0f11bdb37
2014-03-28 22:24:49 +00:00
Kongqun Yang 0c2d7cfa33 Add an empty .gitmodules to avoid gclient warning 2014-03-28 22:13:33 +00:00