Commit c353da68 authored by James Zern's avatar James Zern

third_party/libwebm: pull from upstream

Changes:
b6de61a Adds support for simple tags
75a6d2d sample_muxer: Don't write huge files.
cec1f85 mkvmuxer: remove unused timecode_scale variable
8a61b40 Merge "mkvparser: Tiny whitespace fix."
7affc5c clang-format re-run
d6d04ac mkvmuxer: use generic Cluster::AddFrame
4928b0b Merge "mkvmuxer: Write Block key frames correctly."
c2e4a46 Merge "sample_muxer: Use AddGenericFrame to add frames."
e97f296 mkvparser: Tiny whitespace fix.
d66ba44 Merge "Add support to parse DisplayUnit."
deb41c2 Add support to parse DisplayUnit.
42e5660 Fix issues on EBML lacing block parsing
fe1e9bb Fix block parsing to not allow frame_size = 0
2cb6a28 Change assertions to checks when parsing TrackPositions
d04580f Fixes issues on Block Group parsing
c3550fd mkvmuxer: Write Block key frames correctly.
5dd0e40 Merge "mkvmuxer: Set is_key to true for metadata blocks."
8e96863 mkvmuxer: Set is_key to true for metadata blocks.
a9e4819 sample_muxer: Use AddGenericFrame to add frames.
5a3be73 Change assertions to checks when load CuePoints
f99f3b2 mkvmuxerutil::EbmlDateElementSize: remove value param
ff572b5 Frame::IsValid: fix track_number check
b6311dc mkvmuxer: Refactor to remove a lot of duplicate code
256cd02 Merge "mkvmuxer: DiscardPadding should be signed integer."
16c8e78 mkvmuxer: s/frame/data in all AddFrame* functions.
c5e511c mkvmuxer: DiscardPadding should be signed integer.
4baaa2c Add framework build script: iosbuild.sh
3d06eb1 PATENTS: fix a typo: constitutes -> constitute
d3849c2 mkvparser: Dead code removal.
f439e52 Change assertions to checks when preloading Cues
d3a44cd Fix track transversal when listing Cues on sample
c6255af Tweak .gitignore so git status is clean after checkout and
build: - added missing underscore to sample_muxer - added cmake and make
related files
b5229c7 Makefile.unix: s/samplemuxer/sample_muxer/
e3616a6 Add support to parse stereo mode, display width and display
height in mkvparser
a4b68f8 parser: Fix bug in Chapters::Atom::Parse()
bab0a00 cmake: Set library and project name the proper way on Windows.
feeb9b1 Set library name to match Windows expectations.
b9a549b Fix CMakefile to generate libwebm.a
b386aa5 Add CMakeLists.txt and msvc_runtime.cmake.
b0f8a81 parser: Fix memory leak in Chapter parsing
f06e152 mkvmuxer: Fix MoveCuesBeforeClustersHelper recursive call.
27bb747 allow subtitle tracks with ContentEncodings
623d182 DoLoadCluster: tolerate empty clusters
1156da8 Update PATENTS to reflect s/VP8/WebM/g
0d4cb40 mkvmuxerutil: Use rand() in MSVC builds.
e12fff0 mkvmuxer: Overload WriteEbmlHeader for backward compatibility
a321704 mkvmuxer: write correct DocTypeVersion
574045e mkvmuxer: fix DiscardPadding
8be6397 Include crop elements when calculating size of Video element
8f2d1b3 mkvparser: fix DiscardPadding extraction
1c36c24 mkvmuxer: fix style guide violations
568504e Merge "UUIDs can have their high bit set"
acf788b Add support for CropLeft, CropRight, CropTop and CropBottom
elements.
418188b Merge "muxer: codec_id is a mandatory element"
07688c9 mkvmuxer: Reject frames if invalid track number is passed.
2a63e47 muxer: codec_id is a mandatory element
d13c017 UUIDs can have their high bit set

