diff --git a/.gitmodules b/.gitmodules index 61595185ce..5a50c8d16f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,9 +7,6 @@ [submodule "packager/third_party/curl/source"] path = packager/third_party/curl/source url = https://github.com/curl/curl -[submodule "packager/third_party/glog/source"] - path = packager/third_party/glog/source - url = https://github.com/google/glog [submodule "packager/third_party/json/source"] path = packager/third_party/json/source url = https://github.com/nlohmann/json diff --git a/CMakeLists.txt b/CMakeLists.txt index 412f911b93..447c607207 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,6 @@ # Root-level CMake build file. # Minimum CMake version. This must be in the root level CMakeLists.txt. -# We could require as low as 3.10, but glog requires 3.16. cmake_minimum_required(VERSION 3.16) # These policy settings should be included before the project definition. diff --git a/packager/CMakeLists.txt b/packager/CMakeLists.txt index a10834e4c6..c97ff457d2 100644 --- a/packager/CMakeLists.txt +++ b/packager/CMakeLists.txt @@ -141,13 +141,14 @@ add_executable(packager app/widevine_encryption_flags.h ) target_link_libraries(packager - libpackager - hex_bytes_flags absl::flags absl::flags_parse - license_notice - glog + absl::log + absl::log_flags absl::strings + hex_bytes_flags + libpackager + license_notice string_utils ) @@ -158,13 +159,14 @@ add_executable(mpd_generator app/vlog_flags.h ) target_link_libraries(mpd_generator - mpd_builder - mpd_util absl::flags absl::flags_parse + absl::log + absl::log_flags absl::strings - glog license_notice + mpd_builder + mpd_util ) add_executable(packager_test diff --git a/packager/app/job_manager.cc b/packager/app/job_manager.cc index 0bb1b3bcdb..6eee7447ea 100644 --- a/packager/app/job_manager.cc +++ b/packager/app/job_manager.cc @@ -8,6 +8,8 @@ #include +#include + #include #include diff --git a/packager/app/mpd_generator.cc b/packager/app/mpd_generator.cc index f50df3af5a..757a62c4f2 100644 --- a/packager/app/mpd_generator.cc +++ b/packager/app/mpd_generator.cc @@ -14,9 +14,11 @@ #include #include #include +#include +#include +#include #include #include -#include #include #include @@ -122,7 +124,9 @@ int MpdMain(int argc, char** argv) { return status; } - register_flags_with_glog(); + handle_vlog_flags(); + + absl::InitializeLog(); if (!absl::GetFlag(FLAGS_test_packager_version).empty()) SetPackagerVersionForTesting(absl::GetFlag(FLAGS_test_packager_version)); diff --git a/packager/app/packager_main.cc b/packager/app/packager_main.cc index d3fb4d333e..a99ec70ddd 100644 --- a/packager/app/packager_main.cc +++ b/packager/app/packager_main.cc @@ -16,10 +16,12 @@ #include #include #include +#include +#include +#include #include #include #include -#include #include #include @@ -550,14 +552,19 @@ int PackagerMain(int argc, char** argv) { std::cout << line << std::endl; return kSuccess; } + if (remaining_args.size() < 2) { std::cerr << "Usage: " << absl::ProgramUsageMessage(); return kSuccess; } - if (absl::GetFlag(FLAGS_quiet)) - google::SetStderrLogging(google::GLOG_WARNING); - register_flags_with_glog(); + if (absl::GetFlag(FLAGS_quiet)) { + absl::SetMinLogLevel(absl::LogSeverityAtLeast::kWarning); + } + + handle_vlog_flags(); + + absl::InitializeLog(); if (!ValidateWidevineCryptoFlags() || !ValidateRawKeyCryptoFlags() || !ValidatePRCryptoFlags() || !ValidateCryptoFlags() || diff --git a/packager/app/packager_util.cc b/packager/app/packager_util.cc index 428cac9232..c3efbff209 100644 --- a/packager/app/packager_util.cc +++ b/packager/app/packager_util.cc @@ -6,7 +6,7 @@ #include -#include +#include #include #include diff --git a/packager/app/stream_descriptor.cc b/packager/app/stream_descriptor.cc index c968ee0846..c65c7e1256 100644 --- a/packager/app/stream_descriptor.cc +++ b/packager/app/stream_descriptor.cc @@ -6,9 +6,9 @@ #include +#include #include #include -#include #include #include diff --git a/packager/app/vlog_flags.cc b/packager/app/vlog_flags.cc index 6e9eceac58..558ec8fd52 100644 --- a/packager/app/vlog_flags.cc +++ b/packager/app/vlog_flags.cc @@ -8,11 +8,13 @@ #include +#include +#include #include #include -ABSL_FLAG(int32_t, +ABSL_FLAG(int, v, 0, "Show all VLOG(m) or DVLOG(m) messages for m <= this. " @@ -22,50 +24,48 @@ ABSL_FLAG( std::string, vmodule, "", - "Per-module verbose level." + "Per-module verbose level. THIS FLAG IS DEPRECATED. " "Argument is a comma-separated list of =. " - " is a glob pattern, matched against the filename base " - "(that is, name ignoring .cc/.h./-inl.h). " - "A pattern without slashes matches just the file name portion, otherwise " - "the whole file path (still without .cc/.h./-inl.h) is matched. " - "? and * in the glob pattern match any single or sequence of characters " - "respectively including slashes. " - " overrides any value given by --v."); + "The logging system no longer supports different levels for different " + "modules, so the verbosity level will be set to the maximum specified for " + "any module or given by --v."); -// logging.h defines FLAGS_v and FLAGS_vmodule in terms of the gflags library, -// which we do not use. Here we use macros to rename those symbols to avoid a -// conflict with the flags we defined above using absl. When we switch from -// glog to absl::logging, this workaround should be removed. -#define FLAGS_v GLOG_FLAGS_v -#define FLAGS_vmodule GLOG_FLAGS_vmodule -#include -#undef FLAGS_vmodule -#undef FLAGS_v +ABSL_DECLARE_FLAG(int, minloglevel); namespace shaka { -void register_flags_with_glog() { - auto vlog_level = absl::GetFlag(FLAGS_v); - if (vlog_level != 0) { - google::SetVLOGLevel("*", vlog_level); - } +void handle_vlog_flags() { + // Reference the log level flag to keep the absl::log flags from getting + // stripped from the executable. + int log_level = absl::GetFlag(FLAGS_minloglevel); + (void)log_level; + int vlog_level = absl::GetFlag(FLAGS_v); std::string vmodule_patterns = absl::GetFlag(FLAGS_vmodule); + if (!vmodule_patterns.empty()) { std::vector patterns = SplitStringIntoKeyValuePairs(vmodule_patterns, '=', ','); int pattern_vlevel; + bool warning_shown = false; for (const auto& pattern : patterns) { + if (!warning_shown) { + LOG(WARNING) << "--vmodule ignored, combined with --v!"; + warning_shown = true; + } + if (!::absl::SimpleAtoi(pattern.second, &pattern_vlevel)) { LOG(ERROR) << "Error parsing log level for '" << pattern.first << "' from '" << pattern.second << "'"; continue; } - - google::SetVLOGLevel(pattern.first.c_str(), pattern_vlevel); } } + + if (vlog_level != 0) { + absl::SetMinLogLevel(static_cast(-vlog_level)); + } } } // namespace shaka diff --git a/packager/app/vlog_flags.h b/packager/app/vlog_flags.h index 66c8008ca2..59365bdf1c 100644 --- a/packager/app/vlog_flags.h +++ b/packager/app/vlog_flags.h @@ -11,7 +11,7 @@ #include namespace shaka { -void register_flags_with_glog(); +void handle_vlog_flags(); } #endif // APP_VLOG_FLAGS_H_ diff --git a/packager/app/widevine_encryption_flags.cc b/packager/app/widevine_encryption_flags.cc index 48b5bb3453..6a37726127 100644 --- a/packager/app/widevine_encryption_flags.cc +++ b/packager/app/widevine_encryption_flags.cc @@ -11,9 +11,9 @@ #include #include +#include #include #include -#include #include diff --git a/packager/file/CMakeLists.txt b/packager/file/CMakeLists.txt index d56e27e54c..9677ae55b4 100644 --- a/packager/file/CMakeLists.txt +++ b/packager/file/CMakeLists.txt @@ -19,13 +19,13 @@ add_library(file STATIC target_link_libraries(file absl::base absl::flags + absl::log absl::str_format absl::strings absl::synchronization absl::time - libcurl - glog kv_pairs + libcurl status version) @@ -36,6 +36,7 @@ endif() add_library(file_test_util STATIC file_test_util.cc) target_link_libraries(file_test_util + absl::log gmock) add_executable(file_unittest @@ -47,6 +48,8 @@ add_executable(file_unittest memory_file_unittest.cc udp_options_unittest.cc) target_link_libraries(file_unittest + absl::check + absl::log file file_test_util gmock diff --git a/packager/file/callback_file.cc b/packager/file/callback_file.cc index 288fef447b..c5099e3f18 100644 --- a/packager/file/callback_file.cc +++ b/packager/file/callback_file.cc @@ -6,7 +6,7 @@ #include -#include +#include #include diff --git a/packager/file/file.cc b/packager/file/file.cc index b1174621ee..18dfab1169 100644 --- a/packager/file/file.cc +++ b/packager/file/file.cc @@ -12,9 +12,10 @@ #include #include +#include +#include #include #include -#include #include #include @@ -23,6 +24,7 @@ #include #include #include +#include ABSL_FLAG(uint64_t, io_cache_size, diff --git a/packager/file/file_closer.h b/packager/file/file_closer.h index 7c3b7eb164..257b58e0cd 100644 --- a/packager/file/file_closer.h +++ b/packager/file/file_closer.h @@ -7,7 +7,7 @@ #ifndef MEDIA_FILE_FILE_CLOSER_H_ #define MEDIA_FILE_FILE_CLOSER_H_ -#include +#include #include diff --git a/packager/file/file_util_unittest.cc b/packager/file/file_util_unittest.cc index 2497777085..abffe72e31 100644 --- a/packager/file/file_util_unittest.cc +++ b/packager/file/file_util_unittest.cc @@ -6,7 +6,7 @@ #include -#include +#include #include namespace shaka { diff --git a/packager/file/http_file.cc b/packager/file/http_file.cc index ecc0593123..ec2092532a 100644 --- a/packager/file/http_file.cc +++ b/packager/file/http_file.cc @@ -8,10 +8,11 @@ #include #include +#include +#include #include #include #include -#include #include #include diff --git a/packager/file/http_file_unittest.cc b/packager/file/http_file_unittest.cc index a1393b75b0..ba52d24323 100644 --- a/packager/file/http_file_unittest.cc +++ b/packager/file/http_file_unittest.cc @@ -15,6 +15,7 @@ #include #include +#include #include #define ASSERT_JSON_STRING(json, key, value) \ diff --git a/packager/file/io_cache.cc b/packager/file/io_cache.cc index 908a33d34e..dc93d94150 100644 --- a/packager/file/io_cache.cc +++ b/packager/file/io_cache.cc @@ -9,7 +9,10 @@ #include #include -#include +#include +#include + +#include namespace shaka { diff --git a/packager/file/local_file.cc b/packager/file/local_file.cc index a3e7d24fde..06357bd9c8 100644 --- a/packager/file/local_file.cc +++ b/packager/file/local_file.cc @@ -15,7 +15,10 @@ #include #include -#include +#include +#include + +#include namespace shaka { diff --git a/packager/file/memory_file.cc b/packager/file/memory_file.cc index f0d69f5bcc..b3d52b773a 100644 --- a/packager/file/memory_file.cc +++ b/packager/file/memory_file.cc @@ -12,8 +12,9 @@ #include #include +#include +#include #include -#include namespace shaka { namespace { diff --git a/packager/file/thread_pool.cc b/packager/file/thread_pool.cc index 51ed625c59..937fa72392 100644 --- a/packager/file/thread_pool.cc +++ b/packager/file/thread_pool.cc @@ -8,8 +8,9 @@ #include +#include +#include #include -#include namespace shaka { diff --git a/packager/file/threaded_io_file.cc b/packager/file/threaded_io_file.cc index c860d060d9..7ac84a5d3b 100644 --- a/packager/file/threaded_io_file.cc +++ b/packager/file/threaded_io_file.cc @@ -6,6 +6,8 @@ #include +#include + #include namespace shaka { diff --git a/packager/file/udp_file.cc b/packager/file/udp_file.cc index 1bfee39c7e..e0e470bdee 100644 --- a/packager/file/udp_file.cc +++ b/packager/file/udp_file.cc @@ -28,7 +28,8 @@ #include -#include +#include +#include #include diff --git a/packager/file/udp_options.cc b/packager/file/udp_options.cc index e3dfe23681..644bd4e93b 100644 --- a/packager/file/udp_options.cc +++ b/packager/file/udp_options.cc @@ -9,9 +9,10 @@ #include #include +#include +#include #include #include -#include #include #include diff --git a/packager/hls/CMakeLists.txt b/packager/hls/CMakeLists.txt index d186366213..83671d51db 100644 --- a/packager/hls/CMakeLists.txt +++ b/packager/hls/CMakeLists.txt @@ -20,15 +20,15 @@ add_library(hls_builder ) target_link_libraries(hls_builder - file - media_base - widevine_protos - manifest_base - mpd_media_info_proto absl::flags + absl::log absl::strings absl::str_format - glog + file + manifest_base + media_base + mpd_media_info_proto + widevine_protos ) add_executable(hls_unittest @@ -40,13 +40,13 @@ add_executable(hls_unittest ) target_link_libraries(hls_unittest + absl::flags file file_test_util - test_data_util - absl::flags - hls_builder gmock gtest - gtest_main) + gtest_main + hls_builder + test_data_util) -add_test(NAME hls_unittest COMMAND hls_unittest) \ No newline at end of file +add_test(NAME hls_unittest COMMAND hls_unittest) diff --git a/packager/hls/base/master_playlist.cc b/packager/hls/base/master_playlist.cc index d7e70eebee..f090b7c572 100644 --- a/packager/hls/base/master_playlist.cc +++ b/packager/hls/base/master_playlist.cc @@ -10,10 +10,11 @@ #include #include +#include +#include #include #include #include -#include #include #include diff --git a/packager/hls/base/media_playlist.cc b/packager/hls/base/media_playlist.cc index 6a11383ea9..1df0bed06e 100644 --- a/packager/hls/base/media_playlist.cc +++ b/packager/hls/base/media_playlist.cc @@ -11,12 +11,14 @@ #include #include +#include +#include #include #include -#include #include #include +#include #include #include #include diff --git a/packager/hls/base/simple_hls_notifier.cc b/packager/hls/base/simple_hls_notifier.cc index 0303f67010..9b85f83bd1 100644 --- a/packager/hls/base/simple_hls_notifier.cc +++ b/packager/hls/base/simple_hls_notifier.cc @@ -11,9 +11,10 @@ #include #include +#include +#include #include #include -#include #include #include diff --git a/packager/kv_pairs/CMakeLists.txt b/packager/kv_pairs/CMakeLists.txt index 0bbd14efb9..c7c4cf6244 100644 --- a/packager/kv_pairs/CMakeLists.txt +++ b/packager/kv_pairs/CMakeLists.txt @@ -7,8 +7,8 @@ add_library(kv_pairs STATIC kv_pairs.cc) target_link_libraries(kv_pairs - absl::str_format - glog) + absl::log + absl::str_format) add_executable(kv_pairs_unittest kv_pairs_unittest.cc) diff --git a/packager/macros.h b/packager/macros.h index 70af519e84..16eccd2f7f 100644 --- a/packager/macros.h +++ b/packager/macros.h @@ -9,6 +9,9 @@ #include +#include +#include + /// A macro to disable copying and assignment. Usage: /// class Foo { /// private: @@ -39,8 +42,21 @@ /// AES block size in bytes, regardless of key size. #define AES_BLOCK_SIZE 16 -#define DVLOG_IF(verboselevel, condition) \ - static_cast(0), !(condition) ? (void)0 : VLOG(verboselevel) +#define VLOG(verboselevel) \ + LOG(LEVEL(static_cast(-verboselevel))) + +#define VLOG_IS_ON(verboselevel) \ + (static_cast(absl::MinLogLevel()) <= -verboselevel) + +#ifndef NDEBUG +#define DVLOG(verboselevel) VLOG(verboselevel) +#else +// We need this expression to work with << after it, so this is a simple way to +// turn DVLOG into a no-op in release builds. +#define DVLOG(verboselevel) \ + if (false) \ + VLOG(verboselevel) +#endif #if defined(SHARED_LIBRARY_BUILD) #if defined(_WIN32) diff --git a/packager/media/base/CMakeLists.txt b/packager/media/base/CMakeLists.txt index f557e98b1e..7d863fcadd 100644 --- a/packager/media/base/CMakeLists.txt +++ b/packager/media/base/CMakeLists.txt @@ -58,10 +58,10 @@ add_library(media_base STATIC target_link_libraries(media_base absl::base absl::flags + absl::log absl::str_format absl::strings file - glog hex_parser mbedtls mpd_media_info_proto @@ -73,8 +73,8 @@ target_link_libraries(media_base add_library(media_handler_test_base STATIC media_handler_test_base.cc) target_link_libraries(media_handler_test_base + absl::log absl::strings - glog gmock) add_executable(media_base_unittest diff --git a/packager/media/base/aes_cryptor.cc b/packager/media/base/aes_cryptor.cc index a7c1e203b4..beba4d3675 100644 --- a/packager/media/base/aes_cryptor.cc +++ b/packager/media/base/aes_cryptor.cc @@ -9,7 +9,8 @@ #include #include -#include +#include +#include #include namespace { diff --git a/packager/media/base/aes_cryptor_unittest.cc b/packager/media/base/aes_cryptor_unittest.cc index 234243fd0a..579e2072a9 100644 --- a/packager/media/base/aes_cryptor_unittest.cc +++ b/packager/media/base/aes_cryptor_unittest.cc @@ -10,8 +10,8 @@ #include #include +#include #include -#include #include #include diff --git a/packager/media/base/aes_decryptor.cc b/packager/media/base/aes_decryptor.cc index 16f8b80985..f3bea9e0ed 100644 --- a/packager/media/base/aes_decryptor.cc +++ b/packager/media/base/aes_decryptor.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include namespace shaka { namespace media { diff --git a/packager/media/base/aes_encryptor.cc b/packager/media/base/aes_encryptor.cc index 8224c56577..d66c97e1a8 100644 --- a/packager/media/base/aes_encryptor.cc +++ b/packager/media/base/aes_encryptor.cc @@ -6,7 +6,8 @@ #include -#include +#include +#include namespace { diff --git a/packager/media/base/aes_pattern_cryptor.cc b/packager/media/base/aes_pattern_cryptor.cc index 7c4fec18dc..a9a445962c 100644 --- a/packager/media/base/aes_pattern_cryptor.cc +++ b/packager/media/base/aes_pattern_cryptor.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include namespace shaka { namespace media { diff --git a/packager/media/base/audio_stream_info.cc b/packager/media/base/audio_stream_info.cc index 6b72f731f9..f3620bb412 100644 --- a/packager/media/base/audio_stream_info.cc +++ b/packager/media/base/audio_stream_info.cc @@ -8,8 +8,8 @@ #include +#include #include -#include #include #include diff --git a/packager/media/base/audio_timestamp_helper.cc b/packager/media/base/audio_timestamp_helper.cc index 8816073342..001d003274 100644 --- a/packager/media/base/audio_timestamp_helper.cc +++ b/packager/media/base/audio_timestamp_helper.cc @@ -4,7 +4,8 @@ #include -#include +#include +#include #include diff --git a/packager/media/base/bit_reader.cc b/packager/media/base/bit_reader.cc index 4973e620cf..554b13f40c 100644 --- a/packager/media/base/bit_reader.cc +++ b/packager/media/base/bit_reader.cc @@ -6,6 +6,8 @@ #include +#include + namespace shaka { namespace media { diff --git a/packager/media/base/bit_reader.h b/packager/media/base/bit_reader.h index 6672750079..b05bcebcb6 100644 --- a/packager/media/base/bit_reader.h +++ b/packager/media/base/bit_reader.h @@ -8,7 +8,8 @@ #include #include -#include +#include +#include #include diff --git a/packager/media/base/bit_writer.cc b/packager/media/base/bit_writer.cc index 12d46f094b..9b654046db 100644 --- a/packager/media/base/bit_writer.cc +++ b/packager/media/base/bit_writer.cc @@ -6,6 +6,8 @@ #include +#include + namespace shaka { namespace media { diff --git a/packager/media/base/bit_writer.h b/packager/media/base/bit_writer.h index 1f8409d6db..adc966fdd2 100644 --- a/packager/media/base/bit_writer.h +++ b/packager/media/base/bit_writer.h @@ -10,7 +10,7 @@ #include #include -#include +#include namespace shaka { namespace media { diff --git a/packager/media/base/buffer_reader.cc b/packager/media/base/buffer_reader.cc index 870e081533..4000ae4be3 100644 --- a/packager/media/base/buffer_reader.cc +++ b/packager/media/base/buffer_reader.cc @@ -6,7 +6,8 @@ #include -#include +#include +#include namespace shaka { namespace media { diff --git a/packager/media/base/buffer_writer.cc b/packager/media/base/buffer_writer.cc index 61bf962d53..53e2292df6 100644 --- a/packager/media/base/buffer_writer.cc +++ b/packager/media/base/buffer_writer.cc @@ -7,7 +7,8 @@ #include #include -#include +#include +#include #include diff --git a/packager/media/base/buffer_writer_unittest.cc b/packager/media/base/buffer_writer_unittest.cc index 92c22b9eab..089a1db443 100644 --- a/packager/media/base/buffer_writer_unittest.cc +++ b/packager/media/base/buffer_writer_unittest.cc @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include diff --git a/packager/media/base/byte_queue.cc b/packager/media/base/byte_queue.cc index c4c13534b5..a0ba493bd5 100644 --- a/packager/media/base/byte_queue.cc +++ b/packager/media/base/byte_queue.cc @@ -4,7 +4,8 @@ #include -#include +#include +#include namespace shaka { namespace media { diff --git a/packager/media/base/container_names.cc b/packager/media/base/container_names.cc index d9b0043aa4..b630048f21 100644 --- a/packager/media/base/container_names.cc +++ b/packager/media/base/container_names.cc @@ -10,7 +10,8 @@ #include #include -#include +#include +#include #include #include diff --git a/packager/media/base/decrypt_config.cc b/packager/media/base/decrypt_config.cc index 50f087be60..ea0acfcdeb 100644 --- a/packager/media/base/decrypt_config.cc +++ b/packager/media/base/decrypt_config.cc @@ -4,7 +4,8 @@ #include -#include +#include +#include namespace shaka { namespace media { diff --git a/packager/media/base/decryptor_source.cc b/packager/media/base/decryptor_source.cc index 1b2e7f1a3c..c7d8496332 100644 --- a/packager/media/base/decryptor_source.cc +++ b/packager/media/base/decryptor_source.cc @@ -6,7 +6,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/media/base/http_key_fetcher_unittest.cc b/packager/media/base/http_key_fetcher_unittest.cc index af4d91b97c..9cfd97f707 100644 --- a/packager/media/base/http_key_fetcher_unittest.cc +++ b/packager/media/base/http_key_fetcher_unittest.cc @@ -8,7 +8,7 @@ #include -#include +#include #include #include diff --git a/packager/media/base/id3_tag.cc b/packager/media/base/id3_tag.cc index e5797b0938..2dcde76983 100644 --- a/packager/media/base/id3_tag.cc +++ b/packager/media/base/id3_tag.cc @@ -6,7 +6,7 @@ #include -#include +#include #include #include diff --git a/packager/media/base/language_utils.cc b/packager/media/base/language_utils.cc index f71f5385da..f389041447 100644 --- a/packager/media/base/language_utils.cc +++ b/packager/media/base/language_utils.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include #include diff --git a/packager/media/base/media_handler_test_base.cc b/packager/media/base/media_handler_test_base.cc index 7a6fe3025f..22a43cb73b 100644 --- a/packager/media/base/media_handler_test_base.cc +++ b/packager/media/base/media_handler_test_base.cc @@ -6,6 +6,8 @@ #include +#include + #include #include #include diff --git a/packager/media/base/media_sample.cc b/packager/media/base/media_sample.cc index 63bd550b91..5945b82204 100644 --- a/packager/media/base/media_sample.cc +++ b/packager/media/base/media_sample.cc @@ -8,8 +8,9 @@ #include +#include +#include #include -#include namespace shaka { namespace media { diff --git a/packager/media/base/media_sample.h b/packager/media/base/media_sample.h index 8e06e025e6..dbde2a95e4 100644 --- a/packager/media/base/media_sample.h +++ b/packager/media/base/media_sample.h @@ -12,7 +12,8 @@ #include #include -#include +#include +#include #include diff --git a/packager/media/base/muxer.cc b/packager/media/base/muxer.cc index 30d9bd649f..6d6952d480 100644 --- a/packager/media/base/muxer.cc +++ b/packager/media/base/muxer.cc @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/packager/media/base/muxer_util.cc b/packager/media/base/muxer_util.cc index 09e711e758..bd6028da6f 100644 --- a/packager/media/base/muxer_util.cc +++ b/packager/media/base/muxer_util.cc @@ -10,10 +10,11 @@ #include #include +#include +#include #include #include #include -#include #include diff --git a/packager/media/base/offset_byte_queue.cc b/packager/media/base/offset_byte_queue.cc index fb10406731..433dcad6d2 100644 --- a/packager/media/base/offset_byte_queue.cc +++ b/packager/media/base/offset_byte_queue.cc @@ -6,7 +6,9 @@ #include -#include +#include + +#include namespace shaka { namespace media { diff --git a/packager/media/base/playready_key_source.cc b/packager/media/base/playready_key_source.cc index 4e34612360..561793fb0d 100644 --- a/packager/media/base/playready_key_source.cc +++ b/packager/media/base/playready_key_source.cc @@ -9,9 +9,11 @@ #include #include +#include +#include #include -#include +#include #include #include #include diff --git a/packager/media/base/playready_pssh_generator.cc b/packager/media/base/playready_pssh_generator.cc index 0b451e76de..0c36697bd9 100644 --- a/packager/media/base/playready_pssh_generator.cc +++ b/packager/media/base/playready_pssh_generator.cc @@ -11,8 +11,9 @@ #include #include +#include +#include #include -#include #include #include diff --git a/packager/media/base/producer_consumer_queue.h b/packager/media/base/producer_consumer_queue.h index a7570a13f9..80a2cd8ab1 100644 --- a/packager/media/base/producer_consumer_queue.h +++ b/packager/media/base/producer_consumer_queue.h @@ -10,10 +10,11 @@ #include #include +#include +#include #include #include #include -#include #include #include diff --git a/packager/media/base/producer_consumer_queue_unittest.cc b/packager/media/base/producer_consumer_queue_unittest.cc index 71188fe4bb..b1d2fe2882 100644 --- a/packager/media/base/producer_consumer_queue_unittest.cc +++ b/packager/media/base/producer_consumer_queue_unittest.cc @@ -8,8 +8,8 @@ #include +#include #include -#include #include #include diff --git a/packager/media/base/protection_system_specific_info.cc b/packager/media/base/protection_system_specific_info.cc index 4c002b4332..16b9907111 100644 --- a/packager/media/base/protection_system_specific_info.cc +++ b/packager/media/base/protection_system_specific_info.cc @@ -8,6 +8,8 @@ #include +#include + #include #include #include diff --git a/packager/media/base/protection_system_specific_info.h b/packager/media/base/protection_system_specific_info.h index 6874f062a2..f52defd35d 100644 --- a/packager/media/base/protection_system_specific_info.h +++ b/packager/media/base/protection_system_specific_info.h @@ -11,7 +11,8 @@ #include #include -#include +#include +#include #include diff --git a/packager/media/base/proto_json_util.cc b/packager/media/base/proto_json_util.cc index 621de4f5c3..0a752628d6 100644 --- a/packager/media/base/proto_json_util.cc +++ b/packager/media/base/proto_json_util.cc @@ -6,8 +6,8 @@ #include +#include #include -#include namespace shaka { namespace media { diff --git a/packager/media/base/raw_key_source.cc b/packager/media/base/raw_key_source.cc index 594bfc3831..0e99db5df9 100644 --- a/packager/media/base/raw_key_source.cc +++ b/packager/media/base/raw_key_source.cc @@ -8,8 +8,9 @@ #include +#include +#include #include -#include #include #include diff --git a/packager/media/base/rcheck.h b/packager/media/base/rcheck.h index c05ffb562f..35d078dadc 100644 --- a/packager/media/base/rcheck.h +++ b/packager/media/base/rcheck.h @@ -5,7 +5,7 @@ #ifndef PACKAGER_MEDIA_BASE_RCHECK_H_ #define PACKAGER_MEDIA_BASE_RCHECK_H_ -#include +#include #define RCHECK(x) \ do { \ diff --git a/packager/media/base/request_signer.cc b/packager/media/base/request_signer.cc index 0603df045f..7ff33b28c0 100644 --- a/packager/media/base/request_signer.cc +++ b/packager/media/base/request_signer.cc @@ -6,7 +6,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/media/base/rsa_key.cc b/packager/media/base/rsa_key.cc index e4d944eb13..9943d46879 100644 --- a/packager/media/base/rsa_key.cc +++ b/packager/media/base/rsa_key.cc @@ -21,7 +21,8 @@ #include #include -#include +#include +#include #include #include diff --git a/packager/media/base/rsa_key_unittest.cc b/packager/media/base/rsa_key_unittest.cc index 873388a648..be58616f42 100644 --- a/packager/media/base/rsa_key_unittest.cc +++ b/packager/media/base/rsa_key_unittest.cc @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/packager/media/base/stream_info.cc b/packager/media/base/stream_info.cc index 9ef4bd478a..72f5d12c02 100644 --- a/packager/media/base/stream_info.cc +++ b/packager/media/base/stream_info.cc @@ -8,8 +8,8 @@ #include +#include #include -#include #include #include diff --git a/packager/media/base/text_muxer.cc b/packager/media/base/text_muxer.cc index 360f3bd901..1c22ce79a3 100644 --- a/packager/media/base/text_muxer.cc +++ b/packager/media/base/text_muxer.cc @@ -6,6 +6,8 @@ #include +#include + #include #include diff --git a/packager/media/base/text_sample.cc b/packager/media/base/text_sample.cc index 62f9b6c39d..9ddd4db812 100644 --- a/packager/media/base/text_sample.cc +++ b/packager/media/base/text_sample.cc @@ -9,7 +9,7 @@ #include #include -#include +#include namespace shaka { namespace media { diff --git a/packager/media/base/video_stream_info.cc b/packager/media/base/video_stream_info.cc index 1582ac3565..b96078337d 100644 --- a/packager/media/base/video_stream_info.cc +++ b/packager/media/base/video_stream_info.cc @@ -6,8 +6,8 @@ #include +#include #include -#include #include #include diff --git a/packager/media/base/widevine_key_source.cc b/packager/media/base/widevine_key_source.cc index 910bcb390b..866940de5f 100644 --- a/packager/media/base/widevine_key_source.cc +++ b/packager/media/base/widevine_key_source.cc @@ -11,8 +11,10 @@ #include #include +#include #include +#include #include #include #include diff --git a/packager/media/chunking/chunking_handler.cc b/packager/media/chunking/chunking_handler.cc index 4cbad42880..23131ae08e 100644 --- a/packager/media/chunking/chunking_handler.cc +++ b/packager/media/chunking/chunking_handler.cc @@ -8,8 +8,10 @@ #include -#include +#include +#include +#include #include #include diff --git a/packager/media/chunking/chunking_handler.h b/packager/media/chunking/chunking_handler.h index 443869f135..0c1659cc25 100644 --- a/packager/media/chunking/chunking_handler.h +++ b/packager/media/chunking/chunking_handler.h @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/packager/media/chunking/cue_alignment_handler.cc b/packager/media/chunking/cue_alignment_handler.cc index 4b2d1caf6d..6d0347e491 100644 --- a/packager/media/chunking/cue_alignment_handler.cc +++ b/packager/media/chunking/cue_alignment_handler.cc @@ -8,6 +8,9 @@ #include +#include + +#include #include namespace shaka { diff --git a/packager/media/chunking/sync_point_queue.cc b/packager/media/chunking/sync_point_queue.cc index 82af70360e..f6a51d4b40 100644 --- a/packager/media/chunking/sync_point_queue.cc +++ b/packager/media/chunking/sync_point_queue.cc @@ -9,6 +9,8 @@ #include #include +#include + #include namespace shaka { diff --git a/packager/media/chunking/text_chunker.cc b/packager/media/chunking/text_chunker.cc index 44aaf9913a..1daec99ba6 100644 --- a/packager/media/chunking/text_chunker.cc +++ b/packager/media/chunking/text_chunker.cc @@ -6,6 +6,8 @@ #include +#include + #include namespace shaka { diff --git a/packager/media/codecs/aac_audio_specific_config.cc b/packager/media/codecs/aac_audio_specific_config.cc index cf4c4d7f53..5e9138cb31 100644 --- a/packager/media/codecs/aac_audio_specific_config.cc +++ b/packager/media/codecs/aac_audio_specific_config.cc @@ -6,7 +6,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/media/codecs/av1_parser.cc b/packager/media/codecs/av1_parser.cc index bd20da437a..b5739c9525 100644 --- a/packager/media/codecs/av1_parser.cc +++ b/packager/media/codecs/av1_parser.cc @@ -8,8 +8,10 @@ #include -#include +#include +#include +#include #include #include diff --git a/packager/media/codecs/decoder_configuration_record.h b/packager/media/codecs/decoder_configuration_record.h index 0c5db919b8..30167e4013 100644 --- a/packager/media/codecs/decoder_configuration_record.h +++ b/packager/media/codecs/decoder_configuration_record.h @@ -9,7 +9,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/media/codecs/ec3_audio_util.cc b/packager/media/codecs/ec3_audio_util.cc index c80a8972ff..8202e9926e 100644 --- a/packager/media/codecs/ec3_audio_util.cc +++ b/packager/media/codecs/ec3_audio_util.cc @@ -6,6 +6,7 @@ #include +#include #include #include diff --git a/packager/media/codecs/es_descriptor.cc b/packager/media/codecs/es_descriptor.cc index 18473b5788..9cdd6e718e 100644 --- a/packager/media/codecs/es_descriptor.cc +++ b/packager/media/codecs/es_descriptor.cc @@ -4,6 +4,8 @@ #include +#include + #include #include #include diff --git a/packager/media/codecs/h264_byte_to_unit_stream_converter.cc b/packager/media/codecs/h264_byte_to_unit_stream_converter.cc index 4c17f33b9b..04cdaafac6 100644 --- a/packager/media/codecs/h264_byte_to_unit_stream_converter.cc +++ b/packager/media/codecs/h264_byte_to_unit_stream_converter.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/media/codecs/h264_parser.cc b/packager/media/codecs/h264_parser.cc index 9f211ad614..928879755a 100644 --- a/packager/media/codecs/h264_parser.cc +++ b/packager/media/codecs/h264_parser.cc @@ -6,8 +6,10 @@ #include -#include +#include +#include +#include #include #define LOG_ERROR_ONCE(msg) \ diff --git a/packager/media/codecs/h264_parser_unittest.cc b/packager/media/codecs/h264_parser_unittest.cc index 98aabb39d7..a6310f2336 100644 --- a/packager/media/codecs/h264_parser_unittest.cc +++ b/packager/media/codecs/h264_parser_unittest.cc @@ -5,9 +5,10 @@ #include -#include +#include #include +#include #include namespace shaka { diff --git a/packager/media/codecs/h265_byte_to_unit_stream_converter.cc b/packager/media/codecs/h265_byte_to_unit_stream_converter.cc index b4490bdad2..1c177a8d5e 100644 --- a/packager/media/codecs/h265_byte_to_unit_stream_converter.cc +++ b/packager/media/codecs/h265_byte_to_unit_stream_converter.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/media/codecs/h265_parser.cc b/packager/media/codecs/h265_parser.cc index c2f2f78a0d..e77e2a2a00 100644 --- a/packager/media/codecs/h265_parser.cc +++ b/packager/media/codecs/h265_parser.cc @@ -9,8 +9,10 @@ #include #include -#include +#include +#include +#include #include #include diff --git a/packager/media/codecs/h26x_bit_reader.cc b/packager/media/codecs/h26x_bit_reader.cc index 93a733e5f3..34fb121358 100644 --- a/packager/media/codecs/h26x_bit_reader.cc +++ b/packager/media/codecs/h26x_bit_reader.cc @@ -4,7 +4,8 @@ #include -#include +#include +#include namespace shaka { namespace media { diff --git a/packager/media/codecs/h26x_byte_to_unit_stream_converter.cc b/packager/media/codecs/h26x_byte_to_unit_stream_converter.cc index 63be7e4f64..58f3db4c7c 100644 --- a/packager/media/codecs/h26x_byte_to_unit_stream_converter.cc +++ b/packager/media/codecs/h26x_byte_to_unit_stream_converter.cc @@ -9,9 +9,11 @@ #include #include +#include +#include #include -#include +#include #include #include diff --git a/packager/media/codecs/hevc_decoder_configuration_record.cc b/packager/media/codecs/hevc_decoder_configuration_record.cc index b7b0e80f86..9fef0fe06e 100644 --- a/packager/media/codecs/hevc_decoder_configuration_record.cc +++ b/packager/media/codecs/hevc_decoder_configuration_record.cc @@ -6,6 +6,7 @@ #include +#include #include #include #include diff --git a/packager/media/codecs/hls_audio_util.cc b/packager/media/codecs/hls_audio_util.cc index bb56e379f1..593906197a 100644 --- a/packager/media/codecs/hls_audio_util.cc +++ b/packager/media/codecs/hls_audio_util.cc @@ -6,6 +6,8 @@ #include +#include + #include #include #include diff --git a/packager/media/codecs/nal_unit_to_byte_stream_converter.cc b/packager/media/codecs/nal_unit_to_byte_stream_converter.cc index 9d77db8d31..f66af5e37a 100644 --- a/packager/media/codecs/nal_unit_to_byte_stream_converter.cc +++ b/packager/media/codecs/nal_unit_to_byte_stream_converter.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/media/codecs/nalu_reader.cc b/packager/media/codecs/nalu_reader.cc index e5849f562b..9bbd19e971 100644 --- a/packager/media/codecs/nalu_reader.cc +++ b/packager/media/codecs/nalu_reader.cc @@ -8,8 +8,10 @@ #include -#include +#include +#include +#include #include #include diff --git a/packager/media/codecs/video_slice_header_parser.cc b/packager/media/codecs/video_slice_header_parser.cc index 7f16a6d574..c0a5d6ac6c 100644 --- a/packager/media/codecs/video_slice_header_parser.cc +++ b/packager/media/codecs/video_slice_header_parser.cc @@ -6,6 +6,9 @@ #include +#include + +#include #include #include #include diff --git a/packager/media/codecs/vp8_parser.cc b/packager/media/codecs/vp8_parser.cc index 3024f8eeee..474e6ebe7d 100644 --- a/packager/media/codecs/vp8_parser.cc +++ b/packager/media/codecs/vp8_parser.cc @@ -6,8 +6,10 @@ #include -#include +#include +#include +#include #include #include diff --git a/packager/media/codecs/vp9_parser.cc b/packager/media/codecs/vp9_parser.cc index aefd81d1ae..d026d088af 100644 --- a/packager/media/codecs/vp9_parser.cc +++ b/packager/media/codecs/vp9_parser.cc @@ -6,8 +6,10 @@ #include -#include +#include +#include +#include #include #include diff --git a/packager/media/codecs/vp_codec_configuration_record.cc b/packager/media/codecs/vp_codec_configuration_record.cc index 23ff73ca50..5a51cdfa80 100644 --- a/packager/media/codecs/vp_codec_configuration_record.cc +++ b/packager/media/codecs/vp_codec_configuration_record.cc @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/packager/media/crypto/CMakeLists.txt b/packager/media/crypto/CMakeLists.txt index ed0759c3be..b297f8e869 100644 --- a/packager/media/crypto/CMakeLists.txt +++ b/packager/media/crypto/CMakeLists.txt @@ -10,10 +10,10 @@ add_library(media_crypto STATIC sample_aes_ec3_cryptor.cc subsample_generator.cc) target_link_libraries(media_crypto - media_base - media_codecs absl::base - glog) + absl::log + media_base + media_codecs) add_executable(media_crypto_unittest encryption_handler_unittest.cc diff --git a/packager/media/crypto/encryption_handler.cc b/packager/media/crypto/encryption_handler.cc index 402d8bde6d..8191cf0ec9 100644 --- a/packager/media/crypto/encryption_handler.cc +++ b/packager/media/crypto/encryption_handler.cc @@ -10,6 +10,9 @@ #include #include +#include + +#include #include #include #include diff --git a/packager/media/crypto/encryption_handler_unittest.cc b/packager/media/crypto/encryption_handler_unittest.cc index 84928c2275..a45790a72c 100644 --- a/packager/media/crypto/encryption_handler_unittest.cc +++ b/packager/media/crypto/encryption_handler_unittest.cc @@ -6,7 +6,7 @@ #include -#include +#include #include #include diff --git a/packager/media/crypto/sample_aes_ec3_cryptor.cc b/packager/media/crypto/sample_aes_ec3_cryptor.cc index f926a092b5..bdfdde1c25 100644 --- a/packager/media/crypto/sample_aes_ec3_cryptor.cc +++ b/packager/media/crypto/sample_aes_ec3_cryptor.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include #include diff --git a/packager/media/crypto/subsample_generator.cc b/packager/media/crypto/subsample_generator.cc index 5fae664eb6..2d35629fcd 100644 --- a/packager/media/crypto/subsample_generator.cc +++ b/packager/media/crypto/subsample_generator.cc @@ -9,6 +9,8 @@ #include #include +#include + #include #include #include diff --git a/packager/media/demuxer/demuxer.cc b/packager/media/demuxer/demuxer.cc index 25802ddd26..2beeac7496 100644 --- a/packager/media/demuxer/demuxer.cc +++ b/packager/media/demuxer/demuxer.cc @@ -9,10 +9,11 @@ #include #include +#include +#include #include #include #include -#include #include #include diff --git a/packager/media/event/hls_notify_muxer_listener.cc b/packager/media/event/hls_notify_muxer_listener.cc index 1895d52184..7825451b12 100644 --- a/packager/media/event/hls_notify_muxer_listener.cc +++ b/packager/media/event/hls_notify_muxer_listener.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/media/event/mpd_notify_muxer_listener.cc b/packager/media/event/mpd_notify_muxer_listener.cc index 0af9233227..b3f4fbc022 100644 --- a/packager/media/event/mpd_notify_muxer_listener.cc +++ b/packager/media/event/mpd_notify_muxer_listener.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/media/event/mpd_notify_muxer_listener_unittest.cc b/packager/media/event/mpd_notify_muxer_listener_unittest.cc index 2b7ecabf4b..e20463a273 100644 --- a/packager/media/event/mpd_notify_muxer_listener_unittest.cc +++ b/packager/media/event/mpd_notify_muxer_listener_unittest.cc @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/packager/media/event/multi_codec_muxer_listener.cc b/packager/media/event/multi_codec_muxer_listener.cc index 060888d1b7..8efa4feea0 100644 --- a/packager/media/event/multi_codec_muxer_listener.cc +++ b/packager/media/event/multi_codec_muxer_listener.cc @@ -6,8 +6,8 @@ #include +#include #include -#include #include diff --git a/packager/media/event/muxer_listener_factory.cc b/packager/media/event/muxer_listener_factory.cc index 4197eaa203..ea63fdc353 100644 --- a/packager/media/event/muxer_listener_factory.cc +++ b/packager/media/event/muxer_listener_factory.cc @@ -8,8 +8,9 @@ #include +#include +#include #include -#include #include #include diff --git a/packager/media/event/muxer_listener_internal.cc b/packager/media/event/muxer_listener_internal.cc index 93fcec211f..17731fb02b 100644 --- a/packager/media/event/muxer_listener_internal.cc +++ b/packager/media/event/muxer_listener_internal.cc @@ -8,8 +8,9 @@ #include +#include +#include #include -#include #include #include diff --git a/packager/media/event/vod_media_info_dump_muxer_listener.cc b/packager/media/event/vod_media_info_dump_muxer_listener.cc index 333a1f205e..a1246199d2 100644 --- a/packager/media/event/vod_media_info_dump_muxer_listener.cc +++ b/packager/media/event/vod_media_info_dump_muxer_listener.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/media/event/vod_media_info_dump_muxer_listener_unittest.cc b/packager/media/event/vod_media_info_dump_muxer_listener_unittest.cc index 4d8c7fcd66..e5caa3b7f8 100644 --- a/packager/media/event/vod_media_info_dump_muxer_listener_unittest.cc +++ b/packager/media/event/vod_media_info_dump_muxer_listener_unittest.cc @@ -8,6 +8,7 @@ #include +#include #include #include #include diff --git a/packager/media/formats/dvb/CMakeLists.txt b/packager/media/formats/dvb/CMakeLists.txt index d1aa885455..d2e14afd6e 100644 --- a/packager/media/formats/dvb/CMakeLists.txt +++ b/packager/media/formats/dvb/CMakeLists.txt @@ -21,16 +21,16 @@ add_library(dvb STATIC subtitle_composer.h ) target_link_libraries(dvb - file - media_base - widevine_protos - manifest_base - mpd_media_info_proto - png_static absl::flags + absl::log absl::strings absl::str_format - glog + file + manifest_base + media_base + mpd_media_info_proto + png_static + widevine_protos ) add_executable(dvb_unittest @@ -50,4 +50,4 @@ target_link_libraries(dvb_unittest gtest gtest_main) -add_test(NAME dvb_unittest COMMAND dvb_unittest) \ No newline at end of file +add_test(NAME dvb_unittest COMMAND dvb_unittest) diff --git a/packager/media/formats/dvb/dvb_image.cc b/packager/media/formats/dvb/dvb_image.cc index 1edd33638d..6de4fb7378 100644 --- a/packager/media/formats/dvb/dvb_image.cc +++ b/packager/media/formats/dvb/dvb_image.cc @@ -10,7 +10,8 @@ #include #include -#include +#include +#include namespace shaka { namespace media { diff --git a/packager/media/formats/dvb/dvb_sub_parser.cc b/packager/media/formats/dvb/dvb_sub_parser.cc index a11adeefc4..66666f5654 100644 --- a/packager/media/formats/dvb/dvb_sub_parser.cc +++ b/packager/media/formats/dvb/dvb_sub_parser.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include #include diff --git a/packager/media/formats/dvb/dvb_sub_parser_unittest.cc b/packager/media/formats/dvb/dvb_sub_parser_unittest.cc index e3545c19cf..abb545b153 100644 --- a/packager/media/formats/dvb/dvb_sub_parser_unittest.cc +++ b/packager/media/formats/dvb/dvb_sub_parser_unittest.cc @@ -10,6 +10,7 @@ #include #include +#include #include #include diff --git a/packager/media/formats/dvb/subtitle_composer.cc b/packager/media/formats/dvb/subtitle_composer.cc index 8d34c27acb..033742c34b 100644 --- a/packager/media/formats/dvb/subtitle_composer.cc +++ b/packager/media/formats/dvb/subtitle_composer.cc @@ -8,9 +8,12 @@ #include -#include +#include +#include #include +#include + namespace shaka { namespace media { diff --git a/packager/media/formats/mp2t/CMakeLists.txt b/packager/media/formats/mp2t/CMakeLists.txt index ee3b1f6d0f..6c4d5b7b5a 100644 --- a/packager/media/formats/mp2t/CMakeLists.txt +++ b/packager/media/formats/mp2t/CMakeLists.txt @@ -55,12 +55,12 @@ add_library(mp2t STATIC ) target_link_libraries(mp2t + absl::log + dvb media_base - glog + media_codecs media_crypto hex_parser - media_codecs - dvb ) add_executable(mp2t_unittest @@ -77,18 +77,18 @@ ts_writer_unittest.cc ) target_link_libraries(mp2t_unittest - mp2t + absl::flags + absl::log file file_test_util - test_data_util - absl::flags + gmock + gtest + gtest_main media_event media_handler_test_base mock_muxer_listener - glog - gmock - gtest - gtest_main) + mp2t + test_data_util) add_test(NAME mp2t_unittest COMMAND mp2t_unittest) diff --git a/packager/media/formats/mp2t/ac3_header.cc b/packager/media/formats/mp2t/ac3_header.cc index 4a36c86fd9..c895ae0979 100644 --- a/packager/media/formats/mp2t/ac3_header.cc +++ b/packager/media/formats/mp2t/ac3_header.cc @@ -6,6 +6,8 @@ #include +#include + #include #include #include diff --git a/packager/media/formats/mp2t/ac3_header_unittest.cc b/packager/media/formats/mp2t/ac3_header_unittest.cc index 3564f0d54d..7a3e9423fc 100644 --- a/packager/media/formats/mp2t/ac3_header_unittest.cc +++ b/packager/media/formats/mp2t/ac3_header_unittest.cc @@ -6,8 +6,8 @@ #include +#include #include -#include #include #include diff --git a/packager/media/formats/mp2t/adts_header.cc b/packager/media/formats/mp2t/adts_header.cc index 5ad4010faa..8a7bc78198 100644 --- a/packager/media/formats/mp2t/adts_header.cc +++ b/packager/media/formats/mp2t/adts_header.cc @@ -6,6 +6,8 @@ #include +#include + #include #include #include diff --git a/packager/media/formats/mp2t/adts_header_unittest.cc b/packager/media/formats/mp2t/adts_header_unittest.cc index 054787bef8..34780b539e 100644 --- a/packager/media/formats/mp2t/adts_header_unittest.cc +++ b/packager/media/formats/mp2t/adts_header_unittest.cc @@ -4,8 +4,8 @@ #include +#include #include -#include #include #include diff --git a/packager/media/formats/mp2t/es_parser_audio.cc b/packager/media/formats/mp2t/es_parser_audio.cc index e2e7867652..10dcef96f5 100644 --- a/packager/media/formats/mp2t/es_parser_audio.cc +++ b/packager/media/formats/mp2t/es_parser_audio.cc @@ -8,10 +8,12 @@ #include #include +#include +#include #include #include -#include +#include #include #include #include diff --git a/packager/media/formats/mp2t/es_parser_h264.cc b/packager/media/formats/mp2t/es_parser_h264.cc index 34bfc5db85..b9336eb915 100644 --- a/packager/media/formats/mp2t/es_parser_h264.cc +++ b/packager/media/formats/mp2t/es_parser_h264.cc @@ -6,8 +6,9 @@ #include -#include +#include +#include #include #include #include diff --git a/packager/media/formats/mp2t/es_parser_h264_unittest.cc b/packager/media/formats/mp2t/es_parser_h264_unittest.cc index ce10cb9eee..f9a01765a4 100644 --- a/packager/media/formats/mp2t/es_parser_h264_unittest.cc +++ b/packager/media/formats/mp2t/es_parser_h264_unittest.cc @@ -8,9 +8,11 @@ #include #include -#include +#include +#include #include +#include #include #include #include diff --git a/packager/media/formats/mp2t/es_parser_h265.cc b/packager/media/formats/mp2t/es_parser_h265.cc index 4a6ca532a7..fdf1e374e6 100644 --- a/packager/media/formats/mp2t/es_parser_h265.cc +++ b/packager/media/formats/mp2t/es_parser_h265.cc @@ -8,8 +8,9 @@ #include -#include +#include +#include #include #include #include diff --git a/packager/media/formats/mp2t/es_parser_h26x.cc b/packager/media/formats/mp2t/es_parser_h26x.cc index 5a5501bcb0..9bbd01ef56 100644 --- a/packager/media/formats/mp2t/es_parser_h26x.cc +++ b/packager/media/formats/mp2t/es_parser_h26x.cc @@ -6,8 +6,10 @@ #include -#include +#include +#include +#include #include #include #include @@ -53,8 +55,9 @@ bool EsParserH26x::Parse(const uint8_t* buf, // HLS recommendation: "In AVC video, you should have both a DTS and a // PTS in each PES header". // However, some streams do not comply with this recommendation. - DVLOG_IF(1, pts == kNoTimestamp) << "Each video PES should have a PTS"; - if (pts != kNoTimestamp) { + if (pts == kNoTimestamp) { + DVLOG(1) << "Each video PES should have a PTS"; + } else { TimingDesc timing_desc; timing_desc.pts = pts; timing_desc.dts = (dts != kNoTimestamp) ? dts : pts; diff --git a/packager/media/formats/mp2t/es_parser_h26x_unittest.cc b/packager/media/formats/mp2t/es_parser_h26x_unittest.cc index 9a0a5bc5a3..f4a2635271 100644 --- a/packager/media/formats/mp2t/es_parser_h26x_unittest.cc +++ b/packager/media/formats/mp2t/es_parser_h26x_unittest.cc @@ -9,7 +9,8 @@ #include #include -#include +#include +#include #include #include diff --git a/packager/media/formats/mp2t/mp2t_media_parser.cc b/packager/media/formats/mp2t/mp2t_media_parser.cc index 78c2a8f326..f8acceb70f 100644 --- a/packager/media/formats/mp2t/mp2t_media_parser.cc +++ b/packager/media/formats/mp2t/mp2t_media_parser.cc @@ -7,6 +7,9 @@ #include #include +#include + +#include #include #include #include @@ -22,7 +25,6 @@ #include #include #include -#include namespace shaka { namespace media { @@ -261,7 +263,9 @@ void Mp2tMediaParser::RegisterPmt(int program_number, int pmt_pid) { // if there is already one registered. for (const auto& pair : pids_) { if (pair.second->pid_type() == PidState::kPidPmt) { - DVLOG_IF(1, pmt_pid != pair.first) << "More than one program is defined"; + if (pmt_pid != pair.first) { + DVLOG(1) << "More than one program is defined"; + } return; } } diff --git a/packager/media/formats/mp2t/mp2t_media_parser_unittest.cc b/packager/media/formats/mp2t/mp2t_media_parser_unittest.cc index a1b2c18d6d..6f8a7efb6f 100644 --- a/packager/media/formats/mp2t/mp2t_media_parser_unittest.cc +++ b/packager/media/formats/mp2t/mp2t_media_parser_unittest.cc @@ -8,9 +8,10 @@ #include #include -#include +#include #include +#include #include #include #include diff --git a/packager/media/formats/mp2t/mpeg1_header.cc b/packager/media/formats/mp2t/mpeg1_header.cc index d8c577d866..e935cdb7b1 100644 --- a/packager/media/formats/mp2t/mpeg1_header.cc +++ b/packager/media/formats/mp2t/mpeg1_header.cc @@ -6,6 +6,8 @@ #include +#include + #include #include #include diff --git a/packager/media/formats/mp2t/mpeg1_header_unittest.cc b/packager/media/formats/mp2t/mpeg1_header_unittest.cc index 86c370a448..2e8d3cdd44 100644 --- a/packager/media/formats/mp2t/mpeg1_header_unittest.cc +++ b/packager/media/formats/mp2t/mpeg1_header_unittest.cc @@ -6,8 +6,8 @@ #include +#include #include -#include #include #include diff --git a/packager/media/formats/mp2t/pes_packet_generator.cc b/packager/media/formats/mp2t/pes_packet_generator.cc index eea2d611d2..04f013a01d 100644 --- a/packager/media/formats/mp2t/pes_packet_generator.cc +++ b/packager/media/formats/mp2t/pes_packet_generator.cc @@ -10,6 +10,8 @@ #include #include +#include + #include #include #include diff --git a/packager/media/formats/mp2t/program_map_table_writer.cc b/packager/media/formats/mp2t/program_map_table_writer.cc index 2de15c639b..a2a072d19d 100644 --- a/packager/media/formats/mp2t/program_map_table_writer.cc +++ b/packager/media/formats/mp2t/program_map_table_writer.cc @@ -9,7 +9,8 @@ #include #include -#include +#include +#include #include #include diff --git a/packager/media/formats/mp2t/ts_muxer.cc b/packager/media/formats/mp2t/ts_muxer.cc index a82151510b..f9de46b634 100644 --- a/packager/media/formats/mp2t/ts_muxer.cc +++ b/packager/media/formats/mp2t/ts_muxer.cc @@ -6,6 +6,8 @@ #include +#include + namespace shaka { namespace media { namespace mp2t { diff --git a/packager/media/formats/mp2t/ts_packet.cc b/packager/media/formats/mp2t/ts_packet.cc index a6f605fe36..c63b8041d8 100644 --- a/packager/media/formats/mp2t/ts_packet.cc +++ b/packager/media/formats/mp2t/ts_packet.cc @@ -6,6 +6,8 @@ #include +#include + #include #include #include @@ -39,7 +41,9 @@ int TsPacket::Sync(const uint8_t* buf, int size) { break; } - DVLOG_IF(1, k != 0) << "SYNC: nbytes_skipped=" << k; + if (k != 0) { + DVLOG(1) << "SYNC: nbytes_skipped=" << k; + } return k; } diff --git a/packager/media/formats/mp2t/ts_packet_writer_util.cc b/packager/media/formats/mp2t/ts_packet_writer_util.cc index b5d5f59695..c57ffac96f 100644 --- a/packager/media/formats/mp2t/ts_packet_writer_util.cc +++ b/packager/media/formats/mp2t/ts_packet_writer_util.cc @@ -6,7 +6,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/media/formats/mp2t/ts_section_pat.cc b/packager/media/formats/mp2t/ts_section_pat.cc index 0a47373c8b..22de796bef 100644 --- a/packager/media/formats/mp2t/ts_section_pat.cc +++ b/packager/media/formats/mp2t/ts_section_pat.cc @@ -6,8 +6,9 @@ #include -#include +#include +#include #include #include @@ -96,9 +97,10 @@ bool TsSectionPat::ParsePsiSection(BitReader* bit_reader) { int expected_version_number = version_number; if (version_number_ >= 0) expected_version_number = (version_number_ + 1) % 32; - DVLOG_IF(1, version_number != expected_version_number) - << "Unexpected version number: " - << version_number << " vs " << version_number_; + if (version_number != expected_version_number) { + VLOG(1) << "Unexpected version number: " << version_number << " vs " + << version_number_; + } #endif for (int k = 0; k < pmt_pid_count; k++) { if (program_number_array[k] != 0) { diff --git a/packager/media/formats/mp2t/ts_section_pes.cc b/packager/media/formats/mp2t/ts_section_pes.cc index 9f8444bc54..d088f31023 100644 --- a/packager/media/formats/mp2t/ts_section_pes.cc +++ b/packager/media/formats/mp2t/ts_section_pes.cc @@ -4,8 +4,10 @@ #include -#include +#include +#include +#include #include #include #include diff --git a/packager/media/formats/mp2t/ts_section_pmt.cc b/packager/media/formats/mp2t/ts_section_pmt.cc index 8ac25fdafa..07aef73413 100644 --- a/packager/media/formats/mp2t/ts_section_pmt.cc +++ b/packager/media/formats/mp2t/ts_section_pmt.cc @@ -6,7 +6,7 @@ #include -#include +#include #include #include diff --git a/packager/media/formats/mp2t/ts_section_psi.cc b/packager/media/formats/mp2t/ts_section_psi.cc index f76550ab1d..1bc5b13677 100644 --- a/packager/media/formats/mp2t/ts_section_psi.cc +++ b/packager/media/formats/mp2t/ts_section_psi.cc @@ -7,8 +7,10 @@ #include #include -#include +#include +#include +#include #include #include @@ -102,9 +104,10 @@ bool TsSectionPsi::Parse(bool payload_unit_start_indicator, // There should not be any trailing bytes after a PMT. // Instead, the pointer field should be used to stuff bytes. - DVLOG_IF(1, raw_psi_size > psi_length) - << "Trailing bytes after a PSI section: " - << psi_length << " vs " << raw_psi_size; + if (raw_psi_size > psi_length) { + DVLOG(1) << "Trailing bytes after a PSI section: " << psi_length << " vs " + << raw_psi_size; + } // Verify the CRC. RCHECK(IsCrcValid(raw_psi, psi_length)); diff --git a/packager/media/formats/mp2t/ts_segmenter.cc b/packager/media/formats/mp2t/ts_segmenter.cc index f1ada1fcb0..c8dc2e5316 100644 --- a/packager/media/formats/mp2t/ts_segmenter.cc +++ b/packager/media/formats/mp2t/ts_segmenter.cc @@ -8,6 +8,8 @@ #include +#include + #include #include #include diff --git a/packager/media/formats/mp2t/ts_writer.cc b/packager/media/formats/mp2t/ts_writer.cc index 8f9a40d569..78457c64fb 100644 --- a/packager/media/formats/mp2t/ts_writer.cc +++ b/packager/media/formats/mp2t/ts_writer.cc @@ -8,7 +8,7 @@ #include -#include +#include #include #include diff --git a/packager/media/formats/mp4/box.cc b/packager/media/formats/mp4/box.cc index 26f07b62df..5e63a24c5e 100644 --- a/packager/media/formats/mp4/box.cc +++ b/packager/media/formats/mp4/box.cc @@ -6,7 +6,8 @@ #include -#include +#include +#include #include diff --git a/packager/media/formats/mp4/box_buffer.h b/packager/media/formats/mp4/box_buffer.h index a43908a2f8..b46a7f2e96 100644 --- a/packager/media/formats/mp4/box_buffer.h +++ b/packager/media/formats/mp4/box_buffer.h @@ -9,6 +9,8 @@ #include +#include + #include #include #include diff --git a/packager/media/formats/mp4/box_definitions.cc b/packager/media/formats/mp4/box_definitions.cc index ba93bae4d7..3d85d24144 100644 --- a/packager/media/formats/mp4/box_definitions.cc +++ b/packager/media/formats/mp4/box_definitions.cc @@ -8,7 +8,8 @@ #include #include -#include +#include +#include #include #include diff --git a/packager/media/formats/mp4/box_reader.cc b/packager/media/formats/mp4/box_reader.cc index 9de0714e7d..b1d3e46747 100644 --- a/packager/media/formats/mp4/box_reader.cc +++ b/packager/media/formats/mp4/box_reader.cc @@ -8,9 +8,11 @@ #include #include +#include +#include #include -#include +#include #include namespace shaka { diff --git a/packager/media/formats/mp4/box_reader.h b/packager/media/formats/mp4/box_reader.h index 25efb5c9d4..2bcb4d4a15 100644 --- a/packager/media/formats/mp4/box_reader.h +++ b/packager/media/formats/mp4/box_reader.h @@ -9,7 +9,8 @@ #include #include -#include +#include +#include #include #include diff --git a/packager/media/formats/mp4/box_reader_unittest.cc b/packager/media/formats/mp4/box_reader_unittest.cc index 30ad1f1399..6b169aa6cb 100644 --- a/packager/media/formats/mp4/box_reader_unittest.cc +++ b/packager/media/formats/mp4/box_reader_unittest.cc @@ -8,7 +8,8 @@ #include #include -#include +#include +#include #include #include diff --git a/packager/media/formats/mp4/chunk_info_iterator.cc b/packager/media/formats/mp4/chunk_info_iterator.cc index 0a52df3ee6..68d0f640a6 100644 --- a/packager/media/formats/mp4/chunk_info_iterator.cc +++ b/packager/media/formats/mp4/chunk_info_iterator.cc @@ -9,7 +9,8 @@ #include #include -#include +#include +#include namespace shaka { namespace media { diff --git a/packager/media/formats/mp4/chunk_info_iterator_unittest.cc b/packager/media/formats/mp4/chunk_info_iterator_unittest.cc index 0f50732eb5..4661a2a953 100644 --- a/packager/media/formats/mp4/chunk_info_iterator_unittest.cc +++ b/packager/media/formats/mp4/chunk_info_iterator_unittest.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include #include namespace { diff --git a/packager/media/formats/mp4/composition_offset_iterator.cc b/packager/media/formats/mp4/composition_offset_iterator.cc index 344db485e1..71d521aa43 100644 --- a/packager/media/formats/mp4/composition_offset_iterator.cc +++ b/packager/media/formats/mp4/composition_offset_iterator.cc @@ -6,7 +6,8 @@ #include -#include +#include +#include namespace shaka { namespace media { diff --git a/packager/media/formats/mp4/decoding_time_iterator.cc b/packager/media/formats/mp4/decoding_time_iterator.cc index 79d0468a86..bef6f1b8af 100644 --- a/packager/media/formats/mp4/decoding_time_iterator.cc +++ b/packager/media/formats/mp4/decoding_time_iterator.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include namespace shaka { namespace media { diff --git a/packager/media/formats/mp4/fragmenter.cc b/packager/media/formats/mp4/fragmenter.cc index 7814515a78..e65b9a6126 100644 --- a/packager/media/formats/mp4/fragmenter.cc +++ b/packager/media/formats/mp4/fragmenter.cc @@ -9,6 +9,8 @@ #include #include +#include + #include #include #include diff --git a/packager/media/formats/mp4/fragmenter.h b/packager/media/formats/mp4/fragmenter.h index 74edbd518c..582e42fcd5 100644 --- a/packager/media/formats/mp4/fragmenter.h +++ b/packager/media/formats/mp4/fragmenter.h @@ -10,7 +10,8 @@ #include #include -#include +#include +#include #include #include diff --git a/packager/media/formats/mp4/low_latency_segment_segmenter.cc b/packager/media/formats/mp4/low_latency_segment_segmenter.cc index 08d70f2ff7..e9da015ade 100644 --- a/packager/media/formats/mp4/low_latency_segment_segmenter.cc +++ b/packager/media/formats/mp4/low_latency_segment_segmenter.cc @@ -8,8 +8,11 @@ #include +#include + #include #include +#include #include #include #include diff --git a/packager/media/formats/mp4/mp4_media_parser.cc b/packager/media/formats/mp4/mp4_media_parser.cc index b768993fae..bd819ebc5c 100644 --- a/packager/media/formats/mp4/mp4_media_parser.cc +++ b/packager/media/formats/mp4/mp4_media_parser.cc @@ -8,11 +8,13 @@ #include #include +#include +#include #include -#include #include #include +#include #include #include #include diff --git a/packager/media/formats/mp4/mp4_media_parser_unittest.cc b/packager/media/formats/mp4/mp4_media_parser_unittest.cc index 48b9fc5feb..c03697d969 100644 --- a/packager/media/formats/mp4/mp4_media_parser_unittest.cc +++ b/packager/media/formats/mp4/mp4_media_parser_unittest.cc @@ -8,10 +8,11 @@ #include -#include +#include #include #include +#include #include #include #include diff --git a/packager/media/formats/mp4/mp4_muxer.cc b/packager/media/formats/mp4/mp4_muxer.cc index 3315509eb8..3a4b2e9626 100644 --- a/packager/media/formats/mp4/mp4_muxer.cc +++ b/packager/media/formats/mp4/mp4_muxer.cc @@ -9,10 +9,12 @@ #include #include +#include #include #include #include +#include #include #include #include diff --git a/packager/media/formats/mp4/multi_segment_segmenter.cc b/packager/media/formats/mp4/multi_segment_segmenter.cc index e0c57ee94f..0a5d402fd8 100644 --- a/packager/media/formats/mp4/multi_segment_segmenter.cc +++ b/packager/media/formats/mp4/multi_segment_segmenter.cc @@ -8,11 +8,13 @@ #include +#include #include #include #include #include +#include #include #include #include diff --git a/packager/media/formats/mp4/segmenter.cc b/packager/media/formats/mp4/segmenter.cc index 2d49b03bdf..0df3a81db9 100644 --- a/packager/media/formats/mp4/segmenter.cc +++ b/packager/media/formats/mp4/segmenter.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/media/formats/mp4/single_segment_segmenter.cc b/packager/media/formats/mp4/single_segment_segmenter.cc index 0f079bb4f3..13527ce446 100644 --- a/packager/media/formats/mp4/single_segment_segmenter.cc +++ b/packager/media/formats/mp4/single_segment_segmenter.cc @@ -8,6 +8,8 @@ #include +#include + #include #include #include diff --git a/packager/media/formats/mp4/track_run_iterator.cc b/packager/media/formats/mp4/track_run_iterator.cc index 73188931ab..e707662d47 100644 --- a/packager/media/formats/mp4/track_run_iterator.cc +++ b/packager/media/formats/mp4/track_run_iterator.cc @@ -8,7 +8,9 @@ #include #include +#include +#include #include #include #include diff --git a/packager/media/formats/mp4/track_run_iterator_unittest.cc b/packager/media/formats/mp4/track_run_iterator_unittest.cc index 1223f44194..ce8640317e 100644 --- a/packager/media/formats/mp4/track_run_iterator_unittest.cc +++ b/packager/media/formats/mp4/track_run_iterator_unittest.cc @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include diff --git a/packager/media/formats/packed_audio/packed_audio_segmenter.cc b/packager/media/formats/packed_audio/packed_audio_segmenter.cc index 2e26aa15d5..33704a6e1a 100644 --- a/packager/media/formats/packed_audio/packed_audio_segmenter.cc +++ b/packager/media/formats/packed_audio/packed_audio_segmenter.cc @@ -8,6 +8,8 @@ #include +#include + #include #include #include diff --git a/packager/media/formats/packed_audio/packed_audio_writer.cc b/packager/media/formats/packed_audio/packed_audio_writer.cc index 79fd524c02..bab884fc23 100644 --- a/packager/media/formats/packed_audio/packed_audio_writer.cc +++ b/packager/media/formats/packed_audio/packed_audio_writer.cc @@ -6,6 +6,8 @@ #include +#include + #include #include #include diff --git a/packager/media/formats/ttml/ttml_to_mp4_handler.cc b/packager/media/formats/ttml/ttml_to_mp4_handler.cc index e064a585e9..68c83c0c5c 100644 --- a/packager/media/formats/ttml/ttml_to_mp4_handler.cc +++ b/packager/media/formats/ttml/ttml_to_mp4_handler.cc @@ -6,6 +6,8 @@ #include +#include + #include namespace shaka { diff --git a/packager/media/formats/webm/cluster_builder.cc b/packager/media/formats/webm/cluster_builder.cc index 21fc6cdc1a..2893aa89d7 100644 --- a/packager/media/formats/webm/cluster_builder.cc +++ b/packager/media/formats/webm/cluster_builder.cc @@ -4,7 +4,8 @@ #include -#include +#include +#include #include diff --git a/packager/media/formats/webm/encryptor.cc b/packager/media/formats/webm/encryptor.cc index 35a86288e0..f2b693f8d5 100644 --- a/packager/media/formats/webm/encryptor.cc +++ b/packager/media/formats/webm/encryptor.cc @@ -6,6 +6,8 @@ #include +#include + #include #include #include diff --git a/packager/media/formats/webm/mkv_writer.cc b/packager/media/formats/webm/mkv_writer.cc index f393f12e93..46fdbe94c6 100644 --- a/packager/media/formats/webm/mkv_writer.cc +++ b/packager/media/formats/webm/mkv_writer.cc @@ -6,6 +6,8 @@ #include +#include + namespace shaka { namespace media { diff --git a/packager/media/formats/webm/multi_segment_segmenter.cc b/packager/media/formats/webm/multi_segment_segmenter.cc index e12531b70f..0e6efed64f 100644 --- a/packager/media/formats/webm/multi_segment_segmenter.cc +++ b/packager/media/formats/webm/multi_segment_segmenter.cc @@ -6,8 +6,10 @@ #include +#include #include +#include #include #include #include diff --git a/packager/media/formats/webm/seek_head.cc b/packager/media/formats/webm/seek_head.cc index d43701aecb..87067af3da 100644 --- a/packager/media/formats/webm/seek_head.cc +++ b/packager/media/formats/webm/seek_head.cc @@ -9,8 +9,9 @@ #include #include +#include +#include #include -#include #include using namespace mkvmuxer; diff --git a/packager/media/formats/webm/segmenter.cc b/packager/media/formats/webm/segmenter.cc index 3e0d44d9d4..cf335d5002 100644 --- a/packager/media/formats/webm/segmenter.cc +++ b/packager/media/formats/webm/segmenter.cc @@ -6,6 +6,7 @@ #include +#include #include #include diff --git a/packager/media/formats/webm/segmenter_test_base.cc b/packager/media/formats/webm/segmenter_test_base.cc index e0b7908c58..9e2ef8d511 100644 --- a/packager/media/formats/webm/segmenter_test_base.cc +++ b/packager/media/formats/webm/segmenter_test_base.cc @@ -6,6 +6,8 @@ #include +#include + #include #include #include diff --git a/packager/media/formats/webm/single_segment_segmenter.cc b/packager/media/formats/webm/single_segment_segmenter.cc index 1cd8aed730..adafcee867 100644 --- a/packager/media/formats/webm/single_segment_segmenter.cc +++ b/packager/media/formats/webm/single_segment_segmenter.cc @@ -6,6 +6,7 @@ #include +#include #include #include diff --git a/packager/media/formats/webm/tracks_builder.cc b/packager/media/formats/webm/tracks_builder.cc index 13134b819c..5b695bccf1 100644 --- a/packager/media/formats/webm/tracks_builder.cc +++ b/packager/media/formats/webm/tracks_builder.cc @@ -4,7 +4,8 @@ #include -#include +#include +#include #include diff --git a/packager/media/formats/webm/two_pass_single_segment_segmenter.cc b/packager/media/formats/webm/two_pass_single_segment_segmenter.cc index fe32cb192f..dbb2052c30 100644 --- a/packager/media/formats/webm/two_pass_single_segment_segmenter.cc +++ b/packager/media/formats/webm/two_pass_single_segment_segmenter.cc @@ -8,6 +8,7 @@ #include +#include #include #include diff --git a/packager/media/formats/webm/webm_audio_client.cc b/packager/media/formats/webm/webm_audio_client.cc index 043f8c1c37..6ba47a9610 100644 --- a/packager/media/formats/webm/webm_audio_client.cc +++ b/packager/media/formats/webm/webm_audio_client.cc @@ -4,7 +4,7 @@ #include -#include +#include #include diff --git a/packager/media/formats/webm/webm_cluster_parser.cc b/packager/media/formats/webm/webm_cluster_parser.cc index 1f98f7c75c..6a54884e85 100644 --- a/packager/media/formats/webm/webm_cluster_parser.cc +++ b/packager/media/formats/webm/webm_cluster_parser.cc @@ -8,8 +8,10 @@ #include #include -#include +#include +#include +#include #include #include #include diff --git a/packager/media/formats/webm/webm_cluster_parser_unittest.cc b/packager/media/formats/webm/webm_cluster_parser_unittest.cc index ccba02251a..b8e3b6e2d6 100644 --- a/packager/media/formats/webm/webm_cluster_parser_unittest.cc +++ b/packager/media/formats/webm/webm_cluster_parser_unittest.cc @@ -10,8 +10,9 @@ #include #include +#include +#include #include -#include #include #include diff --git a/packager/media/formats/webm/webm_content_encodings.cc b/packager/media/formats/webm/webm_content_encodings.cc index b3db2d7c90..8fcfc0645b 100644 --- a/packager/media/formats/webm/webm_content_encodings.cc +++ b/packager/media/formats/webm/webm_content_encodings.cc @@ -4,7 +4,8 @@ #include -#include +#include +#include namespace shaka { namespace media { diff --git a/packager/media/formats/webm/webm_content_encodings_client.cc b/packager/media/formats/webm/webm_content_encodings_client.cc index e3fb5a7e47..28eceb16bf 100644 --- a/packager/media/formats/webm/webm_content_encodings_client.cc +++ b/packager/media/formats/webm/webm_content_encodings_client.cc @@ -4,7 +4,8 @@ #include -#include +#include +#include #include diff --git a/packager/media/formats/webm/webm_crypto_helpers.cc b/packager/media/formats/webm/webm_crypto_helpers.cc index 044ce2c84e..d81a99a92e 100644 --- a/packager/media/formats/webm/webm_crypto_helpers.cc +++ b/packager/media/formats/webm/webm_crypto_helpers.cc @@ -5,8 +5,9 @@ #include #include -#include +#include +#include #include #include diff --git a/packager/media/formats/webm/webm_info_parser.cc b/packager/media/formats/webm/webm_info_parser.cc index c509cb91a2..ec870478b1 100644 --- a/packager/media/formats/webm/webm_info_parser.cc +++ b/packager/media/formats/webm/webm_info_parser.cc @@ -6,8 +6,9 @@ #include -#include +#include +#include #include namespace shaka { diff --git a/packager/media/formats/webm/webm_media_parser.cc b/packager/media/formats/webm/webm_media_parser.cc index 4f82eba2a2..8f40afe86d 100644 --- a/packager/media/formats/webm/webm_media_parser.cc +++ b/packager/media/formats/webm/webm_media_parser.cc @@ -6,8 +6,10 @@ #include -#include +#include +#include +#include #include #include #include diff --git a/packager/media/formats/webm/webm_muxer.cc b/packager/media/formats/webm/webm_muxer.cc index 17fbfb2a12..8c2d683900 100644 --- a/packager/media/formats/webm/webm_muxer.cc +++ b/packager/media/formats/webm/webm_muxer.cc @@ -6,6 +6,8 @@ #include +#include + #include #include #include diff --git a/packager/media/formats/webm/webm_parser.cc b/packager/media/formats/webm/webm_parser.cc index f45fbbbd89..33d4dbd8cb 100644 --- a/packager/media/formats/webm/webm_parser.cc +++ b/packager/media/formats/webm/webm_parser.cc @@ -14,8 +14,10 @@ #include -#include +#include +#include +#include #include namespace shaka { diff --git a/packager/media/formats/webm/webm_tracks_parser.cc b/packager/media/formats/webm/webm_tracks_parser.cc index e311e7a92b..344a4a9a35 100644 --- a/packager/media/formats/webm/webm_tracks_parser.cc +++ b/packager/media/formats/webm/webm_tracks_parser.cc @@ -4,8 +4,9 @@ #include +#include +#include #include -#include #include #include diff --git a/packager/media/formats/webm/webm_tracks_parser_unittest.cc b/packager/media/formats/webm/webm_tracks_parser_unittest.cc index 68524b7697..f57577a09f 100644 --- a/packager/media/formats/webm/webm_tracks_parser_unittest.cc +++ b/packager/media/formats/webm/webm_tracks_parser_unittest.cc @@ -4,7 +4,7 @@ #include -#include +#include #include #include diff --git a/packager/media/formats/webm/webm_video_client.cc b/packager/media/formats/webm/webm_video_client.cc index dc081beaab..50f3471499 100644 --- a/packager/media/formats/webm/webm_video_client.cc +++ b/packager/media/formats/webm/webm_video_client.cc @@ -4,7 +4,7 @@ #include -#include +#include #include #include diff --git a/packager/media/formats/webvtt/text_padder.cc b/packager/media/formats/webvtt/text_padder.cc index 628f1aaa53..9ee887b317 100644 --- a/packager/media/formats/webvtt/text_padder.cc +++ b/packager/media/formats/webvtt/text_padder.cc @@ -8,6 +8,8 @@ #include +#include + #include namespace shaka { diff --git a/packager/media/formats/webvtt/text_readers.cc b/packager/media/formats/webvtt/text_readers.cc index c035d7066a..7b6a6f1cf1 100644 --- a/packager/media/formats/webvtt/text_readers.cc +++ b/packager/media/formats/webvtt/text_readers.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include namespace shaka { namespace media { diff --git a/packager/media/formats/webvtt/webvtt_file_buffer.cc b/packager/media/formats/webvtt/webvtt_file_buffer.cc index 4ca2c61842..2b19719fb7 100644 --- a/packager/media/formats/webvtt/webvtt_file_buffer.cc +++ b/packager/media/formats/webvtt/webvtt_file_buffer.cc @@ -6,6 +6,7 @@ #include +#include #include #include diff --git a/packager/media/formats/webvtt/webvtt_parser.cc b/packager/media/formats/webvtt/webvtt_parser.cc index 27ce212136..f31c07bcf2 100644 --- a/packager/media/formats/webvtt/webvtt_parser.cc +++ b/packager/media/formats/webvtt/webvtt_parser.cc @@ -6,10 +6,11 @@ #include +#include +#include #include #include #include -#include #include #include diff --git a/packager/media/formats/webvtt/webvtt_to_mp4_handler.cc b/packager/media/formats/webvtt/webvtt_to_mp4_handler.cc index 87568a98be..78bb13f375 100644 --- a/packager/media/formats/webvtt/webvtt_to_mp4_handler.cc +++ b/packager/media/formats/webvtt/webvtt_to_mp4_handler.cc @@ -9,6 +9,8 @@ #include #include +#include + #include #include #include diff --git a/packager/media/formats/webvtt/webvtt_to_mp4_handler_unittest.cc b/packager/media/formats/webvtt/webvtt_to_mp4_handler_unittest.cc index 7d1758ce11..b42c107066 100644 --- a/packager/media/formats/webvtt/webvtt_to_mp4_handler_unittest.cc +++ b/packager/media/formats/webvtt/webvtt_to_mp4_handler_unittest.cc @@ -6,6 +6,7 @@ #include +#include #include #include diff --git a/packager/media/formats/webvtt/webvtt_utils.cc b/packager/media/formats/webvtt/webvtt_utils.cc index b57881fdc7..2a6be18feb 100644 --- a/packager/media/formats/webvtt/webvtt_utils.cc +++ b/packager/media/formats/webvtt/webvtt_utils.cc @@ -11,9 +11,12 @@ #include #include +#include +#include #include #include -#include + +#include namespace shaka { namespace media { diff --git a/packager/media/formats/wvm/CMakeLists.txt b/packager/media/formats/wvm/CMakeLists.txt index 14b03c9d6d..661aad43b0 100644 --- a/packager/media/formats/wvm/CMakeLists.txt +++ b/packager/media/formats/wvm/CMakeLists.txt @@ -10,10 +10,10 @@ add_library(wvm STATIC ) target_link_libraries(wvm + absl::log media_base media_codecs mp2t - glog ) add_executable(wvm_unittest @@ -21,18 +21,18 @@ add_executable(wvm_unittest ) target_link_libraries(wvm_unittest - wvm + absl::flags + absl::log file file_test_util - test_data_util - absl::flags - media_event - media_handler_test_base - mock_muxer_listener - glog gmock gtest gtest_main + media_event + media_handler_test_base + mock_muxer_listener + test_data_util + wvm ) add_test(NAME wvm_unittest COMMAND wvm_unittest) diff --git a/packager/media/formats/wvm/wvm_media_parser.cc b/packager/media/formats/wvm/wvm_media_parser.cc index 547a4176b6..c66e921b09 100644 --- a/packager/media/formats/wvm/wvm_media_parser.cc +++ b/packager/media/formats/wvm/wvm_media_parser.cc @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/packager/media/formats/wvm/wvm_media_parser_unittest.cc b/packager/media/formats/wvm/wvm_media_parser_unittest.cc index 61fc7feb66..e60c633990 100644 --- a/packager/media/formats/wvm/wvm_media_parser_unittest.cc +++ b/packager/media/formats/wvm/wvm_media_parser_unittest.cc @@ -8,10 +8,11 @@ #include #include -#include +#include #include #include +#include #include #include #include diff --git a/packager/media/origin/CMakeLists.txt b/packager/media/origin/CMakeLists.txt index ed822e3bd5..f6456ab42e 100644 --- a/packager/media/origin/CMakeLists.txt +++ b/packager/media/origin/CMakeLists.txt @@ -8,5 +8,5 @@ add_library(media_origin STATIC origin_handler.cc) target_link_libraries(media_origin - status - glog) + absl::log + status) diff --git a/packager/media/replicator/CMakeLists.txt b/packager/media/replicator/CMakeLists.txt index 8afc911ea2..7f13081811 100644 --- a/packager/media/replicator/CMakeLists.txt +++ b/packager/media/replicator/CMakeLists.txt @@ -6,6 +6,7 @@ add_library(media_replicator STATIC replicator.cc) + target_link_libraries(media_replicator - glog - absl::base) + absl::base + absl::log) diff --git a/packager/media/replicator/replicator.cc b/packager/media/replicator/replicator.cc index e5a8f46ee5..e7049c2f7c 100644 --- a/packager/media/replicator/replicator.cc +++ b/packager/media/replicator/replicator.cc @@ -6,7 +6,8 @@ #include -#include +#include +#include namespace shaka { namespace media { diff --git a/packager/media/test/CMakeLists.txt b/packager/media/test/CMakeLists.txt index 3bdd7b5cd2..3038f315b5 100644 --- a/packager/media/test/CMakeLists.txt +++ b/packager/media/test/CMakeLists.txt @@ -12,7 +12,7 @@ target_compile_definitions(test_data_util # path, depending on the version of CMake. This is consistent. TEST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data") target_link_libraries(test_data_util - glog) + absl::log) add_library(test_web_server STATIC test_web_server.cc) diff --git a/packager/media/test/test_data_util.cc b/packager/media/test/test_data_util.cc index 786091598c..be7f7fadb7 100644 --- a/packager/media/test/test_data_util.cc +++ b/packager/media/test/test_data_util.cc @@ -4,7 +4,7 @@ #include -#include +#include namespace shaka { namespace media { diff --git a/packager/media/trick_play/CMakeLists.txt b/packager/media/trick_play/CMakeLists.txt index 6f5ce9ff04..84ae5807de 100644 --- a/packager/media/trick_play/CMakeLists.txt +++ b/packager/media/trick_play/CMakeLists.txt @@ -7,9 +7,9 @@ add_library(media_trick_play STATIC trick_play_handler.cc) target_link_libraries(media_trick_play - media_base absl::base - glog) + absl::log + media_base) add_executable(media_trick_play_unittest trick_play_handler_unittest.cc) diff --git a/packager/media/trick_play/trick_play_handler.cc b/packager/media/trick_play/trick_play_handler.cc index a7f8713e4b..1d60c90f1e 100644 --- a/packager/media/trick_play/trick_play_handler.cc +++ b/packager/media/trick_play/trick_play_handler.cc @@ -6,7 +6,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/mpd/CMakeLists.txt b/packager/mpd/CMakeLists.txt index de5278ad11..21674d5b3d 100644 --- a/packager/mpd/CMakeLists.txt +++ b/packager/mpd/CMakeLists.txt @@ -12,7 +12,7 @@ add_library(manifest_base STATIC ) target_link_libraries(manifest_base - glog + absl::log ) add_library(mpd_builder STATIC @@ -43,13 +43,13 @@ add_library(mpd_builder STATIC target_link_libraries(mpd_builder absl::flags + absl::log absl::strings absl::str_format - glog - LibXml2 file - media_base + LibXml2 manifest_base + media_base mpd_media_info_proto utils_clock ) diff --git a/packager/mpd/base/adaptation_set.cc b/packager/mpd/base/adaptation_set.cc index f001568cdc..d0b4cbb65a 100644 --- a/packager/mpd/base/adaptation_set.cc +++ b/packager/mpd/base/adaptation_set.cc @@ -8,10 +8,12 @@ #include +#include +#include #include #include -#include +#include #include #include #include diff --git a/packager/mpd/base/bandwidth_estimator.cc b/packager/mpd/base/bandwidth_estimator.cc index b5726d804b..2ac7c4b277 100644 --- a/packager/mpd/base/bandwidth_estimator.cc +++ b/packager/mpd/base/bandwidth_estimator.cc @@ -10,7 +10,10 @@ #include #include -#include +#include +#include + +#include namespace shaka { diff --git a/packager/mpd/base/mpd_builder.cc b/packager/mpd/base/mpd_builder.cc index 038c5aa514..289bcf4d6e 100644 --- a/packager/mpd/base/mpd_builder.cc +++ b/packager/mpd/base/mpd_builder.cc @@ -11,10 +11,11 @@ #include #include +#include +#include #include #include #include -#include #include #include diff --git a/packager/mpd/base/mpd_notifier_util.cc b/packager/mpd/base/mpd_notifier_util.cc index 56ab89f341..eca1f3e8d8 100644 --- a/packager/mpd/base/mpd_notifier_util.cc +++ b/packager/mpd/base/mpd_notifier_util.cc @@ -6,7 +6,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/mpd/base/mpd_utils.cc b/packager/mpd/base/mpd_utils.cc index 8c742becbe..bcc57ca9c9 100644 --- a/packager/mpd/base/mpd_utils.cc +++ b/packager/mpd/base/mpd_utils.cc @@ -7,12 +7,14 @@ #include #include +#include +#include #include #include #include -#include #include +#include #include #include #include @@ -485,9 +487,10 @@ void AddContentProtectionElementsHelperTemplated( parent->AddContentProtectionElement(drm_content_protection); } - VLOG_IF(1, protected_content.content_protection_entry().size() == 0) - << "The media is encrypted but no content protection specified (can " - "happen with key rotation)."; + if (protected_content.content_protection_entry().size() == 0) { + VLOG(1) << "The media is encrypted but no content protection specified " + << "(can happen with key rotation)."; + } } } // namespace diff --git a/packager/mpd/base/period.cc b/packager/mpd/base/period.cc index 9d35cb16da..4e035609a9 100644 --- a/packager/mpd/base/period.cc +++ b/packager/mpd/base/period.cc @@ -6,7 +6,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/mpd/base/representation.cc b/packager/mpd/base/representation.cc index 7ff51afaa5..cae8210208 100644 --- a/packager/mpd/base/representation.cc +++ b/packager/mpd/base/representation.cc @@ -9,10 +9,12 @@ #include #include +#include +#include #include -#include #include +#include #include #include #include diff --git a/packager/mpd/base/representation_unittest.cc b/packager/mpd/base/representation_unittest.cc index 9e3f95a829..cc73618a3c 100644 --- a/packager/mpd/base/representation_unittest.cc +++ b/packager/mpd/base/representation_unittest.cc @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/packager/mpd/base/simple_mpd_notifier.cc b/packager/mpd/base/simple_mpd_notifier.cc index 15d8b939df..4c096c5da9 100644 --- a/packager/mpd/base/simple_mpd_notifier.cc +++ b/packager/mpd/base/simple_mpd_notifier.cc @@ -6,7 +6,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/mpd/base/xml/xml_node.cc b/packager/mpd/base/xml/xml_node.cc index 0462f0394e..c67291bf2e 100644 --- a/packager/mpd/base/xml/xml_node.cc +++ b/packager/mpd/base/xml/xml_node.cc @@ -6,16 +6,18 @@ #include +#include #include #include #include #include #include +#include +#include #include #include #include -#include #include #include diff --git a/packager/mpd/base/xml/xml_node_unittest.cc b/packager/mpd/base/xml/xml_node_unittest.cc index 43ad2d1986..868f1c1598 100644 --- a/packager/mpd/base/xml/xml_node_unittest.cc +++ b/packager/mpd/base/xml/xml_node_unittest.cc @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/packager/mpd/test/mpd_builder_test_helper.cc b/packager/mpd/test/mpd_builder_test_helper.cc index 805425f596..7605c4fb0f 100644 --- a/packager/mpd/test/mpd_builder_test_helper.cc +++ b/packager/mpd/test/mpd_builder_test_helper.cc @@ -8,7 +8,8 @@ #include -#include +#include +#include #include #include diff --git a/packager/mpd/test/xml_compare.cc b/packager/mpd/test/xml_compare.cc index 5cec362289..654b6ed80b 100644 --- a/packager/mpd/test/xml_compare.cc +++ b/packager/mpd/test/xml_compare.cc @@ -11,11 +11,14 @@ #include #include +#include +#include #include -#include #include #include +#include + namespace shaka { namespace { diff --git a/packager/mpd/util/mpd_writer.cc b/packager/mpd/util/mpd_writer.cc index 43d7298b6e..c3593abbb2 100644 --- a/packager/mpd/util/mpd_writer.cc +++ b/packager/mpd/util/mpd_writer.cc @@ -9,7 +9,8 @@ #include #include -#include +#include +#include #include #include diff --git a/packager/packager.cc b/packager/packager.cc index c4c5184d19..c5c2afa8b3 100644 --- a/packager/packager.cc +++ b/packager/packager.cc @@ -10,9 +10,10 @@ #include #include +#include +#include #include #include -#include #include #include @@ -21,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/packager/status/CMakeLists.txt b/packager/status/CMakeLists.txt index a982272c77..0744601edd 100644 --- a/packager/status/CMakeLists.txt +++ b/packager/status/CMakeLists.txt @@ -7,8 +7,8 @@ add_library(status STATIC status.cc) target_link_libraries(status - absl::str_format - glog) + absl::log + absl::str_format) if(LIBPACKAGER_SHARED) target_compile_definitions(status PUBLIC SHAKA_IMPLEMENTATION) diff --git a/packager/status/status.cc b/packager/status/status.cc index bec0969ad2..3d5c5fc6b9 100644 --- a/packager/status/status.cc +++ b/packager/status/status.cc @@ -6,8 +6,8 @@ #include +#include #include -#include #include diff --git a/packager/third_party/CMakeLists.txt b/packager/third_party/CMakeLists.txt index dba432e8a0..15f2f955c9 100644 --- a/packager/third_party/CMakeLists.txt +++ b/packager/third_party/CMakeLists.txt @@ -28,7 +28,6 @@ endif() # These all use EXCLUDE_FROM_ALL so that only the referenced targets get built. add_subdirectory(abseil-cpp EXCLUDE_FROM_ALL) add_subdirectory(curl EXCLUDE_FROM_ALL) -add_subdirectory(glog EXCLUDE_FROM_ALL) add_subdirectory(googletest EXCLUDE_FROM_ALL) add_subdirectory(json EXCLUDE_FROM_ALL) add_subdirectory(libpng EXCLUDE_FROM_ALL) diff --git a/packager/third_party/glog/CMakeLists.txt b/packager/third_party/glog/CMakeLists.txt deleted file mode 100644 index 2ed27d024a..0000000000 --- a/packager/third_party/glog/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2022 Google LLC. 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 - -# CMake build file to host glog configuration. - -# We will use abseil for flags, so turn off glog's search for gflags. -set(WITH_GFLAGS OFF) - -# Don't depend on gtest, since we won't be building glog's tests. -set(WITH_GTEST OFF) - -# Don't depend on or search for libunwind. -set(WITH_UNWIND OFF) - -# Disable this warning/error, which occurs in demangle.c on macOS: -if(NOT MSVC) - add_compile_options(-Wno-shorten-64-to-32) -endif() - -# With these set in scope of this folder, load the library's own CMakeLists.txt. -add_subdirectory(source) diff --git a/packager/third_party/glog/source b/packager/third_party/glog/source deleted file mode 160000 index c515e1ae2f..0000000000 --- a/packager/third_party/glog/source +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c515e1ae2fc8b36ca19362842f9347e9429be7ad