Go to file
Tom Finegan 6cf0a0f400 vpxpes_parser: Store frame payloads.
libwebm_util:
- Add 90khz -> nanosecond conversion.

vpxpes_parser:
- Get rid of VpxPesParser::VpxFrame and use VideoFrame.
- Store/Accumulate (when neccessary) PES payloads in
  VideoFrames.
- Change type of size constants from int to size_t.
- Return offset accounting for origin from FindStartCode().
- Check all PTS marker bits (instead of checking the second
  marker twice).

video_frame:
- Add nanosecond_pts mutator.

webm2pes:
- Write DTS/PTS presence flag correctly when PTS is not
  present.

Change-Id: I10f16cd03bb3a51205a25331527ddceb3769ba03
2016-08-08 11:14:03 -07:00
build cmake: Integrate new parsing API and tests. 2016-07-14 11:11:59 -07:00
common vpxpes_parser: Store frame payloads. 2016-08-08 11:14:03 -07:00
m2ts vpxpes_parser: Store frame payloads. 2016-08-08 11:14:03 -07:00
mkvmuxer mkvwriter: Fix shorten-64-to-32 warning in 32 bit builds. 2016-05-06 11:40:44 -07:00
mkvparser mkvreader: Fix shorten-64-to-32 warning in 32 bit builds. 2016-05-06 11:40:48 -07:00
testing Add a basic video frame storage class. 2016-07-22 15:07:33 -07:00
webm_parser webm_parser: Convert style to match the rest of libwebm 2016-07-27 14:31:28 -07:00
webvtt webvtt: Fix include in vttreader. 2016-03-30 12:32:23 -07:00
.clang-format clang-format re-run 2015-06-04 16:48:48 -07:00
.gitattributes Enable auto CRLF for visual studio project and solution files. 2012-05-29 10:45:59 -04:00
.gitignore Add webm_info. 2016-04-01 12:07:38 -04:00
Android.mk Android.mk: Make libwebm easier to build downstream. 2016-04-06 13:36:19 -07:00
AUTHORS.TXT Initial version 2010-06-02 10:25:33 -04:00
CMakeLists.txt Add a basic video frame storage class. 2016-07-22 15:07:33 -07:00
dumpvtt.cc webvtt: Organize and clean up webvtt support. 2016-03-21 12:41:47 -07:00
hdr_util.hpp Add temporary include shims at old file locations. 2016-04-11 23:25:20 +00:00
iosbuild.sh iosbuild.sh: Fix build. 2016-03-23 10:09:59 -07:00
LICENSE.TXT added new license files 2010-06-15 17:45:08 -04:00
Makefile.unix Add VP9 level output to webm_info. 2016-04-26 22:16:31 -07:00
mkvmuxer.hpp Add temporary include shims at old file locations. 2016-04-11 23:25:20 +00:00
mkvmuxertypes.hpp Fix file name in mkvmuxertypes shim. 2016-04-12 13:27:57 -07:00
mkvmuxerutil.hpp mkvmuxerutil.hpp: Add using directives for overloaded size utils. 2016-04-14 17:16:31 -07:00
mkvparser.hpp Add temporary include shims at old file locations. 2016-04-11 23:25:20 +00:00
mkvreader.hpp Add temporary include shims at old file locations. 2016-04-11 23:25:20 +00:00
mkvwriter.hpp Add temporary include shims at old file locations. 2016-04-11 23:25:20 +00:00
PATENTS.TXT PATENTS: fix a typo: constitutes -> constitute 2015-04-30 15:40:13 -07:00
README.libwebm rename mingw64_toolchain.cmake to mingw-w64_toolchain 2016-04-07 10:46:24 -07:00
sample_muxer_metadata.cc Restore original namespaces for mkvmuxer and mkvparser. 2016-03-21 14:41:49 -07:00
sample_muxer_metadata.h Restore original namespaces for mkvmuxer and mkvparser. 2016-03-21 14:41:49 -07:00
sample_muxer.cc style_clean_up: Remove unnecessary parentheses 2016-05-13 10:41:16 -07:00
sample.cc style_clean_up: Remove unnecessary parentheses 2016-05-13 10:41:16 -07:00
vttdemux.cc cmake/msvc: Disable C4996 project wide. 2016-03-30 12:32:22 -07:00
vttreader.h Add temporary include shims at old file locations. 2016-04-11 23:25:20 +00:00
webm_info.cc Add column tiles and frame parallel to webm_info 2016-05-17 09:00:41 -07:00
webmids.hpp Add temporary include shims at old file locations. 2016-04-11 23:25:20 +00:00
webvttparser.h Add temporary include shims at old file locations. 2016-04-11 23:25:20 +00:00

Building Libwebm

To build libwebm you must first create project files. To do this run cmake
and pass it the path to your libwebm repo.

