Commit Graph

19 Commits

Author SHA1 Message Date
Kongqun Yang 9990524f98 Implement ChunkingHandler
This handler is a multi-in multi-out handler. If more than one input is
provided, there should be one and only one video stream; also, all inputs
should come from the same thread and are synchronized.
There can be multiple chunking handler running in different threads or even
different processes, we use the "consistent chunking algorithm" to make sure
the chunks in different streams are aligned without explicit communcating
with each other - which is not efficient and often difficult.

Consistent Chunking Algorithm:
 1. Find the consistent chunkable boundary
 Let the timestamps for video frames be (t1, t2, t3, ...). Then a
 consistent chunkable boundary is simply the first chunkable boundary after
 (tk / N) != (tk-1 / N), where '/' denotes integer division, and N is the
 intended chunk duration.
 2. Chunk only at the consistent chunkable boundary

This algorithm will make sure the chunks from different video streams are
aligned if they have aligned GoPs. However, this algorithm will only work
for video streams. To be able to chunk non video streams at similar
positions as video streams, ChunkingHandler is designed to accept one video
input and multiple non video inputs, the non video inputs are chunked when
the video input is chunked. If the inputs are synchronized - which is true
if the inputs come from the same demuxer, the video and non video chunks
are aligned.

Change-Id: Id3bad51ab14f311efdb8713b6cd36d36cf9e4639
2017-02-11 02:41:34 +00:00
Kongqun Yang 7a90ee70ab Implement EncryptionHandler
Change-Id: Iabedf3b02057d6124d5393ae9618490e5595ad89
2017-02-11 01:21:28 +00:00
Yohann Connell 24b0e3031a Adding PlayReady support to Shaka packager
PlayReady Header Object Spec (PSSH Data VOD)
http://download.microsoft.com/download/2/3/8/238F67D9-1B8B-48D3-AB83-9C00112268B2/PlayReady%20Header%20Object%202015-08-13-FINAL-CL.PDF

PlayReady Live Streaming Spec (Consult Appendix for package acquisition information)
http://download.microsoft.com/download/2/D/D/2DD6B4E8-CABF-4DE9-8F61-895BE8F1ED33/ProtectingLiveTVServicesWithPlayReady_March2015.pdf

Issue #128
Change-Id: Ic5c0d6c642ceba3bdf9e8e413934f0fbcba242e6
2017-01-24 13:36:47 -08:00
Kongqun Yang 80c54a533a Update cmd flags to support static mpd with live profile
- Deprecated command line flags --profile and --single_segment.
  'segment_template' in stream descriptors implies live profile
  and non-single segment.
- Added flag --generate_static_mpd_for_live_profile to generate
  static mpd for live profile; if not set, dynamic mpd will be
  generated.

Close #142

Change-Id: I78879297ed118f0f246c4753a16ad125bd6b5e4f
2017-01-13 20:00:10 +00:00
Rintaro Kuroiwa 60419f26d0 Add driver program flags for HLS
- Add flags and stream descriptor fields for HLS.
- Remove fields from MuxerOptions. Instead pass them directly to
  HlsNotifyMuxerListener.
- Rebase segment names to the master playlist's path where it makes
  sense.

Change-Id: If4f54bc56ff46dc6140859a79ed66f7b99112ed7
2016-06-13 18:30:24 -07:00
Kongqun Yang 32482c0bce Rename filters directory to codecs
Also move codecs related classes in mp4 to codecs directory.

Change-Id: I83db2bcf9e66b405fcceed78918b762b26cd7fce
2016-05-27 16:13:19 -07:00
Kongqun Yang 797ae3e639 Copy packager_test.py to out directory on build
- Disallow packager_test.py to be executed from source directory
- Remove the building of packager target from packager_test.py. User
  need to make sure packager builds successfully before running
  the test.
- Remove build_type parameter which is no longer needed

