Commit Graph

11 Commits

Author SHA1 Message Date
Joey Parrish 0295ef182b
chore: Refactor public headers and macros (#1275)
This organizes all public headers for the library into
include/  and makes sure then don't rely on any headers from
other folders.

To accomplish this, this change also refactors macros.h,
media/base/macros.h, and status/status_macros.h into macros/classes.h,
macros/compiler.h, macros/crypto.h, macros/logging.h, macros/status.h,
and public/export.h.  Now the export macros from macros.h live in
include/ to keep include/ from requiring anything else.

This refactor enables an install target that includes public headers
only.

---------

Co-authored-by: Cosmin Stejerean <cstejerean@meta.com>
2023-10-14 09:36:01 -07:00
Joey Parrish 7653e1e02f
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.
2023-10-13 12:42:47 -07:00
Joey Parrish 3b3e267221
style: Sort headers to comply with the style guide (#1273)
Reorder headers to follow the Google C++ Style Guide:

> In dir/foo.cc or dir/foo_test.cc:
>
> 1. dir2/foo2.h.
> 2. A blank line
> 3. C system headers (more precisely: headers in angle brackets with
the .h extension), e.g., <unistd.h>, <stdlib.h>.
> 4. A blank line
> 5. C++ standard library headers (without file extension), e.g.,
<algorithm>, <cstddef>.
> 6. A blank line
> 7. Other libraries' .h files.
> 8. A blank line
> 9. Your project's .h files.


https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes
2023-10-11 16:49:50 +08:00
Joey Parrish 4e310f03bf
style: Use angle-brackets for all internal headers (#1271)
This feeds into efforts to create a working install target.

The order of headers is still funky, and was "fixed" by clang-format,
but in a way that doesn't exactly align with the style guide. Further
cleanup of header order is coming in a follow-up PR.
2023-10-11 07:51:11 +08:00
Cosmin Stejerean 1337e86597
style: cleanup unused includes and use consistent <> for external code (#1267) 2023-10-09 16:21:41 -07:00
Joey Parrish b1095f6bc3
feat: port media/base (#1127)
This removes all chromium dependencies from media/base/ and completes
the build system in CMake.

The ClosureThread class and its classes were removed, as they were
specific to chromium base. ClosureThread has been replaced by
std::thread.

The byte-swapping utilities in network_util.cc have been removed and
replaced with absl.

generate_unique_temp_path() was split out of file_unittest.cc into
file_test_util.cc, where other test suites could make use of it.

WARN_UNUSED_RESULT was replaced with the C++ standard attribute
[[nodiscard]].

The base::Clock interface was replaced with a typedef for a function
pointer that returns the current time.

This re-enables the tests in http_key_fetcher_unittest.cc by using
httpbin.org.

Issue #1047 (CMake porting)
Issue #346 (absl porting)
2022-11-04 15:46:41 -07:00
Kongqun Yang 4f9c8ea781 Rename top level namespace to shaka
Issue #103

Change-Id: I67945c8ec6d2c178494d3b5400e5ec0170e9d115
2016-05-24 21:55:55 +00:00
KongQun Yang f66ebe82bb Fix packager crash with corrupted media file
The corrupted media file contains an invalid chunk offset box.

Bug: 18411271

Change-Id: I3d7f51c3647134bd7d0846d0992e10e398784475
2014-12-23 14:29:59 -08:00
KongQun Yang 7798a1b845 move mpd_options to its own file
Also always generates sidx box for segments for now.

Change-Id: I61f71ebd281195b737902b57557a345c8e0b0c66
2014-12-15 19:04:40 +00:00
KongQun Yang 15ae26e12f Modify include headers to have "packager" in the path
This is a follow up to previous CL.

Generated using command:
find {media,app,mpd} -type f -exec sed -r -i 's/#include "(.*)"/#include
"packager\/\1"/' {} \;

common.gypi and mpd.gyp are also modified to take the path change into
consideration.

Change-Id: I1fb102b4eb73ae5fde5f4ab303a12cec09b05c33
2014-10-02 12:53:29 -07:00
KongQun Yang b8126bc9da Move source code into packager directory
Make it easier to be included and integrated into other code.

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