|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| build/ | | 03-May-2024 | - | 150 | 126 |
| common/ | | 03-May-2024 | - | 2,458 | 1,743 |
| m2ts/ | | 03-May-2024 | - | 1,906 | 1,219 |
| mkvmuxer/ | | 03-May-2024 | - | 7,190 | 4,848 |
| mkvparser/ | | 03-May-2024 | - | 9,407 | 6,462 |
| testing/ | | 03-May-2024 | - | 2,240 | 1,740 |
| webm_parser/ | | 03-May-2024 | - | 21,800 | 13,035 |
| webvtt/ | | 03-May-2024 | - | 966 | 520 |
| .clang-format | D | 03-May-2024 | 4.1 KiB | 153 | 152 |
| .gitattributes | D | 03-May-2024 | 156 | 7 | 6 |
| .gitignore | D | 03-May-2024 | 324 | 36 | 35 |
| AUTHORS.TXT | D | 03-May-2024 | 98 | 5 | 3 |
| Android.bp | D | 03-May-2024 | 1.6 KiB | 60 | 56 |
| CMakeLists.txt | D | 03-May-2024 | 20.2 KiB | 453 | 401 |
| LICENSE | D | 03-May-2024 | 1.5 KiB | 31 | 24 |
| LICENSE.TXT | D | 03-May-2024 | 1.5 KiB | 31 | 24 |
| METADATA | D | 03-May-2024 | 438 | 20 | 19 |
| MODULE_LICENSE_BSD | D | 03-May-2024 | 0 | | |
| Makefile.unix | D | 03-May-2024 | 1.7 KiB | 58 | 46 |
| PATENTS.TXT | D | 03-May-2024 | 1.4 KiB | 24 | 21 |
| README.libwebm | D | 03-May-2024 | 4.8 KiB | 144 | 92 |
| codereview.settings | D | 03-May-2024 | 170 | 5 | 4 |
| dumpvtt.cc | D | 03-May-2024 | 2.5 KiB | 92 | 67 |
| hdr_util.hpp | D | 03-May-2024 | 681 | 16 | 4 |
| iosbuild.sh | D | 03-May-2024 | 5.6 KiB | 208 | 153 |
| mkvmuxer.hpp | D | 03-May-2024 | 683 | 16 | 4 |
| mkvmuxer_sample.cc | D | 03-May-2024 | 29.7 KiB | 803 | 658 |
| mkvmuxertypes.hpp | D | 03-May-2024 | 703 | 16 | 4 |
| mkvmuxerutil.hpp | D | 03-May-2024 | 772 | 19 | 6 |
| mkvparser.hpp | D | 03-May-2024 | 688 | 16 | 4 |
| mkvparser_sample.cc | D | 03-May-2024 | 15.4 KiB | 460 | 358 |
| mkvreader.hpp | D | 03-May-2024 | 688 | 16 | 4 |
| mkvwriter.hpp | D | 03-May-2024 | 687 | 16 | 4 |
| sample_muxer_metadata.cc | D | 03-May-2024 | 8.9 KiB | 391 | 272 |
| sample_muxer_metadata.h | D | 03-May-2024 | 4.4 KiB | 138 | 61 |
| vttdemux.cc | D | 03-May-2024 | 29.3 KiB | 1,005 | 567 |
| vttreader.h | D | 03-May-2024 | 679 | 16 | 4 |
| webm_info.cc | D | 03-May-2024 | 49.6 KiB | 1,330 | 1,132 |
| webmids.hpp | D | 03-May-2024 | 990 | 24 | 7 |
| webvttparser.h | D | 03-May-2024 | 691 | 16 | 4 |
README.libwebm
1Building Libwebm
2
3To build libwebm you must first create project files. To do this run cmake
4and pass it the path to your libwebm repo.
5
6Makefile.unix can be used as a fallback on systems that cmake does not
7support.
8
9
10CMake Basics
11
12To generate project/make files for the default toolchain on your system simply
13run cmake with the path to the libwebm repo:
14
15$ cmake path/to/libwebm
16
17On Windows the above command will produce Visual Studio project files for the
18newest Visual Studio detected on the system. On Mac OS X and Linux systems, the
19above command will produce a makefile.
20
21To control what types of projects are generated the -G parameter is added to
22the cmake command line. This argument must be followed by the name of a
23generator. Running cmake with the --help argument will list the available
24generators for your system.
25
26On Mac OS X you would run the following command to generate Xcode projects:
27
28$ cmake path/to/libwebm -G Xcode
29
30On a Windows box you would run the following command to generate Visual Studio
312013 projects:
32
33$ cmake path/to/libwebm -G "Visual Studio 12"
34
35To generate 64-bit Windows Visual Studio 2013 projects:
36
37$ cmake path/to/libwebm "Visual Studio 12 Win64"
38
39
40CMake Makefiles: Debugging and Optimization
41
42Unlike Visual Studio and Xcode projects, the build configuration for make builds
43is controlled when you run cmake. The following examples demonstrate various
44build configurations.
45
46Omitting the build type produces makefiles that use build flags containing
47neither optimization nor debug flags:
48$ cmake path/to/libwebm
49
50A makefile using release (optimized) flags is produced like this:
51$ cmake path/to/libwebm -DCMAKE_BUILD_TYPE=release
52
53A release build with debug info can be produced as well:
54$ cmake path/to/libwebm -DCMAKE_BUILD_TYPE=relwithdebinfo
55
56And your standard debug build will be produced using:
57$ cmake path/to/libwebm -DCMAKE_BUILD_TYPE=debug
58
59
60Tests
61
62To enable libwebm tests add -DENABLE_TESTS=ON CMake generation command line. For
63example:
64
65$ cmake path/to/libwebm -G Xcode -DENABLE_TESTS=ON
66
67Libwebm tests depend on googletest. By default googletest is expected to be a
68sibling directory of the Libwebm repository. To change that, update your CMake
69command to be similar to the following:
70
71$ cmake path/to/libwebm -G Xcode -DENABLE_TESTS=ON \
72 -DGTEST_SRC_DIR=/path/to/googletest
73
74The tests rely upon the LIBWEBM_TEST_DATA_PATH environment variable to locate
75test input. The following example demonstrates running the muxer tests from the
76build directory:
77
78$ LIBWEBM_TEST_DATA_PATH=path/to/libwebm/testing/testdata ./mkvmuxer_tests
79
80Note: Libwebm Googletest integration was built with googletest from
81 https://github.com/google/googletest.git at git revision
82 ddb8012eb48bc203aa93dcc2b22c1db516302b29.
83
84
85CMake Include-what-you-use integration
86
87Include-what-you-use is an analysis tool that helps ensure libwebm includes the
88C/C++ header files actually in use. To enable the integration support
89ENABLE_IWYU must be turned on at cmake run time:
90
91$ cmake path/to/libwebm -G "Unix Makefiles" -DENABLE_IWYU=ON
92
93This adds the iwyu target to the build. To run include-what-you-use:
94
95$ make iwyu
96
97The following requirements must be met for ENABLE_IWYU to enable the iwyu
98target:
99
1001. include-what-you-use and iwyu_tool.py must be in your PATH.
1012. A python interpreter must be on the system and available to CMake.
102
103The values of the following variables are used to determine if the requirements
104have been met. Values to the right of the equals sign are what a successful run
105might look like:
106 iwyu_path=/path/to/iwyu_tool.py
107 iwyu_tool_path=/path/to/include-what-you-use
108 PYTHONINTERP_FOUND=TRUE
109
110An empty PYTHONINTERP_FOUND, or iwyu_path/iwyu_tool_path suffixed with NOTFOUND
111are failures.
112
113For Include-what-you-use setup instructions, see:
114https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/InstructionsForUsers.md
115
116If, when building the iwyu target, compile errors reporting failures loading
117standard include files occur, one solution can be found here:
118https://github.com/include-what-you-use/include-what-you-use/issues/100
119
120
121CMake cross compile
122To cross compile libwebm for Windows using mingw-w64 run cmake with the
123following arguments:
124
125$ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/libwebm/build/mingw-w64_toolchain.cmake \
126 path/to/libwebm
127
128Note1: As of this writing googletest will not build via mingw-w64 without
129disabling pthreads.
130googletest hash: d225acc90bc3a8c420a9bcd1f033033c1ccd7fe0
131
132To build with tests when using mingw-w64 use the following arguments when
133running CMake:
134
135$ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/libwebm/build/mingw-w64_toolchain.cmake \
136 -DENABLE_TESTS=ON -Dgtest_disable_pthreads=ON path/to/libwebm
137
138Note2: i686-w64-mingw32 is the default compiler. This can be controlled using
139the MINGW_PREFIX variable:
140
141$ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/libwebm/build/mingw-w64_toolchain.cmake \
142 -DMINGW_PREFIX=x86_64-w64-mingw32 path/to/libwebm
143
144