Change-Id: I479d3c39b8d45730e5388d194069f1320fa5cd75
2016-04-22 18:16:33 +00:00
Rintaro Kuroiwa 2adaf1712d HLS MediaPlaylist class
- A class to generate Media Playlists.

Issue #85

Change-Id: I689e97c767049bc21de279c743cbabf4ca4711be
2016-04-11 20:53:47 -07:00
KongQun Yang b3e85ff810 Enable '-Wimplicit-fallthrough' and fix issues
Change-Id: I9e1e09f3924dcd8f59af2fbc952456b81e2d7c4e
2016-01-06 17:12:49 -08:00
KongQun Yang 9c95309c12 Pull profiling dependency from Chromium
Profiling can be enabled by setting profiling=1 in gyp, e.g.
  GYP_DEFINES="profiling=1" gclient runhooks

To turn on heap profiling, use the HEAPPROFILE environment variable
to specify a filename for the heap profile dump, e.g.
  HEAPPROFILE=/tmp/heapprofile out/Release/packager ...

To turn on cpu profiling, use the CPUPROFILE environment variable
to specify a filename for the cpu profile dump, e.g.
  CPUPROFILE=/tmp/cpuprofile out/Release/packager ...

Note that profiling may not work for debug builds, so use release
build if possible.

See docs/linux_profiling.md for details.

This change will help identify and resolve problem behind Issue #61.

Change-Id: I6f85a04ed82dd0cb3588e6b38e8ceb68dac6c436
2015-12-29 17:14:02 -08:00
Rintaro Kuroiwa 1cdce29343 WebVttMediaParser and TextStreamInfo
- Add WebVttMediaParser which parses and creates MediaSamples from text
  WebVtt inputt

Change-Id: Ia7bb7474df7f15e454e887b8c291fdfdc3195e46
2015-12-14 13:58:21 -08:00
KongQun Yang c577e6132f Implement initial support for vpx in iso-bmff
Also update the code to generate CompressorName in VideoSampleEntry
for both AVC1 and various VP codecs.

Change-Id: I2355f8008a72806e852aa1ec6c80e9141b97d963
2015-11-04 00:34:00 +00:00
KongQun Yang cf0db383a3 Enable verbose logging through --v or --vmodule
Change-Id: I36d8d3dd11abe10ce598ef92f38a2a33a15d8f8e
2015-10-28 22:15:50 +00:00
KongQun Yang 845766f69a Make webm parser compile and unittest pass
Change-Id: Ib93fbb3eba6f0638f3aa57a9a47e73e8738792d1
2015-10-16 15:51:56 -07:00
Kongqun Yang 9c0ae378bc Switch to boringssl. Also update curl accordingly.
Boringssl and yasm gyp and patches will follow in a separate cl.

Bug: 22463853

Change-Id: I87b91ac089866db58ac433def006fe9ac4744bd6
2015-10-16 20:10:38 +00:00
Kongqun Yang e5b6096857 Generate tkhd and pasp boxes properly with non-square pixels
- Width/Height in tkhd box should be display resolution instead of
  coded resolution.
- pasp was not generated earlier.
- Assuming SAR as 1:1 if it failed to be extracted successfully.
- Also update test files for mp4_media_parser_unittest.

This fixes Issue #35.

Change-Id: Iedbe6a44465aac6723b6ea2de30aed180821eccd
2015-08-07 21:46:08 +00:00
KongQun Yang d3c3a5573b Make LibcryptoThreading cross-platform
Change-Id: Id559c9b4d61f6d5d419735becc968fff3aa7f866
2015-03-24 18:19:30 +00:00
KongQun Yang dd2ada2026 Make signer optional in packager app
Also refactor the command line flag validation app to make it cleaner.

Change-Id: Idb7bb33bd3060aaf25765c1575ceddd901b90c4d
2014-10-14 14:20:21 -07:00
KongQun Yang b8126bc9da Move source code into packager directory
Make it easier to be included and integrated into other code.

Change-Id: I609881688cc20f8fac676cbd91fde4753af32ee5
2014-10-02 12:32:14 -07:00