Makefile.unix can be used as a fallback on systems that cmake does not
support.


CMake Basics

To generate project/make files for the default toolchain on your system simply
run cmake with the path to the libwebm repo:

$ cmake path/to/libwebm

On Windows the above command will produce Visual Studio project files for the
newest Visual Studio detected on the system. On Mac OS X and Linux systems, the
above command will produce a makefile.

To control what types of projects are generated the -G parameter is added to
the cmake command line. This argument must be followed by the name of a
generator. Running cmake with the --help argument will list the available
generators for your system.

On Mac OS X you would run the following command to generate Xcode projects:

$ cmake path/to/libwebm -G Xcode

On a Windows box you would run the following command to generate Visual Studio
2013 projects:

$ cmake path/to/libwebm -G "Visual Studio 12"

To generate 64-bit Windows Visual Studio 2013 projects:

$ cmake path/to/libwebm "Visual Studio 12 Win64"


CMake Makefiles: Debugging and Optimization

Unlike Visual Studio and Xcode projects, the build configuration for make builds
is controlled when you run cmake. The following examples demonstrate various
build configurations.

Omitting the build type produces makefiles that use build flags containing
neither optimization nor debug flags:
$ cmake path/to/libwebm

A makefile using release (optimized) flags is produced like this:
$ cmake path/to/libwebm -DCMAKE_BUILD_TYPE=release

A release build with debug info can be produced as well:
$ cmake path/to/libwebm -DCMAKE_BUILD_TYPE=relwithdebinfo

And your standard debug build will be produced using:
$ cmake path/to/libwebm -DCMAKE_BUILD_TYPE=debug


Tests

To enable libwebm tests add -DENABLE_TESTS=ON CMake generation command line. For
example:

$ cmake path/to/libwebm -G Xcode -DENABLE_TESTS=ON

Libwebm tests depend on googletest. By default googletest is expected to be a
sibling directory of the Libwebm repository. To change that, update your CMake
command to be similar to the following:

$ cmake path/to/libwebm -G Xcode -DENABLE_TESTS=ON \
  -DGTEST_SRC_DIR=/path/to/googletest

The tests rely upon the LIBWEBM_TEST_DATA_PATH environment variable to locate
test input. The following example demonstrates running the muxer tests from the
build directory:

$ LIBWEBM_TEST_DATA_PATH=path/to/libwebm/testing/testdata ./muxer_tests

Note: Libwebm Googletest integration was built with googletest from
      https://github.com/google/googletest.git at git revision
      ddb8012eb48bc203aa93dcc2b22c1db516302b29.


CMake Include-what-you-use integration

Include-what-you-use is an analysis tool that helps ensure libwebm includes the
C/C++ header files actually in use. To enable the integration support
ENABLE_IWYU must be turned on at cmake run time:

$ cmake path/to/libwebm -G "Unix Makefiles" -DENABLE_IWYU=ON

This adds the iwyu target to the build. To run include-what-you-use:

$ make iwyu

The following requirements must be met for ENABLE_IWYU to enable the iwyu
target:

1. include-what-you-use and iwyu_tool.py must be in your PATH.
2. A python interpreter must be on the system and available to CMake.

The values of the following variables are used to determine if the requirements
have been met. Values to the right of the equals sign are what a successful run
might look like:
  iwyu_path=/path/to/iwyu_tool.py
  iwyu_tool_path=/path/to/include-what-you-use
  PYTHONINTERP_FOUND=TRUE

An empty PYTHONINTERP_FOUND, or iwyu_path/iwyu_tool_path suffixed with NOTFOUND
are failures.

For Include-what-you-use setup instructions, see:
https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/InstructionsForUsers.md

If, when building the iwyu target, compile errors reporting failures loading
standard include files occur, one solution can be found here:
https://github.com/include-what-you-use/include-what-you-use/issues/100


CMake cross compile
To cross compile libwebm for Windows using mingw-w64 run cmake with the
following arguments:

$ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/libwebm/build/mingw-w64_toolchain.cmake \
  path/to/libwebm

Note1: As of this writing googletest will not build via mingw-w64 without
disabling pthreads.
googletest hash: d225acc90bc3a8c420a9bcd1f033033c1ccd7fe0

To build with tests when using mingw-w64 use the following arguments when
running CMake:

$ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/libwebm/build/mingw-w64_toolchain.cmake \
  -DENABLE_TESTS=ON -Dgtest_disable_pthreads=ON path/to/libwebm

Note2: i686-w64-mingw32 is the default compiler. This can be controlled using
the MINGW_PREFIX variable:

$ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/libwebm/build/mingw-w64_toolchain.cmake \
  -DMINGW_PREFIX=x86_64-w64-mingw32 path/to/libwebm