Change-Id: Iba28acb1ff774349d03e565f2641ddea132cf1e7
parent 18427983
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_PATH:= $(call my-dir)
LOCAL_CPP_EXTENSION := .cpp
LOCAL_SRC_FILES := mkvmuxer.cpp \
mkvmuxerutil.cpp \
mkvparser.cpp \
mkvreader.cpp \
mkvwriter.cpp
LOCAL_MODULE := libwebm
include $(CLEAR_VARS)
LOCAL_MODULE:= libwebm
LOCAL_SRC_FILES:= mkvparser.cpp \
mkvreader.cpp \
mkvmuxer.cpp \
mkvmuxerutil.cpp \
mkvwriter.cpp
include $(BUILD_STATIC_LIBRARY)
......@@ -17,7 +17,7 @@ or agree to the institution of patent litigation or any other patent
enforcement activity against any entity (including a cross-claim or
counterclaim in a lawsuit) alleging that any of these implementations of WebM
or any code incorporated within any of these implementations of WebM
constitutes direct or contributory patent infringement, or inducement of
constitute direct or contributory patent infringement, or inducement of
patent infringement, then any patent rights granted to you under this License
for these implementations of WebM shall terminate as of the date such
litigation is filed.
URL: https://chromium.googlesource.com/webm/libwebm
Version: 249629d46c6e9391f25a90cff6d19075f47474cb
Version: b6de61a5c0d441c91afb0785e3b26efd2f9e7337
License: BSD
License File: LICENSE.txt
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -9,6 +9,7 @@
#ifndef MKVMUXERUTIL_HPP
#define MKVMUXERUTIL_HPP
#include "mkvmuxer.hpp"
#include "mkvmuxertypes.hpp"
namespace mkvmuxer {
......@@ -23,6 +24,7 @@ int32 SerializeInt(IMkvWriter* writer, int64 value, int32 size);
// Returns the size in bytes of the element.
int32 GetUIntSize(uint64 value);
int32 GetIntSize(int64 value);
int32 GetCodedUIntSize(uint64 value);
uint64 EbmlMasterElementSize(uint64 type, uint64 value);
uint64 EbmlElementSize(uint64 type, int64 value);
......@@ -30,7 +32,7 @@ uint64 EbmlElementSize(uint64 type, uint64 value);
uint64 EbmlElementSize(uint64 type, float value);
uint64 EbmlElementSize(uint64 type, const char* value);
uint64 EbmlElementSize(uint64 type, const uint8* value, uint64 size);
uint64 EbmlDateElementSize(uint64 type, int64 value);
uint64 EbmlDateElementSize(uint64 type);
// Creates an EBML coded number from |value| and writes it out. The size of
// the coded number is determined by the value of |value|. |value| must not
......@@ -51,73 +53,17 @@ int32 WriteID(IMkvWriter* writer, uint64 type);
// Output an Mkv non-master element. Returns true if the element was written.
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, uint64 value);
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, int64 value);
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, float value);
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, const char* value);
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, const uint8* value,
uint64 size);
bool WriteEbmlDateElement(IMkvWriter* writer, uint64 type, int64 value);
// Output an Mkv Simple Block.
// Inputs:
// data: Pointer to the data.
// length: Length of the data.
// track_number: Track to add the data to. Value returned by Add track
// functions. Only values in the range [1, 126] are
// permitted.
// timecode: Relative timecode of the Block. Only values in the
// range [0, 2^15) are permitted.
// is_key: Non-zero value specifies that frame is a key frame.
uint64 WriteSimpleBlock(IMkvWriter* writer, const uint8* data, uint64 length,
uint64 track_number, int64 timecode, uint64 is_key);
// Output a metadata keyframe, using a Block Group element.
// Inputs:
// data: Pointer to the (meta)data.
// length: Length of the (meta)data.
// track_number: Track to add the data to. Value returned by Add track
// functions. Only values in the range [1, 126] are
// permitted.
// timecode Timecode of frame, relative to cluster timecode. Only
// values in the range [0, 2^15) are permitted.
// duration_timecode Duration of frame, using timecode units.
uint64 WriteMetadataBlock(IMkvWriter* writer, const uint8* data, uint64 length,
uint64 track_number, int64 timecode,
uint64 duration_timecode);
// Output an Mkv Block with BlockAdditional data.
// Inputs:
// data: Pointer to the data.
// length: Length of the data.
// additional: Pointer to the additional data
// additional_length: Length of the additional data.
// add_id: Value of BlockAddID element.
// track_number: Track to add the data to. Value returned by Add track
// functions. Only values in the range [1, 126] are
// permitted.
// timecode: Relative timecode of the Block. Only values in the
// range [0, 2^15) are permitted.
// is_key: Non-zero value specifies that frame is a key frame.
uint64 WriteBlockWithAdditional(IMkvWriter* writer, const uint8* data,
uint64 length, const uint8* additional,
uint64 additional_length, uint64 add_id,
uint64 track_number, int64 timecode,
uint64 is_key);
// Output an Mkv Block with a DiscardPadding element.
// Inputs:
// data: Pointer to the data.
// length: Length of the data.
// discard_padding: DiscardPadding value.
// track_number: Track to add the data to. Value returned by Add track
// functions. Only values in the range [1, 126] are
// permitted.
// timecode: Relative timecode of the Block. Only values in the
// range [0, 2^15) are permitted.
// is_key: Non-zero value specifies that frame is a key frame.
uint64 WriteBlockWithDiscardPadding(IMkvWriter* writer, const uint8* data,
uint64 length, int64 discard_padding,
uint64 track_number, int64 timecode,
uint64 is_key);
// Output a Mkv Frame. It decides the correct element to write (Block vs
// SimpleBlock) based on the parameters of the Frame.
uint64 WriteFrame(IMkvWriter* writer, const Frame* const frame,
Cluster* cluster);
// Output a void element. |size| must be the entire size in bytes that will be
// void. The function will calculate the size of the void header and subtract
......
This diff is collapsed.
This diff is collapsed.
......@@ -133,7 +133,13 @@ enum MkvId {
kMkvChapterDisplay = 0x80,
kMkvChapString = 0x85,
kMkvChapLanguage = 0x437C,
kMkvChapCountry = 0x437E
kMkvChapCountry = 0x437E,
// Tags
kMkvTags = 0x1254C367,
kMkvTag = 0x7373,
kMkvSimpleTag = 0x67C8,
kMkvTagName = 0x45A3,
kMkvTagString = 0x4487
};
} // end namespace mkvmuxer
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment