Commit Graph

214 Commits

Author SHA1 Message Date
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
Kongqun Yang 895a4daa4d Update happyhttp to latest revision
Latest rev of happyhttp fixes the bugs so patches are no longer needed.
Also removes http_fetcher_unittest from the build as it performs real
http requests to an external server.
2014-03-28 22:13:03 +00:00
Kongqun Yang 56c203c214 Remove TODOs
Some TODOs remain but are replaced with word NOTE instead. Some TODOs
are turned into bugs.

The patch are prepared using script:
find . -regex ".*/\(app\|media\|mpd\)/.*\.\(cc\|h\|gyp\)" \
  -exec sed -i "/TODO/d" {} \;
(remove the line containing TODO) with some post editing.

Change-Id: I6dd3539cce2bbeefee32d6307f78c13aacb94d1b
2014-03-28 14:30:27 -07:00
Kongqun Yang fddeb1feb1 Support for multiple audio/video tracks in a file
Remove --audio and --video command line options and replaced with
--stream. User can use --stream=video (default) to pull the first video
track from the source or --stream=audio to pull the first audio track.
The user may also use --stream={stream_id}, 0-based stream id to pull
the stream, e.g. --stream=0 for the first stream.

Change-Id: Ie1f93c2cc80a160a496b1d43ae3a658263d30cfc
2014-03-21 14:38:45 -07:00
Kongqun Yang af0725a887 Fix crash when parsing MP4 with MDAT before MOOV
Exit gracefully rather than crash with segmentation fault.

Bug: 13458666
Change-Id: Ic34bbd9aa2e2fa69c46a47f9cfeb326a910121a5
2014-03-20 16:33:00 -07:00
Kongqun Yang aee2419c16 Remove UINT32_MAX in xml_node.cc
UINT32_MAX is not defined in C++. It was brought in indirectly from
libxml.

http://stackoverflow.com/questions/1471353/whats-the-c-equivalent-of-uint32-max

Change-Id: I1bdb0a3d06a40d439d81f283934c24df271fb740
2014-03-20 23:20:36 +00:00
Kongqun Yang e21f436d97 Fix a compilation error due to base update 2014-03-19 18:57:29 -07:00
Kongqun Yang c1a7fd9c4a Change output messages to make it more human readable
Also remove formatting using stream which is not recommended per Google
C++ style guide.

Change-Id: I3930f0a453acc0258876c08c4266dcbb13757ac8
2014-03-19 18:42:27 -07:00
Kongqun Yang 5f3c0f7181 Remove the name after TODO
The change is made using command:
find . -regex ".*/\(app\|media\|mpd\)/.*\.\(cc\|h\|gyp\)" -exec sed -i
's,TODO(\w\+),TODO,g' {} \;

Then scan through the files and reformat them properly.

Change-Id: I13836cde38b9e30daf1fd8a847e203337f883e1b
2014-03-19 18:07:06 -07:00
Kongqun Yang ed5ecd64fd Remove ipc and net, replacing with dependency in DEPS
Change-Id: I5a95cc475291b788981a09b3621bd0c18c01091c
2014-03-20 01:00:54 +00:00
Kongqun Yang c8307c102e Update packager to work with gclient
Detail changes:
1. Add gclient DEPS (depenencies)
2. Update gyp_packager.py
3. Update .gitignore
4. Update third_party/happyhttp patch path
5. Add a new script in happyhttp to reset the patch before re-sync

Change-Id: I30f0beb94a56ae8aff3b25bb16fe76a7b07e3d54
2014-03-20 00:56:36 +00:00
Kongqun Yang 4a8e868e8f Remove submodules, third_party, testing, and tools
This is preparing for gclient switching.

Build break is expected. Some change in build script is required.

Change-Id: I4ebb78d3ae3114318c101ff4927954c89fce9a1d
2014-03-20 00:56:02 +00:00
Kongqun Yang e2b29552e9 Fix flaky packager_test due to timestamp diff
Change muxer interface to allow injection of testing clock. Also added
more packager_tests.

Change-Id: Ie580cbd7e79607a2c2b9df5d5d52ee4be108ff8f
2014-03-20 00:52:53 +00:00
Kongqun Yang cca3767c25 First draft doxygen documentation for media/mp4.
Change-Id: I13a28245168724a237a4653e298d6b835c24f17b
2014-03-19 17:39:42 -07:00
Kongqun Yang 6046cde3d8 Remove valgrind and include it using submodule
Change-Id: I4cfdb6bb908a386ad29b9932534cc5d187106f79
2014-03-17 18:05:04 +00:00
Kongqun Yang b387b4083c Remove xdisplaycheck, emacs, and vim from tools
We don't need xdisplaycheck any more with x11 disabled. Emacs and vim
are setup for Chromium, and are not really useful for us.

Change-Id: Ia04e8458ea24e1980918de7eab74705e56b90735
2014-03-17 18:04:24 +00:00
Kongqun Yang d2b38ce118 Remove webm which is not really supported yet
Change-Id: Idc94f8c193c07e93c3c910a95f8576a10a65a177
2014-03-14 14:00:08 -07:00
Kongqun Yang d90ca489f9 Widevine encryptor source unittest
Change-Id: I1b56d0a019480472eb462d8a39f81c4eb3c81a0e
2014-03-12 10:56:31 -07:00