2014-02-14 23:21:05 +00:00
|
|
|
# Copyright 2014 Google Inc. All rights reserved.
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style
|
|
|
|
# license that can be found in the LICENSE file or at
|
|
|
|
# https://developers.google.com/open-source/licenses/bsd
|
|
|
|
|
2013-10-10 00:07:10 +00:00
|
|
|
{
|
2017-12-06 23:08:40 +00:00
|
|
|
'variables': {
|
|
|
|
'shaka_code': 1,
|
|
|
|
},
|
2013-10-10 00:07:10 +00:00
|
|
|
'targets': [
|
2017-05-22 20:31:41 +00:00
|
|
|
{
|
|
|
|
'target_name': 'libpackager',
|
2017-05-23 02:41:26 +00:00
|
|
|
'type': '<(libpackager_type)',
|
2017-05-22 20:31:41 +00:00
|
|
|
'sources': [
|
|
|
|
# TODO(kqyang): Clean up the file path.
|
2017-12-12 21:05:12 +00:00
|
|
|
'app/job_manager.cc',
|
|
|
|
'app/job_manager.h',
|
2018-01-03 18:16:08 +00:00
|
|
|
'app/muxer_factory.cc',
|
|
|
|
'app/muxer_factory.h',
|
2017-05-22 20:31:41 +00:00
|
|
|
'app/libcrypto_threading.cc',
|
|
|
|
'app/libcrypto_threading.h',
|
|
|
|
'app/packager_util.cc',
|
|
|
|
'app/packager_util.h',
|
2017-12-12 21:05:12 +00:00
|
|
|
'packager.cc',
|
|
|
|
'packager.h',
|
2017-05-22 20:31:41 +00:00
|
|
|
],
|
|
|
|
'dependencies': [
|
2017-07-10 18:26:22 +00:00
|
|
|
'file/file.gyp:file',
|
2017-05-22 20:31:41 +00:00
|
|
|
'hls/hls.gyp:hls_builder',
|
2017-11-21 21:24:13 +00:00
|
|
|
'media/ad_cue_generator/ad_cue_generator.gyp:ad_cue_generator',
|
2017-05-22 20:31:41 +00:00
|
|
|
'media/chunking/chunking.gyp:chunking',
|
2017-08-28 22:27:05 +00:00
|
|
|
'media/codecs/codecs.gyp:codecs',
|
2017-11-21 21:24:13 +00:00
|
|
|
'media/crypto/crypto.gyp:crypto',
|
2017-05-22 20:31:41 +00:00
|
|
|
'media/demuxer/demuxer.gyp:demuxer',
|
|
|
|
'media/event/media_event.gyp:media_event',
|
|
|
|
'media/formats/mp2t/mp2t.gyp:mp2t',
|
|
|
|
'media/formats/mp4/mp4.gyp:mp4',
|
|
|
|
'media/formats/webm/webm.gyp:webm',
|
|
|
|
'media/formats/webvtt/webvtt.gyp:webvtt',
|
|
|
|
'media/formats/wvm/wvm.gyp:wvm',
|
2017-11-15 20:13:18 +00:00
|
|
|
'media/public/public.gyp:public',
|
2017-08-28 22:27:05 +00:00
|
|
|
'media/replicator/replicator.gyp:replicator',
|
2017-05-22 20:31:41 +00:00
|
|
|
'media/trick_play/trick_play.gyp:trick_play',
|
|
|
|
'mpd/mpd.gyp:mpd_builder',
|
|
|
|
'third_party/boringssl/boringssl.gyp:boringssl',
|
2017-05-23 02:41:26 +00:00
|
|
|
'version/version.gyp:version',
|
|
|
|
],
|
|
|
|
'conditions': [
|
2017-06-22 20:38:27 +00:00
|
|
|
['libpackager_type == "shared_library"', {
|
2017-05-23 02:41:26 +00:00
|
|
|
'defines': [
|
|
|
|
'SHARED_LIBRARY_BUILD',
|
|
|
|
'SHAKA_IMPLEMENTATION',
|
|
|
|
],
|
|
|
|
}],
|
2017-06-22 20:38:27 +00:00
|
|
|
['libpackager_type == "static_library"', {
|
|
|
|
'standalone_static_library': 1,
|
|
|
|
}],
|
2017-05-22 20:31:41 +00:00
|
|
|
],
|
|
|
|
},
|
2014-01-14 04:52:05 +00:00
|
|
|
{
|
2014-05-09 01:23:54 +00:00
|
|
|
'target_name': 'packager',
|
2013-10-11 21:44:55 +00:00
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
2017-11-13 18:08:44 +00:00
|
|
|
'app/ad_cue_generator_flags.cc',
|
|
|
|
'app/ad_cue_generator_flags.h',
|
2017-03-28 15:19:15 +00:00
|
|
|
'app/crypto_flags.cc',
|
|
|
|
'app/crypto_flags.h',
|
2017-06-14 23:18:16 +00:00
|
|
|
'app/gflags_hex_bytes.cc',
|
|
|
|
'app/gflags_hex_bytes.h',
|
2016-04-16 22:58:47 +00:00
|
|
|
'app/hls_flags.cc',
|
|
|
|
'app/hls_flags.h',
|
2018-01-18 19:26:47 +00:00
|
|
|
'app/manifest_flags.cc',
|
|
|
|
'app/manifest_flags.h',
|
2014-05-22 19:39:30 +00:00
|
|
|
'app/mpd_flags.cc',
|
|
|
|
'app/mpd_flags.h',
|
2014-05-09 01:23:54 +00:00
|
|
|
'app/muxer_flags.cc',
|
|
|
|
'app/muxer_flags.h',
|
|
|
|
'app/packager_main.cc',
|
2017-01-05 17:32:17 +00:00
|
|
|
'app/playready_key_encryption_flags.cc',
|
|
|
|
'app/playready_key_encryption_flags.h',
|
2017-10-17 23:03:08 +00:00
|
|
|
'app/raw_key_encryption_flags.cc',
|
|
|
|
'app/raw_key_encryption_flags.h',
|
2017-09-12 19:22:39 +00:00
|
|
|
'app/protection_system_flags.cc',
|
|
|
|
'app/protection_system_flags.h',
|
2017-01-07 02:40:37 +00:00
|
|
|
'app/retired_flags.cc',
|
|
|
|
'app/retired_flags.h',
|
2014-06-27 23:07:36 +00:00
|
|
|
'app/stream_descriptor.cc',
|
|
|
|
'app/stream_descriptor.h',
|
2014-10-13 22:06:48 +00:00
|
|
|
'app/validate_flag.cc',
|
|
|
|
'app/validate_flag.h',
|
2015-10-27 18:52:50 +00:00
|
|
|
'app/vlog_flags.cc',
|
|
|
|
'app/vlog_flags.h',
|
2014-05-09 01:23:54 +00:00
|
|
|
'app/widevine_encryption_flags.cc',
|
|
|
|
'app/widevine_encryption_flags.h',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
2017-05-23 02:41:26 +00:00
|
|
|
'base/base.gyp:base',
|
2017-07-10 18:26:22 +00:00
|
|
|
'file/file.gyp:file',
|
2017-05-22 20:31:41 +00:00
|
|
|
'libpackager',
|
2014-05-09 01:23:54 +00:00
|
|
|
'third_party/gflags/gflags.gyp:gflags',
|
|
|
|
],
|
2015-12-29 20:41:04 +00:00
|
|
|
'conditions': [
|
|
|
|
['profiling==1', {
|
|
|
|
'dependencies': [
|
|
|
|
'base/allocator/allocator.gyp:allocator',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
2014-05-09 01:23:54 +00:00
|
|
|
},
|
2013-10-11 21:44:55 +00:00
|
|
|
{
|
2014-02-13 23:56:38 +00:00
|
|
|
'target_name': 'mpd_generator',
|
2013-10-11 21:44:55 +00:00
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
2014-02-13 23:56:38 +00:00
|
|
|
'app/mpd_generator.cc',
|
|
|
|
'app/mpd_generator_flags.h',
|
2015-10-27 18:52:50 +00:00
|
|
|
'app/vlog_flags.cc',
|
|
|
|
'app/vlog_flags.h',
|
2013-10-11 21:44:55 +00:00
|
|
|
],
|
|
|
|
'dependencies': [
|
|
|
|
'base/base.gyp:base',
|
2014-02-13 23:56:38 +00:00
|
|
|
'mpd/mpd.gyp:mpd_util',
|
|
|
|
'third_party/gflags/gflags.gyp:gflags',
|
2013-10-11 21:44:55 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'packager_test',
|
2014-01-22 15:52:18 +00:00
|
|
|
'type': '<(gtest_target_type)',
|
|
|
|
'sources': [
|
2017-05-22 20:31:41 +00:00
|
|
|
'packager_test.cc',
|
2014-01-22 15:52:18 +00:00
|
|
|
],
|
|
|
|
'dependencies': [
|
2017-05-23 02:41:26 +00:00
|
|
|
'base/base.gyp:base',
|
2017-05-22 20:31:41 +00:00
|
|
|
'libpackager',
|
2017-07-17 18:15:07 +00:00
|
|
|
'testing/gmock.gyp:gmock',
|
2014-01-22 15:52:18 +00:00
|
|
|
'testing/gtest.gyp:gtest',
|
2017-05-23 02:41:26 +00:00
|
|
|
'testing/gtest.gyp:gtest_main',
|
2014-01-22 15:52:18 +00:00
|
|
|
],
|
|
|
|
},
|
2016-04-20 00:42:40 +00:00
|
|
|
{
|
|
|
|
'target_name': 'packager_test_py_copy',
|
|
|
|
'type': 'none',
|
|
|
|
'copies': [{
|
|
|
|
'destination': '<(PRODUCT_DIR)',
|
|
|
|
'files': [
|
|
|
|
'app/test/packager_app.py',
|
|
|
|
'app/test/packager_test.py',
|
|
|
|
'app/test/test_env.py',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
'dependencies': ['packager'],
|
|
|
|
},
|
2017-06-29 22:23:53 +00:00
|
|
|
{
|
|
|
|
'target_name': 'status',
|
|
|
|
'type': '<(component)',
|
|
|
|
'sources': [
|
|
|
|
'status.cc',
|
|
|
|
'status.h',
|
2018-03-21 18:03:54 +00:00
|
|
|
'status_macros.h',
|
2017-06-29 22:23:53 +00:00
|
|
|
],
|
|
|
|
'dependencies': [
|
|
|
|
'base/base.gyp:base',
|
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
['libpackager_type == "shared_library"', {
|
|
|
|
'defines': [
|
|
|
|
'SHARED_LIBRARY_BUILD',
|
|
|
|
'SHAKA_IMPLEMENTATION',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'status_unittest',
|
|
|
|
'type': '<(gtest_target_type)',
|
|
|
|
'sources': [
|
|
|
|
'status_unittest.cc',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
|
|
|
'status',
|
|
|
|
'testing/gmock.gyp:gmock',
|
|
|
|
'testing/gtest.gyp:gtest',
|
|
|
|
'testing/gtest.gyp:gtest_main',
|
|
|
|
]
|
|
|
|
},
|
2014-01-29 21:40:13 +00:00
|
|
|
{
|
2014-02-13 23:56:38 +00:00
|
|
|
'target_name': 'packager_builder_tests',
|
|
|
|
'type': 'none',
|
2014-01-29 21:40:13 +00:00
|
|
|
'dependencies': [
|
2017-07-10 18:26:22 +00:00
|
|
|
'file/file.gyp:file_unittest',
|
2016-03-25 08:35:44 +00:00
|
|
|
'hls/hls.gyp:hls_unittest',
|
2014-02-13 23:56:38 +00:00
|
|
|
'media/base/media_base.gyp:media_base_unittest',
|
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-07 18:58:47 +00:00
|
|
|
'media/chunking/chunking.gyp:chunking_unittest',
|
2016-05-25 18:03:17 +00:00
|
|
|
'media/codecs/codecs.gyp:codecs_unittest',
|
2017-02-02 18:28:29 +00:00
|
|
|
'media/crypto/crypto.gyp:crypto_unittest',
|
2017-03-28 19:31:32 +00:00
|
|
|
'media/demuxer/demuxer.gyp:demuxer_unittest',
|
2014-02-13 23:56:38 +00:00
|
|
|
'media/event/media_event.gyp:media_event_unittest',
|
2014-04-08 00:39:14 +00:00
|
|
|
'media/formats/mp2t/mp2t.gyp:mp2t_unittest',
|
2014-04-10 21:42:38 +00:00
|
|
|
'media/formats/mp4/mp4.gyp:mp4_unittest',
|
2015-10-14 23:12:10 +00:00
|
|
|
'media/formats/webm/webm.gyp:webm_unittest',
|
2016-01-06 23:52:18 +00:00
|
|
|
'media/formats/webvtt/webvtt.gyp:webvtt_unittest',
|
2015-08-05 23:39:03 +00:00
|
|
|
'media/formats/wvm/wvm.gyp:wvm_unittest',
|
2017-02-27 17:22:25 +00:00
|
|
|
'media/trick_play/trick_play.gyp:trick_play_unittest',
|
2014-02-13 23:56:38 +00:00
|
|
|
'mpd/mpd.gyp:mpd_unittest',
|
|
|
|
'packager_test',
|
2017-06-29 22:23:53 +00:00
|
|
|
'status_unittest',
|
2014-01-29 21:40:13 +00:00
|
|
|
],
|
|
|
|
},
|
2013-10-10 00:07:10 +00:00
|
|
|
],
|
|
|
|
}
|