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
|
2014-02-13 23:56:38 +00:00
|
|
|
|
|
|
|
{
|
2017-12-06 23:08:40 +00:00
|
|
|
'variables': {
|
|
|
|
'shaka_code': 1,
|
|
|
|
},
|
2014-02-13 23:56:38 +00:00
|
|
|
'targets': [
|
|
|
|
{
|
2016-01-15 14:57:20 +00:00
|
|
|
'target_name': 'media_base',
|
2014-02-13 23:56:38 +00:00
|
|
|
'type': '<(component)',
|
|
|
|
'sources': [
|
2016-04-06 00:19:16 +00:00
|
|
|
'aes_cryptor.cc',
|
|
|
|
'aes_cryptor.h',
|
2016-03-17 17:03:19 +00:00
|
|
|
'aes_decryptor.cc',
|
|
|
|
'aes_decryptor.h',
|
2014-02-13 23:56:38 +00:00
|
|
|
'aes_encryptor.cc',
|
|
|
|
'aes_encryptor.h',
|
2016-04-06 00:26:20 +00:00
|
|
|
'aes_pattern_cryptor.cc',
|
|
|
|
'aes_pattern_cryptor.h',
|
2014-02-13 23:56:38 +00:00
|
|
|
'audio_stream_info.cc',
|
|
|
|
'audio_stream_info.h',
|
2014-04-07 17:48:25 +00:00
|
|
|
'audio_timestamp_helper.cc',
|
|
|
|
'audio_timestamp_helper.h',
|
2014-02-13 23:56:38 +00:00
|
|
|
'bit_reader.cc',
|
|
|
|
'bit_reader.h',
|
2017-10-23 05:07:14 +00:00
|
|
|
'bit_writer.cc',
|
|
|
|
'bit_writer.h',
|
2014-02-13 23:56:38 +00:00
|
|
|
'buffer_reader.cc',
|
|
|
|
'buffer_reader.h',
|
|
|
|
'buffer_writer.cc',
|
|
|
|
'buffer_writer.h',
|
|
|
|
'byte_queue.cc',
|
|
|
|
'byte_queue.h',
|
2014-04-11 21:31:28 +00:00
|
|
|
'closure_thread.cc',
|
|
|
|
'closure_thread.h',
|
2014-02-13 23:56:38 +00:00
|
|
|
'container_names.cc',
|
|
|
|
'container_names.h',
|
|
|
|
'decrypt_config.cc',
|
|
|
|
'decrypt_config.h',
|
2016-01-13 01:32:48 +00:00
|
|
|
'decryptor_source.cc',
|
2014-02-13 23:56:38 +00:00
|
|
|
'decryptor_source.h',
|
2017-03-11 02:48:04 +00:00
|
|
|
'encryption_config.h',
|
2018-08-07 23:01:43 +00:00
|
|
|
'fairplay_pssh_generator.cc',
|
|
|
|
'fairplay_pssh_generator.h',
|
2016-04-06 23:21:45 +00:00
|
|
|
'fourccs.h',
|
2014-10-07 21:33:08 +00:00
|
|
|
'http_key_fetcher.cc',
|
|
|
|
'http_key_fetcher.h',
|
2018-05-07 22:57:56 +00:00
|
|
|
'id3_tag.cc',
|
|
|
|
'id3_tag.h',
|
2014-10-07 21:33:08 +00:00
|
|
|
'key_fetcher.cc',
|
|
|
|
'key_fetcher.h',
|
2014-08-20 23:51:15 +00:00
|
|
|
'key_source.cc',
|
|
|
|
'key_source.h',
|
2017-03-10 23:18:42 +00:00
|
|
|
'language_utils.cc',
|
|
|
|
'language_utils.h',
|
2014-02-13 23:56:38 +00:00
|
|
|
'limits.h',
|
2016-01-06 23:52:18 +00:00
|
|
|
'macros.h',
|
2017-01-23 22:51:00 +00:00
|
|
|
'media_handler.cc',
|
|
|
|
'media_handler.h',
|
2014-02-13 23:56:38 +00:00
|
|
|
'media_parser.h',
|
|
|
|
'media_sample.cc',
|
|
|
|
'media_sample.h',
|
|
|
|
'muxer.cc',
|
|
|
|
'muxer.h',
|
|
|
|
'muxer_options.cc',
|
|
|
|
'muxer_options.h',
|
2014-05-14 23:19:35 +00:00
|
|
|
'muxer_util.cc',
|
|
|
|
'muxer_util.h',
|
2014-07-14 21:35:57 +00:00
|
|
|
'network_util.cc',
|
|
|
|
'network_util.h',
|
2014-04-08 00:39:14 +00:00
|
|
|
'offset_byte_queue.cc',
|
|
|
|
'offset_byte_queue.h',
|
2017-01-05 17:32:17 +00:00
|
|
|
'playready_key_source.cc',
|
|
|
|
'playready_key_source.h',
|
2017-09-12 19:22:39 +00:00
|
|
|
'playready_pssh_generator.cc',
|
|
|
|
'playready_pssh_generator.h',
|
2014-04-07 19:40:52 +00:00
|
|
|
'producer_consumer_queue.h',
|
2016-02-10 17:51:15 +00:00
|
|
|
'protection_system_specific_info.cc',
|
|
|
|
'protection_system_specific_info.h',
|
2018-05-04 21:26:39 +00:00
|
|
|
'proto_json_util.cc',
|
|
|
|
'proto_json_util.h',
|
2017-09-12 19:22:39 +00:00
|
|
|
'pssh_generator.cc',
|
|
|
|
'pssh_generator.h',
|
|
|
|
'pssh_generator_util.cc',
|
|
|
|
'pssh_generator_util.h',
|
2017-05-01 23:17:09 +00:00
|
|
|
'range.h',
|
2017-09-12 19:22:39 +00:00
|
|
|
'raw_key_pssh_generator.cc',
|
|
|
|
'raw_key_pssh_generator.h',
|
2017-10-17 23:03:08 +00:00
|
|
|
'raw_key_source.cc',
|
|
|
|
'raw_key_source.h',
|
2016-04-06 23:21:45 +00:00
|
|
|
'rcheck.h',
|
2014-02-13 23:56:38 +00:00
|
|
|
'request_signer.cc',
|
|
|
|
'request_signer.h',
|
|
|
|
'rsa_key.cc',
|
|
|
|
'rsa_key.h',
|
|
|
|
'stream_info.cc',
|
|
|
|
'stream_info.h',
|
2017-06-09 15:30:16 +00:00
|
|
|
'text_sample.cc',
|
|
|
|
'text_sample.h',
|
2015-11-19 23:58:29 +00:00
|
|
|
'text_stream_info.cc',
|
|
|
|
'text_stream_info.h',
|
2014-02-13 23:56:38 +00:00
|
|
|
'text_track.h',
|
2015-10-14 23:12:10 +00:00
|
|
|
'text_track_config.cc',
|
|
|
|
'text_track_config.h',
|
2015-11-19 23:58:29 +00:00
|
|
|
'timestamp.h',
|
2014-02-13 23:56:38 +00:00
|
|
|
'video_stream_info.cc',
|
|
|
|
'video_stream_info.h',
|
2014-08-20 23:51:15 +00:00
|
|
|
'widevine_key_source.cc',
|
|
|
|
'widevine_key_source.h',
|
2017-09-12 19:22:39 +00:00
|
|
|
'widevine_pssh_generator.cc',
|
|
|
|
'widevine_pssh_generator.h'
|
2014-02-13 23:56:38 +00:00
|
|
|
],
|
|
|
|
'dependencies': [
|
2018-05-04 21:24:35 +00:00
|
|
|
'widevine_common_encryption_proto',
|
2016-02-19 18:24:33 +00:00
|
|
|
'widevine_pssh_data_proto',
|
2014-02-13 23:56:38 +00:00
|
|
|
'../../base/base.gyp:base',
|
2017-06-29 22:23:53 +00:00
|
|
|
'../../packager.gyp:status',
|
2015-07-24 18:44:52 +00:00
|
|
|
'../../third_party/boringssl/boringssl.gyp:boringssl',
|
2014-06-18 01:33:07 +00:00
|
|
|
'../../third_party/curl/curl.gyp:libcurl',
|
2015-11-16 23:47:39 +00:00
|
|
|
'../../third_party/libxml/libxml.gyp:libxml',
|
2015-12-21 23:10:17 +00:00
|
|
|
'../../version/version.gyp:version',
|
2014-02-13 23:56:38 +00:00
|
|
|
],
|
|
|
|
},
|
2016-01-13 01:32:48 +00:00
|
|
|
{
|
|
|
|
'target_name': 'widevine_pssh_data_proto',
|
|
|
|
'type': '<(component)',
|
|
|
|
'sources': ['widevine_pssh_data.proto'],
|
|
|
|
'variables': {
|
|
|
|
'proto_in_dir': '.',
|
|
|
|
'proto_out_dir': 'packager/media/base',
|
|
|
|
},
|
2017-05-23 02:41:26 +00:00
|
|
|
'includes': [
|
|
|
|
'../../protoc.gypi',
|
2016-01-13 01:32:48 +00:00
|
|
|
],
|
|
|
|
},
|
2018-05-04 21:24:35 +00:00
|
|
|
{
|
|
|
|
'target_name': 'widevine_common_encryption_proto',
|
|
|
|
'type': '<(component)',
|
|
|
|
'sources': ['widevine_common_encryption.proto'],
|
|
|
|
'variables': {
|
|
|
|
'proto_in_dir': '.',
|
|
|
|
'proto_out_dir': 'packager/media/base',
|
|
|
|
},
|
|
|
|
'includes': [
|
|
|
|
'../../protoc.gypi',
|
|
|
|
],
|
|
|
|
},
|
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
|
|
|
{
|
|
|
|
'target_name': 'media_handler_test_base',
|
|
|
|
'type': '<(component)',
|
|
|
|
'sources': [
|
|
|
|
'media_handler_test_base.cc',
|
|
|
|
'media_handler_test_base.h',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
|
|
|
'../../testing/gmock.gyp:gmock',
|
|
|
|
'../../testing/gtest.gyp:gtest',
|
|
|
|
],
|
|
|
|
},
|
2014-02-13 23:56:38 +00:00
|
|
|
{
|
|
|
|
'target_name': 'media_base_unittest',
|
|
|
|
'type': '<(gtest_target_type)',
|
|
|
|
'sources': [
|
2016-04-06 00:19:16 +00:00
|
|
|
'aes_cryptor_unittest.cc',
|
2016-04-06 00:26:20 +00:00
|
|
|
'aes_pattern_cryptor_unittest.cc',
|
2014-04-07 17:48:25 +00:00
|
|
|
'audio_timestamp_helper_unittest.cc',
|
2014-02-13 23:56:38 +00:00
|
|
|
'bit_reader_unittest.cc',
|
2017-10-23 05:07:14 +00:00
|
|
|
'bit_writer_unittest.cc',
|
2014-02-13 23:56:38 +00:00
|
|
|
'buffer_writer_unittest.cc',
|
2014-04-11 21:31:28 +00:00
|
|
|
'closure_thread_unittest.cc',
|
2014-02-13 23:56:38 +00:00
|
|
|
'container_names_unittest.cc',
|
2016-01-13 01:32:48 +00:00
|
|
|
'decryptor_source_unittest.cc',
|
2014-10-07 21:33:08 +00:00
|
|
|
'http_key_fetcher_unittest.cc',
|
2018-05-07 22:57:56 +00:00
|
|
|
'id3_tag_unittest.cc',
|
2014-05-14 23:19:35 +00:00
|
|
|
'muxer_util_unittest.cc',
|
2014-04-08 00:39:14 +00:00
|
|
|
'offset_byte_queue_unittest.cc',
|
2014-04-11 22:01:13 +00:00
|
|
|
'producer_consumer_queue_unittest.cc',
|
2016-02-10 17:51:15 +00:00
|
|
|
'protection_system_specific_info_unittest.cc',
|
2017-09-12 19:22:39 +00:00
|
|
|
'pssh_generator_unittest.cc',
|
2017-10-17 23:03:08 +00:00
|
|
|
'raw_key_source_unittest.cc',
|
2014-02-13 23:56:38 +00:00
|
|
|
'rsa_key_unittest.cc',
|
|
|
|
'status_test_util_unittest.cc',
|
2014-10-09 23:33:56 +00:00
|
|
|
'test/fake_prng.cc', # For rsa_key_unittest
|
|
|
|
'test/fake_prng.h', # For rsa_key_unittest
|
|
|
|
'test/rsa_test_data.cc', # For rsa_key_unittest
|
|
|
|
'test/rsa_test_data.h', # For rsa_key_unittest
|
2014-08-20 23:51:15 +00:00
|
|
|
'widevine_key_source_unittest.cc',
|
2014-02-13 23:56:38 +00:00
|
|
|
],
|
|
|
|
'dependencies': [
|
2017-07-10 18:26:22 +00:00
|
|
|
'../../file/file.gyp:file',
|
2014-02-13 23:56:38 +00:00
|
|
|
'../../testing/gmock.gyp:gmock',
|
2017-06-29 22:23:53 +00:00
|
|
|
'../../testing/gtest.gyp:gtest',
|
2015-07-24 18:44:52 +00:00
|
|
|
'../../third_party/boringssl/boringssl.gyp:boringssl',
|
2014-02-13 23:56:38 +00:00
|
|
|
'../test/media_test.gyp:media_test_support',
|
2016-01-15 14:57:20 +00:00
|
|
|
'media_base',
|
2014-02-13 23:56:38 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|