feat: Replace glog with absl::log (#1274)

This deprecates --vmodule (not available in absl, mapping it to --v for
a very minimal sort of compatibility) and adds the absl::log flags
--minloglevel, --stderrthreshold, --log_backtrace_at, and --log_prefix.
This commit is contained in:
Joey Parrish 2023-10-13 12:42:47 -07:00 committed by GitHub
parent 3b3e267221
commit 7653e1e02f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
231 changed files with 561 additions and 294 deletions

3
.gitmodules vendored
View File

@ -7,9 +7,6 @@
[submodule "packager/third_party/curl/source"] [submodule "packager/third_party/curl/source"]
path = packager/third_party/curl/source path = packager/third_party/curl/source
url = https://github.com/curl/curl 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"] [submodule "packager/third_party/json/source"]
path = packager/third_party/json/source path = packager/third_party/json/source
url = https://github.com/nlohmann/json url = https://github.com/nlohmann/json

View File

@ -7,7 +7,6 @@
# Root-level CMake build file. # Root-level CMake build file.
# Minimum CMake version. This must be in the root level CMakeLists.txt. # 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) cmake_minimum_required(VERSION 3.16)
# These policy settings should be included before the project definition. # These policy settings should be included before the project definition.

View File

@ -141,13 +141,14 @@ add_executable(packager
app/widevine_encryption_flags.h app/widevine_encryption_flags.h
) )
target_link_libraries(packager target_link_libraries(packager
libpackager
hex_bytes_flags
absl::flags absl::flags
absl::flags_parse absl::flags_parse
license_notice absl::log
glog absl::log_flags
absl::strings absl::strings
hex_bytes_flags
libpackager
license_notice
string_utils string_utils
) )
@ -158,13 +159,14 @@ add_executable(mpd_generator
app/vlog_flags.h app/vlog_flags.h
) )
target_link_libraries(mpd_generator target_link_libraries(mpd_generator
mpd_builder
mpd_util
absl::flags absl::flags
absl::flags_parse absl::flags_parse
absl::log
absl::log_flags
absl::strings absl::strings
glog
license_notice license_notice
mpd_builder
mpd_util
) )
add_executable(packager_test add_executable(packager_test

View File

@ -8,6 +8,8 @@
#include <set> #include <set>
#include <absl/log/check.h>
#include <packager/media/chunking/sync_point_queue.h> #include <packager/media/chunking/sync_point_queue.h>
#include <packager/media/origin/origin_handler.h> #include <packager/media/origin/origin_handler.h>

View File

@ -14,9 +14,11 @@
#include <absl/flags/parse.h> #include <absl/flags/parse.h>
#include <absl/flags/usage.h> #include <absl/flags/usage.h>
#include <absl/flags/usage_config.h> #include <absl/flags/usage_config.h>
#include <absl/log/check.h>
#include <absl/log/initialize.h>
#include <absl/log/log.h>
#include <absl/strings/str_format.h> #include <absl/strings/str_format.h>
#include <absl/strings/str_split.h> #include <absl/strings/str_split.h>
#include <glog/logging.h>
#include <packager/app/mpd_generator_flags.h> #include <packager/app/mpd_generator_flags.h>
#include <packager/app/vlog_flags.h> #include <packager/app/vlog_flags.h>
@ -122,7 +124,9 @@ int MpdMain(int argc, char** argv) {
return status; return status;
} }
register_flags_with_glog(); handle_vlog_flags();
absl::InitializeLog();
if (!absl::GetFlag(FLAGS_test_packager_version).empty()) if (!absl::GetFlag(FLAGS_test_packager_version).empty())
SetPackagerVersionForTesting(absl::GetFlag(FLAGS_test_packager_version)); SetPackagerVersionForTesting(absl::GetFlag(FLAGS_test_packager_version));

View File

@ -16,10 +16,12 @@
#include <absl/flags/parse.h> #include <absl/flags/parse.h>
#include <absl/flags/usage.h> #include <absl/flags/usage.h>
#include <absl/flags/usage_config.h> #include <absl/flags/usage_config.h>
#include <absl/log/globals.h>
#include <absl/log/initialize.h>
#include <absl/log/log.h>
#include <absl/strings/numbers.h> #include <absl/strings/numbers.h>
#include <absl/strings/str_format.h> #include <absl/strings/str_format.h>
#include <absl/strings/str_split.h> #include <absl/strings/str_split.h>
#include <glog/logging.h>
#include <packager/app/ad_cue_generator_flags.h> #include <packager/app/ad_cue_generator_flags.h>
#include <packager/app/crypto_flags.h> #include <packager/app/crypto_flags.h>
@ -550,14 +552,19 @@ int PackagerMain(int argc, char** argv) {
std::cout << line << std::endl; std::cout << line << std::endl;
return kSuccess; return kSuccess;
} }
if (remaining_args.size() < 2) { if (remaining_args.size() < 2) {
std::cerr << "Usage: " << absl::ProgramUsageMessage(); std::cerr << "Usage: " << absl::ProgramUsageMessage();
return kSuccess; 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() || if (!ValidateWidevineCryptoFlags() || !ValidateRawKeyCryptoFlags() ||
!ValidatePRCryptoFlags() || !ValidateCryptoFlags() || !ValidatePRCryptoFlags() || !ValidateCryptoFlags() ||

View File

@ -6,7 +6,7 @@
#include <packager/app/packager_util.h> #include <packager/app/packager_util.h>
#include <glog/logging.h> #include <absl/log/log.h>
#include <packager/file/file.h> #include <packager/file/file.h>
#include <packager/media/base/media_handler.h> #include <packager/media/base/media_handler.h>

View File

@ -6,9 +6,9 @@
#include <packager/app/stream_descriptor.h> #include <packager/app/stream_descriptor.h>
#include <absl/log/log.h>
#include <absl/strings/numbers.h> #include <absl/strings/numbers.h>
#include <absl/strings/str_split.h> #include <absl/strings/str_split.h>
#include <glog/logging.h>
#include <packager/kv_pairs/kv_pairs.h> #include <packager/kv_pairs/kv_pairs.h>
#include <packager/utils/string_trim_split.h> #include <packager/utils/string_trim_split.h>

View File

@ -8,11 +8,13 @@
#include <packager/app/vlog_flags.h> #include <packager/app/vlog_flags.h>
#include <absl/log/globals.h>
#include <absl/log/log.h>
#include <absl/strings/numbers.h> #include <absl/strings/numbers.h>
#include <packager/kv_pairs/kv_pairs.h> #include <packager/kv_pairs/kv_pairs.h>
ABSL_FLAG(int32_t, ABSL_FLAG(int,
v, v,
0, 0,
"Show all VLOG(m) or DVLOG(m) messages for m <= this. " "Show all VLOG(m) or DVLOG(m) messages for m <= this. "
@ -22,50 +24,48 @@ ABSL_FLAG(
std::string, std::string,
vmodule, vmodule,
"", "",
"Per-module verbose level." "Per-module verbose level. THIS FLAG IS DEPRECATED. "
"Argument is a comma-separated list of <module name>=<log level>. " "Argument is a comma-separated list of <module name>=<log level>. "
"<module name> is a glob pattern, matched against the filename base " "The logging system no longer supports different levels for different "
"(that is, name ignoring .cc/.h./-inl.h). " "modules, so the verbosity level will be set to the maximum specified for "
"A pattern without slashes matches just the file name portion, otherwise " "any module or given by --v.");
"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. "
"<log level> overrides any value given by --v.");
// logging.h defines FLAGS_v and FLAGS_vmodule in terms of the gflags library, ABSL_DECLARE_FLAG(int, minloglevel);
// 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 <glog/logging.h>
#undef FLAGS_vmodule
#undef FLAGS_v
namespace shaka { namespace shaka {
void register_flags_with_glog() { void handle_vlog_flags() {
auto vlog_level = absl::GetFlag(FLAGS_v); // Reference the log level flag to keep the absl::log flags from getting
if (vlog_level != 0) { // stripped from the executable.
google::SetVLOGLevel("*", vlog_level); 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); std::string vmodule_patterns = absl::GetFlag(FLAGS_vmodule);
if (!vmodule_patterns.empty()) { if (!vmodule_patterns.empty()) {
std::vector<KVPair> patterns = std::vector<KVPair> patterns =
SplitStringIntoKeyValuePairs(vmodule_patterns, '=', ','); SplitStringIntoKeyValuePairs(vmodule_patterns, '=', ',');
int pattern_vlevel; int pattern_vlevel;
bool warning_shown = false;
for (const auto& pattern : patterns) { 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)) { if (!::absl::SimpleAtoi(pattern.second, &pattern_vlevel)) {
LOG(ERROR) << "Error parsing log level for '" << pattern.first LOG(ERROR) << "Error parsing log level for '" << pattern.first
<< "' from '" << pattern.second << "'"; << "' from '" << pattern.second << "'";
continue; continue;
} }
google::SetVLOGLevel(pattern.first.c_str(), pattern_vlevel);
} }
} }
if (vlog_level != 0) {
absl::SetMinLogLevel(static_cast<absl::LogSeverityAtLeast>(-vlog_level));
}
} }
} // namespace shaka } // namespace shaka

View File

@ -11,7 +11,7 @@
#include <absl/flags/flag.h> #include <absl/flags/flag.h>
namespace shaka { namespace shaka {
void register_flags_with_glog(); void handle_vlog_flags();
} }
#endif // APP_VLOG_FLAGS_H_ #endif // APP_VLOG_FLAGS_H_

View File

@ -11,9 +11,9 @@
#include <string_view> #include <string_view>
#include <absl/flags/flag.h> #include <absl/flags/flag.h>
#include <absl/log/log.h>
#include <absl/strings/ascii.h> #include <absl/strings/ascii.h>
#include <absl/strings/match.h> #include <absl/strings/match.h>
#include <glog/logging.h>
#include <packager/app/validate_flag.h> #include <packager/app/validate_flag.h>

View File

@ -19,13 +19,13 @@ add_library(file STATIC
target_link_libraries(file target_link_libraries(file
absl::base absl::base
absl::flags absl::flags
absl::log
absl::str_format absl::str_format
absl::strings absl::strings
absl::synchronization absl::synchronization
absl::time absl::time
libcurl
glog
kv_pairs kv_pairs
libcurl
status status
version) version)
@ -36,6 +36,7 @@ endif()
add_library(file_test_util STATIC add_library(file_test_util STATIC
file_test_util.cc) file_test_util.cc)
target_link_libraries(file_test_util target_link_libraries(file_test_util
absl::log
gmock) gmock)
add_executable(file_unittest add_executable(file_unittest
@ -47,6 +48,8 @@ add_executable(file_unittest
memory_file_unittest.cc memory_file_unittest.cc
udp_options_unittest.cc) udp_options_unittest.cc)
target_link_libraries(file_unittest target_link_libraries(file_unittest
absl::check
absl::log
file file
file_test_util file_test_util
gmock gmock

View File

@ -6,7 +6,7 @@
#include <packager/file/callback_file.h> #include <packager/file/callback_file.h>
#include <glog/logging.h> #include <absl/log/log.h>
#include <packager/macros.h> #include <packager/macros.h>

View File

@ -12,9 +12,10 @@
#include <memory> #include <memory>
#include <absl/flags/flag.h> #include <absl/flags/flag.h>
#include <absl/log/check.h>
#include <absl/log/log.h>
#include <absl/strings/numbers.h> #include <absl/strings/numbers.h>
#include <absl/strings/str_format.h> #include <absl/strings/str_format.h>
#include <glog/logging.h>
#include <packager/file/callback_file.h> #include <packager/file/callback_file.h>
#include <packager/file/file_util.h> #include <packager/file/file_util.h>
@ -23,6 +24,7 @@
#include <packager/file/memory_file.h> #include <packager/file/memory_file.h>
#include <packager/file/threaded_io_file.h> #include <packager/file/threaded_io_file.h>
#include <packager/file/udp_file.h> #include <packager/file/udp_file.h>
#include <packager/macros.h>
ABSL_FLAG(uint64_t, ABSL_FLAG(uint64_t,
io_cache_size, io_cache_size,

View File

@ -7,7 +7,7 @@
#ifndef MEDIA_FILE_FILE_CLOSER_H_ #ifndef MEDIA_FILE_FILE_CLOSER_H_
#define MEDIA_FILE_FILE_CLOSER_H_ #define MEDIA_FILE_FILE_CLOSER_H_
#include <glog/logging.h> #include <absl/log/log.h>
#include <packager/file/file.h> #include <packager/file/file.h>

View File

@ -6,7 +6,7 @@
#include <packager/file/file_util.h> #include <packager/file/file_util.h>
#include <glog/logging.h> #include <absl/log/log.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
namespace shaka { namespace shaka {

View File

@ -8,10 +8,11 @@
#include <absl/flags/declare.h> #include <absl/flags/declare.h>
#include <absl/flags/flag.h> #include <absl/flags/flag.h>
#include <absl/log/check.h>
#include <absl/log/log.h>
#include <absl/strings/escaping.h> #include <absl/strings/escaping.h>
#include <absl/strings/str_format.h> #include <absl/strings/str_format.h>
#include <curl/curl.h> #include <curl/curl.h>
#include <glog/logging.h>
#include <packager/file/thread_pool.h> #include <packager/file/thread_pool.h>
#include <packager/macros.h> #include <packager/macros.h>

View File

@ -15,6 +15,7 @@
#include <packager/file/file.h> #include <packager/file/file.h>
#include <packager/file/file_closer.h> #include <packager/file/file_closer.h>
#include <packager/macros.h>
#include <packager/media/test/test_web_server.h> #include <packager/media/test/test_web_server.h>
#define ASSERT_JSON_STRING(json, key, value) \ #define ASSERT_JSON_STRING(json, key, value) \

View File

@ -9,7 +9,10 @@
#include <algorithm> #include <algorithm>
#include <cstring> #include <cstring>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/macros.h>
namespace shaka { namespace shaka {

View File

@ -15,7 +15,10 @@
#include <cstdio> #include <cstdio>
#include <filesystem> #include <filesystem>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/macros.h>
namespace shaka { namespace shaka {

View File

@ -12,8 +12,9 @@
#include <memory> #include <memory>
#include <set> #include <set>
#include <absl/log/check.h>
#include <absl/log/log.h>
#include <absl/synchronization/mutex.h> #include <absl/synchronization/mutex.h>
#include <glog/logging.h>
namespace shaka { namespace shaka {
namespace { namespace {

View File

@ -8,8 +8,9 @@
#include <thread> #include <thread>
#include <absl/log/check.h>
#include <absl/log/log.h>
#include <absl/time/time.h> #include <absl/time/time.h>
#include <glog/logging.h>
namespace shaka { namespace shaka {

View File

@ -6,6 +6,8 @@
#include <packager/file/threaded_io_file.h> #include <packager/file/threaded_io_file.h>
#include <absl/log/check.h>
#include <packager/file/thread_pool.h> #include <packager/file/thread_pool.h>
namespace shaka { namespace shaka {

View File

@ -28,7 +28,8 @@
#include <limits> #include <limits>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/file/udp_options.h> #include <packager/file/udp_options.h>

View File

@ -9,9 +9,10 @@
#include <iterator> #include <iterator>
#include <absl/flags/flag.h> #include <absl/flags/flag.h>
#include <absl/log/check.h>
#include <absl/log/log.h>
#include <absl/strings/numbers.h> #include <absl/strings/numbers.h>
#include <absl/strings/str_split.h> #include <absl/strings/str_split.h>
#include <glog/logging.h>
#include <packager/kv_pairs/kv_pairs.h> #include <packager/kv_pairs/kv_pairs.h>
#include <packager/macros.h> #include <packager/macros.h>

View File

@ -20,15 +20,15 @@ add_library(hls_builder
) )
target_link_libraries(hls_builder target_link_libraries(hls_builder
file
media_base
widevine_protos
manifest_base
mpd_media_info_proto
absl::flags absl::flags
absl::log
absl::strings absl::strings
absl::str_format absl::str_format
glog file
manifest_base
media_base
mpd_media_info_proto
widevine_protos
) )
add_executable(hls_unittest add_executable(hls_unittest
@ -40,13 +40,13 @@ add_executable(hls_unittest
) )
target_link_libraries(hls_unittest target_link_libraries(hls_unittest
absl::flags
file file
file_test_util file_test_util
test_data_util
absl::flags
hls_builder
gmock gmock
gtest gtest
gtest_main) gtest_main
hls_builder
test_data_util)
add_test(NAME hls_unittest COMMAND hls_unittest) add_test(NAME hls_unittest COMMAND hls_unittest)

View File

@ -10,10 +10,11 @@
#include <cstdint> #include <cstdint>
#include <filesystem> #include <filesystem>
#include <absl/log/check.h>
#include <absl/log/log.h>
#include <absl/strings/numbers.h> #include <absl/strings/numbers.h>
#include <absl/strings/str_format.h> #include <absl/strings/str_format.h>
#include <absl/strings/str_join.h> #include <absl/strings/str_join.h>
#include <glog/logging.h>
#include <packager/file/file.h> #include <packager/file/file.h>
#include <packager/hls/base/media_playlist.h> #include <packager/hls/base/media_playlist.h>

View File

@ -11,12 +11,14 @@
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include <absl/log/check.h>
#include <absl/log/log.h>
#include <absl/strings/numbers.h> #include <absl/strings/numbers.h>
#include <absl/strings/str_format.h> #include <absl/strings/str_format.h>
#include <glog/logging.h>
#include <packager/file/file.h> #include <packager/file/file.h>
#include <packager/hls/base/tag.h> #include <packager/hls/base/tag.h>
#include <packager/macros.h>
#include <packager/media/base/language_utils.h> #include <packager/media/base/language_utils.h>
#include <packager/media/base/muxer_util.h> #include <packager/media/base/muxer_util.h>
#include <packager/version/version.h> #include <packager/version/version.h>

View File

@ -11,9 +11,10 @@
#include <optional> #include <optional>
#include <absl/flags/flag.h> #include <absl/flags/flag.h>
#include <absl/log/check.h>
#include <absl/log/log.h>
#include <absl/strings/escaping.h> #include <absl/strings/escaping.h>
#include <absl/strings/numbers.h> #include <absl/strings/numbers.h>
#include <glog/logging.h>
#include <packager/file/file_util.h> #include <packager/file/file_util.h>
#include <packager/media/base/protection_system_ids.h> #include <packager/media/base/protection_system_ids.h>

View File

@ -7,8 +7,8 @@
add_library(kv_pairs STATIC add_library(kv_pairs STATIC
kv_pairs.cc) kv_pairs.cc)
target_link_libraries(kv_pairs target_link_libraries(kv_pairs
absl::str_format absl::log
glog) absl::str_format)
add_executable(kv_pairs_unittest add_executable(kv_pairs_unittest
kv_pairs_unittest.cc) kv_pairs_unittest.cc)

View File

@ -9,6 +9,9 @@
#include <type_traits> #include <type_traits>
#include <absl/log/globals.h>
#include <absl/log/log.h>
/// A macro to disable copying and assignment. Usage: /// A macro to disable copying and assignment. Usage:
/// class Foo { /// class Foo {
/// private: /// private:
@ -39,8 +42,21 @@
/// AES block size in bytes, regardless of key size. /// AES block size in bytes, regardless of key size.
#define AES_BLOCK_SIZE 16 #define AES_BLOCK_SIZE 16
#define DVLOG_IF(verboselevel, condition) \ #define VLOG(verboselevel) \
static_cast<void>(0), !(condition) ? (void)0 : VLOG(verboselevel) LOG(LEVEL(static_cast<absl::LogSeverity>(-verboselevel)))
#define VLOG_IS_ON(verboselevel) \
(static_cast<int>(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(SHARED_LIBRARY_BUILD)
#if defined(_WIN32) #if defined(_WIN32)

View File

@ -58,10 +58,10 @@ add_library(media_base STATIC
target_link_libraries(media_base target_link_libraries(media_base
absl::base absl::base
absl::flags absl::flags
absl::log
absl::str_format absl::str_format
absl::strings absl::strings
file file
glog
hex_parser hex_parser
mbedtls mbedtls
mpd_media_info_proto mpd_media_info_proto
@ -73,8 +73,8 @@ target_link_libraries(media_base
add_library(media_handler_test_base STATIC add_library(media_handler_test_base STATIC
media_handler_test_base.cc) media_handler_test_base.cc)
target_link_libraries(media_handler_test_base target_link_libraries(media_handler_test_base
absl::log
absl::strings absl::strings
glog
gmock) gmock)
add_executable(media_base_unittest add_executable(media_base_unittest

View File

@ -9,7 +9,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <mbedtls/entropy.h> #include <mbedtls/entropy.h>
namespace { namespace {

View File

@ -10,8 +10,8 @@
#include <iterator> #include <iterator>
#include <memory> #include <memory>
#include <absl/log/log.h>
#include <absl/strings/escaping.h> #include <absl/strings/escaping.h>
#include <glog/logging.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <packager/utils/bytes_to_string_view.h> #include <packager/utils/bytes_to_string_view.h>

View File

@ -8,7 +8,8 @@
#include <algorithm> #include <algorithm>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
namespace shaka { namespace shaka {
namespace media { namespace media {

View File

@ -6,7 +6,8 @@
#include <packager/media/base/aes_encryptor.h> #include <packager/media/base/aes_encryptor.h>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
namespace { namespace {

View File

@ -8,7 +8,8 @@
#include <algorithm> #include <algorithm>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
namespace shaka { namespace shaka {
namespace media { namespace media {

View File

@ -8,8 +8,8 @@
#include <cinttypes> #include <cinttypes>
#include <absl/log/log.h>
#include <absl/strings/str_format.h> #include <absl/strings/str_format.h>
#include <glog/logging.h>
#include <packager/macros.h> #include <packager/macros.h>
#include <packager/media/base/limits.h> #include <packager/media/base/limits.h>

View File

@ -4,7 +4,8 @@
#include <packager/media/base/audio_timestamp_helper.h> #include <packager/media/base/audio_timestamp_helper.h>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/media/base/timestamp.h> #include <packager/media/base/timestamp.h>

View File

@ -6,6 +6,8 @@
#include <algorithm> #include <algorithm>
#include <absl/log/check.h>
namespace shaka { namespace shaka {
namespace media { namespace media {

View File

@ -8,7 +8,8 @@
#include <cstddef> #include <cstddef>
#include <cstdint> #include <cstdint>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/macros.h> #include <packager/macros.h>

View File

@ -6,6 +6,8 @@
#include <packager/media/base/bit_writer.h> #include <packager/media/base/bit_writer.h>
#include <absl/log/check.h>
namespace shaka { namespace shaka {
namespace media { namespace media {

View File

@ -10,7 +10,7 @@
#include <cstdint> #include <cstdint>
#include <vector> #include <vector>
#include <glog/logging.h> #include <absl/log/log.h>
namespace shaka { namespace shaka {
namespace media { namespace media {

View File

@ -6,7 +6,8 @@
#include <packager/media/base/buffer_reader.h> #include <packager/media/base/buffer_reader.h>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
namespace shaka { namespace shaka {
namespace media { namespace media {

View File

@ -7,7 +7,8 @@
#include <packager/media/base/buffer_writer.h> #include <packager/media/base/buffer_writer.h>
#include <absl/base/internal/endian.h> #include <absl/base/internal/endian.h>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/file/file.h> #include <packager/file/file.h>

View File

@ -10,7 +10,7 @@
#include <limits> #include <limits>
#include <memory> #include <memory>
#include <glog/logging.h> #include <absl/log/log.h>
#include <packager/file/file.h> #include <packager/file/file.h>
#include <packager/file/file_test_util.h> #include <packager/file/file_test_util.h>

View File

@ -4,7 +4,8 @@
#include <packager/media/base/byte_queue.h> #include <packager/media/base/byte_queue.h>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
namespace shaka { namespace shaka {
namespace media { namespace media {

View File

@ -10,7 +10,8 @@
#include <iterator> #include <iterator>
#include <limits> #include <limits>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <libxml/parser.h> #include <libxml/parser.h>
#include <libxml/tree.h> #include <libxml/tree.h>

View File

@ -4,7 +4,8 @@
#include <packager/media/base/decrypt_config.h> #include <packager/media/base/decrypt_config.h>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
namespace shaka { namespace shaka {
namespace media { namespace media {

View File

@ -6,7 +6,8 @@
#include <packager/media/base/decryptor_source.h> #include <packager/media/base/decryptor_source.h>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/media/base/aes_decryptor.h> #include <packager/media/base/aes_decryptor.h>
#include <packager/media/base/aes_pattern_cryptor.h> #include <packager/media/base/aes_pattern_cryptor.h>

View File

@ -8,7 +8,7 @@
#include <algorithm> #include <algorithm>
#include <glog/logging.h> #include <absl/log/log.h>
#include <packager/media/test/test_web_server.h> #include <packager/media/test/test_web_server.h>
#include <packager/status/status_test_util.h> #include <packager/status/status_test_util.h>

View File

@ -6,7 +6,7 @@
#include <packager/media/base/id3_tag.h> #include <packager/media/base/id3_tag.h>
#include <glog/logging.h> #include <absl/log/log.h>
#include <packager/media/base/buffer_writer.h> #include <packager/media/base/buffer_writer.h>
#include <packager/media/base/fourccs.h> #include <packager/media/base/fourccs.h>

View File

@ -8,7 +8,8 @@
#include <iterator> #include <iterator>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/macros.h> #include <packager/macros.h>

View File

@ -6,6 +6,8 @@
#include <packager/media/base/media_handler_test_base.h> #include <packager/media/base/media_handler_test_base.h>
#include <absl/log/check.h>
#include <packager/media/base/audio_stream_info.h> #include <packager/media/base/audio_stream_info.h>
#include <packager/media/base/text_stream_info.h> #include <packager/media/base/text_stream_info.h>
#include <packager/media/base/video_stream_info.h> #include <packager/media/base/video_stream_info.h>

View File

@ -8,8 +8,9 @@
#include <cinttypes> #include <cinttypes>
#include <absl/log/check.h>
#include <absl/log/log.h>
#include <absl/strings/str_format.h> #include <absl/strings/str_format.h>
#include <glog/logging.h>
namespace shaka { namespace shaka {
namespace media { namespace media {

View File

@ -12,7 +12,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/media/base/decrypt_config.h> #include <packager/media/base/decrypt_config.h>

View File

@ -9,6 +9,7 @@
#include <algorithm> #include <algorithm>
#include <chrono> #include <chrono>
#include <packager/macros.h>
#include <packager/media/base/media_sample.h> #include <packager/media/base/media_sample.h>
#include <packager/media/base/muxer_util.h> #include <packager/media/base/muxer_util.h>
#include <packager/status/status_macros.h> #include <packager/status/status_macros.h>

View File

@ -10,10 +10,11 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <absl/log/check.h>
#include <absl/log/log.h>
#include <absl/strings/numbers.h> #include <absl/strings/numbers.h>
#include <absl/strings/str_format.h> #include <absl/strings/str_format.h>
#include <absl/strings/str_split.h> #include <absl/strings/str_split.h>
#include <glog/logging.h>
#include <packager/media/base/video_stream_info.h> #include <packager/media/base/video_stream_info.h>

View File

@ -6,7 +6,9 @@
#include <cstdint> #include <cstdint>
#include <glog/logging.h> #include <absl/log/log.h>
#include <packager/macros.h>
namespace shaka { namespace shaka {
namespace media { namespace media {

View File

@ -9,9 +9,11 @@
#include <algorithm> #include <algorithm>
#include <iterator> #include <iterator>
#include <absl/log/check.h>
#include <absl/log/log.h>
#include <absl/strings/escaping.h> #include <absl/strings/escaping.h>
#include <glog/logging.h>
#include <packager/macros.h>
#include <packager/media/base/buffer_writer.h> #include <packager/media/base/buffer_writer.h>
#include <packager/media/base/http_key_fetcher.h> #include <packager/media/base/http_key_fetcher.h>
#include <packager/media/base/key_source.h> #include <packager/media/base/key_source.h>

View File

@ -11,8 +11,9 @@
#include <set> #include <set>
#include <vector> #include <vector>
#include <absl/log/check.h>
#include <absl/log/log.h>
#include <absl/strings/escaping.h> #include <absl/strings/escaping.h>
#include <glog/logging.h>
#include <mbedtls/cipher.h> #include <mbedtls/cipher.h>
#include <packager/media/base/buffer_writer.h> #include <packager/media/base/buffer_writer.h>

View File

@ -10,10 +10,11 @@
#include <chrono> #include <chrono>
#include <deque> #include <deque>
#include <absl/log/check.h>
#include <absl/log/log.h>
#include <absl/strings/str_format.h> #include <absl/strings/str_format.h>
#include <absl/synchronization/mutex.h> #include <absl/synchronization/mutex.h>
#include <absl/time/time.h> #include <absl/time/time.h>
#include <glog/logging.h>
#include <packager/macros.h> #include <packager/macros.h>
#include <packager/status/status.h> #include <packager/status/status.h>

View File

@ -8,8 +8,8 @@
#include <thread> #include <thread>
#include <absl/log/log.h>
#include <absl/synchronization/notification.h> #include <absl/synchronization/notification.h>
#include <glog/logging.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <packager/status/status_test_util.h> #include <packager/status/status_test_util.h>

View File

@ -8,6 +8,8 @@
#include <map> #include <map>
#include <absl/log/check.h>
#include <packager/media/base/buffer_reader.h> #include <packager/media/base/buffer_reader.h>
#include <packager/media/base/buffer_writer.h> #include <packager/media/base/buffer_writer.h>
#include <packager/media/base/fourccs.h> #include <packager/media/base/fourccs.h>

View File

@ -11,7 +11,8 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/media/public/crypto_params.h> #include <packager/media/public/crypto_params.h>

View File

@ -6,8 +6,8 @@
#include <packager/media/base/proto_json_util.h> #include <packager/media/base/proto_json_util.h>
#include <absl/log/log.h>
#include <google/protobuf/util/json_util.h> #include <google/protobuf/util/json_util.h>
#include <glog/logging.h>
namespace shaka { namespace shaka {
namespace media { namespace media {

View File

@ -8,8 +8,9 @@
#include <algorithm> #include <algorithm>
#include <absl/log/check.h>
#include <absl/log/log.h>
#include <absl/strings/escaping.h> #include <absl/strings/escaping.h>
#include <glog/logging.h>
#include <packager/media/base/key_source.h> #include <packager/media/base/key_source.h>
#include <packager/status/status_macros.h> #include <packager/status/status_macros.h>

View File

@ -5,7 +5,7 @@
#ifndef PACKAGER_MEDIA_BASE_RCHECK_H_ #ifndef PACKAGER_MEDIA_BASE_RCHECK_H_
#define PACKAGER_MEDIA_BASE_RCHECK_H_ #define PACKAGER_MEDIA_BASE_RCHECK_H_
#include <glog/logging.h> #include <absl/log/log.h>
#define RCHECK(x) \ #define RCHECK(x) \
do { \ do { \

View File

@ -6,7 +6,8 @@
#include <packager/media/base/request_signer.h> #include <packager/media/base/request_signer.h>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <mbedtls/md.h> #include <mbedtls/md.h>
#include <packager/media/base/aes_encryptor.h> #include <packager/media/base/aes_encryptor.h>

View File

@ -21,7 +21,8 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <mbedtls/error.h> #include <mbedtls/error.h>
#include <mbedtls/md.h> #include <mbedtls/md.h>

View File

@ -11,7 +11,7 @@
#include <filesystem> #include <filesystem>
#include <memory> #include <memory>
#include <glog/logging.h> #include <absl/log/log.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <packager/media/base/test/rsa_test_data.h> #include <packager/media/base/test/rsa_test_data.h>

View File

@ -8,8 +8,8 @@
#include <cinttypes> #include <cinttypes>
#include <absl/log/log.h>
#include <absl/strings/str_format.h> #include <absl/strings/str_format.h>
#include <glog/logging.h>
#include <packager/macros.h> #include <packager/macros.h>
#include <packager/media/base/timestamp.h> #include <packager/media/base/timestamp.h>

View File

@ -6,6 +6,8 @@
#include <packager/media/base/text_muxer.h> #include <packager/media/base/text_muxer.h>
#include <absl/log/check.h>
#include <packager/media/base/muxer_util.h> #include <packager/media/base/muxer_util.h>
#include <packager/status/status_macros.h> #include <packager/status/status_macros.h>

View File

@ -9,7 +9,7 @@
#include <algorithm> #include <algorithm>
#include <functional> #include <functional>
#include <glog/logging.h> #include <absl/log/log.h>
namespace shaka { namespace shaka {
namespace media { namespace media {

View File

@ -6,8 +6,8 @@
#include <packager/media/base/video_stream_info.h> #include <packager/media/base/video_stream_info.h>
#include <absl/log/log.h>
#include <absl/strings/str_format.h> #include <absl/strings/str_format.h>
#include <glog/logging.h>
#include <packager/macros.h> #include <packager/macros.h>
#include <packager/media/base/limits.h> #include <packager/media/base/limits.h>

View File

@ -11,8 +11,10 @@
#include <absl/base/internal/endian.h> #include <absl/base/internal/endian.h>
#include <absl/flags/flag.h> #include <absl/flags/flag.h>
#include <absl/log/check.h>
#include <absl/strings/escaping.h> #include <absl/strings/escaping.h>
#include <packager/macros.h>
#include <packager/media/base/http_key_fetcher.h> #include <packager/media/base/http_key_fetcher.h>
#include <packager/media/base/producer_consumer_queue.h> #include <packager/media/base/producer_consumer_queue.h>
#include <packager/media/base/protection_system_ids.h> #include <packager/media/base/protection_system_ids.h>

View File

@ -8,8 +8,10 @@
#include <algorithm> #include <algorithm>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/macros.h>
#include <packager/media/base/media_sample.h> #include <packager/media/base/media_sample.h>
#include <packager/status/status_macros.h> #include <packager/status/status_macros.h>

View File

@ -11,7 +11,7 @@
#include <optional> #include <optional>
#include <queue> #include <queue>
#include <glog/logging.h> #include <absl/log/log.h>
#include <packager/media/base/media_handler.h> #include <packager/media/base/media_handler.h>
#include <packager/media/public/chunking_params.h> #include <packager/media/public/chunking_params.h>

View File

@ -8,6 +8,9 @@
#include <algorithm> #include <algorithm>
#include <absl/log/check.h>
#include <packager/macros.h>
#include <packager/status/status_macros.h> #include <packager/status/status_macros.h>
namespace shaka { namespace shaka {

View File

@ -9,6 +9,8 @@
#include <algorithm> #include <algorithm>
#include <limits> #include <limits>
#include <absl/log/check.h>
#include <packager/media/base/media_handler.h> #include <packager/media/base/media_handler.h>
namespace shaka { namespace shaka {

View File

@ -6,6 +6,8 @@
#include <packager/media/chunking/text_chunker.h> #include <packager/media/chunking/text_chunker.h>
#include <absl/log/check.h>
#include <packager/status/status_macros.h> #include <packager/status/status_macros.h>
namespace shaka { namespace shaka {

View File

@ -6,7 +6,8 @@
#include <algorithm> #include <algorithm>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/media/base/bit_reader.h> #include <packager/media/base/bit_reader.h>
#include <packager/media/base/rcheck.h> #include <packager/media/base/rcheck.h>

View File

@ -8,8 +8,10 @@
#include <algorithm> #include <algorithm>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/macros.h>
#include <packager/media/base/bit_reader.h> #include <packager/media/base/bit_reader.h>
#include <packager/media/base/rcheck.h> #include <packager/media/base/rcheck.h>

View File

@ -9,7 +9,8 @@
#include <vector> #include <vector>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/macros.h> #include <packager/macros.h>
#include <packager/media/codecs/nalu_reader.h> #include <packager/media/codecs/nalu_reader.h>

View File

@ -6,6 +6,7 @@
#include <packager/media/codecs/ec3_audio_util.h> #include <packager/media/codecs/ec3_audio_util.h>
#include <absl/log/check.h>
#include <absl/strings/escaping.h> #include <absl/strings/escaping.h>
#include <packager/macros.h> #include <packager/macros.h>

View File

@ -4,6 +4,8 @@
#include <packager/media/codecs/es_descriptor.h> #include <packager/media/codecs/es_descriptor.h>
#include <absl/log/check.h>
#include <packager/media/base/bit_reader.h> #include <packager/media/base/bit_reader.h>
#include <packager/media/base/buffer_writer.h> #include <packager/media/base/buffer_writer.h>
#include <packager/media/base/rcheck.h> #include <packager/media/base/rcheck.h>

View File

@ -8,7 +8,8 @@
#include <limits> #include <limits>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/media/base/buffer_writer.h> #include <packager/media/base/buffer_writer.h>
#include <packager/media/codecs/h264_parser.h> #include <packager/media/codecs/h264_parser.h>

View File

@ -6,8 +6,10 @@
#include <memory> #include <memory>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/macros.h>
#include <packager/media/base/buffer_reader.h> #include <packager/media/base/buffer_reader.h>
#define LOG_ERROR_ONCE(msg) \ #define LOG_ERROR_ONCE(msg) \

View File

@ -5,9 +5,10 @@
#include <packager/media/codecs/h264_parser.h> #include <packager/media/codecs/h264_parser.h>
#include <glog/logging.h> #include <absl/log/log.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <packager/macros.h>
#include <packager/media/test/test_data_util.h> #include <packager/media/test/test_data_util.h>
namespace shaka { namespace shaka {

View File

@ -8,7 +8,8 @@
#include <limits> #include <limits>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/media/base/buffer_writer.h> #include <packager/media/base/buffer_writer.h>
#include <packager/media/base/rcheck.h> #include <packager/media/base/rcheck.h>

View File

@ -9,8 +9,10 @@
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/macros.h>
#include <packager/media/base/macros.h> #include <packager/media/base/macros.h>
#include <packager/media/codecs/nalu_reader.h> #include <packager/media/codecs/nalu_reader.h>

View File

@ -4,7 +4,8 @@
#include <packager/media/codecs/h26x_bit_reader.h> #include <packager/media/codecs/h26x_bit_reader.h>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
namespace shaka { namespace shaka {
namespace media { namespace media {

View File

@ -9,9 +9,11 @@
#include <limits> #include <limits>
#include <absl/flags/flag.h> #include <absl/flags/flag.h>
#include <absl/log/check.h>
#include <absl/log/log.h>
#include <absl/strings/escaping.h> #include <absl/strings/escaping.h>
#include <glog/logging.h>
#include <packager/macros.h>
#include <packager/media/base/buffer_writer.h> #include <packager/media/base/buffer_writer.h>
#include <packager/utils/bytes_to_string_view.h> #include <packager/utils/bytes_to_string_view.h>

View File

@ -6,6 +6,7 @@
#include <packager/media/codecs/hevc_decoder_configuration_record.h> #include <packager/media/codecs/hevc_decoder_configuration_record.h>
#include <absl/log/check.h>
#include <absl/strings/escaping.h> #include <absl/strings/escaping.h>
#include <absl/strings/str_format.h> #include <absl/strings/str_format.h>
#include <absl/strings/str_join.h> #include <absl/strings/str_join.h>

View File

@ -6,6 +6,8 @@
#include <packager/media/codecs/hls_audio_util.h> #include <packager/media/codecs/hls_audio_util.h>
#include <absl/log/check.h>
#include <packager/media/base/buffer_writer.h> #include <packager/media/base/buffer_writer.h>
#include <packager/media/base/fourccs.h> #include <packager/media/base/fourccs.h>
#include <packager/media/codecs/aac_audio_specific_config.h> #include <packager/media/codecs/aac_audio_specific_config.h>

View File

@ -8,7 +8,8 @@
#include <list> #include <list>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/media/base/bit_reader.h> #include <packager/media/base/bit_reader.h>
#include <packager/media/base/buffer_reader.h> #include <packager/media/base/buffer_reader.h>

View File

@ -8,8 +8,10 @@
#include <iostream> #include <iostream>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/macros.h>
#include <packager/media/base/buffer_reader.h> #include <packager/media/base/buffer_reader.h>
#include <packager/media/codecs/h264_parser.h> #include <packager/media/codecs/h264_parser.h>

View File

@ -6,6 +6,9 @@
#include <packager/media/codecs/video_slice_header_parser.h> #include <packager/media/codecs/video_slice_header_parser.h>
#include <absl/log/check.h>
#include <packager/macros.h>
#include <packager/media/base/rcheck.h> #include <packager/media/base/rcheck.h>
#include <packager/media/codecs/avc_decoder_configuration_record.h> #include <packager/media/codecs/avc_decoder_configuration_record.h>
#include <packager/media/codecs/hevc_decoder_configuration_record.h> #include <packager/media/codecs/hevc_decoder_configuration_record.h>

View File

@ -6,8 +6,10 @@
#include <packager/media/codecs/vp8_parser.h> #include <packager/media/codecs/vp8_parser.h>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/macros.h>
#include <packager/media/base/bit_reader.h> #include <packager/media/base/bit_reader.h>
#include <packager/media/base/rcheck.h> #include <packager/media/base/rcheck.h>

View File

@ -6,8 +6,10 @@
#include <packager/media/codecs/vp9_parser.h> #include <packager/media/codecs/vp9_parser.h>
#include <glog/logging.h> #include <absl/log/check.h>
#include <absl/log/log.h>
#include <packager/macros.h>
#include <packager/media/base/bit_reader.h> #include <packager/media/base/bit_reader.h>
#include <packager/media/base/rcheck.h> #include <packager/media/base/rcheck.h>

Some files were not shown because too many files have changed in this diff Show More