Compare commits
1 Commits
dev
...
release-1.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6cb787ee51 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +0,0 @@
|
||||
*.[ao]
|
1006
LICENSE.LGPL
1006
LICENSE.LGPL
File diff suppressed because it is too large
Load Diff
186
debian/changelog
vendored
Normal file
186
debian/changelog
vendored
Normal file
@@ -0,0 +1,186 @@
|
||||
libmatroska (1.0.0-1) lucid; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Sat, 05 Jun 2010 10:39:00 +0200
|
||||
|
||||
libmatroska (0.9.0-1) karmic; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Sun, 09 May 2010 16:59:20 +0200
|
||||
|
||||
libmatroska (0.8.1-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Mon, 16 Jan 2007 17:00:30 +0100
|
||||
|
||||
libmatroska (0.8.0-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Tue, 18 Oct 2005 20:00:18 +0200
|
||||
|
||||
libmatroska (0.7.7-2) unstable; urgency=low
|
||||
|
||||
* Rebuilt with g++ 4.0.2.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Sat, 15 Oct 2005 14:25:46 +0200
|
||||
|
||||
libmatroska (0.7.7-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Fri, 20 May 2005 16:28:21 +0200
|
||||
|
||||
libmatroska (0.7.6-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Sat, 16 Apr 2005 13:24:30 +0200
|
||||
|
||||
libmatroska (0.7.5-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Sun, 6 Feb 2005 21:02:42 +0100
|
||||
|
||||
libmatroska (0.7.4-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Sun, 26 Sep 2004 12:35:05 +0200
|
||||
|
||||
libmatroska (0.7.3-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Mon, 16 Aug 2004 22:52:57 +0200
|
||||
|
||||
libmatroska (0.7.2-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Wed, 4 Aug 2004 19:49:25 +0200
|
||||
|
||||
libmatroska (0.7.1-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Sun, 25 Jul 2004 12:41:11 +0200
|
||||
|
||||
libmatroska (0.7.0-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Fri, 23 Apr 2004 18:45:32 +0200
|
||||
|
||||
libmatroska (0.6.3-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Mon, 5 Jan 2004 19:55:59 +0100
|
||||
|
||||
libmatroska (0.6.2-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Tue, 30 Dec 2003 10:59:47 +0100
|
||||
|
||||
libmatroska (0.6.1-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Thu, 30 Oct 2003 13:49:33 +0100
|
||||
|
||||
libmatroska (0.6.0-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Tue, 28 Oct 2003 23:09:34 +0100
|
||||
|
||||
libmatroska (0.5.3-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Wed, 22 Oct 2003 19:22:10 +0200
|
||||
|
||||
libmatroska (0.5.2-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Wed, 17 Sep 2003 22:22:10 +0200
|
||||
|
||||
libmatroska (0.5.1-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Mon, 1 Sep 2003 13:42:56 +0200
|
||||
|
||||
libmatroska (0.5.0-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Mon, 28 Jul 2003 10:49:27 +0200
|
||||
|
||||
libmatroska (0.4.4-2) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Sat, 14 Jun 2003 17:40:11 +0200
|
||||
|
||||
libmatroska (0.4.4-1) unstable; urgency=low
|
||||
|
||||
* New version.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Wed, 11 Jun 2003 20:32:09 +0200
|
||||
|
||||
libmatroska (0.4.3-1) unstable; urgency=low
|
||||
|
||||
* New version with API changes.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Wed, 21 May 2003 22:35:52 +0200
|
||||
|
||||
libmatroska (0.4.2-1) unstable; urgency=low
|
||||
|
||||
* New version with API changes.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Tue, 6 May 2003 22:33:44 +0200
|
||||
|
||||
libmatroska (0.4.1-2) unstable; urgency=low
|
||||
|
||||
* Compiled with gcc 3.2.3
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Sun, 04 May 2003 22:11:33 +0200
|
||||
|
||||
libmatroska (0.4.1-1) unstable; urgency=low
|
||||
|
||||
* Some bugfixes, memleak fixed.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Sat, 03 May 2003 23:07:33 +0200
|
||||
|
||||
libmatroska (0.4.0-1) unstable; urgency=low
|
||||
|
||||
* First alpha release :)
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Wed, 30 Apr 2003 10:44:33 +0200
|
||||
|
||||
libmatroska (0.2.0.20030425) unstable; urgency=low
|
||||
|
||||
* New version with bugfixes by Steve.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Fri, 25 Apr 2003 20:01:49 +0200
|
||||
|
||||
libmatroska (0.2.0.20030421) unstable; urgency=low
|
||||
|
||||
* Separated libebml from libmatroska like in the upstream sources.)
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Mon, 21 Apr 2003 16:33:36 +0200
|
||||
|
||||
libmatroska (0.0.20030225) unstable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
-- Moritz Bunkus <moritz@bunkus.org> Tue, 25 Feb 2003 18:28:52 +0100
|
||||
|
16
debian/control
vendored
Normal file
16
debian/control
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
Source: libmatroska
|
||||
Priority: optional
|
||||
Maintainer: Moritz Bunkus <moritz@bunkus.org>
|
||||
Build-Depends: debhelper (>> 3.0.0), libebml-dev (>= 1.0.0-1)
|
||||
Standards-Version: 3.5.8
|
||||
|
||||
Package: libmatroska-dev
|
||||
Section: devel
|
||||
Architecture: any
|
||||
Depends: libebml-dev (>= 1.0.0-1)
|
||||
Description: an extensible open standard Audio/Video container format
|
||||
Matroska is aiming to become the standard of Multimedia
|
||||
Container Formats one day. It is based on EBML (Extensible Binary
|
||||
Meta Language), a kind of binary version of XML. This way the
|
||||
significant advantages in terms of future format extensability
|
||||
are gained without breaking file support in old parsers.
|
26
debian/copyright
vendored
Normal file
26
debian/copyright
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
This package was debianized by Moritz Bunkus <moritz@bunkus.org> on
|
||||
Mon, 21 Apr 2003 12:49:33 +0200.
|
||||
|
||||
It was downloaded from http://www.matroska.org/
|
||||
|
||||
Upstream Author: Steve Lhomme <steve.lhomme@free.fr>
|
||||
|
||||
Copyright (C) 2002-2003 Steve Lhomme. All rights reserved.
|
||||
|
||||
This file may be distributed under the terms of the Q Public License
|
||||
as defined by Trolltech AS of Norway and appearing in the file
|
||||
LICENSE.QPL included in the packaging of this file.
|
||||
|
||||
This proram is also licensed under the GPL. See
|
||||
/usr/share/common-licenses/GPL for details.
|
||||
|
||||
Licensees holding an other license may use this file in accordance with
|
||||
the Agreement provided with the Software.
|
||||
|
||||
This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See http://www.matroska.org/license/qpl/ for QPL licensing information.
|
||||
|
||||
Contact license@matroska.org if any conditions of this licensing are
|
||||
not clear to you.
|
2
debian/dirs
vendored
Normal file
2
debian/dirs
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
usr/bin
|
||||
usr/sbin
|
0
debian/docs
vendored
Normal file
0
debian/docs
vendored
Normal file
2
debian/libmatroska-dev.dirs
vendored
Normal file
2
debian/libmatroska-dev.dirs
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
usr/lib
|
||||
usr/include
|
2
debian/libmatroska-dev.files
vendored
Normal file
2
debian/libmatroska-dev.files
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
usr/include/*
|
||||
usr/lib/lib*.a
|
95
debian/rules
vendored
Normal file
95
debian/rules
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
#!/usr/bin/make -f
|
||||
# Sample debian/rules that uses debhelper.
|
||||
# GNU copyright 1997 to 1999 by Joey Hess.
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
# This is the debhelper compatibility version to use.
|
||||
export DH_COMPAT=4
|
||||
|
||||
# shared library versions, option 1
|
||||
version=2.0.5
|
||||
major=2
|
||||
# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
|
||||
#version=`ls src/.libs/lib*.so.* | \
|
||||
# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
|
||||
#major=`ls src/.libs/lib*.so.* | \
|
||||
# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
|
||||
|
||||
# configure: configure-stamp
|
||||
# configure-stamp:
|
||||
# dh_testdir
|
||||
# # Add here commands to configure the package.
|
||||
|
||||
# touch configure-stamp
|
||||
|
||||
|
||||
build: build-stamp
|
||||
build-stamp:
|
||||
dh_testdir
|
||||
|
||||
# Add here commands to compile the package.
|
||||
$(MAKE) -C make/linux $(DEB_BUILD_OPTIONS) LIBEBML_INCLUDE_DIR=/usr/include/ebml staticlib
|
||||
|
||||
touch build-stamp
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) -C make/linux $(DEB_BUILD_OPTIONS) clean
|
||||
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
|
||||
# Add here commands to install the package into debian/tmp
|
||||
$(MAKE) -C make/linux prefix=$(CURDIR)/debian/tmp/usr \
|
||||
install_headers install_staticlib
|
||||
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_movefiles
|
||||
|
||||
# dh_installdebconf
|
||||
dh_installdocs
|
||||
# dh_installexamples
|
||||
# dh_installmenu
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_installinit
|
||||
# dh_installcron
|
||||
# dh_installman
|
||||
# dh_installinfo
|
||||
# dh_undocumented
|
||||
dh_installchangelogs ChangeLog
|
||||
dh_link
|
||||
# dh_strip
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
dh_makeshlibs
|
||||
dh_installdeb
|
||||
# dh_perl
|
||||
dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install configure
|
@@ -1,8 +1,8 @@
|
||||
#include "*/*.proj"
|
||||
Include "*/*.proj"
|
||||
|
||||
LIB matroska
|
||||
{
|
||||
PROJECT_VERSION 1.3.0
|
||||
PROJECT_VERSION 1.0.0
|
||||
|
||||
INCLUDE .
|
||||
EXPINCLUDE .
|
||||
@@ -24,30 +24,50 @@ LIB matroska
|
||||
SOURCE src/KaxAttachments.cpp
|
||||
SOURCE src/KaxBlock.cpp
|
||||
SOURCE src/KaxBlockData.cpp
|
||||
SOURCE src/KaxChapters.cpp
|
||||
SOURCE src/KaxCluster.cpp
|
||||
SOURCE src/KaxClusterData.cpp
|
||||
SOURCE src/KaxContentEncoding.cpp
|
||||
SOURCE src/KaxContexts.cpp
|
||||
SOURCE src/KaxCues.cpp
|
||||
SOURCE src/KaxCuesData.cpp
|
||||
SOURCE src/KaxInfo.cpp
|
||||
SOURCE src/KaxInfoData.cpp
|
||||
SOURCE src/KaxSeekHead.cpp
|
||||
SOURCE src/KaxSegment.cpp
|
||||
SOURCE src/KaxSemantic.cpp
|
||||
SOURCE src/KaxTag.cpp
|
||||
SOURCE src/KaxTagMulti.cpp
|
||||
SOURCE src/KaxTags.cpp
|
||||
SOURCE src/KaxTrackAudio.cpp
|
||||
SOURCE src/KaxTrackEntryData.cpp
|
||||
SOURCE src/KaxTrackVideo.cpp
|
||||
SOURCE src/KaxTracks.cpp
|
||||
SOURCE src/KaxVersion.cpp
|
||||
|
||||
HEADER matroska/FileKax.h
|
||||
HEADER matroska/KaxAttached.h
|
||||
HEADER matroska/KaxAttachments.h
|
||||
HEADER matroska/KaxBlock.h
|
||||
HEADER matroska/KaxBlockData.h
|
||||
HEADER matroska/KaxChapters.h
|
||||
HEADER matroska/KaxCluster.h
|
||||
HEADER matroska/KaxClusterData.h
|
||||
HEADER matroska/KaxConfig.h
|
||||
HEADER matroska/KaxContentEncoding.h
|
||||
HEADER matroska/KaxContexts.h
|
||||
HEADER matroska/KaxCues.h
|
||||
HEADER matroska/KaxCuesData.h
|
||||
HEADER matroska/KaxDefines.h
|
||||
HEADER matroska/KaxInfo.h
|
||||
HEADER matroska/KaxInfoData.h
|
||||
HEADER matroska/KaxSeekHead.h
|
||||
HEADER matroska/KaxSegment.h
|
||||
HEADER matroska/KaxSemantic.h
|
||||
HEADER matroska/KaxTag.h
|
||||
HEADER matroska/KaxTagMulti.h
|
||||
HEADER matroska/KaxTags.h
|
||||
HEADER matroska/KaxTrackAudio.h
|
||||
HEADER matroska/KaxTrackEntryData.h
|
||||
HEADER matroska/KaxTrackVideo.h
|
||||
HEADER matroska/KaxTracks.h
|
||||
HEADER matroska/KaxTypes.h
|
||||
HEADER matroska/KaxVersion.h
|
||||
|
422
make/Doxyfile
422
make/Doxyfile
@@ -1,211 +1,211 @@
|
||||
# Doxyfile 1.3
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# General configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = libmatroska
|
||||
PROJECT_NUMBER = 0.5.0
|
||||
OUTPUT_DIRECTORY = ../../doc/src
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = YES
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = YES
|
||||
FULL_PATH_NAMES = NO
|
||||
STRIP_FROM_PATH =
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = YES
|
||||
SHORT_NAMES = NO
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
SHOW_INCLUDE_FILES = NO
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = YES
|
||||
INHERIT_DOCS = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = NO
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
TAB_SIZE = 2
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ALIASES =
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
SHOW_USED_FILES = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ../../libebml/src \
|
||||
../../libebml/src/platform/win32 \
|
||||
../../libebml/ebml \
|
||||
../../libebml/ebml/c \
|
||||
../src \
|
||||
../matroska \
|
||||
../matroska/c
|
||||
FILE_PATTERNS = *.cpp \
|
||||
*.h
|
||||
RECURSIVE = NO
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = YES
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = NO
|
||||
REFERENCES_RELATION = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET = libmatroska.css
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = NO
|
||||
TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = YES
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = YES
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = YES
|
||||
USE_PDFLATEX = YES
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = YES
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = YES
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
TEMPLATE_RELATIONS = YES
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
||||
CGI_NAME = search.cgi
|
||||
CGI_URL =
|
||||
DOC_URL =
|
||||
DOC_ABSPATH =
|
||||
BIN_ABSPATH = /usr/local/bin/
|
||||
EXT_DOC_PATHS =
|
||||
# Doxyfile 1.3
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# General configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = libmatroska
|
||||
PROJECT_NUMBER = 0.5.0
|
||||
OUTPUT_DIRECTORY = ../../doc/src
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = YES
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = YES
|
||||
FULL_PATH_NAMES = NO
|
||||
STRIP_FROM_PATH =
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = YES
|
||||
SHORT_NAMES = NO
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
SHOW_INCLUDE_FILES = NO
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = YES
|
||||
INHERIT_DOCS = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = NO
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
TAB_SIZE = 2
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ALIASES =
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
SHOW_USED_FILES = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ../../libebml/src \
|
||||
../../libebml/src/platform/win32 \
|
||||
../../libebml/ebml \
|
||||
../../libebml/ebml/c \
|
||||
../src \
|
||||
../matroska \
|
||||
../matroska/c
|
||||
FILE_PATTERNS = *.cpp \
|
||||
*.h
|
||||
RECURSIVE = NO
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = YES
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = NO
|
||||
REFERENCES_RELATION = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET = libmatroska.css
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = NO
|
||||
TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = YES
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = YES
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = YES
|
||||
USE_PDFLATEX = YES
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = YES
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = YES
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
TEMPLATE_RELATIONS = YES
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
||||
CGI_NAME = search.cgi
|
||||
CGI_URL =
|
||||
DOC_URL =
|
||||
DOC_ABSPATH =
|
||||
BIN_ABSPATH = /usr/local/bin/
|
||||
EXT_DOC_PATHS =
|
||||
|
@@ -1,179 +1,178 @@
|
||||
# libmatroska core Makefile (used in cygwin)
|
||||
# $Id: Makefile 1254 2006-06-02 14:32:52Z mosu $
|
||||
# Author: Steve Lhomme <robux4 @ users.sf.net>
|
||||
# Author: Moritz Bunkus <moritz @ bunkus.org>
|
||||
|
||||
#
|
||||
# The library is built without debug information. If you want
|
||||
# debug information to be included then compile with
|
||||
# 'make DEBUG=yes'.
|
||||
#
|
||||
|
||||
# Paths
|
||||
# BeOS wants the libs and headers in /boot/home/config
|
||||
ifeq (BeOS,$(shell uname -s))
|
||||
prefix=/boot/home/config
|
||||
else
|
||||
prefix=/usr/local
|
||||
endif
|
||||
libdir=$(prefix)/lib
|
||||
includedir=$(prefix)/include/matroska
|
||||
|
||||
# Programs
|
||||
CROSS =
|
||||
CXX = $(CROSS)g++
|
||||
LD = $(CXX)
|
||||
AR = $(CROSS)ar
|
||||
RANLIB = $(CROSS)ranlib
|
||||
INSTALL = install
|
||||
INSTALL_OPTS = -m 644
|
||||
INSTALL_OPTS_LIB = -m 644
|
||||
INSTALL_DIR_OPTS = -m 755
|
||||
|
||||
CWD=$(shell pwd)
|
||||
|
||||
# Options
|
||||
LIBEBML_INCLUDE_DIR=$(CWD)/../../../libebml
|
||||
LIBEBML_LIB_DIR=$(CWD)/../../../libebml/make/linux
|
||||
EXTENSION=.cpp
|
||||
|
||||
ifeq (yes,$(DEBUG))
|
||||
DEBUGFLAGS=-g -DDEBUG
|
||||
endif
|
||||
|
||||
ifeq (Darwin,$(shell uname -s))
|
||||
link=static
|
||||
else
|
||||
link=both
|
||||
endif
|
||||
|
||||
targets_both = staticlib sharedlib
|
||||
targets_shared = sharedlib
|
||||
targets_static = staticlib
|
||||
|
||||
SRC_DIR=$(CWD)/../../src/
|
||||
INCLUDE_DIR=$(CWD)/../../matroska
|
||||
MUX_SRC_DIR=$(CWD)/../../test/mux/
|
||||
TAG_SRC_DIR=$(CWD)/../../test/tags/
|
||||
|
||||
# Libraries
|
||||
INCLUDE=-I$(CWD)/../.. -I$(LIBEBML_INCLUDE_DIR)
|
||||
LIBS=
|
||||
MUX_LIBS=-lmatroska -lebml $(LIBICONV)
|
||||
|
||||
# Names
|
||||
LIBRARY=libmatroska.a
|
||||
LIBRARY_SO=libmatroska.so
|
||||
LIBRARY_SO_VER=libmatroska.so.6
|
||||
|
||||
# source-files
|
||||
sources:=$(wildcard ${SRC_DIR}*$(EXTENSION))
|
||||
|
||||
# header files; replace .cxx extension with .h
|
||||
headers:=$(patsubst %$(EXTENSION),%.h,$(sources))
|
||||
|
||||
# object files; replace .cxx extension with .o
|
||||
objects:=$(patsubst %$(EXTENSION),%.o,$(sources))
|
||||
|
||||
objects_so:=$(patsubst %$(EXTENSION),%.lo,$(sources))
|
||||
|
||||
WARNINGFLAGS=-Wall -Wextra -Wno-unknown-pragmas -D_GNU_SOURCE -Wshadow
|
||||
COMPILEFLAGS=$(DEBUGFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(WARNINGFLAGS) $(INCLUDE)
|
||||
LINKFLAGS=-L. -L$(LIBEBML_LIB_DIR) $(LDFLAGS)
|
||||
DEPENDFLAGS = $(CXXFLAGS) $(INCLUDE)
|
||||
|
||||
all: $(targets_$(link))
|
||||
|
||||
staticlib: $(LIBRARY)
|
||||
|
||||
sharedlib: $(LIBRARY_SO)
|
||||
|
||||
lib:
|
||||
@echo "Use the 'staticlib', 'sharedlib' or 'all' targets."
|
||||
@false
|
||||
|
||||
# Build rules
|
||||
%.o: %$(EXTENSION)
|
||||
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
|
||||
|
||||
%.lo: %$(EXTENSION)
|
||||
$(CXX) -c $(COMPILEFLAGS) -fPIC -o $@ $<
|
||||
|
||||
$(LIBRARY): $(objects)
|
||||
$(AR) rcvu $@ $(objects)
|
||||
$(RANLIB) $@
|
||||
|
||||
$(LIBRARY_SO): $(objects_so)
|
||||
$(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so) -lebml
|
||||
rm -f $(LIBRARY_SO)
|
||||
ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)
|
||||
|
||||
clean: cleantest
|
||||
rm -f $(objects) $(objects_so)
|
||||
rm -f $(LIBRARY)
|
||||
rm -f $(LIBRARY_SO)
|
||||
rm -f $(LIBRARY_SO_VER)
|
||||
rm -f CORE
|
||||
|
||||
cleantest:
|
||||
rm -f test6 test8 test9 test6.o test8.o test9.o
|
||||
|
||||
distclean dist-clean: clean
|
||||
rm -f .depend
|
||||
|
||||
depend:
|
||||
@echo Calculating dependecies:
|
||||
@rm -f .depend
|
||||
@touch .depend
|
||||
@for i in $(sources); do \
|
||||
o="`echo $$i | sed -e 's/\.c$$/.o/' -e 's/\.cpp$$/.o/'`" ; \
|
||||
echo ' ' $$i: $$o ; \
|
||||
$(CXX) $(DEPENDFLAGS) -MM -MT $$o $$i >> .depend ; \
|
||||
done
|
||||
|
||||
test: test6 test9
|
||||
|
||||
test6: test6.o $(LIBRARY) $(LIBRARY_SO)
|
||||
$(LD) -o $@ $(LINKFLAGS) $< $(MUX_LIBS)
|
||||
|
||||
test6.o: $(MUX_SRC_DIR)test6.cpp
|
||||
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
|
||||
|
||||
test8: test8.o $(LIBRARY) $(LIBRARY_SO)
|
||||
$(LD) -o $@ $(LINKFLAGS) $< $(MUX_LIBS)
|
||||
|
||||
test8.o: $(MUX_SRC_DIR)test8.cpp
|
||||
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
|
||||
|
||||
test9: test9.o $(LIBRARY) $(LIBRARY_SO)
|
||||
$(LD) -o $@ $(LINKFLAGS) $< $(MUX_LIBS)
|
||||
|
||||
test9.o: $(TAG_SRC_DIR)test9.cpp
|
||||
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
|
||||
|
||||
install: $(targets_$(link):%=install_%) install_headers
|
||||
|
||||
install_headers:
|
||||
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)
|
||||
for i in $(INCLUDE_DIR)/*.h; do \
|
||||
$(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir) ; \
|
||||
done
|
||||
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)/c
|
||||
for i in $(INCLUDE_DIR)/c/*.h; do \
|
||||
$(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir)/c ; \
|
||||
done
|
||||
|
||||
install_staticlib: $(LIBRARY)
|
||||
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir)
|
||||
$(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(DESTDIR)$(libdir)
|
||||
|
||||
install_sharedlib: $(LIBRARY_SO)
|
||||
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir)
|
||||
$(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY_SO_VER) $(DESTDIR)$(libdir)
|
||||
ln -fs $(LIBRARY_SO_VER) $(DESTDIR)$(libdir)/$(LIBRARY_SO)
|
||||
|
||||
ifneq ($(wildcard .depend),)
|
||||
include .depend
|
||||
endif
|
||||
|
||||
# DO NOT DELETE
|
||||
# libmatroska core Makefile (used in cygwin)
|
||||
# $Id: Makefile 1254 2006-06-02 14:32:52Z mosu $
|
||||
# Author: Steve Lhomme <robux4 @ users.sf.net>
|
||||
# Author: Moritz Bunkus <moritz @ bunkus.org>
|
||||
|
||||
#
|
||||
# The library is built without debug information. If you want
|
||||
# debug information to be included then compile with
|
||||
# 'make DEBUG=yes'.
|
||||
#
|
||||
|
||||
# Paths
|
||||
# BeOS wants the libs and headers in /boot/home/config
|
||||
ifeq (BeOS,$(shell uname -s))
|
||||
prefix=/boot/home/config
|
||||
else
|
||||
prefix=/usr/local
|
||||
endif
|
||||
libdir=$(prefix)/lib
|
||||
includedir=$(prefix)/include/matroska
|
||||
|
||||
# Programs
|
||||
CROSS =
|
||||
CXX = $(CROSS)g++
|
||||
LD = $(CXX)
|
||||
AR = $(CROSS)ar
|
||||
RANLIB = $(CROSS)ranlib
|
||||
INSTALL = install
|
||||
INSTALL_OPTS = -m 644
|
||||
INSTALL_OPTS_LIB = -m 644
|
||||
INSTALL_DIR_OPTS = -m 755
|
||||
|
||||
CWD=$(shell pwd)
|
||||
|
||||
# Options
|
||||
LIBEBML_INCLUDE_DIR=$(CWD)/../../../libebml
|
||||
LIBEBML_LIB_DIR=$(CWD)/../../../libebml/make/linux
|
||||
EXTENSION=.cpp
|
||||
|
||||
ifeq (yes,$(DEBUG))
|
||||
DEBUGFLAGS=-g -DDEBUG
|
||||
endif
|
||||
|
||||
SRC_DIR=$(CWD)/../../src/
|
||||
INCLUDE_DIR=$(CWD)/../../matroska
|
||||
MUX_SRC_DIR=$(CWD)/../../test/mux/
|
||||
TAG_SRC_DIR=$(CWD)/../../test/tags/
|
||||
|
||||
# Librarires
|
||||
INCLUDE=-I$(CWD)/../.. -I$(LIBEBML_INCLUDE_DIR)
|
||||
LIBS=
|
||||
MUX_LIBS=-lmatroska -lebml $(LIBICONV)
|
||||
|
||||
# Names
|
||||
LIBRARY=libmatroska.a
|
||||
LIBRARY_SO=libmatroska.so
|
||||
LIBRARY_SO_VER=libmatroska.so.2
|
||||
|
||||
# source-files
|
||||
sources:=$(wildcard ${SRC_DIR}*$(EXTENSION))
|
||||
|
||||
# header files; replace .cxx extension with .h
|
||||
headers:=$(patsubst %$(EXTENSION),%.h,$(sources))
|
||||
|
||||
# object files; replace .cxx extension with .o
|
||||
objects:=$(patsubst %$(EXTENSION),%.o,$(sources))
|
||||
|
||||
objects_so:=$(patsubst %$(EXTENSION),%.lo,$(sources))
|
||||
|
||||
WARNINGFLAGS=-Wall -Wno-unknown-pragmas -ansi -fno-gnu-keywords -D_GNU_SOURCE \
|
||||
-Wshadow
|
||||
COMPILEFLAGS=$(DEBUGFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(WARNINGFLAGS) $(INCLUDE)
|
||||
LINKFLAGS=-L. -L$(LIBEBML_LIB_DIR) $(LDFLAGS)
|
||||
DEPENDFLAGS = $(CXXFLAGS) $(INCLUDE)
|
||||
|
||||
ifeq (Darwin,$(shell uname -s))
|
||||
all: staticlib
|
||||
else
|
||||
all: staticlib sharedlib
|
||||
endif
|
||||
|
||||
staticlib: $(LIBRARY)
|
||||
|
||||
sharedlib: $(LIBRARY_SO)
|
||||
|
||||
lib:
|
||||
@echo "Use the 'staticlib', 'sharedlib' or 'all' targets."
|
||||
@false
|
||||
|
||||
# Build rules
|
||||
%.o: %$(EXTENSION)
|
||||
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
|
||||
|
||||
%.lo: %$(EXTENSION)
|
||||
$(CXX) -c $(COMPILEFLAGS) -fPIC -o $@ $<
|
||||
|
||||
$(LIBRARY): $(objects)
|
||||
$(AR) rcvu $@ $(objects)
|
||||
$(RANLIB) $@
|
||||
|
||||
$(LIBRARY_SO): $(objects_so)
|
||||
$(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so) -lebml
|
||||
rm -f $(LIBRARY_SO)
|
||||
ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)
|
||||
|
||||
clean: cleantest
|
||||
rm -f $(objects) $(objects_so)
|
||||
rm -f $(LIBRARY)
|
||||
rm -f $(LIBRARY_SO)
|
||||
rm -f $(LIBRARY_SO_VER)
|
||||
rm -f CORE
|
||||
|
||||
cleantest:
|
||||
rm -f test6 test8 test9 test6.o test8.o test9.o
|
||||
|
||||
distclean dist-clean: clean
|
||||
rm -f .depend
|
||||
|
||||
depend:
|
||||
@echo Calculating dependecies:
|
||||
@rm -f .depend
|
||||
@touch .depend
|
||||
@for i in $(sources); do \
|
||||
o="`echo $$i | sed -e 's/\.c$$/.o/' -e 's/\.cpp$$/.o/'`" ; \
|
||||
echo ' ' $$i: $$o ; \
|
||||
$(CXX) $(DEPENDFLAGS) -MM -MT $$o $$i >> .depend ; \
|
||||
done
|
||||
|
||||
test: test6 test9
|
||||
|
||||
test6: test6.o $(LIBRARY) $(LIBRARY_SO)
|
||||
$(LD) -o $@ $(LINKFLAGS) $< $(MUX_LIBS)
|
||||
|
||||
test6.o: $(MUX_SRC_DIR)test6.cpp
|
||||
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
|
||||
|
||||
test8: test8.o $(LIBRARY) $(LIBRARY_SO)
|
||||
$(LD) -o $@ $(LINKFLAGS) $< $(MUX_LIBS)
|
||||
|
||||
test8.o: $(MUX_SRC_DIR)test8.cpp
|
||||
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
|
||||
|
||||
test9: test9.o $(LIBRARY) $(LIBRARY_SO)
|
||||
$(LD) -o $@ $(LINKFLAGS) $< $(MUX_LIBS)
|
||||
|
||||
test9.o: $(TAG_SRC_DIR)test9.cpp
|
||||
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
|
||||
|
||||
ifeq (Darwin,$(shell uname -s))
|
||||
install: install_staticlib install_headers
|
||||
else
|
||||
install: install_staticlib install_sharedlib install_headers
|
||||
endif
|
||||
|
||||
install_headers:
|
||||
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)
|
||||
for i in $(INCLUDE_DIR)/*.h; do \
|
||||
$(INSTALL) $(INSTALL_OPTS) $$i $(includedir) ; \
|
||||
done
|
||||
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)/c
|
||||
for i in $(INCLUDE_DIR)/c/*.h; do \
|
||||
$(INSTALL) $(INSTALL_OPTS) $$i $(includedir)/c ; \
|
||||
done
|
||||
|
||||
install_staticlib: $(LIBRARY)
|
||||
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir)
|
||||
$(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(libdir)
|
||||
|
||||
install_sharedlib: $(LIBRARY_SO)
|
||||
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir)
|
||||
$(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY_SO_VER) $(libdir)
|
||||
ln -fs $(LIBRARY_SO_VER) $(libdir)/$(LIBRARY_SO)
|
||||
|
||||
ifneq ($(wildcard .depend),)
|
||||
include .depend
|
||||
endif
|
||||
|
||||
# DO NOT DELETE
|
||||
|
@@ -1,98 +1,98 @@
|
||||
##
|
||||
## This Makefile is made for cygwin, but might probably work on any standard UNIX too
|
||||
##
|
||||
|
||||
#****************************************************************************
|
||||
|
||||
# DEBUG can be set to YES to include debugging info, or NO otherwise
|
||||
DEBUG = YES
|
||||
|
||||
# PROFILE can be set to YES to include profiling info, or NO otherwise
|
||||
PROFILE = NO
|
||||
|
||||
#****************************************************************************
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
LD = gcc
|
||||
AR = ar rcvu
|
||||
RANLIB = ranlib
|
||||
DEPEND = makedepend
|
||||
INDENT =indent --gnu-style -ut -ts6 -br -npsl -npcs
|
||||
DELETE =rm -f
|
||||
|
||||
GLOBAL_CFLAGS = -Wall -Wno-unknown-pragmas -Wno-format
|
||||
DEBUG_CFLAGS = -g -O0 -DDEBUG ${GLOBAL_CFLAGS}
|
||||
RELEASE_CFLAGS = -O2 ${GLOBAL_CFLAGS}
|
||||
|
||||
P_OPTIONS = -pedantic
|
||||
|
||||
LIBS =
|
||||
|
||||
DEBUG_CXXFLAGS = ${DEBUG_CFLAGS}
|
||||
RELEASE_CXXFLAGS = ${RELEASE_CFLAGS}
|
||||
|
||||
DEBUG_LDFLAGS = -g
|
||||
RELEASE_LDFLAGS =
|
||||
|
||||
ifeq (YES, ${DEBUG})
|
||||
CFLAGS = ${DEBUG_CFLAGS} ${INCS} ${P_OPTIONS}
|
||||
CXXFLAGS = ${DEBUG_CXXFLAGS} ${INCS} ${P_OPTIONS}
|
||||
LDFLAGS = ${DEBUG_LDFLAGS}
|
||||
DEPENDFLAGS = ${DEBUG_CFLAGS} ${INCS}
|
||||
else
|
||||
CFLAGS = ${RELEASE_CFLAGS} ${INCS} ${P_OPTIONS}
|
||||
CXXFLAGS = ${RELEASE_CXXFLAGS} ${INCS} ${P_OPTIONS}
|
||||
LDFLAGS = ${RELEASE_LDFLAGS}
|
||||
DEPENDFLAGS = ${RELEASE_CFLAGS} ${INCS}
|
||||
endif
|
||||
|
||||
ifeq (YES, ${PROFILE})
|
||||
CFLAGS := ${CFLAGS} -pg
|
||||
CXXFLAGS := ${CXXFLAGS} -pg
|
||||
LDFLAGS := ${LDFLAGS} -pg
|
||||
endif
|
||||
|
||||
#****************************************************************************
|
||||
# Preprocessor directives
|
||||
#****************************************************************************
|
||||
|
||||
ifeq (YES, ${PROFILE})
|
||||
DEFS =
|
||||
else
|
||||
DEFS =
|
||||
endif
|
||||
|
||||
#****************************************************************************
|
||||
# Include paths
|
||||
#****************************************************************************
|
||||
|
||||
#INCS := -I/usr/include/g++-2 -I/usr/local/include
|
||||
#INCS =
|
||||
|
||||
|
||||
#****************************************************************************
|
||||
# Makefile code common to all platforms
|
||||
#****************************************************************************
|
||||
|
||||
CFLAGS := ${CFLAGS} ${DEFS}
|
||||
CXXFLAGS := ${CXXFLAGS} ${DEFS}
|
||||
|
||||
#****************************************************************************
|
||||
# General rules
|
||||
#****************************************************************************
|
||||
|
||||
indent:
|
||||
$(INDENT) --line-length 100 ${SRCS} ${SRCS_HEADERS}
|
||||
$(DELETE) *.*~
|
||||
|
||||
indent80:
|
||||
$(INDENT) --line-length 80 ${SRCS} ${SRCS_HEADERS}
|
||||
$(DELETE) *.*~
|
||||
|
||||
clean:
|
||||
rm -f core *.o *.so *.a *.exe
|
||||
|
||||
# what are the source dependencies
|
||||
depend: $(SRCS)
|
||||
$(DEPEND) $(DEPENDFLAGS) $(SRCS)
|
||||
##
|
||||
## This Makefile is made for cygwin, but might probably work on any standard UNIX too
|
||||
##
|
||||
|
||||
#****************************************************************************
|
||||
|
||||
# DEBUG can be set to YES to include debugging info, or NO otherwise
|
||||
DEBUG = YES
|
||||
|
||||
# PROFILE can be set to YES to include profiling info, or NO otherwise
|
||||
PROFILE = NO
|
||||
|
||||
#****************************************************************************
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
LD = gcc
|
||||
AR = ar rcvu
|
||||
RANLIB = ranlib
|
||||
DEPEND = makedepend
|
||||
INDENT =indent --gnu-style -ut -ts6 -br -npsl -npcs
|
||||
DELETE =rm -f
|
||||
|
||||
GLOBAL_CFLAGS = -Wall -Wno-unknown-pragmas -Wno-format
|
||||
DEBUG_CFLAGS = -g -O0 -DDEBUG ${GLOBAL_CFLAGS}
|
||||
RELEASE_CFLAGS = -O2 ${GLOBAL_CFLAGS}
|
||||
|
||||
P_OPTIONS = -pedantic
|
||||
|
||||
LIBS =
|
||||
|
||||
DEBUG_CXXFLAGS = ${DEBUG_CFLAGS}
|
||||
RELEASE_CXXFLAGS = ${RELEASE_CFLAGS}
|
||||
|
||||
DEBUG_LDFLAGS = -g
|
||||
RELEASE_LDFLAGS =
|
||||
|
||||
ifeq (YES, ${DEBUG})
|
||||
CFLAGS = ${DEBUG_CFLAGS} ${INCS} ${P_OPTIONS}
|
||||
CXXFLAGS = ${DEBUG_CXXFLAGS} ${INCS} ${P_OPTIONS}
|
||||
LDFLAGS = ${DEBUG_LDFLAGS}
|
||||
DEPENDFLAGS = ${DEBUG_CFLAGS} ${INCS}
|
||||
else
|
||||
CFLAGS = ${RELEASE_CFLAGS} ${INCS} ${P_OPTIONS}
|
||||
CXXFLAGS = ${RELEASE_CXXFLAGS} ${INCS} ${P_OPTIONS}
|
||||
LDFLAGS = ${RELEASE_LDFLAGS}
|
||||
DEPENDFLAGS = ${RELEASE_CFLAGS} ${INCS}
|
||||
endif
|
||||
|
||||
ifeq (YES, ${PROFILE})
|
||||
CFLAGS := ${CFLAGS} -pg
|
||||
CXXFLAGS := ${CXXFLAGS} -pg
|
||||
LDFLAGS := ${LDFLAGS} -pg
|
||||
endif
|
||||
|
||||
#****************************************************************************
|
||||
# Preprocessor directives
|
||||
#****************************************************************************
|
||||
|
||||
ifeq (YES, ${PROFILE})
|
||||
DEFS =
|
||||
else
|
||||
DEFS =
|
||||
endif
|
||||
|
||||
#****************************************************************************
|
||||
# Include paths
|
||||
#****************************************************************************
|
||||
|
||||
#INCS := -I/usr/include/g++-2 -I/usr/local/include
|
||||
#INCS =
|
||||
|
||||
|
||||
#****************************************************************************
|
||||
# Makefile code common to all platforms
|
||||
#****************************************************************************
|
||||
|
||||
CFLAGS := ${CFLAGS} ${DEFS}
|
||||
CXXFLAGS := ${CXXFLAGS} ${DEFS}
|
||||
|
||||
#****************************************************************************
|
||||
# General rules
|
||||
#****************************************************************************
|
||||
|
||||
indent:
|
||||
$(INDENT) --line-length 100 ${SRCS} ${SRCS_HEADERS}
|
||||
$(DELETE) *.*~
|
||||
|
||||
indent80:
|
||||
$(INDENT) --line-length 80 ${SRCS} ${SRCS_HEADERS}
|
||||
$(DELETE) *.*~
|
||||
|
||||
clean:
|
||||
rm -f core *.o *.so *.a *.exe
|
||||
|
||||
# what are the source dependencies
|
||||
depend: $(SRCS)
|
||||
$(DEPEND) $(DEPENDFLAGS) $(SRCS)
|
||||
|
@@ -1,18 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# A small script that looks for duplicate EBML IDs in all of libmatroska's
|
||||
# source files.
|
||||
|
||||
echo 'Duplicate IDs:'
|
||||
grep -h '^EbmlId.*_TheId' ../../src/*cpp | \
|
||||
sed -e 's/TheId/TheId /' | \
|
||||
awk '{ print $3 }' | \
|
||||
sed -e 's/(//' -e 's/,//' | \
|
||||
sort | \
|
||||
uniq -d | \
|
||||
( while read id ; do
|
||||
echo ''
|
||||
echo ${id}:
|
||||
grep -i $id ../../src/*cpp
|
||||
done )
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
# A small script that looks for duplicate EBML IDs in all of libmatroska's
|
||||
# source files.
|
||||
|
||||
echo 'Duplicate IDs:'
|
||||
grep -h '^EbmlId.*_TheId' ../../src/*cpp | \
|
||||
sed -e 's/TheId/TheId /' | \
|
||||
awk '{ print $3 }' | \
|
||||
sed -e 's/(//' -e 's/,//' | \
|
||||
sort | \
|
||||
uniq -d | \
|
||||
( while read id ; do
|
||||
echo ''
|
||||
echo ${id}:
|
||||
grep -i $id ../../src/*cpp
|
||||
done )
|
||||
|
||||
|
@@ -1,61 +1,61 @@
|
||||
# SPEC file for (at least) Fedora Core 1, 2, 3
|
||||
|
||||
Name: libmatroska
|
||||
Version: 1.4.0
|
||||
Release: 1
|
||||
License: LGPL
|
||||
Summary: Matroska Video Container
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.matroska.org/
|
||||
Vendor: Moritz Bunkus <moritz@bunkus.org>
|
||||
Source: http://dl.matroska.org/downloads/%{name}/%{name}-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-root
|
||||
|
||||
%description
|
||||
Matroska aims to become THE Standard of Multimedia Container Formats.
|
||||
It was derived from a project called MCF, but differentiates from it
|
||||
significantly because it is based on EBML (Extensible Binary Meta
|
||||
Language), a binary derivative of XML. EBML enables the Matroska
|
||||
Development Team to gain significant advantages in terms of future
|
||||
format extensibility, without breaking file support in old parsers.
|
||||
|
||||
%package devel
|
||||
Summary: Matroska Video Container headers/development files
|
||||
Group: Development/Libraries
|
||||
|
||||
%description devel
|
||||
Headers for libmatroska.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
cd make/linux
|
||||
CFLAGS="$RPM_OPT_FLAGS" \
|
||||
make \
|
||||
prefix="%{_prefix}" \
|
||||
LIBEBML_INCLUDE_DIR=%{_includedir} \
|
||||
LIBEBML_LIB_DIR=%{_libdir} \
|
||||
staticlib
|
||||
cd ../..
|
||||
|
||||
%install
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
cd make/linux
|
||||
make prefix=$RPM_BUILD_ROOT/%{_prefix} libdir=$RPM_BUILD_ROOT/%{_libdir} install_staticlib install_headers
|
||||
cd ../..
|
||||
|
||||
%clean
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files devel
|
||||
%defattr(-, root, root)
|
||||
%{_includedir}/matroska/*.h
|
||||
%{_includedir}/matroska/c/*.h
|
||||
%{_libdir}/libmatroska.a
|
||||
|
||||
%changelog
|
||||
* Sat Apr 16 2005 Moritz Bunkus <moritz@bunkus.org>
|
||||
- updated for the new libmatroska build targets
|
||||
* Fri May 15 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
||||
- create spec file
|
||||
# SPEC file for (at least) Fedora Core 1, 2, 3
|
||||
|
||||
Name: libmatroska
|
||||
Version: 0.8.1
|
||||
Release: 1
|
||||
License: LGPL
|
||||
Summary: Matroska Video Container
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.matroska.org/
|
||||
Vendor: Moritz Bunkus <moritz@bunkus.org>
|
||||
Source: http://dl.matroska.org/downloads/%{name}/%{name}-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-root
|
||||
|
||||
%description
|
||||
Matroska aims to become THE Standard of Multimedia Container Formats.
|
||||
It was derived from a project called MCF, but differentiates from it
|
||||
significantly because it is based on EBML (Extensible Binary Meta
|
||||
Language), a binary derivative of XML. EBML enables the Matroska
|
||||
Development Team to gain significant advantages in terms of future
|
||||
format extensibility, without breaking file support in old parsers.
|
||||
|
||||
%package devel
|
||||
Summary: Matroska Video Container headers/development files
|
||||
Group: Development/Libraries
|
||||
|
||||
%description devel
|
||||
Headers for libmatroska.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
cd make/linux
|
||||
CFLAGS="$RPM_OPT_FLAGS" \
|
||||
make \
|
||||
prefix="%{_prefix}" \
|
||||
LIBEBML_INCLUDE_DIR=%{_includedir} \
|
||||
LIBEBML_LIB_DIR=%{_libdir} \
|
||||
staticlib
|
||||
cd ../..
|
||||
|
||||
%install
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
cd make/linux
|
||||
make prefix=$RPM_BUILD_ROOT/%{_prefix} libdir=$RPM_BUILD_ROOT/%{_libdir} install_staticlib install_headers
|
||||
cd ../..
|
||||
|
||||
%clean
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files devel
|
||||
%defattr(-, root, root)
|
||||
%{_includedir}/matroska/*.h
|
||||
%{_includedir}/matroska/c/*.h
|
||||
%{_libdir}/libmatroska.a
|
||||
|
||||
%changelog
|
||||
* Sat Apr 16 2005 Moritz Bunkus <moritz@bunkus.org>
|
||||
- updated for the new libmatroska build targets
|
||||
* Fri May 15 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
||||
- create spec file
|
||||
|
@@ -1,73 +1,73 @@
|
||||
#
|
||||
# spec file for package libmatroska for (at least) SuSE 9.0, 9.1
|
||||
#
|
||||
# Copyright (c) 2004 SUSE LINUX AG, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://www.suse.de/feedback/
|
||||
#
|
||||
|
||||
# neededforbuild gcc-c++ libebml libstdc++-devel
|
||||
|
||||
BuildRequires: bzip2 cpp libebml make tar zlib zlib-devel binutils gcc gcc-c++ libstdc++-devel perl rpm
|
||||
|
||||
Name: libmatroska
|
||||
URL: http://dl.matroska.org/downloads/libmatroska/
|
||||
Version: 1.4.0
|
||||
Release: 1
|
||||
Summary: library to deal with matroska files.
|
||||
License: LGPL
|
||||
Group: Development/Libraries/Other
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Summary: library to deal with matroska files.
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Prefix: /usr
|
||||
|
||||
%description
|
||||
libmatroska is a C++ libary to parse Matroska files (.mkv and .mka). It
|
||||
depends on libebml to work. You only need this package to compile your
|
||||
own applications.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Steve Lhomme <steve.lhomme@free.fr>
|
||||
Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
%prep
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%setup
|
||||
|
||||
%build
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
cd make/linux
|
||||
make prefix=$RPM_BUILD_ROOT/usr libdir=$RPM_BUILD_ROOT/%{_libdir} staticlib
|
||||
|
||||
%install
|
||||
cd make/linux
|
||||
make prefix=$RPM_BUILD_ROOT/usr libdir=$RPM_BUILD_ROOT/%{_libdir} install_staticlib install_headers
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
%run_ldconfig
|
||||
|
||||
%postun
|
||||
%run_ldconfig
|
||||
|
||||
%files
|
||||
%defattr (-,root,root)
|
||||
%{_libdir}/libmatroska.a
|
||||
/usr/include/matroska
|
||||
# /usr/include/ebml/*
|
||||
|
||||
%changelog -n libmatroska
|
||||
* Sat Apr 16 2005 - moritz@bunkus.org
|
||||
- updated for the new libmatroska build targets
|
||||
* Thu Sep 02 2004 - seife@suse.de
|
||||
- add libebml to neededforbuild
|
||||
* Wed Sep 01 2004 - seife@suse.de
|
||||
- initial submission
|
||||
#
|
||||
# spec file for package libmatroska for (at least) SuSE 9.0, 9.1
|
||||
#
|
||||
# Copyright (c) 2004 SUSE LINUX AG, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://www.suse.de/feedback/
|
||||
#
|
||||
|
||||
# neededforbuild gcc-c++ libebml libstdc++-devel
|
||||
|
||||
BuildRequires: bzip2 cpp libebml make tar zlib zlib-devel binutils gcc gcc-c++ libstdc++-devel perl rpm
|
||||
|
||||
Name: libmatroska
|
||||
URL: http://dl.matroska.org/downloads/libmatroska/
|
||||
Version: 0.8.1
|
||||
Release: 1
|
||||
Summary: library to deal with matroska files.
|
||||
License: LGPL
|
||||
Group: Development/Libraries/Other
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Summary: library to deal with matroska files.
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Prefix: /usr
|
||||
|
||||
%description
|
||||
libmatroska is a C++ libary to parse Matroska files (.mkv and .mka). It
|
||||
depends on libebml to work. You only need this package to compile your
|
||||
own applications.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Steve Lhomme <steve.lhomme@free.fr>
|
||||
Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
%prep
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%setup
|
||||
|
||||
%build
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
cd make/linux
|
||||
make prefix=$RPM_BUILD_ROOT/usr libdir=$RPM_BUILD_ROOT/%{_libdir} staticlib
|
||||
|
||||
%install
|
||||
cd make/linux
|
||||
make prefix=$RPM_BUILD_ROOT/usr libdir=$RPM_BUILD_ROOT/%{_libdir} install_staticlib install_headers
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
%run_ldconfig
|
||||
|
||||
%postun
|
||||
%run_ldconfig
|
||||
|
||||
%files
|
||||
%defattr (-,root,root)
|
||||
%{_libdir}/libmatroska.a
|
||||
/usr/include/matroska
|
||||
# /usr/include/ebml/*
|
||||
|
||||
%changelog -n libmatroska
|
||||
* Sat Apr 16 2005 - moritz@bunkus.org
|
||||
- updated for the new libmatroska build targets
|
||||
* Thu Sep 02 2004 - seife@suse.de
|
||||
- add libebml to neededforbuild
|
||||
* Wed Sep 01 2004 - seife@suse.de
|
||||
- initial submission
|
||||
|
@@ -258,6 +258,7 @@
|
||||
9091E0C904C1CA1D0040EA6E,
|
||||
9091E0CA04C1CA1D0040EA6E,
|
||||
9091E0CB04C1CA1D0040EA6E,
|
||||
9091E0CC04C1CA1D0040EA6E,
|
||||
9091E0CD04C1CA1D0040EA6E,
|
||||
9091E0CE04C1CA1D0040EA6E,
|
||||
9091E0CF04C1CA1D0040EA6E,
|
||||
@@ -288,6 +289,7 @@
|
||||
9091E09A04C1C9FA0040EA6E,
|
||||
9091E09B04C1C9FA0040EA6E,
|
||||
9091E09C04C1C9FA0040EA6E,
|
||||
9091E09D04C1C9FA0040EA6E,
|
||||
9091E09E04C1C9FA0040EA6E,
|
||||
9091E09F04C1C9FA0040EA6E,
|
||||
9091E0A004C1C9FA0040EA6E,
|
||||
@@ -471,6 +473,13 @@
|
||||
path = ../../src/KaxTag.cpp;
|
||||
refType = 2;
|
||||
};
|
||||
9091E09D04C1C9FA0040EA6E = {
|
||||
fileEncoding = 5;
|
||||
isa = PBXFileReference;
|
||||
name = KaxTagMulti.cpp;
|
||||
path = ../../src/KaxTagMulti.cpp;
|
||||
refType = 2;
|
||||
};
|
||||
9091E09E04C1C9FA0040EA6E = {
|
||||
fileEncoding = 5;
|
||||
isa = PBXFileReference;
|
||||
@@ -632,6 +641,13 @@
|
||||
path = ../../matroska/KaxTag.h;
|
||||
refType = 2;
|
||||
};
|
||||
9091E0CC04C1CA1D0040EA6E = {
|
||||
fileEncoding = 5;
|
||||
isa = PBXFileReference;
|
||||
name = KaxTagMulti.h;
|
||||
path = ../../matroska/KaxTagMulti.h;
|
||||
refType = 2;
|
||||
};
|
||||
9091E0CD04C1CA1D0040EA6E = {
|
||||
fileEncoding = 5;
|
||||
isa = PBXFileReference;
|
||||
@@ -1009,6 +1025,7 @@
|
||||
9091E18F04C1CC0E0040EA6E,
|
||||
9091E19004C1CC0F0040EA6E,
|
||||
9091E19104C1CC100040EA6E,
|
||||
9091E19204C1CC100040EA6E,
|
||||
9091E19304C1CC110040EA6E,
|
||||
9091E19404C1CC110040EA6E,
|
||||
9091E19504C1CC120040EA6E,
|
||||
@@ -1054,6 +1071,7 @@
|
||||
9091E16D04C1CBF60040EA6E,
|
||||
9091E16E04C1CBF70040EA6E,
|
||||
9091E16F04C1CBF70040EA6E,
|
||||
9091E17004C1CBF80040EA6E,
|
||||
9091E17104C1CBF90040EA6E,
|
||||
9091E17204C1CBFA0040EA6E,
|
||||
9091E17304C1CBFA0040EA6E,
|
||||
@@ -1185,6 +1203,7 @@
|
||||
9091E27604C1CE340040EA6E,
|
||||
9091E27704C1CE350040EA6E,
|
||||
9091E27804C1CE360040EA6E,
|
||||
9091E27904C1CE360040EA6E,
|
||||
9091E27A04C1CE370040EA6E,
|
||||
9091E27B04C1CE370040EA6E,
|
||||
9091E27C04C1CE380040EA6E,
|
||||
@@ -1237,6 +1256,7 @@
|
||||
9091E25E04C1CE230040EA6E,
|
||||
9091E25F04C1CE240040EA6E,
|
||||
9091E26004C1CE250040EA6E,
|
||||
9091E26104C1CE250040EA6E,
|
||||
9091E26204C1CE260040EA6E,
|
||||
9091E26304C1CE260040EA6E,
|
||||
9091E26404C1CE270040EA6E,
|
||||
@@ -1339,6 +1359,7 @@
|
||||
9091E21A04C1CDD90040EA6E,
|
||||
9091E21B04C1CDD90040EA6E,
|
||||
9091E21C04C1CDDA0040EA6E,
|
||||
9091E21E04C1CDDB0040EA6E,
|
||||
9091E21F04C1CDDC0040EA6E,
|
||||
9091E22004C1CDDD0040EA6E,
|
||||
9091E22104C1CDDD0040EA6E,
|
||||
@@ -1390,6 +1411,7 @@
|
||||
9091E20204C1CDB90040EA6E,
|
||||
9091E20304C1CDB90040EA6E,
|
||||
9091E20404C1CDBA0040EA6E,
|
||||
9091E20504C1CDBA0040EA6E,
|
||||
9091E20604C1CDBB0040EA6E,
|
||||
9091E20704C1CDBC0040EA6E,
|
||||
9091E20804C1CDBE0040EA6E,
|
||||
@@ -1490,6 +1512,12 @@
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
9091E17004C1CBF80040EA6E = {
|
||||
fileRef = 9091E09D04C1C9FA0040EA6E;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
9091E17104C1CBF90040EA6E = {
|
||||
fileRef = 9091E09C04C1C9FA0040EA6E;
|
||||
isa = PBXBuildFile;
|
||||
@@ -1688,6 +1716,12 @@
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
9091E19204C1CC100040EA6E = {
|
||||
fileRef = 9091E0CC04C1CA1D0040EA6E;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
9091E19304C1CC110040EA6E = {
|
||||
fileRef = 9091E0CD04C1CA1D0040EA6E;
|
||||
isa = PBXBuildFile;
|
||||
@@ -2366,6 +2400,12 @@
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
9091E20504C1CDBA0040EA6E = {
|
||||
fileRef = 9091E09D04C1C9FA0040EA6E;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
9091E20604C1CDBB0040EA6E = {
|
||||
fileRef = 9091E09E04C1C9FA0040EA6E;
|
||||
isa = PBXBuildFile;
|
||||
@@ -2504,6 +2544,12 @@
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
9091E21E04C1CDDB0040EA6E = {
|
||||
fileRef = 9091E0CC04C1CA1D0040EA6E;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
9091E21F04C1CDDC0040EA6E = {
|
||||
fileRef = 9091E0CD04C1CA1D0040EA6E;
|
||||
isa = PBXBuildFile;
|
||||
@@ -2900,6 +2946,12 @@
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
9091E26104C1CE250040EA6E = {
|
||||
fileRef = 9091E09D04C1C9FA0040EA6E;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
9091E26204C1CE260040EA6E = {
|
||||
fileRef = 9091E09E04C1C9FA0040EA6E;
|
||||
isa = PBXBuildFile;
|
||||
@@ -3038,6 +3090,12 @@
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
9091E27904C1CE360040EA6E = {
|
||||
fileRef = 9091E0CC04C1CA1D0040EA6E;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
9091E27A04C1CE370040EA6E = {
|
||||
fileRef = 9091E0CD04C1CA1D0040EA6E;
|
||||
isa = PBXBuildFile;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/sh
|
||||
# you should have "doxygen" in your path
|
||||
# http://www.doxygen.org/
|
||||
|
||||
echo make Documentation
|
||||
|
||||
doxygen Doxyfile > Doxygen.log.txt 2> Doxygen.err.txt
|
||||
#!/usr/bin/sh
|
||||
# you should have "doxygen" in your path
|
||||
# http://www.doxygen.org/
|
||||
|
||||
echo make Documentation
|
||||
|
||||
doxygen Doxyfile > Doxygen.log.txt 2> Doxygen.err.txt
|
||||
|
@@ -43,7 +43,7 @@ FLAGS += -DEBML_DLL
|
||||
endif
|
||||
endif
|
||||
CWD = $(shell pwd)
|
||||
INCS = -I"$(CWD)/../.." -I$(EBML_DIR)
|
||||
INCS = -I$(CWD)/../.. -I$(EBML_DIR)
|
||||
LDFLAGS = -L. -L$(EBML_DIR)/make/mingw32
|
||||
COMPILEFLAGS = $(DEBUGFLAGS) $(INCS) $(FLAGS) $(CXXFLAGS)
|
||||
TESTS = test6 test8 test9
|
||||
|
@@ -153,6 +153,10 @@ SOURCE=..\..\..\..\src\KaxTag.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\src\KaxTagMulti.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\src\KaxTags.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -253,6 +257,10 @@ SOURCE=..\..\..\..\matroska\KaxTag.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\matroska\KaxTagMulti.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\matroska\KaxTags.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@@ -164,6 +164,9 @@
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\KaxTag.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\KaxTagMulti.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\KaxTags.cpp">
|
||||
</File>
|
||||
@@ -238,6 +241,9 @@
|
||||
<File
|
||||
RelativePath="..\..\..\..\matroska\KaxTag.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\matroska\KaxTagMulti.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\matroska\KaxTags.h">
|
||||
</File>
|
||||
|
@@ -170,6 +170,9 @@
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\KaxTag.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\KaxTagMulti.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\KaxTags.cpp">
|
||||
</File>
|
||||
@@ -246,6 +249,9 @@
|
||||
<File
|
||||
RelativePath="..\..\..\..\matroska\KaxTag.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\matroska\KaxTagMulti.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\matroska\KaxTags.h">
|
||||
</File>
|
||||
|
@@ -156,6 +156,9 @@
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\KaxTag.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\KaxTagMulti.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\KaxTags.cpp">
|
||||
</File>
|
||||
@@ -232,6 +235,9 @@
|
||||
<File
|
||||
RelativePath="..\..\..\..\matroska\KaxTag.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\matroska\KaxTagMulti.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\matroska\KaxTags.h">
|
||||
</File>
|
||||
|
@@ -1,163 +1,163 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: FileKax.h,v 1.5 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_FILE_H
|
||||
#define LIBMATROSKA_FILE_H
|
||||
|
||||
//#include <vector>
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/IOCallback.h"
|
||||
//#include "MainHeader.h"
|
||||
//#include "TrackType.h"
|
||||
//#include "StreamInfo.h"
|
||||
//#include "Cluster.h"
|
||||
//#include "CodecHeader.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
//class Track;
|
||||
//class Frame;
|
||||
|
||||
/*!
|
||||
\class MATROSKA_DLL_API FileMatroska
|
||||
\brief General container of all the parameters and data of an Matroska file
|
||||
\todo Handle the filename and next filename
|
||||
\todo Handle the IOCallback selection/type
|
||||
*/
|
||||
class MATROSKA_DLL_API FileMatroska {
|
||||
public:
|
||||
FileMatroska(IOCallback & output);
|
||||
~FileMatroska();
|
||||
#ifdef OLD
|
||||
filepos_t RenderHead(const std::string & aEncoderApp);
|
||||
uint32 ReadHead();
|
||||
uint32 ReadTracks();
|
||||
uint32 ReadCodec();
|
||||
void Close(const uint32 aTimeLength);
|
||||
|
||||
inline void type_SetInfo(const std::string & aStr) {myMainHeader.type_SetInfo(aStr);}
|
||||
inline void type_SetAds(const std::string & aStr) {myMainHeader.type_SetAds(aStr);}
|
||||
inline void type_SetSize(const std::string & aStr) {myMainHeader.type_SetSize(aStr);}
|
||||
inline void type_SetSize(uint64 aSize) {myMainHeader.type_SetSize(aSize);}
|
||||
|
||||
inline uint8 GetTrackNumber() const { return myTracks.size(); }
|
||||
|
||||
void track_SetName(Track * aTrack, const std::string & aName);
|
||||
void track_SetLaced(Track * aTrack, bool bLaced = true);
|
||||
|
||||
Track * CreateTrack(const track_type aType);
|
||||
inline Track * GetTrack(const uint8 aTrackNb) const
|
||||
{
|
||||
if (aTrackNb > myTracks.size())
|
||||
return NULL;
|
||||
else
|
||||
return myTracks[aTrackNb-1];
|
||||
}
|
||||
|
||||
void Track_GetInfo(const Track * aTrack, TrackInfo & aTrackInfo) const;
|
||||
|
||||
void Track_SetInfo_Audio(Track * aTrack, const TrackInfoAudio & aTrackInfo);
|
||||
void Track_GetInfo_Audio(const Track * aTrack, TrackInfoAudio & aTrackInfo) const;
|
||||
|
||||
void Track_SetInfo_Video(Track * aTrack, const TrackInfoVideo & aTrackInfo);
|
||||
void Track_GetInfo_Video(const Track * aTrack, TrackInfoVideo & aTrackInfo) const;
|
||||
|
||||
void SelectReadingTrack(Track * aTrack, bool select = true);
|
||||
|
||||
/*!
|
||||
\return wether the frame has been added or not
|
||||
*/
|
||||
bool AddFrame(Track * aTrack, const uint32 aTimecode, const binary *aFrame, const uint32 aFrameSize,
|
||||
bool aKeyFrame = true, bool aBFrame = false);
|
||||
|
||||
/*!
|
||||
\return wether the frame has been read or not
|
||||
*/
|
||||
bool ReadFrame(Track * & aTrack, uint32 & aTimecode, const binary * & aFrame, uint32 & aFrameSize,
|
||||
bool & aKeyFrame, bool & aBFrame);
|
||||
|
||||
/*
|
||||
Render the pending cluster to file
|
||||
*/
|
||||
void Flush();
|
||||
|
||||
void SetMaxClusterSize(const uint32 value);
|
||||
void SetMinClusterSize(const uint32 value) {myMinClusterSize = value;}
|
||||
|
||||
protected:
|
||||
MainHeader myMainHeader;
|
||||
|
||||
std::vector<Track *> myTracks;
|
||||
std::vector<uint8> mySelectedTracks;
|
||||
|
||||
// Track *findTrack(Track * aTrack) const;
|
||||
|
||||
Cluster myCurrWriteCluster; /// \todo merge with the write one ?
|
||||
uint32 myReadBlockNumber;
|
||||
Cluster myCurrReadCluster;
|
||||
binary * myCurrReadBlock; ///< The buffer containing the current read block
|
||||
uint32 myCurrReadBlockSize; ///< The size of the buffer containing the current read block
|
||||
uint8 myCurrReadBlockTrack; ///< The track number of the current track to read
|
||||
|
||||
uint32 myMaxClusterSize;
|
||||
uint32 myMinClusterSize;
|
||||
|
||||
StreamInfo myStreamInfo;
|
||||
|
||||
CodecHeader myCodecHeader;
|
||||
|
||||
inline bool IsMyTrack(const Track * aTrack) const;
|
||||
inline bool IsReadingTrack(const uint8 aTrackNum) const;
|
||||
#endif // OLD
|
||||
IOCallback & myFile;
|
||||
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
MATROSKA_DLL_API void matroska_init();
|
||||
MATROSKA_DLL_API void matroska_done();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // FILE_KAX_HPP
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: FileKax.h,v 1.5 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_FILE_H
|
||||
#define LIBMATROSKA_FILE_H
|
||||
|
||||
//#include <vector>
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/IOCallback.h"
|
||||
//#include "MainHeader.h"
|
||||
//#include "TrackType.h"
|
||||
//#include "StreamInfo.h"
|
||||
//#include "Cluster.h"
|
||||
//#include "CodecHeader.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
//class Track;
|
||||
//class Frame;
|
||||
|
||||
/*!
|
||||
\class MATROSKA_DLL_API FileMatroska
|
||||
\brief General container of all the parameters and data of an Matroska file
|
||||
\todo Handle the filename and next filename
|
||||
\todo Handle the IOCallback selection/type
|
||||
*/
|
||||
class MATROSKA_DLL_API FileMatroska {
|
||||
public:
|
||||
FileMatroska(IOCallback & output);
|
||||
~FileMatroska();
|
||||
#ifdef OLD
|
||||
filepos_t RenderHead(const std::string & aEncoderApp);
|
||||
uint32 ReadHead();
|
||||
uint32 ReadTracks();
|
||||
uint32 ReadCodec();
|
||||
void Close(const uint32 aTimeLength);
|
||||
|
||||
inline void type_SetInfo(const std::string & aStr) {myMainHeader.type_SetInfo(aStr);}
|
||||
inline void type_SetAds(const std::string & aStr) {myMainHeader.type_SetAds(aStr);}
|
||||
inline void type_SetSize(const std::string & aStr) {myMainHeader.type_SetSize(aStr);}
|
||||
inline void type_SetSize(uint64 aSize) {myMainHeader.type_SetSize(aSize);}
|
||||
|
||||
inline uint8 GetTrackNumber() const { return myTracks.size(); }
|
||||
|
||||
void track_SetName(Track * aTrack, const std::string & aName);
|
||||
void track_SetLaced(Track * aTrack, bool bLaced = true);
|
||||
|
||||
Track * CreateTrack(const track_type aType);
|
||||
inline Track * GetTrack(const uint8 aTrackNb) const
|
||||
{
|
||||
if (aTrackNb > myTracks.size())
|
||||
return NULL;
|
||||
else
|
||||
return myTracks[aTrackNb-1];
|
||||
}
|
||||
|
||||
void Track_GetInfo(const Track * aTrack, TrackInfo & aTrackInfo) const;
|
||||
|
||||
void Track_SetInfo_Audio(Track * aTrack, const TrackInfoAudio & aTrackInfo);
|
||||
void Track_GetInfo_Audio(const Track * aTrack, TrackInfoAudio & aTrackInfo) const;
|
||||
|
||||
void Track_SetInfo_Video(Track * aTrack, const TrackInfoVideo & aTrackInfo);
|
||||
void Track_GetInfo_Video(const Track * aTrack, TrackInfoVideo & aTrackInfo) const;
|
||||
|
||||
void SelectReadingTrack(Track * aTrack, bool select = true);
|
||||
|
||||
/*!
|
||||
\return wether the frame has been added or not
|
||||
*/
|
||||
bool AddFrame(Track * aTrack, const uint32 aTimecode, const binary *aFrame, const uint32 aFrameSize,
|
||||
bool aKeyFrame = true, bool aBFrame = false);
|
||||
|
||||
/*!
|
||||
\return wether the frame has been read or not
|
||||
*/
|
||||
bool ReadFrame(Track * & aTrack, uint32 & aTimecode, const binary * & aFrame, uint32 & aFrameSize,
|
||||
bool & aKeyFrame, bool & aBFrame);
|
||||
|
||||
/*
|
||||
Render the pending cluster to file
|
||||
*/
|
||||
void Flush();
|
||||
|
||||
void SetMaxClusterSize(const uint32 value);
|
||||
void SetMinClusterSize(const uint32 value) {myMinClusterSize = value;}
|
||||
|
||||
protected:
|
||||
MainHeader myMainHeader;
|
||||
|
||||
std::vector<Track *> myTracks;
|
||||
std::vector<uint8> mySelectedTracks;
|
||||
|
||||
// Track *findTrack(Track * aTrack) const;
|
||||
|
||||
Cluster myCurrWriteCluster; /// \todo merge with the write one ?
|
||||
uint32 myReadBlockNumber;
|
||||
Cluster myCurrReadCluster;
|
||||
binary * myCurrReadBlock; ///< The buffer containing the current read block
|
||||
uint32 myCurrReadBlockSize; ///< The size of the buffer containing the current read block
|
||||
uint8 myCurrReadBlockTrack; ///< The track number of the current track to read
|
||||
|
||||
uint32 myMaxClusterSize;
|
||||
uint32 myMinClusterSize;
|
||||
|
||||
StreamInfo myStreamInfo;
|
||||
|
||||
CodecHeader myCodecHeader;
|
||||
|
||||
inline bool IsMyTrack(const Track * aTrack) const;
|
||||
inline bool IsReadingTrack(const uint8 aTrackNum) const;
|
||||
#endif // OLD
|
||||
IOCallback & myFile;
|
||||
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
MATROSKA_DLL_API void matroska_init();
|
||||
MATROSKA_DLL_API void matroska_done();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // FILE_KAX_HPP
|
||||
|
@@ -1,40 +1,73 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxAttached.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_ATTACHED_H
|
||||
#define LIBMATROSKA_ATTACHED_H
|
||||
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
#endif // LIBMATROSKA_ATTACHED_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxAttached.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_ATTACHED_H
|
||||
#define LIBMATROSKA_ATTACHED_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlUnicodeString.h"
|
||||
#include "ebml/EbmlString.h"
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_MASTER(KaxAttached)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxFileDescription)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxFileName)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxMimeType)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxFileData)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxFileReferral)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxFileUID)
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_ATTACHED_H
|
||||
|
@@ -1,40 +1,51 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxAttachments.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_ATTACHEMENTS_H
|
||||
#define LIBMATROSKA_ATTACHEMENTS_H
|
||||
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
#endif // LIBMATROSKA_ATTACHEMENTS_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxAttachments.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_ATTACHEMENTS_H
|
||||
#define LIBMATROSKA_ATTACHEMENTS_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_MASTER(KaxAttachments)
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_ATTACHEMENTS_H
|
||||
|
@@ -1,388 +1,383 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\todo add a PureBlock class to group functionalities between Block and BlockVirtual
|
||||
\version \$Id: KaxBlock.h,v 1.24 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author Julien Coloos <suiryc @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_BLOCK_H
|
||||
#define LIBMATROSKA_BLOCK_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "matroska/KaxTracks.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class KaxCluster;
|
||||
class KaxReferenceBlock;
|
||||
class KaxInternalBlock;
|
||||
class KaxBlockBlob;
|
||||
|
||||
class MATROSKA_DLL_API DataBuffer {
|
||||
protected:
|
||||
binary * myBuffer;
|
||||
uint32 mySize;
|
||||
bool bValidValue;
|
||||
bool (*myFreeBuffer)(const DataBuffer & aBuffer); // method to free the internal buffer
|
||||
bool bInternalBuffer;
|
||||
|
||||
public:
|
||||
DataBuffer(binary * aBuffer, uint32 aSize, bool (*aFreeBuffer)(const DataBuffer & aBuffer) = NULL, bool _bInternalBuffer = false)
|
||||
:myBuffer(NULL)
|
||||
,mySize(aSize)
|
||||
,bValidValue(true)
|
||||
,myFreeBuffer(aFreeBuffer)
|
||||
,bInternalBuffer(_bInternalBuffer)
|
||||
{
|
||||
if (bInternalBuffer)
|
||||
{
|
||||
myBuffer = new binary[mySize];
|
||||
if (myBuffer == NULL)
|
||||
bValidValue = false;
|
||||
else
|
||||
memcpy(myBuffer, aBuffer, mySize);
|
||||
}
|
||||
else
|
||||
myBuffer = aBuffer;
|
||||
}
|
||||
|
||||
virtual ~DataBuffer() {}
|
||||
virtual binary * Buffer() {assert(bValidValue); return myBuffer;}
|
||||
virtual uint32 & Size() {return mySize;};
|
||||
virtual const binary * Buffer() const {assert(bValidValue); return myBuffer;}
|
||||
virtual uint32 Size() const {return mySize;};
|
||||
bool FreeBuffer(const DataBuffer & aBuffer) {
|
||||
bool bResult = true;
|
||||
if (myBuffer != NULL && bValidValue) {
|
||||
if (myFreeBuffer != NULL)
|
||||
bResult = myFreeBuffer(aBuffer);
|
||||
if (bInternalBuffer)
|
||||
delete [] myBuffer;
|
||||
myBuffer = NULL;
|
||||
mySize = 0;
|
||||
bValidValue = false;
|
||||
}
|
||||
return bResult;
|
||||
}
|
||||
|
||||
virtual DataBuffer * Clone();
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API SimpleDataBuffer : public DataBuffer {
|
||||
public:
|
||||
SimpleDataBuffer(binary * aBuffer, uint32 aSize, uint32 aOffset, bool (*aFreeBuffer)(const DataBuffer & aBuffer) = myFreeBuffer)
|
||||
:DataBuffer(aBuffer + aOffset, aSize, aFreeBuffer)
|
||||
,Offset(aOffset)
|
||||
,BaseBuffer(aBuffer)
|
||||
{}
|
||||
virtual ~SimpleDataBuffer() {}
|
||||
|
||||
DataBuffer * Clone() {return new SimpleDataBuffer(*this);}
|
||||
|
||||
protected:
|
||||
uint32 Offset;
|
||||
binary * BaseBuffer;
|
||||
|
||||
static bool myFreeBuffer(const DataBuffer & aBuffer)
|
||||
{
|
||||
binary *_Buffer = static_cast<const SimpleDataBuffer*>(&aBuffer)->BaseBuffer;
|
||||
if (_Buffer != NULL)
|
||||
free(_Buffer);
|
||||
return true;
|
||||
}
|
||||
|
||||
SimpleDataBuffer(const SimpleDataBuffer & ToClone);
|
||||
};
|
||||
|
||||
/*!
|
||||
\note the data is copied locally, it can be freed right away
|
||||
* /
|
||||
class MATROSKA_DLL_API NotSoSimpleDataBuffer : public SimpleDataBuffer {
|
||||
public:
|
||||
NotSoSimpleDataBuffer(binary * aBuffer, uint32 aSize, uint32 aOffset)
|
||||
:SimpleDataBuffer(new binary[aSize - aOffset], aSize, 0)
|
||||
{
|
||||
memcpy(BaseBuffer, aBuffer + aOffset, aSize - aOffset);
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
DECLARE_MKX_MASTER(KaxBlockGroup)
|
||||
public:
|
||||
~KaxBlockGroup();
|
||||
|
||||
/*!
|
||||
\brief Addition of a frame without references
|
||||
*/
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing = LACING_AUTO);
|
||||
/*!
|
||||
\brief Addition of a frame with a backward reference (P frame)
|
||||
*/
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockGroup & PastBlock, LacingType lacing = LACING_AUTO);
|
||||
|
||||
/*!
|
||||
\brief Addition of a frame with a backward+forward reference (B frame)
|
||||
*/
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing = LACING_AUTO);
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockBlob * PastBlock, const KaxBlockBlob * ForwBlock, LacingType lacing = LACING_AUTO);
|
||||
|
||||
void SetParent(KaxCluster & aParentCluster);
|
||||
|
||||
void SetParentTrack(const KaxTrackEntry & aParentTrack) {
|
||||
ParentTrack = &aParentTrack;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Set the duration of the contained frame(s) (for the total number of frames)
|
||||
*/
|
||||
void SetBlockDuration(uint64 TimeLength);
|
||||
bool GetBlockDuration(uint64 &TheTimecode) const;
|
||||
|
||||
/*!
|
||||
\return the global timecode of this Block (not just the delta to the Cluster)
|
||||
*/
|
||||
uint64 GlobalTimecode() const;
|
||||
uint64 GlobalTimecodeScale() const {
|
||||
assert(ParentTrack != NULL);
|
||||
return ParentTrack->GlobalTimecodeScale();
|
||||
}
|
||||
|
||||
uint16 TrackNumber() const;
|
||||
|
||||
uint64 ClusterPosition() const;
|
||||
|
||||
/*!
|
||||
\return the number of references to other frames
|
||||
*/
|
||||
unsigned int ReferenceCount() const;
|
||||
const KaxReferenceBlock & Reference(unsigned int Index) const;
|
||||
|
||||
/*!
|
||||
\brief release all the frames of all Blocks
|
||||
*/
|
||||
void ReleaseFrames();
|
||||
|
||||
operator KaxInternalBlock &();
|
||||
|
||||
const KaxCluster *GetParentCluster() const { return ParentCluster; }
|
||||
|
||||
protected:
|
||||
KaxCluster * ParentCluster;
|
||||
const KaxTrackEntry * ParentTrack;
|
||||
};
|
||||
|
||||
class KaxInternalBlock : public EbmlBinary {
|
||||
public:
|
||||
KaxInternalBlock(EBML_DEF_CONS EBML_DEF_SEP bool bSimple EBML_DEF_SEP EBML_EXTRA_PARAM) :EBML_DEF_BINARY_INIT EBML_DEF_SEP bLocalTimecodeUsed(false), mLacing(LACING_AUTO), mInvisible(false)
|
||||
,ParentCluster(NULL), bIsSimple(bSimple), bIsKeyframe(true), bIsDiscardable(false)
|
||||
{}
|
||||
KaxInternalBlock(const KaxInternalBlock & ElementToClone);
|
||||
~KaxInternalBlock();
|
||||
virtual bool ValidateSize() const;
|
||||
|
||||
uint16 TrackNum() const {return TrackNumber;}
|
||||
/*!
|
||||
\todo !!!! This method needs to be changes !
|
||||
*/
|
||||
uint64 GlobalTimecode() const {return Timecode;}
|
||||
|
||||
/*!
|
||||
\note override this function to generate the Data/Size on the fly, unlike the usual binary elements
|
||||
*/
|
||||
filepos_t UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
|
||||
filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
|
||||
|
||||
/*!
|
||||
\brief Only read the head of the Block (not internal data)
|
||||
\note convenient when you are parsing the file quickly
|
||||
*/
|
||||
uint64 ReadInternalHead(IOCallback & input);
|
||||
|
||||
unsigned int NumberFrames() const { return SizeList.size();}
|
||||
DataBuffer & GetBuffer(unsigned int iIndex) {return *myBuffers[iIndex];}
|
||||
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing = LACING_AUTO, bool invisible = false);
|
||||
|
||||
/*!
|
||||
\brief release all the frames of all Blocks
|
||||
*/
|
||||
void ReleaseFrames();
|
||||
|
||||
void SetParent(KaxCluster & aParentCluster);
|
||||
|
||||
/*!
|
||||
\return Returns the lacing type that produces the smallest footprint.
|
||||
*/
|
||||
LacingType GetBestLacingType() const;
|
||||
|
||||
/*!
|
||||
\param FrameNumber 0 for the first frame
|
||||
\return the position in the stream for a given frame
|
||||
\note return -1 if the position doesn't exist
|
||||
*/
|
||||
int64 GetDataPosition(size_t FrameNumber = 0);
|
||||
|
||||
/*!
|
||||
\param FrameNumber 0 for the first frame
|
||||
\return the size of a given frame
|
||||
\note return -1 if the position doesn't exist
|
||||
*/
|
||||
int64 GetFrameSize(size_t FrameNumber = 0);
|
||||
|
||||
bool IsInvisible() const { return mInvisible; }
|
||||
|
||||
uint64 ClusterPosition() const;
|
||||
|
||||
protected:
|
||||
std::vector<DataBuffer *> myBuffers;
|
||||
std::vector<int32> SizeList;
|
||||
uint64 Timecode; // temporary timecode of the first frame, non scaled
|
||||
int16 LocalTimecode;
|
||||
bool bLocalTimecodeUsed;
|
||||
uint16 TrackNumber;
|
||||
LacingType mLacing;
|
||||
bool mInvisible;
|
||||
uint64 FirstFrameLocation;
|
||||
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false);
|
||||
|
||||
KaxCluster * ParentCluster;
|
||||
bool bIsSimple;
|
||||
bool bIsKeyframe;
|
||||
bool bIsDiscardable;
|
||||
};
|
||||
|
||||
DECLARE_MKX_CONTEXT(KaxBlock);
|
||||
class MATROSKA_DLL_API KaxBlock : public KaxInternalBlock {
|
||||
public:
|
||||
KaxBlock(EBML_EXTRA_PARAM) :KaxInternalBlock(EBML_DEF_BINARY_CTX(KaxBlock)EBML_DEF_SEP false EBML_DEF_SEP EBML_EXTRA_CALL) {}
|
||||
EBML_CONCRETE_CLASS(KaxBlock)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_CONTEXT(KaxSimpleBlock);
|
||||
class MATROSKA_DLL_API KaxSimpleBlock : public KaxInternalBlock {
|
||||
public:
|
||||
KaxSimpleBlock(EBML_EXTRA_PARAM) :KaxInternalBlock(EBML_DEF_BINARY_CTX(KaxSimpleBlock)EBML_DEF_SEP true EBML_DEF_SEP EBML_EXTRA_CALL) {}
|
||||
|
||||
void SetKeyframe(bool b_keyframe) { bIsKeyframe = b_keyframe; }
|
||||
void SetDiscardable(bool b_discard) { bIsDiscardable = b_discard; }
|
||||
|
||||
bool IsKeyframe() const { return bIsKeyframe; }
|
||||
bool IsDiscardable() const { return bIsDiscardable; }
|
||||
|
||||
void SetParent(KaxCluster & aParentCluster);
|
||||
|
||||
EBML_CONCRETE_CLASS(KaxSimpleBlock)
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
/// Placeholder class for either a BlockGroup or a SimpleBlock
|
||||
class MATROSKA_DLL_API KaxBlockBlob {
|
||||
public:
|
||||
KaxBlockBlob(BlockBlobType sblock_mode) :ParentCluster(NULL), SimpleBlockMode(sblock_mode) {
|
||||
bUseSimpleBlock = (sblock_mode != BLOCK_BLOB_NO_SIMPLE);
|
||||
Block.group = NULL;
|
||||
}
|
||||
|
||||
~KaxBlockBlob() {
|
||||
#if MATROSKA_VERSION >= 2
|
||||
if (bUseSimpleBlock)
|
||||
delete Block.simpleblock;
|
||||
else
|
||||
#endif // MATROSKA_VERSION
|
||||
delete Block.group;
|
||||
}
|
||||
|
||||
operator KaxBlockGroup &();
|
||||
operator const KaxBlockGroup &() const;
|
||||
#if MATROSKA_VERSION >= 2
|
||||
operator KaxSimpleBlock &();
|
||||
#endif
|
||||
operator KaxInternalBlock &();
|
||||
operator const KaxInternalBlock &() const;
|
||||
|
||||
void SetBlockGroup( KaxBlockGroup &BlockRef );
|
||||
|
||||
void SetBlockDuration(uint64 TimeLength);
|
||||
|
||||
void SetParent(KaxCluster & aParentCluster);
|
||||
bool AddFrameAuto(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing = LACING_AUTO, const KaxBlockBlob * PastBlock = NULL, const KaxBlockBlob * ForwBlock = NULL);
|
||||
|
||||
bool IsSimpleBlock() const {return bUseSimpleBlock;}
|
||||
|
||||
bool ReplaceSimpleByGroup();
|
||||
protected:
|
||||
KaxCluster * ParentCluster;
|
||||
union {
|
||||
KaxBlockGroup *group;
|
||||
#if MATROSKA_VERSION >= 2
|
||||
KaxSimpleBlock *simpleblock;
|
||||
#endif // MATROSKA_VERSION
|
||||
} Block;
|
||||
bool bUseSimpleBlock;
|
||||
BlockBlobType SimpleBlockMode;
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_BINARY_CONS(KaxBlockVirtual)
|
||||
public:
|
||||
~KaxBlockVirtual();
|
||||
|
||||
/*!
|
||||
\note override this function to generate the Data/Size on the fly, unlike the usual binary elements
|
||||
*/
|
||||
filepos_t UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
|
||||
|
||||
void SetParent(const KaxCluster & aParentCluster) {ParentCluster = &aParentCluster;}
|
||||
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
|
||||
filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
|
||||
|
||||
protected:
|
||||
uint64 Timecode; // temporary timecode of the first frame if there are more than one
|
||||
uint16 TrackNumber;
|
||||
binary DataBlock[5];
|
||||
|
||||
const KaxCluster * ParentCluster;
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_BLOCK_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\todo add a PureBlock class to group functionalities between Block and BlockVirtual
|
||||
\version \$Id: KaxBlock.h,v 1.24 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author Julien Coloos <suiryc @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_BLOCK_H
|
||||
#define LIBMATROSKA_BLOCK_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "matroska/KaxTracks.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class KaxCluster;
|
||||
class KaxReferenceBlock;
|
||||
class KaxInternalBlock;
|
||||
class KaxBlockBlob;
|
||||
|
||||
class MATROSKA_DLL_API DataBuffer {
|
||||
protected:
|
||||
binary * myBuffer;
|
||||
uint32 mySize;
|
||||
bool bValidValue;
|
||||
bool (*myFreeBuffer)(const DataBuffer & aBuffer); // method to free the internal buffer
|
||||
|
||||
public:
|
||||
DataBuffer(binary * aBuffer, uint32 aSize, bool (*aFreeBuffer)(const DataBuffer & aBuffer) = NULL)
|
||||
:myBuffer(aBuffer)
|
||||
,mySize(aSize)
|
||||
,bValidValue(true)
|
||||
,myFreeBuffer(aFreeBuffer)
|
||||
{}
|
||||
virtual ~DataBuffer() {}
|
||||
virtual binary * Buffer() {return myBuffer;}
|
||||
virtual uint32 & Size() {return mySize;};
|
||||
virtual const binary * Buffer() const {return myBuffer;}
|
||||
virtual const uint32 Size() const {return mySize;};
|
||||
bool FreeBuffer(const DataBuffer & aBuffer) {
|
||||
bool bResult = true;
|
||||
if (myBuffer != NULL && myFreeBuffer != NULL && bValidValue) {
|
||||
bResult = myFreeBuffer(aBuffer);
|
||||
myBuffer = NULL;
|
||||
bValidValue = false;
|
||||
}
|
||||
return bResult;
|
||||
}
|
||||
|
||||
virtual DataBuffer * Clone();
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API SimpleDataBuffer : public DataBuffer {
|
||||
public:
|
||||
SimpleDataBuffer(binary * aBuffer, uint32 aSize, uint32 aOffset, bool (*aFreeBuffer)(const DataBuffer & aBuffer) = myFreeBuffer)
|
||||
:DataBuffer(aBuffer + aOffset, aSize, aFreeBuffer)
|
||||
,Offset(aOffset)
|
||||
,BaseBuffer(aBuffer)
|
||||
{}
|
||||
virtual ~SimpleDataBuffer() {}
|
||||
|
||||
DataBuffer * Clone() {return new SimpleDataBuffer(*this);}
|
||||
|
||||
protected:
|
||||
uint32 Offset;
|
||||
binary * BaseBuffer;
|
||||
|
||||
static bool myFreeBuffer(const DataBuffer & aBuffer)
|
||||
{
|
||||
binary *_Buffer = static_cast<const SimpleDataBuffer*>(&aBuffer)->BaseBuffer;
|
||||
if (_Buffer != NULL)
|
||||
free(_Buffer);
|
||||
return true;
|
||||
}
|
||||
|
||||
SimpleDataBuffer(const SimpleDataBuffer & ToClone);
|
||||
};
|
||||
|
||||
/*!
|
||||
\note the data is copied locally, it can be freed right away
|
||||
* /
|
||||
class MATROSKA_DLL_API NotSoSimpleDataBuffer : public SimpleDataBuffer {
|
||||
public:
|
||||
NotSoSimpleDataBuffer(binary * aBuffer, uint32 aSize, uint32 aOffset)
|
||||
:SimpleDataBuffer(new binary[aSize - aOffset], aSize, 0)
|
||||
{
|
||||
memcpy(BaseBuffer, aBuffer + aOffset, aSize - aOffset);
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
DECLARE_MKX_MASTER(KaxBlockGroup)
|
||||
public:
|
||||
~KaxBlockGroup();
|
||||
|
||||
/*!
|
||||
\brief Addition of a frame without references
|
||||
*/
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing = LACING_AUTO);
|
||||
/*!
|
||||
\brief Addition of a frame with a backward reference (P frame)
|
||||
*/
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockGroup & PastBlock, LacingType lacing = LACING_AUTO);
|
||||
|
||||
/*!
|
||||
\brief Addition of a frame with a backward+forward reference (B frame)
|
||||
*/
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing = LACING_AUTO);
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockBlob * PastBlock, const KaxBlockBlob * ForwBlock, LacingType lacing = LACING_AUTO);
|
||||
|
||||
void SetParent(KaxCluster & aParentCluster);
|
||||
|
||||
void SetParentTrack(const KaxTrackEntry & aParentTrack) {
|
||||
ParentTrack = &aParentTrack;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Set the duration of the contained frame(s) (for the total number of frames)
|
||||
*/
|
||||
void SetBlockDuration(uint64 TimeLength);
|
||||
bool GetBlockDuration(uint64 &TheTimecode) const;
|
||||
|
||||
/*!
|
||||
\return the global timecode of this Block (not just the delta to the Cluster)
|
||||
*/
|
||||
uint64 GlobalTimecode() const;
|
||||
uint64 GlobalTimecodeScale() const {
|
||||
assert(ParentTrack != NULL);
|
||||
return ParentTrack->GlobalTimecodeScale();
|
||||
}
|
||||
|
||||
uint16 TrackNumber() const;
|
||||
|
||||
uint64 ClusterPosition() const;
|
||||
|
||||
/*!
|
||||
\return the number of references to other frames
|
||||
*/
|
||||
unsigned int ReferenceCount() const;
|
||||
const KaxReferenceBlock & Reference(unsigned int Index) const;
|
||||
|
||||
/*!
|
||||
\brief release all the frames of all Blocks
|
||||
*/
|
||||
void ReleaseFrames();
|
||||
|
||||
operator KaxInternalBlock &();
|
||||
|
||||
const KaxCluster *GetParentCluster() const { return ParentCluster; }
|
||||
|
||||
protected:
|
||||
KaxCluster * ParentCluster;
|
||||
const KaxTrackEntry * ParentTrack;
|
||||
};
|
||||
|
||||
class KaxInternalBlock : public EbmlBinary {
|
||||
public:
|
||||
KaxInternalBlock(EBML_DEF_CONS EBML_DEF_SEP bool bSimple EBML_DEF_SEP EBML_EXTRA_PARAM) :EBML_DEF_BINARY_INIT EBML_DEF_SEP bLocalTimecodeUsed(false), mLacing(LACING_AUTO), mInvisible(false)
|
||||
,ParentCluster(NULL), bIsSimple(bSimple), bIsKeyframe(true), bIsDiscardable(false)
|
||||
{}
|
||||
KaxInternalBlock(const KaxInternalBlock & ElementToClone);
|
||||
~KaxInternalBlock();
|
||||
virtual bool ValidateSize() const;
|
||||
|
||||
uint16 TrackNum() const {return TrackNumber;}
|
||||
/*!
|
||||
\todo !!!! This method needs to be changes !
|
||||
*/
|
||||
uint64 GlobalTimecode() const {return Timecode;}
|
||||
|
||||
/*!
|
||||
\note override this function to generate the Data/Size on the fly, unlike the usual binary elements
|
||||
*/
|
||||
filepos_t UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
|
||||
filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
|
||||
|
||||
/*!
|
||||
\brief Only read the head of the Block (not internal data)
|
||||
\note convenient when you are parsing the file quickly
|
||||
*/
|
||||
uint64 ReadInternalHead(IOCallback & input);
|
||||
|
||||
unsigned int NumberFrames() const { return SizeList.size();}
|
||||
DataBuffer & GetBuffer(unsigned int iIndex) {return *myBuffers[iIndex];}
|
||||
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing = LACING_AUTO, bool invisible = false);
|
||||
|
||||
/*!
|
||||
\brief release all the frames of all Blocks
|
||||
*/
|
||||
void ReleaseFrames();
|
||||
|
||||
void SetParent(KaxCluster & aParentCluster);
|
||||
|
||||
/*!
|
||||
\return Returns the lacing type that produces the smallest footprint.
|
||||
*/
|
||||
LacingType GetBestLacingType() const;
|
||||
|
||||
/*!
|
||||
\param FrameNumber 0 for the first frame
|
||||
\return the position in the stream for a given frame
|
||||
\note return -1 if the position doesn't exist
|
||||
*/
|
||||
int64 GetDataPosition(size_t FrameNumber = 0);
|
||||
|
||||
/*!
|
||||
\param FrameNumber 0 for the first frame
|
||||
\return the size of a given frame
|
||||
\note return -1 if the position doesn't exist
|
||||
*/
|
||||
int64 GetFrameSize(size_t FrameNumber = 0);
|
||||
|
||||
bool IsInvisible() const { return mInvisible; }
|
||||
|
||||
uint64 ClusterPosition() const;
|
||||
|
||||
protected:
|
||||
std::vector<DataBuffer *> myBuffers;
|
||||
std::vector<int32> SizeList;
|
||||
uint64 Timecode; // temporary timecode of the first frame, non scaled
|
||||
int16 LocalTimecode;
|
||||
bool bLocalTimecodeUsed;
|
||||
uint16 TrackNumber;
|
||||
LacingType mLacing;
|
||||
bool mInvisible;
|
||||
uint64 FirstFrameLocation;
|
||||
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false);
|
||||
|
||||
KaxCluster * ParentCluster;
|
||||
bool bIsSimple;
|
||||
bool bIsKeyframe;
|
||||
bool bIsDiscardable;
|
||||
};
|
||||
|
||||
DECLARE_MKX_CONTEXT(KaxBlock);
|
||||
class MATROSKA_DLL_API KaxBlock : public KaxInternalBlock {
|
||||
public:
|
||||
KaxBlock(EBML_EXTRA_PARAM) :KaxInternalBlock(EBML_DEF_BINARY_CTX(KaxBlock)EBML_DEF_SEP false EBML_DEF_SEP EBML_EXTRA_CALL) {}
|
||||
EBML_CONCRETE_CLASS(KaxBlock)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_CONTEXT(KaxSimpleBlock);
|
||||
class MATROSKA_DLL_API KaxSimpleBlock : public KaxInternalBlock {
|
||||
public:
|
||||
KaxSimpleBlock(EBML_EXTRA_PARAM) :KaxInternalBlock(EBML_DEF_BINARY_CTX(KaxSimpleBlock)EBML_DEF_SEP true EBML_DEF_SEP EBML_EXTRA_CALL) {}
|
||||
|
||||
void SetKeyframe(bool b_keyframe) { bIsKeyframe = b_keyframe; }
|
||||
void SetDiscardable(bool b_discard) { bIsDiscardable = b_discard; }
|
||||
|
||||
bool IsKeyframe() const { return bIsKeyframe; }
|
||||
bool IsDiscardable() const { return bIsDiscardable; }
|
||||
|
||||
operator KaxInternalBlock &() { return *this; }
|
||||
|
||||
EBML_CONCRETE_CLASS(KaxSimpleBlock)
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
class MATROSKA_DLL_API KaxBlockBlob {
|
||||
public:
|
||||
KaxBlockBlob(BlockBlobType sblock_mode) :ParentCluster(NULL), SimpleBlockMode(sblock_mode) {
|
||||
bUseSimpleBlock = (sblock_mode != BLOCK_BLOB_NO_SIMPLE);
|
||||
Block.group = NULL;
|
||||
}
|
||||
|
||||
~KaxBlockBlob() {
|
||||
#if MATROSKA_VERSION >= 2
|
||||
if (bUseSimpleBlock)
|
||||
delete Block.simpleblock;
|
||||
else
|
||||
#endif // MATROSKA_VERSION
|
||||
delete Block.group;
|
||||
}
|
||||
|
||||
operator KaxBlockGroup &();
|
||||
operator const KaxBlockGroup &() const;
|
||||
#if MATROSKA_VERSION >= 2
|
||||
operator KaxSimpleBlock &();
|
||||
#endif
|
||||
operator KaxInternalBlock &();
|
||||
operator const KaxInternalBlock &() const;
|
||||
|
||||
void SetBlockGroup( KaxBlockGroup &BlockRef );
|
||||
|
||||
void SetBlockDuration(uint64 TimeLength);
|
||||
|
||||
void SetParent(KaxCluster & aParentCluster);
|
||||
bool AddFrameAuto(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing = LACING_AUTO, const KaxBlockBlob * PastBlock = NULL, const KaxBlockBlob * ForwBlock = NULL);
|
||||
|
||||
bool IsSimpleBlock() const {return bUseSimpleBlock;}
|
||||
|
||||
bool ReplaceSimpleByGroup();
|
||||
protected:
|
||||
KaxCluster * ParentCluster;
|
||||
union {
|
||||
KaxBlockGroup *group;
|
||||
#if MATROSKA_VERSION >= 2
|
||||
KaxSimpleBlock *simpleblock;
|
||||
#endif // MATROSKA_VERSION
|
||||
} Block;
|
||||
bool bUseSimpleBlock;
|
||||
BlockBlobType SimpleBlockMode;
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxBlockDuration)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_BINARY_CONS(KaxBlockVirtual)
|
||||
public:
|
||||
~KaxBlockVirtual();
|
||||
|
||||
/*!
|
||||
\note override this function to generate the Data/Size on the fly, unlike the usual binary elements
|
||||
*/
|
||||
filepos_t UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
|
||||
|
||||
void SetParent(const KaxCluster & aParentCluster) {ParentCluster = &aParentCluster;}
|
||||
|
||||
protected:
|
||||
uint64 Timecode; // temporary timecode of the first frame if there are more than one
|
||||
uint16 TrackNumber;
|
||||
binary DataBlock[5];
|
||||
|
||||
const KaxCluster * ParentCluster;
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
DECLARE_MKX_BINARY(KaxBlockAdditional)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxBlockAdditions)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxBlockMore)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxBlockAddID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxCodecState)
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_BLOCK_H
|
||||
|
@@ -1,74 +1,103 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxBlockData.h,v 1.10 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_BLOCK_ADDITIONAL_H
|
||||
#define LIBMATROSKA_BLOCK_ADDITIONAL_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "ebml/EbmlSInteger.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
#include "matroska/KaxBlock.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
/*!
|
||||
\brief element used for B frame-likes
|
||||
*/
|
||||
DECLARE_MKX_SINTEGER_CONS(KaxReferenceBlock)
|
||||
public:
|
||||
~KaxReferenceBlock();
|
||||
/*!
|
||||
\brief override this method to compute the timecode value
|
||||
*/
|
||||
virtual filepos_t UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
|
||||
|
||||
const KaxBlockBlob & RefBlock() const;
|
||||
void SetReferencedBlock(const KaxBlockBlob * aRefdBlock);
|
||||
void SetReferencedBlock(const KaxBlockGroup & aRefdBlock);
|
||||
void SetParentBlock(const KaxBlockGroup & aParentBlock) {ParentBlock = &aParentBlock;}
|
||||
|
||||
protected:
|
||||
const KaxBlockBlob * RefdBlock;
|
||||
const KaxBlockGroup * ParentBlock;
|
||||
void SetReferencedTimecode(int64 refTimecode) {*static_cast<EbmlSInteger*>(this) = refTimecode; bTimecodeSet = true;};
|
||||
bool bTimecodeSet;
|
||||
bool bOurBlob;
|
||||
void FreeBlob();
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_BLOCK_ADDITIONAL_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxBlockData.h,v 1.10 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_BLOCK_ADDITIONAL_H
|
||||
#define LIBMATROSKA_BLOCK_ADDITIONAL_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "ebml/EbmlSInteger.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class KaxReferenceBlock;
|
||||
class KaxBlockGroup;
|
||||
class KaxBlockBlob;
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxReferencePriority)
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief element used for B frame-likes
|
||||
*/
|
||||
DECLARE_MKX_SINTEGER_CONS(KaxReferenceBlock)
|
||||
public:
|
||||
/*!
|
||||
\brief override this method to compute the timecode value
|
||||
*/
|
||||
virtual filepos_t UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
|
||||
|
||||
const KaxBlockBlob & RefBlock() const;
|
||||
void SetReferencedBlock(const KaxBlockBlob * aRefdBlock);
|
||||
void SetReferencedBlock(const KaxBlockGroup & aRefdBlock);
|
||||
void SetParentBlock(const KaxBlockGroup & aParentBlock) {ParentBlock = &aParentBlock;}
|
||||
|
||||
protected:
|
||||
const KaxBlockBlob * RefdBlock;
|
||||
const KaxBlockGroup * ParentBlock;
|
||||
void SetReferencedTimecode(int64 refTimecode) {*static_cast<EbmlSInteger*>(this) = refTimecode; bTimecodeSet = true;};
|
||||
bool bTimecodeSet;
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_SINTEGER(KaxReferenceVirtual)
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTimeSlice)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxSlices)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxSliceLaceNumber)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxSliceFrameNumber)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxSliceBlockAddID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxSliceDelay)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxSliceDuration)
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_BLOCK_ADDITIONAL_H
|
||||
|
@@ -19,9 +19,9 @@
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -35,6 +35,103 @@
|
||||
#ifndef LIBMATROSKA_CHAPTERS_H
|
||||
#define LIBMATROSKA_CHAPTERS_H
|
||||
|
||||
#include "matroska/KaxSemantic.h"
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "ebml/EbmlUnicodeString.h"
|
||||
#include "ebml/EbmlString.h"
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_MASTER(KaxChapters)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxEditionEntry)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxEditionUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxEditionFlagHidden)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxEditionFlagDefault)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxEditionFlagOrdered)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxChapterAtom)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterTimeStart)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterTimeEnd)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterFlagHidden)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterFlagEnabled)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxChapterSegmentUID)
|
||||
public:
|
||||
virtual bool ValidateSize() const { return IsFiniteSize() && (GetSize() == 16);}
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxChapterSegmentEditionUID)
|
||||
public:
|
||||
virtual bool ValidateSize() const { return IsFiniteSize() && (GetSize() == 16);}
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterPhysicalEquiv)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxChapterTrack)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterTrackNumber)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxChapterDisplay)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxChapterString)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxChapterLanguage)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxChapterCountry)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxChapterProcess)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterProcessCodecID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxChapterProcessPrivate)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxChapterProcessCommand)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterProcessTime)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxChapterProcessData)
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CHAPTERS_H
|
||||
|
@@ -1,159 +1,160 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxCluster.h,v 1.10 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author Julien Coloos <suiryc @ users.sf.net>
|
||||
|
||||
*/
|
||||
#ifndef LIBMATROSKA_CLUSTER_H
|
||||
#define LIBMATROSKA_CLUSTER_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "matroska/KaxTracks.h"
|
||||
#include "matroska/KaxBlock.h"
|
||||
#include "matroska/KaxCues.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class KaxSegment;
|
||||
|
||||
DECLARE_MKX_MASTER_CONS(KaxCluster)
|
||||
public:
|
||||
/*!
|
||||
\brief Addition of a frame without references
|
||||
|
||||
\param the timecode is expressed in nanoseconds, relative to the beggining of the Segment
|
||||
*/
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, LacingType lacing = LACING_AUTO);
|
||||
/*!
|
||||
\brief Addition of a frame with a backward reference (P frame)
|
||||
\param the timecode is expressed in nanoseconds, relative to the beggining of the Segment
|
||||
|
||||
*/
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, LacingType lacing = LACING_AUTO);
|
||||
|
||||
/*!
|
||||
\brief Addition of a frame with a backward+forward reference (B frame)
|
||||
\param the timecode is expressed in nanoseconds, relative to the beggining of the Segment
|
||||
|
||||
*/
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing = LACING_AUTO);
|
||||
|
||||
/*!
|
||||
\brief Render the data to the stream and retrieve the position of BlockGroups for later cue entries
|
||||
*/
|
||||
filepos_t Render(IOCallback & output, KaxCues & CueToUpdate, bool bSaveDefault = false);
|
||||
|
||||
/*!
|
||||
\return the global timecode of this Cluster
|
||||
*/
|
||||
uint64 GlobalTimecode() const;
|
||||
|
||||
KaxBlockGroup & GetNewBlock();
|
||||
|
||||
/*!
|
||||
\brief release all the frames of all Blocks
|
||||
\note this is a convenience to be able to keep Clusters+Blocks in memory (for future reference) withouht being a memory hog
|
||||
*/
|
||||
void ReleaseFrames();
|
||||
|
||||
/*!
|
||||
\brief return the position offset compared to the beggining of the Segment
|
||||
*/
|
||||
uint64 GetPosition() const;
|
||||
|
||||
void SetParent(const KaxSegment & aParentSegment) {ParentSegment = &aParentSegment;}
|
||||
|
||||
void SetPreviousTimecode(uint64 aPreviousTimecode, int64 aTimecodeScale) {
|
||||
bPreviousTimecodeIsSet = true;
|
||||
PreviousTimecode = aPreviousTimecode;
|
||||
SetGlobalTimecodeScale(aTimecodeScale);
|
||||
}
|
||||
|
||||
/*!
|
||||
\note dirty hack to get the mandatory data back after reading
|
||||
\todo there should be a better way to get mandatory data
|
||||
*/
|
||||
void InitTimecode(uint64 aTimecode, int64 aTimecodeScale) {
|
||||
SetGlobalTimecodeScale(aTimecodeScale);
|
||||
MinTimecode = MaxTimecode = PreviousTimecode = aTimecode * TimecodeScale;
|
||||
bFirstFrameInside = bPreviousTimecodeIsSet = true;
|
||||
}
|
||||
|
||||
int16 GetBlockLocalTimecode(uint64 GlobalTimecode) const;
|
||||
|
||||
uint64 GetBlockGlobalTimecode(int16 LocalTimecode);
|
||||
|
||||
void SetGlobalTimecodeScale(uint64 aGlobalTimecodeScale) {
|
||||
TimecodeScale = aGlobalTimecodeScale;
|
||||
bTimecodeScaleIsSet = true;
|
||||
}
|
||||
uint64 GlobalTimecodeScale() const {
|
||||
assert(bTimecodeScaleIsSet);
|
||||
return TimecodeScale;
|
||||
}
|
||||
|
||||
bool SetSilentTrackUsed()
|
||||
{
|
||||
bSilentTracksUsed = true;
|
||||
return FindFirstElt(EBML_INFO(KaxClusterSilentTracks), true) != NULL;
|
||||
}
|
||||
|
||||
bool AddBlockBlob(KaxBlockBlob * NewBlob);
|
||||
|
||||
const KaxSegment *GetParentSegment() const { return ParentSegment; }
|
||||
|
||||
protected:
|
||||
KaxBlockBlob * currentNewBlob;
|
||||
std::vector<KaxBlockBlob*> Blobs;
|
||||
KaxBlockGroup * currentNewBlock;
|
||||
const KaxSegment * ParentSegment;
|
||||
|
||||
uint64 MinTimecode, MaxTimecode, PreviousTimecode;
|
||||
int64 TimecodeScale;
|
||||
|
||||
bool bFirstFrameInside; // used to speed research
|
||||
bool bPreviousTimecodeIsSet;
|
||||
bool bTimecodeScaleIsSet;
|
||||
bool bSilentTracksUsed;
|
||||
|
||||
/*!
|
||||
\note method used internally
|
||||
*/
|
||||
bool AddFrameInternal(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup * PastBlock, const KaxBlockGroup * ForwBlock, LacingType lacing);
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CLUSTER_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxCluster.h,v 1.10 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author Julien Coloos <suiryc @ users.sf.net>
|
||||
|
||||
*/
|
||||
#ifndef LIBMATROSKA_CLUSTER_H
|
||||
#define LIBMATROSKA_CLUSTER_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "matroska/KaxTracks.h"
|
||||
#include "matroska/KaxBlock.h"
|
||||
#include "matroska/KaxCues.h"
|
||||
#include "matroska/KaxClusterData.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class KaxSegment;
|
||||
|
||||
DECLARE_MKX_MASTER_CONS(KaxCluster)
|
||||
public:
|
||||
/*!
|
||||
\brief Addition of a frame without references
|
||||
|
||||
\param the timecode is expressed in nanoseconds, relative to the beggining of the Segment
|
||||
*/
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, LacingType lacing = LACING_AUTO);
|
||||
/*!
|
||||
\brief Addition of a frame with a backward reference (P frame)
|
||||
\param the timecode is expressed in nanoseconds, relative to the beggining of the Segment
|
||||
|
||||
*/
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, LacingType lacing = LACING_AUTO);
|
||||
|
||||
/*!
|
||||
\brief Addition of a frame with a backward+forward reference (B frame)
|
||||
\param the timecode is expressed in nanoseconds, relative to the beggining of the Segment
|
||||
|
||||
*/
|
||||
bool AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing = LACING_AUTO);
|
||||
|
||||
/*!
|
||||
\brief Render the data to the stream and retrieve the position of BlockGroups for later cue entries
|
||||
*/
|
||||
filepos_t Render(IOCallback & output, KaxCues & CueToUpdate, bool bSaveDefault = false);
|
||||
|
||||
/*!
|
||||
\return the global timecode of this Cluster
|
||||
*/
|
||||
uint64 GlobalTimecode() const;
|
||||
|
||||
KaxBlockGroup & GetNewBlock();
|
||||
|
||||
/*!
|
||||
\brief release all the frames of all Blocks
|
||||
\note this is a convenience to be able to keep Clusters+Blocks in memory (for future reference) withouht being a memory hog
|
||||
*/
|
||||
void ReleaseFrames();
|
||||
|
||||
/*!
|
||||
\brief return the position offset compared to the beggining of the Segment
|
||||
*/
|
||||
uint64 GetPosition() const;
|
||||
|
||||
void SetParent(const KaxSegment & aParentSegment) {ParentSegment = &aParentSegment;}
|
||||
|
||||
void SetPreviousTimecode(uint64 aPreviousTimecode, int64 aTimecodeScale) {
|
||||
bPreviousTimecodeIsSet = true;
|
||||
PreviousTimecode = aPreviousTimecode;
|
||||
SetGlobalTimecodeScale(aTimecodeScale);
|
||||
}
|
||||
|
||||
/*!
|
||||
\note dirty hack to get the mandatory data back after reading
|
||||
\todo there should be a better way to get mandatory data
|
||||
*/
|
||||
void InitTimecode(uint64 aTimecode, int64 aTimecodeScale) {
|
||||
SetGlobalTimecodeScale(aTimecodeScale);
|
||||
MinTimecode = MaxTimecode = PreviousTimecode = aTimecode * TimecodeScale;
|
||||
bFirstFrameInside = bPreviousTimecodeIsSet = true;
|
||||
}
|
||||
|
||||
int16 GetBlockLocalTimecode(uint64 GlobalTimecode) const;
|
||||
|
||||
uint64 GetBlockGlobalTimecode(int16 LocalTimecode);
|
||||
|
||||
void SetGlobalTimecodeScale(uint64 aGlobalTimecodeScale) {
|
||||
TimecodeScale = aGlobalTimecodeScale;
|
||||
bTimecodeScaleIsSet = true;
|
||||
}
|
||||
uint64 GlobalTimecodeScale() const {
|
||||
assert(bTimecodeScaleIsSet);
|
||||
return TimecodeScale;
|
||||
}
|
||||
|
||||
bool SetSilentTrackUsed()
|
||||
{
|
||||
bSilentTracksUsed = true;
|
||||
return FindFirstElt(EBML_INFO(KaxClusterSilentTracks), true) != NULL;
|
||||
}
|
||||
|
||||
bool AddBlockBlob(KaxBlockBlob * NewBlob);
|
||||
|
||||
const KaxSegment *GetParentSegment() const { return ParentSegment; }
|
||||
|
||||
protected:
|
||||
KaxBlockBlob * currentNewBlob;
|
||||
std::vector<KaxBlockBlob*> Blobs;
|
||||
KaxBlockGroup * currentNewBlock;
|
||||
const KaxSegment * ParentSegment;
|
||||
|
||||
uint64 MinTimecode, MaxTimecode, PreviousTimecode;
|
||||
int64 TimecodeScale;
|
||||
|
||||
bool bFirstFrameInside; // used to speed research
|
||||
bool bPreviousTimecodeIsSet;
|
||||
bool bTimecodeScaleIsSet;
|
||||
bool bSilentTracksUsed;
|
||||
|
||||
/*!
|
||||
\note method used internally
|
||||
*/
|
||||
bool AddFrameInternal(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup * PastBlock, const KaxBlockGroup * ForwBlock, LacingType lacing);
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CLUSTER_H
|
||||
|
@@ -1,40 +1,64 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxClusterData.h,v 1.9 2004/04/21 19:50:10 mosu Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_CLUSTER_DATA_H
|
||||
#define LIBMATROSKA_CLUSTER_DATA_H
|
||||
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
#endif // LIBMATROSKA_CLUSTER_DATA_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxClusterData.h,v 1.9 2004/04/21 19:50:10 mosu Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_CLUSTER_DATA_H
|
||||
#define LIBMATROSKA_CLUSTER_DATA_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxClusterTimecode)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxClusterSilentTracks)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxClusterSilentTrackNumber)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxClusterPosition)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxClusterPrevSize)
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CLUSTER_DATA_H
|
||||
|
@@ -1,70 +1,70 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxConfig.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author Moritz Bunkus <moritz @ bunkus.org>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_CONFIG_H
|
||||
#define LIBMATROSKA_CONFIG_H
|
||||
|
||||
#define LIBMATROSKA_NAMESPACE libmatroska
|
||||
|
||||
#if defined(NO_NAMESPACE) // for older GCC
|
||||
# define START_LIBMATROSKA_NAMESPACE
|
||||
# define END_LIBMATROSKA_NAMESPACE
|
||||
#else // NO_NAMESPACE
|
||||
# define START_LIBMATROSKA_NAMESPACE namespace LIBMATROSKA_NAMESPACE {
|
||||
# define END_LIBMATROSKA_NAMESPACE };
|
||||
#endif // NO_NAMESPACE
|
||||
|
||||
// There are special implementations for certain platforms. For example on Windows
|
||||
// we use the Win32 file API. here we set the appropriate macros.
|
||||
#if defined(_WIN32)||defined(WIN32)
|
||||
|
||||
# if defined(MATROSKA_DLL)
|
||||
# if defined(MATROSKA_DLL_EXPORT)
|
||||
# define MATROSKA_DLL_API __declspec(dllexport)
|
||||
# else // MATROSKA_DLL_EXPORT
|
||||
# define MATROSKA_DLL_API __declspec(dllimport)
|
||||
# endif // MATROSKA_DLL_EXPORT
|
||||
# else // MATROSKA_DLL
|
||||
# define MATROSKA_DLL_API
|
||||
# endif // MATROSKA_DLL
|
||||
|
||||
#else
|
||||
# define MATROSKA_DLL_API
|
||||
#endif
|
||||
|
||||
#if !defined(MATROSKA_VERSION)
|
||||
#define MATROSKA_VERSION 2
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
|
||||
#endif // LIBMATROSKA_CONFIG_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxConfig.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author Moritz Bunkus <moritz @ bunkus.org>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_CONFIG_H
|
||||
#define LIBMATROSKA_CONFIG_H
|
||||
|
||||
#define LIBMATROSKA_NAMESPACE libmatroska
|
||||
|
||||
#if defined(NO_NAMESPACE) // for older GCC
|
||||
# define START_LIBMATROSKA_NAMESPACE
|
||||
# define END_LIBMATROSKA_NAMESPACE
|
||||
#else // NO_NAMESPACE
|
||||
# define START_LIBMATROSKA_NAMESPACE namespace LIBMATROSKA_NAMESPACE {
|
||||
# define END_LIBMATROSKA_NAMESPACE };
|
||||
#endif // NO_NAMESPACE
|
||||
|
||||
// There are special implementations for certain platforms. For example on Windows
|
||||
// we use the Win32 file API. here we set the appropriate macros.
|
||||
#if defined(_WIN32)||defined(WIN32)
|
||||
|
||||
# if defined(MATROSKA_DLL)
|
||||
# if defined(MATROSKA_DLL_EXPORT)
|
||||
# define MATROSKA_DLL_API __declspec(dllexport)
|
||||
# else // MATROSKA_DLL_EXPORT
|
||||
# define MATROSKA_DLL_API __declspec(dllimport)
|
||||
# endif // MATROSKA_DLL_EXPORT
|
||||
# else // MATROSKA_DLL
|
||||
# define MATROSKA_DLL_API
|
||||
# endif // MATROSKA_DLL
|
||||
|
||||
#else
|
||||
# define MATROSKA_DLL_API
|
||||
#endif
|
||||
|
||||
#if !defined(MATROSKA_VERSION)
|
||||
#define MATROSKA_VERSION 2
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
|
||||
#endif // LIBMATROSKA_CONFIG_H
|
||||
|
@@ -1,40 +1,95 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxContentEncoding.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_CONTENT_ENCODING_H
|
||||
#define LIBMATROSKA_CONTENT_ENCODING_H
|
||||
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
#endif // LIBMATROSKA_CONTENT_ENCODING_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxContentEncoding.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Moritz Bunkus <moritz @ bunkus.org>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_CONTENT_ENCODING_H
|
||||
#define LIBMATROSKA_CONTENT_ENCODING_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_MASTER(KaxContentEncodings)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxContentEncoding)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxContentEncodingOrder)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxContentEncodingScope)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxContentEncodingType)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxContentCompression)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxContentCompAlgo)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxContentCompSettings)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxContentEncryption)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxContentEncAlgo)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxContentEncKeyID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxContentSignature)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxContentSigKeyID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxContentSigAlgo)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxContentSigHashAlgo)
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CONTENT_ENCODING_H
|
||||
|
@@ -1,103 +1,103 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id$
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_CONTEXTS_H
|
||||
#define LIBMATROSKA_CONTEXTS_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlElement.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxMatroska_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxSegment_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxAttachments_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxAttached_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxFileDescription_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxFileName_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxMimeType_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxFileData_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxChapters_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCluster_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTags_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTag_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxBlockGroup_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxReferencePriority_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxReferenceBlock_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxReferenceVirtual_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCues_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxInfo_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxSeekHead_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTracks_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackEntry_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackNumber_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackType_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackFlagEnabled_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackFlagDefault_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackFlagLacing_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackName_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackLanguage_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecID_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecPrivate_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecName_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecSettings_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecInfoURL_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecDownloadURL_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecDecodeAll_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackOverlay_Context;
|
||||
|
||||
#define Context_KaxMatroska KaxMatroska_Context
|
||||
#define Context_KaxSegment KaxSegment_Context
|
||||
#define Context_KaxTrackEntry KaxTrackEntry_Context
|
||||
#define Context_KaxTracks KaxTracks_Context
|
||||
#define Context_KaxCluster KaxCluster_Context
|
||||
#define Context_KaxBlockGroup KaxBlockGroup_Context
|
||||
#define Context_KaxInfo KaxInfo_Context
|
||||
#define Context_KaxAttached KaxAttached_Context
|
||||
#define Context_KaxAttachments KaxAttachments_Context
|
||||
#define Context_KaxChapters KaxChapters_Context
|
||||
#define Context_KaxCues KaxCues_Context
|
||||
#define Context_KaxTags KaxTags_Context
|
||||
#define Context_KaxSeekHead KaxSeekHead_Context
|
||||
#define Context_KaxTag KaxTag_Context
|
||||
#define Context_KaxTagCommercial KaxTagCommercial_Context
|
||||
|
||||
extern MATROSKA_DLL_API const EbmlSemanticContext & GetKaxGlobal_Context();
|
||||
//extern MATROSKA_DLL_API const EbmlSemanticContext & GetKaxTagsGlobal_Context();
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CONTEXTS_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxContexts.h,v 1.6 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_CONTEXTS_H
|
||||
#define LIBMATROSKA_CONTEXTS_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlElement.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxMatroska_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxSegment_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxAttachments_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxAttached_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxFileDescription_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxFileName_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxMimeType_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxFileData_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxChapters_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCluster_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTags_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTag_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxBlockGroup_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxReferencePriority_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxReferenceBlock_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxReferenceVirtual_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCues_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxInfo_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxSeekHead_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTracks_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackEntry_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackNumber_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackType_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackFlagEnabled_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackFlagDefault_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackFlagLacing_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackName_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackLanguage_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecID_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecPrivate_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecName_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecSettings_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecInfoURL_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecDownloadURL_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxCodecDecodeAll_Context;
|
||||
extern const EbmlSemanticContext MATROSKA_DLL_API KaxTrackOverlay_Context;
|
||||
|
||||
#define Context_KaxMatroska KaxMatroska_Context
|
||||
#define Context_KaxSegment KaxSegment_Context
|
||||
#define Context_KaxTrackEntry KaxTrackEntry_Context
|
||||
#define Context_KaxTracks KaxTracks_Context
|
||||
#define Context_KaxCluster KaxCluster_Context
|
||||
#define Context_KaxBlockGroup KaxBlockGroup_Context
|
||||
#define Context_KaxInfo KaxInfo_Context
|
||||
#define Context_KaxAttached KaxAttached_Context
|
||||
#define Context_KaxAttachments KaxAttachments_Context
|
||||
#define Context_KaxChapters KaxChapters_Context
|
||||
#define Context_KaxCues KaxCues_Context
|
||||
#define Context_KaxTags KaxTags_Context
|
||||
#define Context_KaxSeekHead KaxSeekHead_Context
|
||||
#define Context_KaxTag KaxTag_Context
|
||||
#define Context_KaxTagCommercial KaxTagCommercial_Context
|
||||
|
||||
extern const EbmlSemanticContext & MATROSKA_DLL_API GetKaxGlobal_Context();
|
||||
//extern const EbmlSemanticContext & MATROSKA_DLL_API GetKaxTagsGlobal_Context();
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CONTEXTS_H
|
||||
|
@@ -1,91 +1,91 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxCues.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_CUES_H
|
||||
#define LIBMATROSKA_CUES_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "matroska/KaxBlock.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class KaxCuePoint;
|
||||
|
||||
DECLARE_MKX_MASTER(KaxCues)
|
||||
public:
|
||||
~KaxCues();
|
||||
|
||||
//bool AddBlockGroup(const KaxBlockGroup & BlockReference); // deprecated
|
||||
bool AddBlockBlob(const KaxBlockBlob & BlockReference);
|
||||
|
||||
/*!
|
||||
\brief Indicate that the position for this Block is set
|
||||
*/
|
||||
void PositionSet(const KaxBlockGroup & BlockReference);
|
||||
void PositionSet(const KaxBlockBlob & BlockReference);
|
||||
|
||||
/*!
|
||||
\brief override to sort by timecode/track
|
||||
*/
|
||||
filepos_t Render(IOCallback & output, bool bSaveDefault = false) {
|
||||
Sort();
|
||||
return EbmlMaster::Render(output, bSaveDefault);
|
||||
}
|
||||
|
||||
uint64 GetTimecodePosition(uint64 aTimecode) const;
|
||||
const KaxCuePoint * GetTimecodePoint(uint64 aTimecode) const;
|
||||
|
||||
void SetGlobalTimecodeScale(uint64 aGlobalTimecodeScale) {
|
||||
mGlobalTimecodeScale = aGlobalTimecodeScale;
|
||||
bGlobalTimecodeScaleIsSet = true;
|
||||
}
|
||||
uint64 GlobalTimecodeScale() const {
|
||||
assert(bGlobalTimecodeScaleIsSet);
|
||||
return mGlobalTimecodeScale;
|
||||
}
|
||||
|
||||
protected:
|
||||
std::vector<const KaxBlockBlob *> myTempReferences;
|
||||
bool bGlobalTimecodeScaleIsSet;
|
||||
uint64 mGlobalTimecodeScale;
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CUES_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxCues.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_CUES_H
|
||||
#define LIBMATROSKA_CUES_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "matroska/KaxBlock.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class KaxCuePoint;
|
||||
|
||||
DECLARE_MKX_MASTER(KaxCues)
|
||||
public:
|
||||
~KaxCues();
|
||||
|
||||
bool AddBlockGroup(const KaxBlockGroup & BlockReference);
|
||||
bool AddBlockBlob(const KaxBlockBlob & BlockReference);
|
||||
|
||||
/*!
|
||||
\brief Indicate that the position for this Block is set
|
||||
*/
|
||||
void PositionSet(const KaxBlockGroup & BlockReference);
|
||||
void PositionSet(const KaxBlockBlob & BlockReference);
|
||||
|
||||
/*!
|
||||
\brief override to sort by timecode/track
|
||||
*/
|
||||
filepos_t Render(IOCallback & output, bool bSaveDefault = false) {
|
||||
Sort();
|
||||
return EbmlMaster::Render(output, bSaveDefault);
|
||||
}
|
||||
|
||||
uint64 GetTimecodePosition(uint64 aTimecode) const;
|
||||
const KaxCuePoint * GetTimecodePoint(uint64 aTimecode) const;
|
||||
|
||||
void SetGlobalTimecodeScale(uint64 aGlobalTimecodeScale) {
|
||||
mGlobalTimecodeScale = aGlobalTimecodeScale;
|
||||
bGlobalTimecodeScaleIsSet = true;
|
||||
}
|
||||
uint64 GlobalTimecodeScale() const {
|
||||
assert(bGlobalTimecodeScaleIsSet);
|
||||
return mGlobalTimecodeScale;
|
||||
}
|
||||
|
||||
protected:
|
||||
std::vector<const KaxBlockBlob *> myTempReferences;
|
||||
bool bGlobalTimecodeScaleIsSet;
|
||||
uint64 mGlobalTimecodeScale;
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CUES_H
|
||||
|
@@ -1,77 +1,104 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxCuesData.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_CUES_DATA_H
|
||||
#define LIBMATROSKA_CUES_DATA_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class KaxBlockGroup;
|
||||
class KaxBlockBlob;
|
||||
class KaxCueTrackPositions;
|
||||
class KaxInternalBlock;
|
||||
|
||||
DECLARE_MKX_MASTER(KaxCuePoint)
|
||||
public:
|
||||
void PositionSet(const KaxBlockGroup & BlockReference, uint64 GlobalTimecodeScale);
|
||||
void PositionSet(const KaxBlockBlob & BlobReference, uint64 GlobalTimecodeScale);
|
||||
|
||||
virtual bool IsSmallerThan(const EbmlElement *Cmp) const;
|
||||
|
||||
const KaxCueTrackPositions * GetSeekPosition() const;
|
||||
bool Timecode(uint64 & aTimecode, uint64 GlobalTimecodeScale) const;
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxCueTrackPositions)
|
||||
public:
|
||||
uint64 ClusterPosition() const;
|
||||
uint16 TrackNumber() const;
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_MASTER(KaxCueReference)
|
||||
public:
|
||||
void AddReference(const KaxBlockGroup & BlockReferenced, uint64 GlobalTimecodeScale);
|
||||
void AddReference(const KaxBlockBlob & BlockReferenced, uint64 GlobalTimecodeScale);
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CUES_DATA_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxCuesData.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_CUES_DATA_H
|
||||
#define LIBMATROSKA_CUES_DATA_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class KaxBlockGroup;
|
||||
class KaxBlockBlob;
|
||||
class KaxCueTrackPositions;
|
||||
class KaxInternalBlock;
|
||||
|
||||
DECLARE_MKX_MASTER(KaxCuePoint)
|
||||
public:
|
||||
void PositionSet(const KaxBlockGroup & BlockReference, uint64 GlobalTimecodeScale);
|
||||
void PositionSet(const KaxBlockBlob & BlobReference, uint64 GlobalTimecodeScale);
|
||||
|
||||
virtual bool IsSmallerThan(const EbmlElement *Cmp) const;
|
||||
|
||||
const KaxCueTrackPositions * GetSeekPosition() const;
|
||||
bool Timecode(uint64 & aTimecode, uint64 GlobalTimecodeScale) const;
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueTime)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxCueTrackPositions)
|
||||
public:
|
||||
uint64 ClusterPosition() const;
|
||||
uint16 TrackNumber() const;
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueTrack)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueClusterPosition)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueBlockNumber)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_UINTEGER(KaxCueCodecState)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxCueReference)
|
||||
public:
|
||||
void AddReference(const KaxBlockGroup & BlockReferenced, uint64 GlobalTimecodeScale);
|
||||
void AddReference(const KaxBlockBlob & BlockReferenced, uint64 GlobalTimecodeScale);
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueRefTime)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueRefCluster)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueRefNumber)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueRefCodecState)
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CUES_DATA_H
|
||||
|
@@ -17,9 +17,9 @@
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -36,13 +36,12 @@
|
||||
#include "ebml/EbmlVersion.h"
|
||||
#include "ebml/EbmlElement.h"
|
||||
|
||||
#if defined(HAVE_EBML2) || defined(HAS_EBML2)
|
||||
#if defined(HAVE_EBML2)
|
||||
#define DEFINE_MKX_CONTEXT(a) DEFINE_xxx_CONTEXT(a,EBML_SemanticGlobal)
|
||||
#define DEFINE_MKX_MASTER_CONS(a,b,c,d,e) DEFINE_xxx_MASTER_CONS(a,b,d,e,EBML_SemanticGlobal)
|
||||
#define DEFINE_MKX_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,d,e,EBML_SemanticGlobal)
|
||||
#define DEFINE_MKX_MASTER_ORPHAN(a,b,c,d) DEFINE_xxx_MASTER_ORPHAN(a,b,d,EBML_SemanticGlobal)
|
||||
#define DEFINE_MKX_UINTEGER_DEF(a,b,c,d,e,v) DEFINE_xxx_UINTEGER_DEF(a,b,d,e,EBML_SemanticGlobal,v)
|
||||
#define DEFINE_MKX_SINTEGER_DEF(a,b,c,d,e,v) DEFINE_xxx_SINTEGER_DEF(a,b,d,e,EBML_SemanticGlobal,v)
|
||||
#define DEFINE_MKX_UINTEGER(a,b,c,d,e) DEFINE_xxx_UINTEGER(a,b,d,e,EBML_SemanticGlobal)
|
||||
#define DEFINE_MKX_SINTEGER(a,b,c,d,e) DEFINE_xxx_SINTEGER(a,b,d,e,EBML_SemanticGlobal)
|
||||
#define DEFINE_MKX_SINTEGER_CONS(a,b,c,d,e) DEFINE_xxx_SINTEGER_CONS(a,b,d,e,EBML_SemanticGlobal)
|
||||
@@ -131,7 +130,6 @@ class MATROSKA_DLL_API x : public EbmlMaster { \
|
||||
#define DEFINE_MKX_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,c,d,e,*GetKaxGlobal_Context)
|
||||
#define DEFINE_MKX_MASTER_ORPHAN(a,b,c,d) DEFINE_xxx_MASTER_ORPHAN(a,b,c,d,*GetKaxGlobal_Context)
|
||||
#define DEFINE_MKX_UINTEGER_DEF(a,b,c,d,e,v) DEFINE_xxx_UINTEGER_DEF(a,b,c,d,e,*GetKaxGlobal_Context,v)
|
||||
#define DEFINE_MKX_SINTEGER_DEF(a,b,c,d,e,v) DEFINE_xxx_SINTEGER_DEF(a,b,c,d,e,*GetKaxGlobal_Context,v)
|
||||
#define DEFINE_MKX_UINTEGER(a,b,c,d,e) DEFINE_xxx_CLASS(a,b,c,d,e,*GetKaxGlobal_Context)
|
||||
#define DEFINE_MKX_SINTEGER(a,b,c,d,e) DEFINE_xxx_CLASS(a,b,c,d,e,*GetKaxGlobal_Context)
|
||||
#define DEFINE_MKX_STRING_DEF(a,b,c,d,e,v) DEFINE_xxx_STRING_DEF(a,b,c,d,e,*GetKaxGlobal_Context,v)
|
||||
|
@@ -1,40 +1,58 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxInfo.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_INFO_H
|
||||
#define LIBMATROSKA_INFO_H
|
||||
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
#endif // LIBMATROSKA_INFO_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxInfo.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_INFO_H
|
||||
#define LIBMATROSKA_INFO_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlUnicodeString.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_MASTER(KaxInfo)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxMuxingApp)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxWritingApp)
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_INFO_H
|
||||
|
@@ -19,9 +19,9 @@
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -45,12 +45,22 @@
|
||||
#include "ebml/EbmlDate.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_BINARY(KaxSegmentUID)
|
||||
public:
|
||||
#if defined(HAVE_EBML2)
|
||||
KaxSegmentUID(EBML_DEF_CONS EBML_DEF_SEP EBML_EXTRA_PARAM);
|
||||
#endif
|
||||
virtual bool ValidateSize() const { return IsFiniteSize() && (GetSize() == 16);}
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxSegmentFilename)
|
||||
};
|
||||
|
||||
DECLARE_MKX_CONTEXT(KaxPrevUID);
|
||||
class MATROSKA_DLL_API KaxPrevUID : public KaxSegmentUID {
|
||||
public:
|
||||
@@ -61,6 +71,9 @@ class MATROSKA_DLL_API KaxPrevUID : public KaxSegmentUID {
|
||||
EBML_CONCRETE_CLASS(KaxPrevUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxPrevFilename)
|
||||
};
|
||||
|
||||
DECLARE_MKX_CONTEXT(KaxNextUID);
|
||||
class MATROSKA_DLL_API KaxNextUID : public KaxSegmentUID {
|
||||
public:
|
||||
@@ -71,6 +84,38 @@ class MATROSKA_DLL_API KaxNextUID : public KaxSegmentUID {
|
||||
EBML_CONCRETE_CLASS(KaxNextUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxNextFilename)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxSegmentFamily)
|
||||
public:
|
||||
virtual bool ValidateSize() const { return IsFiniteSize() && (GetSize() == 16);}
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxChapterTranslate)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterTranslateCodec)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterTranslateEditionUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxChapterTranslateID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTimecodeScale)
|
||||
};
|
||||
|
||||
DECLARE_MKX_FLOAT(KaxDuration)
|
||||
};
|
||||
|
||||
DECLARE_MKX_DATE(KaxDateUTC)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTitle)
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_INFO_DATA_H
|
||||
|
@@ -19,9 +19,9 @@
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -46,13 +46,7 @@ using namespace LIBEBML_NAMESPACE;
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class KaxSegment;
|
||||
|
||||
DECLARE_MKX_MASTER(KaxSeek)
|
||||
public:
|
||||
int64 Location() const;
|
||||
bool IsEbmlId(const EbmlId & aId) const;
|
||||
bool IsEbmlId(const KaxSeek & aPoint) const;
|
||||
};
|
||||
class KaxSeek;
|
||||
|
||||
DECLARE_MKX_MASTER(KaxSeekHead)
|
||||
public:
|
||||
@@ -66,6 +60,21 @@ DECLARE_MKX_MASTER(KaxSeekHead)
|
||||
KaxSeek * FindNextOf(const KaxSeek &aPrev) const;
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxSeek)
|
||||
public:
|
||||
int64 Location() const;
|
||||
bool IsEbmlId(const EbmlId & aId) const;
|
||||
bool IsEbmlId(const KaxSeek & aPoint) const;
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxSeekID)
|
||||
public:
|
||||
virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() <= 4;}
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxSeekPosition)
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_SEEK_HEAD_H
|
||||
|
@@ -1,62 +1,62 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxSegment.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_SEGMENT_H
|
||||
#define LIBMATROSKA_SEGMENT_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_MASTER_CONS(KaxSegment)
|
||||
public:
|
||||
/*!
|
||||
\brief give the position of the element in the segment
|
||||
*/
|
||||
uint64 GetRelativePosition(const EbmlElement & Elt) const;
|
||||
uint64 GetRelativePosition(uint64 aGlobalPosition) const;
|
||||
|
||||
/*!
|
||||
\brief give the position of the element in the file
|
||||
*/
|
||||
uint64 GetGlobalPosition(uint64 aRelativePosition) const;
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_SEGMENT_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxSegment.h,v 1.8 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_SEGMENT_H
|
||||
#define LIBMATROSKA_SEGMENT_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_MASTER_CONS(KaxSegment)
|
||||
public:
|
||||
/*!
|
||||
\brief give the position of the element in the segment
|
||||
*/
|
||||
uint64 GetRelativePosition(const EbmlElement & Elt) const;
|
||||
uint64 GetRelativePosition(uint64 aGlobalPosition) const;
|
||||
|
||||
/*!
|
||||
\brief give the position of the element in the file
|
||||
*/
|
||||
uint64 GetGlobalPosition(uint64 aRelativePosition) const;
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_SEGMENT_H
|
||||
|
@@ -1,741 +0,0 @@
|
||||
/**********************************************************************
|
||||
** DO NOT EDIT, GENERATED WITH DATA2LIB
|
||||
**
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** Copyright (c) 2002-2010, Matroska (non-profit organisation)
|
||||
** All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
#ifndef LIBMATROSKA_SEMANTIC_H
|
||||
#define LIBMATROSKA_SEMANTIC_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "ebml/EbmlSInteger.h"
|
||||
#include "ebml/EbmlDate.h"
|
||||
#include "ebml/EbmlFloat.h"
|
||||
#include "ebml/EbmlString.h"
|
||||
#include "ebml/EbmlUnicodeString.h"
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_BINARY (KaxSeekID)
|
||||
public:
|
||||
virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() <= 4;}
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxSeekPosition)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxInfo)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_BINARY (KaxSegmentUID)
|
||||
#if defined(HAVE_EBML2) || defined(HAS_EBML2)
|
||||
public:
|
||||
KaxSegmentUID(EBML_DEF_CONS EBML_DEF_SEP EBML_EXTRA_PARAM);
|
||||
#endif
|
||||
public:
|
||||
virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() == 16;}
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxSegmentFilename)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxPrevFilename)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxNextFilename)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxSegmentFamily)
|
||||
public:
|
||||
virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() == 16;}
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxChapterTranslate)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterTranslateEditionUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterTranslateCodec)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxChapterTranslateID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTimecodeScale)
|
||||
};
|
||||
|
||||
DECLARE_MKX_FLOAT(KaxDuration)
|
||||
};
|
||||
|
||||
DECLARE_MKX_DATE (KaxDateUTC)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTitle)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxMuxingApp)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxWritingApp)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxClusterTimecode)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxClusterSilentTracks)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxClusterSilentTrackNumber)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxClusterPosition)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxClusterPrevSize)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxBlockAdditions)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_MASTER(KaxBlockMore)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxBlockAddID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxBlockAdditional)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxBlockDuration)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxReferencePriority)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_SINTEGER(KaxReferenceVirtual)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxCodecState)
|
||||
};
|
||||
|
||||
DECLARE_MKX_SINTEGER(KaxDiscardPadding)
|
||||
};
|
||||
#endif
|
||||
|
||||
DECLARE_MKX_MASTER(KaxSlices)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTimeSlice)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxSliceLaceNumber)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_UINTEGER(KaxSliceFrameNumber)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxSliceBlockAddID)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxSliceDelay)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxSliceDuration)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxReferenceFrame)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxReferenceOffset)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxReferenceTimeCode)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxEncryptedBlock)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
#endif
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTracks)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackNumber)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackType)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_UINTEGER(KaxTrackFlagEnabled)
|
||||
};
|
||||
#endif
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackFlagDefault)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackFlagForced)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackFlagLacing)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackMinCache)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackMaxCache)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackDefaultDuration)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_UINTEGER(KaxTrackDefaultDecodedFieldDuration)
|
||||
};
|
||||
#endif
|
||||
|
||||
DECLARE_MKX_FLOAT(KaxTrackTimecodeScale)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_SINTEGER(KaxTrackOffset)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
#endif
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxMaxBlockAdditionID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTrackName)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTrackLanguage)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxCodecID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxCodecPrivate)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxCodecName)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackAttachmentLink)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_UNISTRING(KaxCodecSettings)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxCodecInfoURL)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxCodecDownloadURL)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCodecDecodeAll)
|
||||
};
|
||||
#endif
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackOverlay)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_UINTEGER(KaxCodecDelay)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxSeekPreRoll)
|
||||
};
|
||||
#endif
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTrackTranslate)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackTranslateEditionUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackTranslateCodec)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxTrackTranslateTrackID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTrackVideo)
|
||||
};
|
||||
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_UINTEGER(KaxVideoFlagInterlaced)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoStereoMode)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoAlphaMode)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxOldStereoMode)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
#endif
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoPixelWidth)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoPixelHeight)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoPixelCropBottom)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoPixelCropTop)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoPixelCropLeft)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoPixelCropRight)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoDisplayWidth)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoDisplayHeight)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoDisplayUnit)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoAspectRatio)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxVideoColourSpace)
|
||||
public:
|
||||
virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() == 4;}
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_FLOAT(KaxVideoGamma)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
|
||||
DECLARE_MKX_FLOAT(KaxVideoFrameRate)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
#endif
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTrackAudio)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_FLOAT(KaxAudioSamplingFreq)
|
||||
};
|
||||
|
||||
DECLARE_MKX_FLOAT(KaxAudioOutputSamplingFreq)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxAudioChannels)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_BINARY (KaxAudioPosition)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
#endif
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxAudioBitDepth)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_MASTER(KaxTrackOperation)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTrackCombinePlanes)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTrackPlane)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackPlaneUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackPlaneType)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTrackJoinBlocks)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackJoinUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrickTrackUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxTrickTrackSegmentUID)
|
||||
public:
|
||||
virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() == 16;}
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrickTrackFlag)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrickMasterTrackUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxTrickMasterTrackSegmentUID)
|
||||
public:
|
||||
virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() == 16;}
|
||||
};
|
||||
#endif
|
||||
|
||||
DECLARE_MKX_MASTER(KaxContentEncodings)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_MASTER(KaxContentEncoding)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxContentEncodingOrder)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxContentEncodingScope)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxContentEncodingType)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxContentCompression)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxContentCompAlgo)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxContentCompSettings)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxContentEncryption)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxContentEncAlgo)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxContentEncKeyID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxContentSignature)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxContentSigKeyID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxContentSigAlgo)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxContentSigHashAlgo)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueTime)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueTrack)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueClusterPosition)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_UINTEGER(KaxCueRelativePosition)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueDuration)
|
||||
};
|
||||
#endif
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueBlockNumber)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_UINTEGER(KaxCueCodecState)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueRefTime)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueRefCluster)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueRefNumber)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCueRefCodecState)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
#endif
|
||||
|
||||
DECLARE_MKX_MASTER(KaxAttachments)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_MASTER(KaxAttached)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxFileDescription)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxFileName)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxMimeType)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxFileData)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxFileUID)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_BINARY (KaxFileReferral)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxFileUsedStartTime)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxFileUsedEndTime)
|
||||
};
|
||||
#endif
|
||||
|
||||
DECLARE_MKX_MASTER(KaxChapters)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_MASTER(KaxEditionEntry)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxEditionUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxEditionFlagHidden)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxEditionFlagDefault)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxEditionFlagOrdered)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxChapterAtom)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterUID)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_UNISTRING(KaxChapterStringUID)
|
||||
};
|
||||
#endif
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterTimeStart)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterTimeEnd)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterFlagHidden)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterFlagEnabled)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxChapterSegmentUID)
|
||||
public:
|
||||
virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() == 16;}
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterSegmentEditionUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterPhysicalEquiv)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxChapterTrack)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterTrackNumber)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxChapterDisplay)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxChapterString)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxChapterLanguage)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxChapterCountry)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxChapterProcess)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterProcessCodecID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxChapterProcessPrivate)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxChapterProcessCommand)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxChapterProcessTime)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxChapterProcessData)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTags)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTag)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagTargets)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagTargetTypeValue)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagTargetType)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagTrackUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagEditionUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagChapterUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagAttachmentUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagSimple)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagName)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagLangue)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagDefault)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagString)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY (KaxTagBinary)
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_SEMANTIC_H
|
@@ -19,9 +19,9 @@
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -30,11 +30,202 @@
|
||||
/*!
|
||||
\file
|
||||
\version \$Id$
|
||||
\author Jory Stone <jcsston @ toughguy.net>
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_TAG_H
|
||||
#define LIBMATROSKA_TAG_H
|
||||
|
||||
#include "matroska/KaxSemantic.h"
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlFloat.h"
|
||||
#include "ebml/EbmlSInteger.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "ebml/EbmlString.h"
|
||||
#include "ebml/EbmlUnicodeString.h"
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTag)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagTargets)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagGeneral)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagGenres)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagAudioSpecific)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagImageSpecific)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagTargetTypeValue)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagTargetType)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagTrackUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagEditionUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagChapterUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagAttachmentUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagArchivalLocation)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxTagAudioEncryption)
|
||||
};
|
||||
|
||||
DECLARE_MKX_FLOAT(KaxTagAudioGain)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagAudioGenre)
|
||||
};
|
||||
|
||||
DECLARE_MKX_FLOAT(KaxTagAudioPeak)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagBibliography)
|
||||
};
|
||||
|
||||
DECLARE_MKX_FLOAT(KaxTagBPM)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagCaptureDPI)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxTagCaptureLightness)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagCapturePaletteSetting)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxTagCaptureSharpness)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagCropped)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagDiscTrack)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagEncoder)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagEncodeSettings)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxTagEqualisation)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagFile)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagInitialKey)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagKeywords)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagLanguage)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagLength)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagMood)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagOfficialAudioFileURL)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagOfficialAudioSourceURL)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagOriginalDimensions)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagOriginalMediaType)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagPlayCounter)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagPlaylistDelay)
|
||||
};
|
||||
|
||||
DECLARE_MKX_SINTEGER(KaxTagPopularimeter)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagProduct)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxTagRating)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagRecordLocation)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagSetPart)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagSource)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagSourceForm)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagSubGenre)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagSubject)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagUnsynchronisedText)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagUserDefinedURL)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxTagVideoGenre)
|
||||
public:
|
||||
virtual bool ValidateSize() const {return IsFiniteSize() && (GetSize() >= 2);}
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagSimple)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagName)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagLangue)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagDefault)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagString)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxTagBinary)
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TAG_H
|
||||
|
304
matroska/KaxTagMulti.h
Normal file
304
matroska/KaxTagMulti.h
Normal file
@@ -0,0 +1,304 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id$
|
||||
\author Jory Stone <jcsston @ toughguy.net>
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_TAGMULTI_H
|
||||
#define LIBMATROSKA_TAGMULTI_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlDate.h"
|
||||
#include "ebml/EbmlFloat.h"
|
||||
#include "ebml/EbmlSInteger.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "ebml/EbmlString.h"
|
||||
#include "ebml/EbmlUnicodeString.h"
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
enum KaxTagMultiCommercialTypes {
|
||||
KaxTagMultiCommercialType_FilePurchase = 1, //Information on where to purchase this file. This is akin to the WPAY tag in ID3.
|
||||
KaxTagMultiCommercialType_ItemPurchase, //Information on where to purchase this album. This is akin to the WCOM tag in ID3.
|
||||
KaxTagMultiCommercialType_Owner //Information on the purchase that occurred for this file. This is akin to the OWNE tag in ID3.
|
||||
};
|
||||
enum KaxTagMultiDateTypes {
|
||||
KaxTagMultiDateType_EncodingDate = 1, //The time that the encoding of this item was completed. This is akin to the TDEN tag in ID3.
|
||||
KaxTagMultiDateType_RecordingDate, //The time that the recording began, and finished. This is akin to the TDRC tag in ID3.
|
||||
KaxTagMultiDateType_ReleaseDate, //The time that the item was originaly released. This is akin to the TDRL tag in ID3.
|
||||
KaxTagMultiDateType_OriginalReleaseDate, //The time that the item was originaly released if it is a remake. This is akin to the TDOR tag in ID3.
|
||||
KaxTagMultiDateType_TaggingDate, //The time that the tags were done for this item. This is akin to the TDTG tag in ID3.
|
||||
KaxTagMultiDateType_DigitizingDate //The time that the item was tranfered to a digital medium. This is akin to the IDIT tag in RIFF
|
||||
};
|
||||
enum KaxTagMultiEntitiesTypes {
|
||||
KaxTagMultiEntitiesType_LyricistTextWriter = 1, //The person that wrote the words/script for this item. This is akin to the TEXT tag in ID3.
|
||||
KaxTagMultiEntitiesType_Composer, //The name of the composer of this item. This is akin to the TCOM tag in ID3.
|
||||
KaxTagMultiEntitiesType_LeadPerformerSoloist, //This is akin to the TPE1 tag in ID3.
|
||||
KaxTagMultiEntitiesType_BandOrchestraAccompaniment, //This is akin to the TPE2 tag in ID3.
|
||||
KaxTagMultiEntitiesType_OriginalLyricistTextWriter, //This is akin to the TOLY tag in ID3.
|
||||
KaxTagMultiEntitiesType_OriginalArtistPerformer, //This is akin to the TOPE tag in ID3.
|
||||
KaxTagMultiEntitiesType_OriginalAlbumMovieShowTitle, //This is akin to the TOAL tag in ID3.
|
||||
KaxTagMultiEntitiesType_ConductorPerformerRefinement, //This is akin to the TPE3 tag in ID3.
|
||||
KaxTagMultiEntitiesType_InterpretedRemixedBy, //This is akin to the TPE4 tag in ID3.
|
||||
KaxTagMultiEntitiesType_Director, //This is akin to the IART tag in RIFF
|
||||
KaxTagMultiEntitiesType_ProducedBy, //This is akin to the IPRO tag in Extended RIFF
|
||||
KaxTagMultiEntitiesType_Cinematographer, //This is akin to the ICNM tag in Extended RIFF
|
||||
KaxTagMultiEntitiesType_ProductionDesigner, //This is akin to the IPDS tag in Extended RIFF
|
||||
KaxTagMultiEntitiesType_CostumeDesigner, //This is akin to the ICDS tag in Extended RIFF
|
||||
KaxTagMultiEntitiesType_ProductionStudio, //This is akin to the ISTD tag in Extended RIFF
|
||||
KaxTagMultiEntitiesType_DistributedBy, //This is akin to the IDST tag in Extended RIFF
|
||||
KaxTagMultiEntitiesType_CommissionedBy, //This is akin to the ICMS tag in RIFF
|
||||
KaxTagMultiEntitiesType_Engineer, //This is akin to the IENG tag in RIFF
|
||||
KaxTagMultiEntitiesType_EditedBy, //This is akin to the IEDT tag in Extended RIFF
|
||||
KaxTagMultiEntitiesType_EncodedBy, //This is akin to the TENC tag in ID3.
|
||||
KaxTagMultiEntitiesType_RippedBy, //This is akin to the IRIP tag in Extended RIFF
|
||||
KaxTagMultiEntitiesType_InvolvedPeopleList, //A very general tag for everyone else that wants to be listed. This is akin to the TMCL tag in ID3.
|
||||
KaxTagMultiEntitiesType_InternetRadioStationName, //This is akin to the TSRN tag in ID3.
|
||||
KaxTagMultiEntitiesType_Publisher //This is akin to the TPUB tag in ID3.
|
||||
};
|
||||
|
||||
enum KaxTagMultiIdentifierTypes {
|
||||
KaxTagMultiIdentifierType_ISRC = 1, //String, The International Standard Recording Code
|
||||
KaxTagMultiIdentifierType_CDIdentifier, //Binary, This is a binary dump of the TOC of the CDROM that this item was taken from. This holds the same information as the MCDI in ID3.
|
||||
KaxTagMultiIdentifierType_ISBN, //String, International Standard Book Number
|
||||
KaxTagMultiIdentifierType_Catalog, //String, sometimes the EAN/UPC, often some letters followed by some numbers
|
||||
KaxTagMultiIdentifierType_EAN, //String, EAN-13 bar code identifier
|
||||
KaxTagMultiIdentifierType_UPC, //String, UPC-A bar code identifier
|
||||
KaxTagMultiIdentifierType_LabelCode, //String, Typically printed as ________ (LC) xxxx) ~~~~~~~~ or _________ (LC) 0xxxx) ~~~~~~~~~ on CDs medias or covers, where xxxx is a 4-digit number.
|
||||
KaxTagMultiIdentifierType_LCCN, //String, Library of Congress Control Number
|
||||
KaxTagMultiIdentifierType_UniqueFileIdentifier, //Binary, This used for a dump of the UFID field in ID3. This field would only be used if the item was pulled from an MP3.
|
||||
CDROM_CD_TEXT_PACK_TOC_INFO2 //Binary
|
||||
};
|
||||
|
||||
enum KaxTagMultiLegalTypes {
|
||||
KaxTagMultiLegalType_Copyright = 1, //The copyright information as per the copyright holder. This is akin to the TCOP tag in ID3.
|
||||
KaxTagMultiLegalType_ProductionCopyright, //The copyright information as per the production copyright holder. This is akin to the TPRO tag in ID3.
|
||||
KaxTagMultiLegalType_TermsOfUse //The terms of use for this item. This is akin to the USER tag in ID3.
|
||||
};
|
||||
|
||||
enum KaxTagMultiTitleTypes {
|
||||
KaxTagMultiTitleType_TrackTitle = 1,
|
||||
//The title of this item. In the case of a track, the Name element should be identical to the Name element.
|
||||
//For example, for music you might label this "Canon in D", or for video's audio track you might use "English 5.1" This is akin to the TIT2 tag in ID3.
|
||||
KaxTagMultiTitleType_AlbumMovieShowTitle,
|
||||
//This is the name given to a grouping of tracks and/or chapters.
|
||||
//For example, all video, audio, and subtitle tracks for a movie would be grouped under this and be given the name of the movie.
|
||||
//All tracks for a particular CD would be grouped together under the title of the CD, or if all tracks for a CD were recorded as a single track, seperated by chapters, the same would apply.
|
||||
//You could use this to label episode 3 of The Simpsons. This is akin to the TALB tag in ID3.
|
||||
KaxTagMultiTitleType_SetTitle, //This would be used to label a set of ID 2. For example, season 13 of The Simpsons.
|
||||
KaxTagMultiTitleType_Series //This would be used to label a set of ID 3. For example, The Simpsons.
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagMultiComment)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagMultiCommentName)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagMultiCommentComments)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagMultiCommentLanguage)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagMultiCommercial)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagCommercial)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagMultiCommercialType)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagMultiCommercialAddress)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagMultiCommercialURL)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagMultiCommercialEmail)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagMultiPrice)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagMultiPriceCurrency)
|
||||
};
|
||||
|
||||
DECLARE_MKX_FLOAT(KaxTagMultiPriceAmount)
|
||||
};
|
||||
|
||||
DECLARE_MKX_DATE(KaxTagMultiPricePriceDate)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagMultiDate)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagDate)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagMultiDateType)
|
||||
};
|
||||
|
||||
DECLARE_MKX_DATE(KaxTagMultiDateDateBegin)
|
||||
};
|
||||
|
||||
DECLARE_MKX_DATE(KaxTagMultiDateDateEnd)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagMultiEntity)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagEntity)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagMultiEntityType)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagMultiEntityName)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagMultiEntityAddress)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagMultiEntityURL)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagMultiEntityEmail)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagMultiIdentifier)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagIdentifier)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagMultiIdentifierType)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxTagMultiIdentifierBinary)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagMultiIdentifierString)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagMultiLegal)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagLegal)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagMultiLegalType)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagMultiLegalContent)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagMultiLegalURL)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagMultiLegalAddress)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagMultiTitle)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagTitle)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagMultiTitleType)
|
||||
};
|
||||
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagMultiTitleName)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagMultiTitleSubTitle)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagMultiTitleEdition)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTagMultiTitleAddress)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagMultiTitleURL)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagMultiTitleEmail)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagMultiTitleLanguage)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagMultiAttachment)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTagAttachment)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagAttachmentID)
|
||||
};
|
||||
|
||||
#if 0
|
||||
DECLARE_MKX_FLOAT(KaxTagBPM)
|
||||
};
|
||||
|
||||
DECLARE_MKX_SINTEGER(KaxTagPopularimeter)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxTagRating)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTagSetPart)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTagUserDefinedURL)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxTagVideoSecondaryGenre)
|
||||
public:
|
||||
virtual bool ValidateSize() const {return IsFiniteSize() && (Size >= 4);
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxWritingApp)
|
||||
};
|
||||
#endif
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TAGMULTI_H
|
@@ -1,40 +1,51 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTags.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_TAGS_H
|
||||
#define LIBMATROSKA_TAGS_H
|
||||
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
#endif // LIBMATROSKA_TAGS_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTags.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_TAGS_H
|
||||
#define LIBMATROSKA_TAGS_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTags)
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TAGS_H
|
||||
|
@@ -1,40 +1,71 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTrackAudio.h,v 1.11 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_TRACK_AUDIO_H
|
||||
#define LIBMATROSKA_TRACK_AUDIO_H
|
||||
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
#endif // LIBMATROSKA_TRACK_AUDIO_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTrackAudio.h,v 1.11 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_TRACK_AUDIO_H
|
||||
#define LIBMATROSKA_TRACK_AUDIO_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlFloat.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTrackAudio)
|
||||
};
|
||||
|
||||
DECLARE_MKX_FLOAT(KaxAudioSamplingFreq)
|
||||
};
|
||||
|
||||
DECLARE_MKX_FLOAT(KaxAudioOutputSamplingFreq)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxAudioChannels)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_BINARY(KaxAudioPosition)
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxAudioBitDepth)
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TRACK_AUDIO_H
|
||||
|
@@ -1,40 +1,139 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTrackEntryData.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_TRACK_ENTRY_DATA_H
|
||||
#define LIBMATROSKA_TRACK_ENTRY_DATA_H
|
||||
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
#endif // LIBMATROSKA_TRACK_ENTRY_DATA_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTrackEntryData.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author John Cannon <spyder2555 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_TRACK_ENTRY_DATA_H
|
||||
#define LIBMATROSKA_TRACK_ENTRY_DATA_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "ebml/EbmlFloat.h"
|
||||
#include "ebml/EbmlString.h"
|
||||
#include "ebml/EbmlUnicodeString.h"
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackNumber)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackType)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_UINTEGER(KaxTrackFlagEnabled)
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackFlagDefault)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackFlagForced)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackFlagLacing)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackMinCache)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackMaxCache)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackDefaultDuration)
|
||||
};
|
||||
|
||||
DECLARE_MKX_FLOAT(KaxTrackTimecodeScale)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxMaxBlockAdditionID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxTrackName)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxTrackLanguage)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxCodecID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxCodecPrivate)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UNISTRING(KaxCodecName)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxTrackAttachmentLink)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackOverlay)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTrackTranslate)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackTranslateCodec)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxTrackTranslateEditionUID)
|
||||
};
|
||||
|
||||
DECLARE_MKX_BINARY(KaxTrackTranslateTrackID)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_UNISTRING(KaxCodecSettings)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxCodecInfoURL)
|
||||
};
|
||||
|
||||
DECLARE_MKX_STRING(KaxCodecDownloadURL)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxCodecDecodeAll)
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TRACK_ENTRY_DATA_H
|
||||
|
@@ -19,9 +19,9 @@
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -35,6 +35,76 @@
|
||||
#ifndef LIBMATROSKA_TRACK_VIDEO_H
|
||||
#define LIBMATROSKA_TRACK_VIDEO_H
|
||||
|
||||
#include "matroska/KaxSemantic.h"
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "ebml/EbmlFloat.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTrackVideo)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_UINTEGER(KaxVideoFlagInterlaced)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoStereoMode)
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoPixelWidth)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoPixelHeight)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoPixelCropBottom)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoPixelCropTop)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoPixelCropLeft)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoPixelCropRight)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoDisplayWidth)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoDisplayHeight)
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_UINTEGER(KaxVideoDisplayUnit)
|
||||
};
|
||||
|
||||
DECLARE_MKX_UINTEGER(KaxVideoAspectRatio)
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
DECLARE_MKX_BINARY(KaxVideoColourSpace)
|
||||
public:
|
||||
bool ValidateSize(void) const {return IsFiniteSize() && (GetSize() == 4);}
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DECLARE_MKX_FLOAT(KaxVideoGamma)
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
DECLARE_MKX_FLOAT(KaxVideoFrameRate)
|
||||
public:
|
||||
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
};
|
||||
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TRACK_VIDEO_H
|
||||
|
@@ -1,78 +1,81 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTracks.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_TRACKS_H
|
||||
#define LIBMATROSKA_TRACKS_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTrackEntry)
|
||||
public:
|
||||
EbmlUInteger & TrackNumber() const { return *(static_cast<EbmlUInteger *>(FindElt(EBML_INFO(KaxTrackNumber)))); }
|
||||
|
||||
void EnableLacing(bool bEnable = true);
|
||||
|
||||
/*!
|
||||
\note lacing set by default
|
||||
*/
|
||||
inline bool LacingEnabled() const {
|
||||
KaxTrackFlagLacing * myLacing = static_cast<KaxTrackFlagLacing *>(FindFirstElt(EBML_INFO(KaxTrackFlagLacing)));
|
||||
return((myLacing == NULL) || (uint8(*myLacing) != 0));
|
||||
}
|
||||
|
||||
void SetGlobalTimecodeScale(uint64 aGlobalTimecodeScale) {
|
||||
mGlobalTimecodeScale = aGlobalTimecodeScale;
|
||||
bGlobalTimecodeScaleIsSet = true;
|
||||
}
|
||||
uint64 GlobalTimecodeScale() const {
|
||||
assert(bGlobalTimecodeScaleIsSet);
|
||||
return mGlobalTimecodeScale;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool bGlobalTimecodeScaleIsSet;
|
||||
uint64 mGlobalTimecodeScale;
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TRACKS_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTracks.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_TRACKS_H
|
||||
#define LIBMATROSKA_TRACKS_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "matroska/KaxTrackEntryData.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTracks)
|
||||
};
|
||||
|
||||
DECLARE_MKX_MASTER(KaxTrackEntry)
|
||||
public:
|
||||
EbmlUInteger & TrackNumber() const { return *(static_cast<EbmlUInteger *>(FindElt(EBML_INFO(KaxTrackNumber)))); }
|
||||
|
||||
void EnableLacing(bool bEnable = true);
|
||||
|
||||
/*!
|
||||
\note lacing set by default
|
||||
*/
|
||||
inline bool LacingEnabled() const {
|
||||
KaxTrackFlagLacing * myLacing = static_cast<KaxTrackFlagLacing *>(FindFirstElt(EBML_INFO(KaxTrackFlagLacing)));
|
||||
return((myLacing == NULL) || (uint8(*myLacing) != 0));
|
||||
}
|
||||
|
||||
void SetGlobalTimecodeScale(uint64 aGlobalTimecodeScale) {
|
||||
mGlobalTimecodeScale = aGlobalTimecodeScale;
|
||||
bGlobalTimecodeScaleIsSet = true;
|
||||
}
|
||||
uint64 GlobalTimecodeScale() const {
|
||||
assert(bGlobalTimecodeScaleIsSet);
|
||||
return mGlobalTimecodeScale;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool bGlobalTimecodeScaleIsSet;
|
||||
uint64 mGlobalTimecodeScale;
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TRACKS_H
|
||||
|
@@ -1,59 +1,59 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTypes.h,v 1.4 2004/04/14 23:26:17 robux4 Exp $
|
||||
*/
|
||||
#ifndef LIBMATROSKA_TYPES_H
|
||||
#define LIBMATROSKA_TYPES_H
|
||||
|
||||
#include "matroska/KaxConfig.h"
|
||||
#include "ebml/EbmlTypes.h"
|
||||
#include "matroska/c/libmatroska_t.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
enum LacingType {
|
||||
LACING_NONE = 0,
|
||||
LACING_XIPH,
|
||||
LACING_FIXED,
|
||||
LACING_EBML,
|
||||
LACING_AUTO
|
||||
};
|
||||
|
||||
enum BlockBlobType {
|
||||
BLOCK_BLOB_NO_SIMPLE = 0,
|
||||
BLOCK_BLOB_SIMPLE_AUTO,
|
||||
BLOCK_BLOB_ALWAYS_SIMPLE,
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TYPES_H
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTypes.h,v 1.4 2004/04/14 23:26:17 robux4 Exp $
|
||||
*/
|
||||
#ifndef LIBMATROSKA_TYPES_H
|
||||
#define LIBMATROSKA_TYPES_H
|
||||
|
||||
#include "matroska/KaxConfig.h"
|
||||
#include "ebml/EbmlTypes.h"
|
||||
#include "matroska/c/libmatroska_t.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
enum LacingType {
|
||||
LACING_NONE = 0,
|
||||
LACING_XIPH,
|
||||
LACING_FIXED,
|
||||
LACING_EBML,
|
||||
LACING_AUTO
|
||||
};
|
||||
|
||||
enum BlockBlobType {
|
||||
BLOCK_BLOB_NO_SIMPLE = 0,
|
||||
BLOCK_BLOB_SIMPLE_AUTO,
|
||||
BLOCK_BLOB_ALWAYS_SIMPLE,
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TYPES_H
|
||||
|
@@ -17,9 +17,9 @@
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -40,10 +40,10 @@
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#define LIBMATROSKA_VERSION 0x010400
|
||||
#define LIBMATROSKA_VERSION 0x010000
|
||||
|
||||
extern const std::string KaxCodeVersion;
|
||||
extern const std::string KaxCodeDate;
|
||||
static const std::string KaxCodeVersion = "1.0.0";
|
||||
static const std::string KaxCodeDate = __TIMESTAMP__;
|
||||
|
||||
/*!
|
||||
\todo Improve the CRC/ECC system (backward and forward possible ?) to fit streaming/live writing/simple reading
|
||||
|
@@ -19,9 +19,9 @@
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
|
||||
**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
|
@@ -19,9 +19,9 @@
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
|
@@ -19,9 +19,9 @@
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -452,14 +452,14 @@ END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
void matroska_init()
|
||||
{
|
||||
#if defined(HAVE_EBML2) || defined(HAS_EBML2)
|
||||
#if defined(HAVE_EBML2)
|
||||
ebml_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
void matroska_done()
|
||||
{
|
||||
#if defined(HAVE_EBML2) || defined(HAS_EBML2)
|
||||
#if defined(HAVE_EBML2)
|
||||
ebml_done();
|
||||
#endif
|
||||
}
|
||||
|
@@ -1,51 +1,72 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxAttached.cpp 1202 2005-08-30 14:39:01Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
// sub elements
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
KaxAttached::KaxAttached(EBML_EXTRA_DEF)
|
||||
:EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxAttached) EBML_DEF_SEP EBML_EXTRA_CALL)
|
||||
{
|
||||
SetSizeLength(2); // mandatory min size support (for easier updating) (2^(7*2)-2 = 16Ko)
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxAttached.cpp 1202 2005-08-30 14:39:01Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxAttached.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
// sub elements
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxAttached)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxFileName)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxMimeType)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxFileData)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxFileDescription)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxFileUID)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxFileReferral)
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_END_SEMANTIC(KaxAttached)
|
||||
|
||||
DEFINE_MKX_MASTER_CONS(KaxAttached, 0x61A7, 2, KaxAttachments, "AttachedFile");
|
||||
DEFINE_MKX_UNISTRING (KaxFileDescription, 0x467E, 2, KaxAttachments, "FileDescription");
|
||||
DEFINE_MKX_UNISTRING (KaxFileName, 0x466E, 2, KaxAttachments, "FileName");
|
||||
DEFINE_MKX_STRING (KaxMimeType, 0x4660, 2, KaxAttachments, "FileMimeType");
|
||||
DEFINE_MKX_BINARY (KaxFileData, 0x465C, 2, KaxAttachments, "FileData");
|
||||
DEFINE_MKX_UINTEGER (KaxFileUID, 0x46AE, 2, KaxAttachments, "FileUID");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_BINARY (KaxFileReferral, 0x4675, 2, KaxAttachments, "FileReferral");
|
||||
#endif
|
||||
|
||||
KaxAttached::KaxAttached(EBML_EXTRA_DEF)
|
||||
:EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxAttached) EBML_DEF_SEP EBML_EXTRA_CALL)
|
||||
{
|
||||
SetSizeLength(2); // mandatory min size support (for easier updating) (2^(7*2)-2 = 16Ko)
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
@@ -1,50 +1,57 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxAttachments.cpp 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
KaxAttachments::KaxAttachments(EBML_EXTRA_DEF)
|
||||
:EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxAttachments) EBML_DEF_SEP EBML_EXTRA_CALL)
|
||||
{
|
||||
SetSizeLength(2); // mandatory min size support (for easier updating) (2^(7*2)-2 = 16Ko)
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxAttachments.cpp 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxAttachments.h"
|
||||
#include "matroska/KaxAttached.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxAttachments)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxAttached) ///< EBMLVersion
|
||||
DEFINE_END_SEMANTIC(KaxAttachments)
|
||||
|
||||
DEFINE_MKX_MASTER_CONS(KaxAttachments, 0x1941A469, 4, KaxSegment, "Attachments");
|
||||
|
||||
KaxAttachments::KaxAttachments(EBML_EXTRA_DEF)
|
||||
:EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxAttachments) EBML_DEF_SEP EBML_EXTRA_CALL)
|
||||
{
|
||||
SetSizeLength(2); // mandatory min size support (for easier updating) (2^(7*2)-2 = 16Ko)
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
2115
src/KaxBlock.cpp
2115
src/KaxBlock.cpp
File diff suppressed because it is too large
Load Diff
@@ -1,114 +1,118 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxBlockData.cpp 1226 2005-10-13 21:16:43Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include <cassert>
|
||||
|
||||
#include "matroska/KaxBlockData.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxBlock.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
const KaxBlockBlob & KaxReferenceBlock::RefBlock() const
|
||||
{
|
||||
assert(RefdBlock != NULL);
|
||||
return *RefdBlock;
|
||||
}
|
||||
|
||||
KaxReferenceBlock::KaxReferenceBlock(EBML_EXTRA_DEF)
|
||||
:EBML_DEF_SINTEGER(KaxReferenceBlock)EBML_DEF_SEP
|
||||
RefdBlock(NULL)
|
||||
,ParentBlock(NULL)
|
||||
,bTimecodeSet(false)
|
||||
,bOurBlob(false)
|
||||
{
|
||||
bTimecodeSet = false;
|
||||
}
|
||||
|
||||
KaxReferenceBlock::KaxReferenceBlock(const KaxReferenceBlock & ElementToClone)
|
||||
:EbmlSInteger(ElementToClone)
|
||||
,RefdBlock(NULL)
|
||||
,ParentBlock(NULL)
|
||||
,bTimecodeSet(ElementToClone.bTimecodeSet)
|
||||
,bOurBlob(false)
|
||||
{
|
||||
}
|
||||
|
||||
KaxReferenceBlock::~KaxReferenceBlock()
|
||||
{
|
||||
FreeBlob();
|
||||
}
|
||||
|
||||
void KaxReferenceBlock::FreeBlob()
|
||||
{
|
||||
if (bOurBlob && RefdBlock!=NULL)
|
||||
delete RefdBlock;
|
||||
RefdBlock = NULL;
|
||||
}
|
||||
|
||||
filepos_t KaxReferenceBlock::UpdateSize(bool bSaveDefault, bool bForceRender)
|
||||
{
|
||||
if (!bTimecodeSet) {
|
||||
assert(RefdBlock != NULL);
|
||||
assert(ParentBlock != NULL);
|
||||
|
||||
const KaxInternalBlock &block = *RefdBlock;
|
||||
*static_cast<EbmlSInteger*>(this) = (int64(block.GlobalTimecode()) - int64(ParentBlock->GlobalTimecode())) / int64(ParentBlock->GlobalTimecodeScale());
|
||||
}
|
||||
return EbmlSInteger::UpdateSize(bSaveDefault, bForceRender);
|
||||
}
|
||||
|
||||
void KaxReferenceBlock::SetReferencedBlock(const KaxBlockBlob * aRefdBlock)
|
||||
{
|
||||
assert(RefdBlock == NULL);
|
||||
assert(aRefdBlock != NULL);
|
||||
FreeBlob();
|
||||
RefdBlock = aRefdBlock;
|
||||
bOurBlob = true;
|
||||
SetValueIsSet();
|
||||
}
|
||||
|
||||
void KaxReferenceBlock::SetReferencedBlock(const KaxBlockGroup & aRefdBlock)
|
||||
{
|
||||
FreeBlob();
|
||||
KaxBlockBlob *block_blob = new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE);
|
||||
block_blob->SetBlockGroup(*const_cast<KaxBlockGroup*>(&aRefdBlock));
|
||||
RefdBlock = block_blob;
|
||||
bOurBlob = true;
|
||||
SetValueIsSet();
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxBlockData.cpp 1226 2005-10-13 21:16:43Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include <cassert>
|
||||
|
||||
#include "matroska/KaxBlockData.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxBlock.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxSlices)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTimeSlice)
|
||||
DEFINE_END_SEMANTIC(KaxSlices)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTimeSlice)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxSliceLaceNumber)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxSliceFrameNumber)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxSliceBlockAddID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxSliceDelay)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxSliceDuration)
|
||||
DEFINE_END_SEMANTIC(KaxTimeSlice)
|
||||
|
||||
DEFINE_MKX_UINTEGER_DEF (KaxReferencePriority, 0xFA, 1, KaxBlockGroup, "FlagReferenced", 0);
|
||||
DEFINE_MKX_SINTEGER_CONS(KaxReferenceBlock, 0xFB, 1, KaxBlockGroup, "ReferenceBlock");
|
||||
DEFINE_MKX_MASTER (KaxSlices, 0x8E, 1, KaxBlockGroup, "Slices");
|
||||
DEFINE_MKX_MASTER (KaxTimeSlice, 0xE8, 1, KaxSlices, "TimeSlice");
|
||||
DEFINE_MKX_UINTEGER_DEF (KaxSliceLaceNumber, 0xCC, 1, KaxTimeSlice, "SliceLaceNumber", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF (KaxSliceFrameNumber, 0xCD, 1, KaxTimeSlice, "SliceFrameNumber", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF (KaxSliceBlockAddID, 0xCB, 1, KaxTimeSlice, "SliceBlockAddID", 0);
|
||||
DEFINE_MKX_UINTEGER (KaxSliceDelay, 0xCE, 1, KaxTimeSlice, "SliceDelay");
|
||||
DEFINE_MKX_UINTEGER_DEF (KaxSliceDuration, 0xCF, 1, KaxTimeSlice, "SliceDuration", 0);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_SINTEGER (KaxReferenceVirtual, 0xFD, 1, KaxBlockGroup, "ReferenceVirtual");
|
||||
#endif
|
||||
|
||||
|
||||
const KaxBlockBlob & KaxReferenceBlock::RefBlock() const
|
||||
{
|
||||
assert(RefdBlock != NULL);
|
||||
return *RefdBlock;
|
||||
}
|
||||
|
||||
KaxReferenceBlock::KaxReferenceBlock(EBML_EXTRA_DEF)
|
||||
:EBML_DEF_SINTEGER(KaxReferenceBlock)EBML_DEF_SEP
|
||||
RefdBlock(NULL)
|
||||
,ParentBlock(NULL)
|
||||
{
|
||||
bTimecodeSet = false;
|
||||
}
|
||||
|
||||
KaxReferenceBlock::KaxReferenceBlock(const KaxReferenceBlock & ElementToClone)
|
||||
:EbmlSInteger(ElementToClone)
|
||||
,bTimecodeSet(ElementToClone.bTimecodeSet)
|
||||
{
|
||||
}
|
||||
|
||||
filepos_t KaxReferenceBlock::UpdateSize(bool bSaveDefault, bool bForceRender)
|
||||
{
|
||||
if (!bTimecodeSet) {
|
||||
assert(RefdBlock != NULL);
|
||||
assert(ParentBlock != NULL);
|
||||
|
||||
const KaxInternalBlock &block = *RefdBlock;
|
||||
*static_cast<EbmlSInteger*>(this) = (int64(block.GlobalTimecode()) - int64(ParentBlock->GlobalTimecode())) / int64(ParentBlock->GlobalTimecodeScale());
|
||||
}
|
||||
return EbmlSInteger::UpdateSize(bSaveDefault, bForceRender);
|
||||
}
|
||||
|
||||
void KaxReferenceBlock::SetReferencedBlock(const KaxBlockBlob * aRefdBlock)
|
||||
{
|
||||
assert(RefdBlock == NULL);
|
||||
assert(aRefdBlock != NULL);
|
||||
RefdBlock = aRefdBlock;
|
||||
SetValueIsSet();
|
||||
}
|
||||
|
||||
void KaxReferenceBlock::SetReferencedBlock(const KaxBlockGroup & aRefdBlock)
|
||||
{
|
||||
KaxBlockBlob *block_blob = new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE);
|
||||
block_blob->SetBlockGroup(*const_cast<KaxBlockGroup*>(&aRefdBlock));
|
||||
RefdBlock = block_blob;
|
||||
SetValueIsSet();
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
118
src/KaxChapters.cpp
Normal file
118
src/KaxChapters.cpp
Normal file
@@ -0,0 +1,118 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxChapters.cpp 1201 2005-08-30 14:28:27Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxChapters.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxChapters)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxEditionEntry)
|
||||
DEFINE_END_SEMANTIC(KaxChapters)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxEditionEntry)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxEditionUID)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxEditionFlagHidden)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxEditionFlagDefault)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxEditionFlagOrdered)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxChapterAtom)
|
||||
DEFINE_END_SEMANTIC(KaxEditionEntry)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxChapterAtom)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxChapterAtom)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterUID)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterTimeStart)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxChapterTimeEnd)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterFlagHidden)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterFlagEnabled)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxChapterSegmentUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxChapterSegmentEditionUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxChapterPhysicalEquiv)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxChapterTrack)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxChapterDisplay)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxChapterProcess)
|
||||
DEFINE_END_SEMANTIC(KaxChapterAtom)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxChapterTrack)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxChapterTrackNumber)
|
||||
DEFINE_END_SEMANTIC(KaxChapterTrack)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxChapterDisplay)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterString)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxChapterLanguage)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxChapterCountry)
|
||||
DEFINE_END_SEMANTIC(KaxChapterDisplay)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxChapterProcess)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterProcessCodecID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxChapterProcessPrivate)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxChapterProcessCommand)
|
||||
DEFINE_END_SEMANTIC(KaxChapterProcess)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxChapterProcessCommand)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterProcessTime)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterProcessData)
|
||||
DEFINE_END_SEMANTIC(KaxChapterProcessCommand)
|
||||
|
||||
DEFINE_MKX_MASTER (KaxChapters, 0x1043A770, 4, KaxSegment, "Chapters");
|
||||
DEFINE_MKX_MASTER (KaxEditionEntry, 0x45B9, 2, KaxChapters, "EditionEntry");
|
||||
DEFINE_MKX_UINTEGER (KaxEditionUID, 0x45BC, 2, KaxEditionEntry, "EditionUID");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxEditionFlagHidden, 0x45BD, 2, KaxEditionEntry, "EditionFlagHidden", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxEditionFlagDefault, 0x45DB, 2, KaxEditionEntry, "EditionFlagDefault", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxEditionFlagOrdered, 0x45DD, 2, KaxEditionEntry, "EditionFlagOrdered", 0);
|
||||
DEFINE_MKX_MASTER (KaxChapterAtom, 0xB6, 1, KaxEditionEntry, "ChapterAtom");
|
||||
DEFINE_MKX_UINTEGER (KaxChapterUID, 0x73C4, 2, KaxChapterAtom, "ChapterUID");
|
||||
DEFINE_MKX_UINTEGER (KaxChapterTimeStart, 0x91, 1, KaxChapterAtom, "ChapterTimeStart");
|
||||
DEFINE_MKX_UINTEGER (KaxChapterTimeEnd, 0x92, 1, KaxChapterAtom, "ChapterTimeEnd");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxChapterFlagHidden, 0x98, 1, KaxChapterAtom, "ChapterFlagHidden", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxChapterFlagEnabled, 0x4598, 2, KaxChapterAtom, "ChapterFlagEnabled", 1);
|
||||
DEFINE_MKX_BINARY (KaxChapterSegmentUID, 0x6E67, 2, KaxChapterAtom, "ChapterSegmentUID");
|
||||
DEFINE_MKX_BINARY (KaxChapterSegmentEditionUID, 0x6EBC, 2, KaxChapterAtom, "ChapterSegmentEditionUID");
|
||||
DEFINE_MKX_UINTEGER (KaxChapterPhysicalEquiv, 0x63C3, 2, KaxChapterAtom, "ChapterPhysicalEquiv");
|
||||
DEFINE_MKX_MASTER (KaxChapterTrack, 0x8F, 1, KaxChapterAtom, "ChapterTrack");
|
||||
DEFINE_MKX_UINTEGER (KaxChapterTrackNumber, 0x89, 1, KaxChapterTrack, "ChapterTrackNumber");
|
||||
DEFINE_MKX_MASTER (KaxChapterDisplay, 0x80, 1, KaxChapterAtom, "ChapterDisplay");
|
||||
DEFINE_MKX_UNISTRING (KaxChapterString, 0x85, 1, KaxChapterDisplay, "ChapterString");
|
||||
DEFINE_MKX_STRING_DEF (KaxChapterLanguage, 0x437C, 2, KaxChapterLanguage, "ChapterLanguage", "eng"); // parent context ?
|
||||
DEFINE_MKX_STRING (KaxChapterCountry, 0x437E, 2, KaxChapterCountry, "ChapterCountry"); // parent context ?
|
||||
DEFINE_MKX_MASTER (KaxChapterProcess, 0x6944, 2, KaxChapterAtom, "ChapterProcess");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxChapterProcessCodecID, 0x6955, 2, KaxChapterProcess, "ChapterProcessCodecID", 0);
|
||||
DEFINE_MKX_BINARY (KaxChapterProcessPrivate, 0x450D, 2, KaxChapterProcess, "ChapterProcessPrivate");
|
||||
DEFINE_MKX_MASTER (KaxChapterProcessCommand, 0x6911, 2, KaxChapterProcess, "ChapterProcessCommand");
|
||||
DEFINE_MKX_UINTEGER (KaxChapterProcessTime, 0x6922, 2, KaxChapterProcessCommand, "ChapterProcessTime");
|
||||
DEFINE_MKX_BINARY (KaxChapterProcessData, 0x6933, 2, KaxChapterProcessCommand, "ChapterProcessData");
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
@@ -1,320 +1,334 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxCluster.cpp 1228 2005-10-14 19:36:51Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxCluster.h"
|
||||
#include "matroska/KaxBlock.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxSegment.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
KaxCluster::KaxCluster(EBML_EXTRA_DEF)
|
||||
:EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxCluster) EBML_DEF_SEP EBML_EXTRA_CALL)
|
||||
,currentNewBlock(NULL)
|
||||
,ParentSegment(NULL)
|
||||
,bFirstFrameInside(false)
|
||||
,bPreviousTimecodeIsSet(false)
|
||||
,bTimecodeScaleIsSet(false)
|
||||
,bSilentTracksUsed(false)
|
||||
{}
|
||||
|
||||
KaxCluster::KaxCluster(const KaxCluster & ElementToClone)
|
||||
:EbmlMaster(ElementToClone)
|
||||
,bSilentTracksUsed(ElementToClone.bSilentTracksUsed)
|
||||
{
|
||||
// update the parent of each children
|
||||
EBML_MASTER_ITERATOR Itr = begin();
|
||||
while (Itr != end())
|
||||
{
|
||||
if (EbmlId(**Itr) == EBML_ID(KaxBlockGroup)) {
|
||||
static_cast<KaxBlockGroup *>(*Itr)->SetParent(*this);
|
||||
} else if (EbmlId(**Itr) == EBML_ID(KaxBlock)) {
|
||||
static_cast<KaxBlock *>(*Itr)->SetParent(*this);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
} else if (EbmlId(**Itr) == EBML_ID(KaxBlockVirtual)) {
|
||||
static_cast<KaxBlockVirtual *>(*Itr)->SetParent(*this);
|
||||
#endif // MATROSKA_VERSION
|
||||
}
|
||||
++Itr;
|
||||
}
|
||||
}
|
||||
|
||||
bool KaxCluster::AddBlockBlob(KaxBlockBlob * NewBlob)
|
||||
{
|
||||
Blobs.push_back(NewBlob);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool KaxCluster::AddFrameInternal(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup * PastBlock, const KaxBlockGroup * ForwBlock, LacingType lacing)
|
||||
{
|
||||
if (!bFirstFrameInside) {
|
||||
bFirstFrameInside = true;
|
||||
MinTimecode = MaxTimecode = timecode;
|
||||
} else {
|
||||
if (timecode < MinTimecode)
|
||||
MinTimecode = timecode;
|
||||
if (timecode > MaxTimecode)
|
||||
MaxTimecode = timecode;
|
||||
}
|
||||
|
||||
MyNewBlock = NULL;
|
||||
|
||||
if (lacing == LACING_NONE || !track.LacingEnabled()) {
|
||||
currentNewBlock = NULL;
|
||||
}
|
||||
|
||||
// force creation of a new block
|
||||
if (currentNewBlock == NULL || uint32(track.TrackNumber()) != uint32(currentNewBlock->TrackNumber()) || PastBlock != NULL || ForwBlock != NULL) {
|
||||
KaxBlockGroup & aNewBlock = GetNewBlock();
|
||||
MyNewBlock = currentNewBlock = &aNewBlock;
|
||||
currentNewBlock = &aNewBlock;
|
||||
}
|
||||
|
||||
if (PastBlock != NULL) {
|
||||
if (ForwBlock != NULL) {
|
||||
if (currentNewBlock->AddFrame(track, timecode, buffer, *PastBlock, *ForwBlock, lacing)) {
|
||||
// more data are allowed in this Block
|
||||
return true;
|
||||
} else {
|
||||
currentNewBlock = NULL;
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (currentNewBlock->AddFrame(track, timecode, buffer, *PastBlock, lacing)) {
|
||||
// more data are allowed in this Block
|
||||
return true;
|
||||
} else {
|
||||
currentNewBlock = NULL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (currentNewBlock->AddFrame(track, timecode, buffer, lacing)) {
|
||||
// more data are allowed in this Block
|
||||
return true;
|
||||
} else {
|
||||
currentNewBlock = NULL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, LacingType lacing)
|
||||
{
|
||||
assert(Blobs.size() == 0); // mutually exclusive for the moment
|
||||
return AddFrameInternal(track, timecode, buffer, MyNewBlock, NULL, NULL, lacing);
|
||||
}
|
||||
|
||||
bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, LacingType lacing)
|
||||
{
|
||||
assert(Blobs.size() == 0); // mutually exclusive for the moment
|
||||
return AddFrameInternal(track, timecode, buffer, MyNewBlock, &PastBlock, NULL, lacing);
|
||||
}
|
||||
|
||||
bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing)
|
||||
{
|
||||
assert(Blobs.size() == 0); // mutually exclusive for the moment
|
||||
return AddFrameInternal(track, timecode, buffer, MyNewBlock, &PastBlock, &ForwBlock, lacing);
|
||||
}
|
||||
|
||||
/*!
|
||||
\todo only put the Blocks written in the cue entries
|
||||
*/
|
||||
filepos_t KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, bool bSaveDefault)
|
||||
{
|
||||
filepos_t Result = 0;
|
||||
size_t Index;
|
||||
EBML_MASTER_ITERATOR TrkItr, Itr;
|
||||
|
||||
// update the Timecode of the Cluster before writing
|
||||
KaxClusterTimecode * Timecode = static_cast<KaxClusterTimecode *>(this->FindElt(EBML_INFO(KaxClusterTimecode)));
|
||||
*static_cast<EbmlUInteger *>(Timecode) = GlobalTimecode() / GlobalTimecodeScale();
|
||||
|
||||
if (Blobs.size() == 0) {
|
||||
// old-school direct KaxBlockGroup
|
||||
|
||||
// SilentTracks handling
|
||||
// check the parent cluster for existing tracks and see if they are contained in this cluster or not
|
||||
if (bSilentTracksUsed)
|
||||
{
|
||||
KaxTracks & MyTracks = *static_cast<KaxTracks *>(ParentSegment->FindElt(EBML_INFO(KaxTracks)));
|
||||
for (TrkItr = MyTracks.begin(); TrkItr != MyTracks.end(); ++TrkItr)
|
||||
{
|
||||
if (EbmlId(*(*TrkItr)) == EBML_ID(KaxTrackEntry))
|
||||
{
|
||||
KaxTrackEntry & entry = *static_cast<KaxTrackEntry *>(*TrkItr);
|
||||
uint32 tracknum = entry.TrackNumber();
|
||||
for (Itr = begin(); Itr != end(); ++Itr)
|
||||
{
|
||||
if (EbmlId(*(*Itr)) == EBML_ID(KaxBlockGroup)) {
|
||||
KaxBlockGroup & group = *static_cast<KaxBlockGroup *>(*Itr);
|
||||
if (group.TrackNumber() == tracknum)
|
||||
break; // this track is used
|
||||
}
|
||||
}
|
||||
// the track wasn't found in this cluster
|
||||
if (Itr == end())
|
||||
{
|
||||
KaxClusterSilentTracks * SilentTracks = static_cast<KaxClusterSilentTracks *>(this->FindFirstElt(EBML_INFO(KaxClusterSilentTracks)));
|
||||
assert(SilentTracks != NULL); // the flag bSilentTracksUsed should be set when creating the Cluster
|
||||
KaxClusterSilentTrackNumber * trackelt = static_cast<KaxClusterSilentTrackNumber *>(SilentTracks->AddNewElt(EBML_INFO(KaxClusterSilentTrackNumber)));
|
||||
*static_cast<EbmlUInteger *>(trackelt) = tracknum;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Result = EbmlMaster::Render(output, bSaveDefault);
|
||||
// For all Blocks add their position on the CueEntry
|
||||
|
||||
for (Itr = begin(); Itr != end(); ++Itr)
|
||||
{
|
||||
if (EbmlId(*(*Itr)) == EBML_ID(KaxBlockGroup)) {
|
||||
CueToUpdate.PositionSet(*static_cast<const KaxBlockGroup *>(*Itr));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// new school, using KaxBlockBlob
|
||||
for (Index = 0; Index<Blobs.size(); Index++)
|
||||
{
|
||||
#if MATROSKA_VERSION >= 2
|
||||
if (Blobs[Index]->IsSimpleBlock())
|
||||
PushElement( (KaxSimpleBlock&) *Blobs[Index] );
|
||||
else
|
||||
#endif
|
||||
PushElement( (KaxBlockGroup&) *Blobs[Index] );
|
||||
}
|
||||
|
||||
// SilentTracks handling
|
||||
// check the parent cluster for existing tracks and see if they are contained in this cluster or not
|
||||
if (bSilentTracksUsed)
|
||||
{
|
||||
KaxTracks & MyTracks = *static_cast<KaxTracks *>(ParentSegment->FindElt(EBML_INFO(KaxTracks)));
|
||||
for (TrkItr = MyTracks.begin(); TrkItr != MyTracks.end(); ++TrkItr)
|
||||
{
|
||||
if (EbmlId(*(*TrkItr)) == EBML_ID(KaxTrackEntry))
|
||||
{
|
||||
KaxTrackEntry & entry = *static_cast<KaxTrackEntry *>(*TrkItr);
|
||||
uint32 tracknum = entry.TrackNumber();
|
||||
for (Index = 0; Index<Blobs.size(); Index++) {
|
||||
if (((KaxInternalBlock&)*Blobs[Index]).TrackNum() == tracknum)
|
||||
break; // this track is used
|
||||
}
|
||||
// the track wasn't found in this cluster
|
||||
if (Index == ListSize())
|
||||
{
|
||||
KaxClusterSilentTracks * SilentTracks = static_cast<KaxClusterSilentTracks *>(this->FindFirstElt(EBML_INFO(KaxClusterSilentTracks)));
|
||||
assert(SilentTracks != NULL); // the flag bSilentTracksUsed should be set when creating the Cluster
|
||||
KaxClusterSilentTrackNumber * trackelt = static_cast<KaxClusterSilentTrackNumber *>(SilentTracks->AddNewElt(EBML_INFO(KaxClusterSilentTrackNumber)));
|
||||
*static_cast<EbmlUInteger *>(trackelt) = tracknum;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Result = EbmlMaster::Render(output, bSaveDefault);
|
||||
|
||||
// For all Blocks add their position on the CueEntry
|
||||
for (Index = 0; Index<Blobs.size(); Index++) {
|
||||
CueToUpdate.PositionSet(*Blobs[Index]);
|
||||
}
|
||||
|
||||
Blobs.clear();
|
||||
}
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
/*!
|
||||
\todo automatically choose valid timecode for the Cluster based on the previous cluster timecode (must be incremental)
|
||||
*/
|
||||
uint64 KaxCluster::GlobalTimecode() const
|
||||
{
|
||||
assert(bPreviousTimecodeIsSet);
|
||||
uint64 result = MinTimecode;
|
||||
|
||||
if (result < PreviousTimecode)
|
||||
result = PreviousTimecode + 1;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief retrieve the relative
|
||||
\todo !!! We need a way to know the TimecodeScale
|
||||
*/
|
||||
int16 KaxCluster::GetBlockLocalTimecode(uint64 aGlobalTimecode) const
|
||||
{
|
||||
int64 TimecodeDelay = (int64(aGlobalTimecode) - int64(GlobalTimecode())) / int64(GlobalTimecodeScale());
|
||||
assert(TimecodeDelay >= int16(0x8000) && TimecodeDelay <= int16(0x7FFF));
|
||||
return int16(TimecodeDelay);
|
||||
}
|
||||
|
||||
uint64 KaxCluster::GetBlockGlobalTimecode(int16 GlobalSavedTimecode)
|
||||
{
|
||||
if (!bFirstFrameInside) {
|
||||
KaxClusterTimecode * Timecode = static_cast<KaxClusterTimecode *>(this->FindElt(EBML_INFO(KaxClusterTimecode)));
|
||||
assert (bFirstFrameInside); // use the InitTimecode() hack for now
|
||||
MinTimecode = MaxTimecode = PreviousTimecode = *static_cast<EbmlUInteger *>(Timecode);
|
||||
bFirstFrameInside = true;
|
||||
bPreviousTimecodeIsSet = true;
|
||||
}
|
||||
return int64(GlobalSavedTimecode * GlobalTimecodeScale()) + GlobalTimecode();
|
||||
}
|
||||
|
||||
KaxBlockGroup & KaxCluster::GetNewBlock()
|
||||
{
|
||||
KaxBlockGroup & MyBlock = AddNewChild<KaxBlockGroup>(*this);
|
||||
MyBlock.SetParent(*this);
|
||||
return MyBlock;
|
||||
}
|
||||
|
||||
void KaxCluster::ReleaseFrames()
|
||||
{
|
||||
EBML_MASTER_ITERATOR Itr;
|
||||
for (Itr = begin(); Itr != end(); ++Itr)
|
||||
{
|
||||
if (EbmlId(*(*Itr)) == EBML_ID(KaxBlockGroup)) {
|
||||
static_cast<KaxBlockGroup*>(*Itr)->ReleaseFrames();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint64 KaxCluster::GetPosition() const
|
||||
{
|
||||
assert(ParentSegment != NULL);
|
||||
return ParentSegment->GetRelativePosition(*this);
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxCluster.cpp 1228 2005-10-14 19:36:51Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxCluster.h"
|
||||
#include "matroska/KaxClusterData.h"
|
||||
#include "matroska/KaxBlock.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxSegment.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxCluster)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxClusterTimecode)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxClusterSilentTracks)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxClusterPrevSize)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxBlockGroup)
|
||||
#if MATROSKA_VERSION == 2
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxSimpleBlock)
|
||||
#endif
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxClusterPosition)
|
||||
DEFINE_END_SEMANTIC(KaxCluster)
|
||||
|
||||
DEFINE_MKX_MASTER_CONS(KaxCluster, 0x1F43B675, 4, KaxSegment, "Cluster");
|
||||
|
||||
KaxCluster::KaxCluster(EBML_EXTRA_DEF)
|
||||
:EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxCluster) EBML_DEF_SEP EBML_EXTRA_CALL)
|
||||
,currentNewBlock(NULL)
|
||||
,ParentSegment(NULL)
|
||||
,bFirstFrameInside(false)
|
||||
,bPreviousTimecodeIsSet(false)
|
||||
,bTimecodeScaleIsSet(false)
|
||||
,bSilentTracksUsed(false)
|
||||
{}
|
||||
|
||||
KaxCluster::KaxCluster(const KaxCluster & ElementToClone)
|
||||
:EbmlMaster(ElementToClone)
|
||||
,bSilentTracksUsed(ElementToClone.bSilentTracksUsed)
|
||||
{
|
||||
// update the parent of each children
|
||||
EBML_MASTER_ITERATOR Itr = begin();
|
||||
while (Itr != end())
|
||||
{
|
||||
if (EbmlId(**Itr) == EBML_ID(KaxBlockGroup)) {
|
||||
static_cast<KaxBlockGroup *>(*Itr)->SetParent(*this);
|
||||
} else if (EbmlId(**Itr) == EBML_ID(KaxBlock)) {
|
||||
static_cast<KaxBlock *>(*Itr)->SetParent(*this);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
} else if (EbmlId(**Itr) == EBML_ID(KaxBlockVirtual)) {
|
||||
static_cast<KaxBlockVirtual *>(*Itr)->SetParent(*this);
|
||||
#endif // MATROSKA_VERSION
|
||||
}
|
||||
++Itr;
|
||||
}
|
||||
}
|
||||
|
||||
bool KaxCluster::AddBlockBlob(KaxBlockBlob * NewBlob)
|
||||
{
|
||||
Blobs.push_back(NewBlob);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool KaxCluster::AddFrameInternal(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup * PastBlock, const KaxBlockGroup * ForwBlock, LacingType lacing)
|
||||
{
|
||||
if (!bFirstFrameInside) {
|
||||
bFirstFrameInside = true;
|
||||
MinTimecode = MaxTimecode = timecode;
|
||||
} else {
|
||||
if (timecode < MinTimecode)
|
||||
MinTimecode = timecode;
|
||||
if (timecode > MaxTimecode)
|
||||
MaxTimecode = timecode;
|
||||
}
|
||||
|
||||
MyNewBlock = NULL;
|
||||
|
||||
if (lacing == LACING_NONE || !track.LacingEnabled()) {
|
||||
currentNewBlock = NULL;
|
||||
}
|
||||
|
||||
// force creation of a new block
|
||||
if (currentNewBlock == NULL || uint32(track.TrackNumber()) != uint32(currentNewBlock->TrackNumber()) || PastBlock != NULL || ForwBlock != NULL) {
|
||||
KaxBlockGroup & aNewBlock = GetNewBlock();
|
||||
MyNewBlock = currentNewBlock = &aNewBlock;
|
||||
currentNewBlock = &aNewBlock;
|
||||
}
|
||||
|
||||
if (PastBlock != NULL) {
|
||||
if (ForwBlock != NULL) {
|
||||
if (currentNewBlock->AddFrame(track, timecode, buffer, *PastBlock, *ForwBlock, lacing)) {
|
||||
// more data are allowed in this Block
|
||||
return true;
|
||||
} else {
|
||||
currentNewBlock = NULL;
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (currentNewBlock->AddFrame(track, timecode, buffer, *PastBlock, lacing)) {
|
||||
// more data are allowed in this Block
|
||||
return true;
|
||||
} else {
|
||||
currentNewBlock = NULL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (currentNewBlock->AddFrame(track, timecode, buffer, lacing)) {
|
||||
// more data are allowed in this Block
|
||||
return true;
|
||||
} else {
|
||||
currentNewBlock = NULL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, LacingType lacing)
|
||||
{
|
||||
assert(Blobs.size() == 0); // mutually exclusive for the moment
|
||||
return AddFrameInternal(track, timecode, buffer, MyNewBlock, NULL, NULL, lacing);
|
||||
}
|
||||
|
||||
bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, LacingType lacing)
|
||||
{
|
||||
assert(Blobs.size() == 0); // mutually exclusive for the moment
|
||||
return AddFrameInternal(track, timecode, buffer, MyNewBlock, &PastBlock, NULL, lacing);
|
||||
}
|
||||
|
||||
bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing)
|
||||
{
|
||||
assert(Blobs.size() == 0); // mutually exclusive for the moment
|
||||
return AddFrameInternal(track, timecode, buffer, MyNewBlock, &PastBlock, &ForwBlock, lacing);
|
||||
}
|
||||
|
||||
/*!
|
||||
\todo only put the Blocks written in the cue entries
|
||||
*/
|
||||
filepos_t KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, bool bSaveDefault)
|
||||
{
|
||||
filepos_t Result = 0;
|
||||
size_t Index;
|
||||
EBML_MASTER_ITERATOR TrkItr, Itr;
|
||||
|
||||
// update the Timecode of the Cluster before writing
|
||||
KaxClusterTimecode * Timecode = static_cast<KaxClusterTimecode *>(this->FindElt(EBML_INFO(KaxClusterTimecode)));
|
||||
*static_cast<EbmlUInteger *>(Timecode) = GlobalTimecode() / GlobalTimecodeScale();
|
||||
|
||||
if (Blobs.size() == 0) {
|
||||
// old-school direct KaxBlockGroup
|
||||
|
||||
// SilentTracks handling
|
||||
// check the parent cluster for existing tracks and see if they are contained in this cluster or not
|
||||
if (bSilentTracksUsed)
|
||||
{
|
||||
KaxTracks & MyTracks = *static_cast<KaxTracks *>(ParentSegment->FindElt(EBML_INFO(KaxTracks)));
|
||||
for (TrkItr = MyTracks.begin(); TrkItr != MyTracks.end(); ++TrkItr)
|
||||
{
|
||||
if (EbmlId(*(*TrkItr)) == EBML_ID(KaxTrackEntry))
|
||||
{
|
||||
KaxTrackEntry & entry = *static_cast<KaxTrackEntry *>(*TrkItr);
|
||||
uint32 tracknum = entry.TrackNumber();
|
||||
for (Itr = begin(); Itr != end(); ++Itr)
|
||||
{
|
||||
if (EbmlId(*(*Itr)) == EBML_ID(KaxBlockGroup)) {
|
||||
KaxBlockGroup & group = *static_cast<KaxBlockGroup *>(*Itr);
|
||||
if (group.TrackNumber() == tracknum)
|
||||
break; // this track is used
|
||||
}
|
||||
}
|
||||
// the track wasn't found in this cluster
|
||||
if (Itr == end())
|
||||
{
|
||||
KaxClusterSilentTracks * SilentTracks = static_cast<KaxClusterSilentTracks *>(this->FindFirstElt(EBML_INFO(KaxClusterSilentTracks)));
|
||||
assert(SilentTracks != NULL); // the flag bSilentTracksUsed should be set when creating the Cluster
|
||||
KaxClusterSilentTrackNumber * trackelt = static_cast<KaxClusterSilentTrackNumber *>(SilentTracks->AddNewElt(EBML_INFO(KaxClusterSilentTrackNumber)));
|
||||
*static_cast<EbmlUInteger *>(trackelt) = tracknum;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Result = EbmlMaster::Render(output, bSaveDefault);
|
||||
// For all Blocks add their position on the CueEntry
|
||||
|
||||
for (Itr = begin(); Itr != end(); ++Itr)
|
||||
{
|
||||
if (EbmlId(*(*Itr)) == EBML_ID(KaxBlockGroup)) {
|
||||
CueToUpdate.PositionSet(*static_cast<const KaxBlockGroup *>(*Itr));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// new school, using KaxBlockBlob
|
||||
for (Index = 0; Index<Blobs.size(); Index++)
|
||||
{
|
||||
#if MATROSKA_VERSION >= 2
|
||||
if (Blobs[Index]->IsSimpleBlock())
|
||||
PushElement( (KaxSimpleBlock&) *Blobs[Index] );
|
||||
else
|
||||
#endif
|
||||
PushElement( (KaxBlockGroup&) *Blobs[Index] );
|
||||
}
|
||||
|
||||
// SilentTracks handling
|
||||
// check the parent cluster for existing tracks and see if they are contained in this cluster or not
|
||||
if (bSilentTracksUsed)
|
||||
{
|
||||
KaxTracks & MyTracks = *static_cast<KaxTracks *>(ParentSegment->FindElt(EBML_INFO(KaxTracks)));
|
||||
for (TrkItr = MyTracks.begin(); TrkItr != MyTracks.end(); ++TrkItr)
|
||||
{
|
||||
if (EbmlId(*(*TrkItr)) == EBML_ID(KaxTrackEntry))
|
||||
{
|
||||
KaxTrackEntry & entry = *static_cast<KaxTrackEntry *>(*TrkItr);
|
||||
uint32 tracknum = entry.TrackNumber();
|
||||
for (Index = 0; Index<Blobs.size(); Index++) {
|
||||
if (((KaxInternalBlock&)*Blobs[Index]).TrackNum() == tracknum)
|
||||
break; // this track is used
|
||||
}
|
||||
// the track wasn't found in this cluster
|
||||
if (Index == ListSize())
|
||||
{
|
||||
KaxClusterSilentTracks * SilentTracks = static_cast<KaxClusterSilentTracks *>(this->FindFirstElt(EBML_INFO(KaxClusterSilentTracks)));
|
||||
assert(SilentTracks != NULL); // the flag bSilentTracksUsed should be set when creating the Cluster
|
||||
KaxClusterSilentTrackNumber * trackelt = static_cast<KaxClusterSilentTrackNumber *>(SilentTracks->AddNewElt(EBML_INFO(KaxClusterSilentTrackNumber)));
|
||||
*static_cast<EbmlUInteger *>(trackelt) = tracknum;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Result = EbmlMaster::Render(output, bSaveDefault);
|
||||
|
||||
// For all Blocks add their position on the CueEntry
|
||||
for (Index = 0; Index<Blobs.size(); Index++) {
|
||||
CueToUpdate.PositionSet(*Blobs[Index]);
|
||||
}
|
||||
|
||||
Blobs.clear();
|
||||
}
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
/*!
|
||||
\todo automatically choose valid timecode for the Cluster based on the previous cluster timecode (must be incremental)
|
||||
*/
|
||||
uint64 KaxCluster::GlobalTimecode() const
|
||||
{
|
||||
assert(bPreviousTimecodeIsSet);
|
||||
uint64 result = MinTimecode;
|
||||
|
||||
if (result < PreviousTimecode)
|
||||
result = PreviousTimecode + 1;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief retrieve the relative
|
||||
\todo !!! We need a way to know the TimecodeScale
|
||||
*/
|
||||
int16 KaxCluster::GetBlockLocalTimecode(uint64 aGlobalTimecode) const
|
||||
{
|
||||
int64 TimecodeDelay = (int64(aGlobalTimecode) - int64(GlobalTimecode())) / int64(GlobalTimecodeScale());
|
||||
assert(TimecodeDelay >= int16(0x8000) && TimecodeDelay <= int16(0x7FFF));
|
||||
return int16(TimecodeDelay);
|
||||
}
|
||||
|
||||
uint64 KaxCluster::GetBlockGlobalTimecode(int16 GlobalSavedTimecode)
|
||||
{
|
||||
if (!bFirstFrameInside) {
|
||||
KaxClusterTimecode * Timecode = static_cast<KaxClusterTimecode *>(this->FindElt(EBML_INFO(KaxClusterTimecode)));
|
||||
assert (bFirstFrameInside); // use the InitTimecode() hack for now
|
||||
MinTimecode = MaxTimecode = PreviousTimecode = *static_cast<EbmlUInteger *>(Timecode);
|
||||
bFirstFrameInside = true;
|
||||
bPreviousTimecodeIsSet = true;
|
||||
}
|
||||
return int64(GlobalSavedTimecode * GlobalTimecodeScale()) + GlobalTimecode();
|
||||
}
|
||||
|
||||
KaxBlockGroup & KaxCluster::GetNewBlock()
|
||||
{
|
||||
KaxBlockGroup & MyBlock = AddNewChild<KaxBlockGroup>(*this);
|
||||
MyBlock.SetParent(*this);
|
||||
return MyBlock;
|
||||
}
|
||||
|
||||
void KaxCluster::ReleaseFrames()
|
||||
{
|
||||
EBML_MASTER_ITERATOR Itr;
|
||||
for (Itr = begin(); Itr != end(); ++Itr)
|
||||
{
|
||||
if (EbmlId(*(*Itr)) == EBML_ID(KaxBlockGroup)) {
|
||||
static_cast<KaxBlockGroup*>(*Itr)->ReleaseFrames();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint64 KaxCluster::GetPosition() const
|
||||
{
|
||||
assert(ParentSegment != NULL);
|
||||
return ParentSegment->GetRelativePosition(*this);
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
51
src/KaxClusterData.cpp
Normal file
51
src/KaxClusterData.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxClusterData.cpp 955 2004-11-28 15:24:37Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxClusterData.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxClusterSilentTracks)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxClusterSilentTrackNumber)
|
||||
DEFINE_END_SEMANTIC(KaxClusterSilentTracks)
|
||||
|
||||
DEFINE_MKX_UINTEGER(KaxClusterTimecode, 0xE7, 1, KaxCluster, "ClusterTimecode");
|
||||
DEFINE_MKX_MASTER (KaxClusterSilentTracks, 0x5854, 2, KaxCluster, "ClusterSilentTracks")
|
||||
DEFINE_MKX_UINTEGER(KaxClusterSilentTrackNumber, 0x58D7, 2, KaxClusterSilentTracks, "ClusterSilentTrackNumber");
|
||||
DEFINE_MKX_UINTEGER(KaxClusterPosition, 0xA7, 1, KaxCluster, "ClusterPosition");
|
||||
DEFINE_MKX_UINTEGER(KaxClusterPrevSize, 0xAB, 1, KaxCluster, "ClusterPrevSize");
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
83
src/KaxContentEncoding.cpp
Normal file
83
src/KaxContentEncoding.cpp
Normal file
@@ -0,0 +1,83 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxContentEncoding.cpp 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Moritz Bunkus <moritz @ bunkus.org>
|
||||
*/
|
||||
#include "matroska/KaxContentEncoding.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxContentEncodings)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxContentEncoding)
|
||||
DEFINE_END_SEMANTIC(KaxContentEncodings)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxContentEncoding)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxContentEncodingOrder)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxContentEncodingScope)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxContentEncodingType)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentCompression)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncryption)
|
||||
DEFINE_END_SEMANTIC(KaxContentEncoding)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxContentCompression)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxContentCompAlgo)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentCompSettings)
|
||||
DEFINE_END_SEMANTIC(KaxContentCompression)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxContentEncryption)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncAlgo)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncKeyID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentSignature)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentSigKeyID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentSigAlgo)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentSigHashAlgo)
|
||||
DEFINE_END_SEMANTIC(KaxContentEncryption)
|
||||
|
||||
DEFINE_MKX_MASTER (KaxContentEncodings, 0x6d80, 2, KaxTrackEntry, "ContentEncodings");
|
||||
DEFINE_MKX_MASTER (KaxContentEncoding, 0x6240, 2, KaxContentEncodings, "ContentEncoding");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxContentEncodingOrder, 0x5031, 2, KaxContentEncoding, "ContentEncodingOrder", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxContentEncodingScope, 0x5032, 2, KaxContentEncoding, "ContentEncodingScope", 1);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxContentEncodingType, 0x5033, 2, KaxContentEncoding, "ContentEncodingType", 0);
|
||||
DEFINE_MKX_MASTER (KaxContentCompression, 0x5034, 2, KaxContentEncoding, "ContentCompression");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxContentCompAlgo, 0x4254, 2, KaxContentCompression, "ContentCompAlgo", 0);
|
||||
DEFINE_MKX_BINARY (KaxContentCompSettings, 0x4255, 2, KaxContentCompression, "ContentCompSettings");
|
||||
DEFINE_MKX_MASTER (KaxContentEncryption, 0x5035, 2, KaxContentEncoding, "ContentEncryption");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxContentEncAlgo, 0x47e1, 2, KaxContentEncryption, "ContentEncAlgo", 0);
|
||||
DEFINE_MKX_BINARY (KaxContentEncKeyID, 0x47e2, 2, KaxContentEncryption, "ContentEncKeyID");
|
||||
DEFINE_MKX_BINARY (KaxContentSignature, 0x47e3, 2, KaxContentEncryption, "ContentSignature");
|
||||
DEFINE_MKX_BINARY (KaxContentSigKeyID, 0x47e4, 2, KaxContentEncryption, "ContentSigKeyID");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxContentSigAlgo, 0x47e5, 2, KaxContentEncryption, "ContentSigAlgo", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxContentSigHashAlgo, 0x47e6, 2, KaxContentEncryption, "ContentSigHashAlgo", 0);
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
@@ -1,67 +1,61 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxContexts.cpp 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "ebml/EbmlContexts.h"
|
||||
#include "ebml/EbmlHead.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxBlock.h"
|
||||
#include "matroska/KaxCluster.h"
|
||||
#include "matroska/KaxSegment.h"
|
||||
#include "matroska/KaxTracks.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxMatroska)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, EbmlHead)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxSegment)
|
||||
DEFINE_END_SEMANTIC(KaxMatroska)
|
||||
|
||||
DEFINE_MKX_CONTEXT(KaxMatroska)
|
||||
|
||||
DEFINE_SEMANTIC_CONTEXT(KaxSegment)
|
||||
DEFINE_SEMANTIC_CONTEXT(KaxAttached)
|
||||
DEFINE_SEMANTIC_CONTEXT(KaxAttachments)
|
||||
DEFINE_SEMANTIC_CONTEXT(KaxBlockGroup)
|
||||
DEFINE_SEMANTIC_CONTEXT(KaxCluster)
|
||||
DEFINE_SEMANTIC_CONTEXT(KaxTrackEntry)
|
||||
|
||||
// for the moment
|
||||
const EbmlSemanticContext & GetKaxGlobal_Context()
|
||||
{
|
||||
return GetEbmlGlobal_Context();
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxContexts.cpp 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "ebml/EbmlContexts.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxAttached.h"
|
||||
#include "matroska/KaxAttachments.h"
|
||||
#include "matroska/KaxBlock.h"
|
||||
#include "matroska/KaxCluster.h"
|
||||
#include "matroska/KaxSegment.h"
|
||||
#include "matroska/KaxTracks.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_SEMANTIC_CONTEXT(KaxSegment)
|
||||
DEFINE_SEMANTIC_CONTEXT(KaxAttached)
|
||||
DEFINE_SEMANTIC_CONTEXT(KaxAttachments)
|
||||
DEFINE_SEMANTIC_CONTEXT(KaxBlockGroup)
|
||||
DEFINE_SEMANTIC_CONTEXT(KaxCluster)
|
||||
DEFINE_SEMANTIC_CONTEXT(KaxTrackEntry)
|
||||
|
||||
// for the moment
|
||||
const EbmlSemanticContext & GetKaxGlobal_Context()
|
||||
{
|
||||
return GetEbmlGlobal_Context();
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
@@ -17,9 +17,9 @@
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -37,34 +37,36 @@
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "ebml/EbmlStream.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxCues)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxCuePoint)
|
||||
DEFINE_END_SEMANTIC(KaxCues)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxCues, 0x1C53BB6B, 4, KaxSegment, "Cues");
|
||||
|
||||
KaxCues::~KaxCues()
|
||||
{
|
||||
assert(myTempReferences.size() == 0); // otherwise that means you have added references and forgot to set the position
|
||||
}
|
||||
/* deprecated and wrong
|
||||
|
||||
bool KaxCues::AddBlockGroup(const KaxBlockGroup & BlockRef)
|
||||
{
|
||||
// Do not add the element if it's already present.
|
||||
std::vector<const KaxBlockBlob *>::iterator ListIdx;
|
||||
KaxBlockBlob *BlockReference = new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE);
|
||||
BlockReference->SetBlockGroup(*const_cast<KaxBlockGroup*>(&BlockRef));
|
||||
KaxBlockBlob &BlockReference = *(new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE));
|
||||
BlockReference.SetBlockGroup(*const_cast<KaxBlockGroup*>(&BlockRef));
|
||||
|
||||
for (ListIdx = myTempReferences.begin(); ListIdx != myTempReferences.end(); ListIdx++)
|
||||
if (&(KaxBlockGroup&)*ListIdx == &BlockRef)
|
||||
{
|
||||
delete BlockReference;
|
||||
if (*ListIdx == &BlockReference)
|
||||
return true;
|
||||
}
|
||||
|
||||
myTempReferences.push_back(BlockReference);
|
||||
myTempReferences.push_back(&BlockReference);
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
bool KaxCues::AddBlockBlob(const KaxBlockBlob & BlockReference)
|
||||
{
|
||||
// Do not add the element if it's already present.
|
||||
@@ -120,6 +122,7 @@ const KaxCuePoint * KaxCues::GetTimecodePoint(uint64 aTimecode) const
|
||||
uint64 TimecodeToLocate = aTimecode / GlobalTimecodeScale();
|
||||
const KaxCuePoint * aPointPrev = NULL;
|
||||
uint64 aPrevTime = 0;
|
||||
const KaxCuePoint * aPointNext = NULL;
|
||||
uint64 aNextTime = EBML_PRETTYLONGINT(0xFFFFFFFFFFFF);
|
||||
|
||||
EBML_MASTER_CONST_ITERATOR Itr;
|
||||
@@ -138,6 +141,7 @@ const KaxCuePoint * KaxCues::GetTimecodePoint(uint64 aTimecode) const
|
||||
}
|
||||
if (_Time < aNextTime && _Time > TimecodeToLocate) {
|
||||
aNextTime= _Time;
|
||||
aPointNext = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,241 +1,279 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxCuesData.cpp 1265 2007-01-14 17:20:35Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include <cassert>
|
||||
|
||||
#include "matroska/KaxCuesData.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxBlock.h"
|
||||
#include "matroska/KaxBlockData.h"
|
||||
#include "matroska/KaxCluster.h"
|
||||
#include "matroska/KaxSegment.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
/*!
|
||||
\todo handle codec state checking
|
||||
\todo remove duplicate references (reference to 2 frames that each reference the same frame)
|
||||
*/
|
||||
void KaxCuePoint::PositionSet(const KaxBlockGroup & BlockReference, uint64 GlobalTimecodeScale)
|
||||
{
|
||||
// fill me
|
||||
KaxCueTime & NewTime = GetChild<KaxCueTime>(*this);
|
||||
*static_cast<EbmlUInteger*>(&NewTime) = BlockReference.GlobalTimecode() / GlobalTimecodeScale;
|
||||
|
||||
KaxCueTrackPositions & NewPositions = AddNewChild<KaxCueTrackPositions>(*this);
|
||||
KaxCueTrack & TheTrack = GetChild<KaxCueTrack>(NewPositions);
|
||||
*static_cast<EbmlUInteger*>(&TheTrack) = BlockReference.TrackNumber();
|
||||
|
||||
KaxCueClusterPosition & TheClustPos = GetChild<KaxCueClusterPosition>(NewPositions);
|
||||
*static_cast<EbmlUInteger*>(&TheClustPos) = BlockReference.ClusterPosition();
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
// handle reference use
|
||||
if (BlockReference.ReferenceCount() != 0)
|
||||
{
|
||||
unsigned int i;
|
||||
for (i=0; i<BlockReference.ReferenceCount(); i++) {
|
||||
KaxCueReference & NewRefs = AddNewChild<KaxCueReference>(NewPositions);
|
||||
NewRefs.AddReference(BlockReference.Reference(i).RefBlock(), GlobalTimecodeScale);
|
||||
}
|
||||
}
|
||||
|
||||
KaxCodecState *CodecState = static_cast<KaxCodecState *>(BlockReference.FindFirstElt(EBML_INFO(KaxCodecState)));
|
||||
if (CodecState != NULL) {
|
||||
KaxCueCodecState &CueCodecState = AddNewChild<KaxCueCodecState>(NewPositions);
|
||||
*static_cast<EbmlUInteger*>(&CueCodecState) = BlockReference.GetParentCluster()->GetParentSegment()->GetRelativePosition(CodecState->GetElementPosition());
|
||||
}
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
SetValueIsSet();
|
||||
}
|
||||
|
||||
void KaxCuePoint::PositionSet(const KaxBlockBlob & BlobReference, uint64 GlobalTimecodeScale)
|
||||
{
|
||||
const KaxInternalBlock &BlockReference = BlobReference;
|
||||
|
||||
// fill me
|
||||
KaxCueTime & NewTime = GetChild<KaxCueTime>(*this);
|
||||
*static_cast<EbmlUInteger*>(&NewTime) = BlockReference.GlobalTimecode() / GlobalTimecodeScale;
|
||||
|
||||
KaxCueTrackPositions & NewPositions = AddNewChild<KaxCueTrackPositions>(*this);
|
||||
KaxCueTrack & TheTrack = GetChild<KaxCueTrack>(NewPositions);
|
||||
*static_cast<EbmlUInteger*>(&TheTrack) = BlockReference.TrackNum();
|
||||
|
||||
KaxCueClusterPosition & TheClustPos = GetChild<KaxCueClusterPosition>(NewPositions);
|
||||
*static_cast<EbmlUInteger*>(&TheClustPos) = BlockReference.ClusterPosition();
|
||||
|
||||
#if 0 // MATROSKA_VERSION >= 2
|
||||
// handle reference use
|
||||
if (BlockReference.ReferenceCount() != 0)
|
||||
{
|
||||
unsigned int i;
|
||||
for (i=0; i<BlockReference.ReferenceCount(); i++) {
|
||||
KaxCueReference & NewRefs = AddNewChild<KaxCueReference>(NewPositions);
|
||||
NewRefs.AddReference(BlockReference.Reference(i).RefBlock(), GlobalTimecodeScale);
|
||||
}
|
||||
}
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
if (!BlobReference.IsSimpleBlock()) {
|
||||
const KaxBlockGroup &BlockGroup = BlobReference;
|
||||
const KaxCodecState *CodecState = static_cast<KaxCodecState *>(BlockGroup.FindFirstElt(EBML_INFO(KaxCodecState)));
|
||||
if (CodecState != NULL) {
|
||||
KaxCueCodecState &CueCodecState = AddNewChild<KaxCueCodecState>(NewPositions);
|
||||
*static_cast<EbmlUInteger*>(&CueCodecState) = BlockGroup.GetParentCluster()->GetParentSegment()->GetRelativePosition(CodecState->GetElementPosition());
|
||||
}
|
||||
}
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
SetValueIsSet();
|
||||
}
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
/*!
|
||||
\todo handle codec state checking
|
||||
*/
|
||||
void KaxCueReference::AddReference(const KaxBlockBlob & BlockReference, uint64 GlobalTimecodeScale)
|
||||
{
|
||||
const KaxInternalBlock & theBlock = BlockReference;
|
||||
KaxCueRefTime & NewTime = GetChild<KaxCueRefTime>(*this);
|
||||
*static_cast<EbmlUInteger*>(&NewTime) = theBlock.GlobalTimecode() / GlobalTimecodeScale;
|
||||
|
||||
KaxCueRefCluster & TheClustPos = GetChild<KaxCueRefCluster>(*this);
|
||||
*static_cast<EbmlUInteger*>(&TheClustPos) = theBlock.ClusterPosition();
|
||||
|
||||
#ifdef OLD
|
||||
// handle recursive reference use
|
||||
if (BlockReference.ReferenceCount() != 0)
|
||||
{
|
||||
unsigned int i;
|
||||
for (i=0; i<BlockReference.ReferenceCount(); i++) {
|
||||
AddReference(BlockReference.Reference(i).RefBlock());
|
||||
}
|
||||
}
|
||||
#endif /* OLD */
|
||||
}
|
||||
#endif
|
||||
|
||||
bool KaxCuePoint::IsSmallerThan(const EbmlElement * EltB) const
|
||||
{
|
||||
assert(EbmlId(*this) == EBML_ID(KaxCuePoint));
|
||||
assert(EbmlId(*EltB) == EBML_ID(KaxCuePoint));
|
||||
|
||||
const KaxCuePoint & theEltB = *static_cast<const KaxCuePoint *>(EltB);
|
||||
|
||||
// compare timecode
|
||||
const KaxCueTime * TimeCodeA = static_cast<const KaxCueTime *>(FindElt(EBML_INFO(KaxCueTime)));
|
||||
if (TimeCodeA == NULL)
|
||||
return false;
|
||||
|
||||
const KaxCueTime * TimeCodeB = static_cast<const KaxCueTime *>(theEltB.FindElt(EBML_INFO(KaxCueTime)));
|
||||
if (TimeCodeB == NULL)
|
||||
return false;
|
||||
|
||||
if (TimeCodeA->IsSmallerThan(TimeCodeB))
|
||||
return true;
|
||||
|
||||
if (TimeCodeB->IsSmallerThan(TimeCodeA))
|
||||
return false;
|
||||
|
||||
// compare tracks (timecodes are equal)
|
||||
const KaxCueTrack * TrackA = static_cast<const KaxCueTrack *>(FindElt(EBML_INFO(KaxCueTrack)));
|
||||
if (TrackA == NULL)
|
||||
return false;
|
||||
|
||||
const KaxCueTrack * TrackB = static_cast<const KaxCueTrack *>(theEltB.FindElt(EBML_INFO(KaxCueTrack)));
|
||||
if (TrackB == NULL)
|
||||
return false;
|
||||
|
||||
if (TrackA->IsSmallerThan(TrackB))
|
||||
return true;
|
||||
|
||||
if (TrackB->IsSmallerThan(TrackA))
|
||||
return false;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool KaxCuePoint::Timecode(uint64 & aTimecode, uint64 GlobalTimecodeScale) const
|
||||
{
|
||||
const KaxCueTime *aTime = static_cast<const KaxCueTime *>(FindFirstElt(EBML_INFO(KaxCueTime)));
|
||||
if (aTime == NULL)
|
||||
return false;
|
||||
aTimecode = uint64(*aTime) * GlobalTimecodeScale;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief return the position of the Cluster to load
|
||||
*/
|
||||
const KaxCueTrackPositions * KaxCuePoint::GetSeekPosition() const
|
||||
{
|
||||
const KaxCueTrackPositions * result = NULL;
|
||||
uint64 aPosition = EBML_PRETTYLONGINT(0xFFFFFFFFFFFFFFF);
|
||||
// find the position of the "earlier" Cluster
|
||||
const KaxCueTrackPositions *aPoss = static_cast<const KaxCueTrackPositions *>(FindFirstElt(EBML_INFO(KaxCueTrackPositions)));
|
||||
while (aPoss != NULL)
|
||||
{
|
||||
const KaxCueClusterPosition *aPos = static_cast<const KaxCueClusterPosition *>(aPoss->FindFirstElt(EBML_INFO(KaxCueClusterPosition)));
|
||||
if (aPos != NULL && uint64(*aPos) < aPosition) {
|
||||
aPosition = uint64(*aPos);
|
||||
result = aPoss;
|
||||
}
|
||||
|
||||
aPoss = static_cast<const KaxCueTrackPositions *>(FindNextElt(*aPoss));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
uint64 KaxCueTrackPositions::ClusterPosition() const
|
||||
{
|
||||
const KaxCueClusterPosition *aPos = static_cast<const KaxCueClusterPosition *>(FindFirstElt(EBML_INFO(KaxCueClusterPosition)));
|
||||
if (aPos == NULL)
|
||||
return 0;
|
||||
|
||||
return uint64(*aPos);
|
||||
}
|
||||
|
||||
uint16 KaxCueTrackPositions::TrackNumber() const
|
||||
{
|
||||
const KaxCueTrack *aTrack = static_cast<const KaxCueTrack *>(FindFirstElt(EBML_INFO(KaxCueTrack)));
|
||||
if (aTrack == NULL)
|
||||
return 0;
|
||||
|
||||
return uint16(*aTrack);
|
||||
}
|
||||
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxCuesData.cpp 1265 2007-01-14 17:20:35Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include <cassert>
|
||||
|
||||
#include "matroska/KaxCuesData.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxBlock.h"
|
||||
#include "matroska/KaxBlockData.h"
|
||||
#include "matroska/KaxCluster.h"
|
||||
#include "matroska/KaxSegment.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxCuePoint)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxCueTime)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxCueTrackPositions)
|
||||
DEFINE_END_SEMANTIC(KaxCuePoint)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxCueTrackPositions)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxCueTrack)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxCueClusterPosition)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCueBlockNumber)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCueCodecState)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxCueReference)
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_END_SEMANTIC(KaxCueTrackPositions)
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_START_SEMANTIC(KaxCueReference)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxCueRefTime)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxCueRefCluster)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCueRefNumber)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCueRefCodecState)
|
||||
DEFINE_END_SEMANTIC(KaxCueReference)
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
DEFINE_MKX_MASTER (KaxCuePoint, 0xBB, 1, KaxCues, "CuePoint");
|
||||
DEFINE_MKX_UINTEGER (KaxCueTime, 0xB3, 1, KaxCuePoint, "CueTime");
|
||||
DEFINE_MKX_MASTER (KaxCueTrackPositions, 0xB7, 1, KaxCuePoint, "CueTrackPositions");
|
||||
DEFINE_MKX_UINTEGER (KaxCueTrack, 0xF7, 1, KaxCueTrackPositions, "CueTrack");
|
||||
DEFINE_MKX_UINTEGER (KaxCueClusterPosition, 0xF1, 1, KaxCueTrackPositions, "CueClusterPosition");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxCueBlockNumber, 0x5378, 2, KaxCueTrackPositions, "CueBlockNumber", 1);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxCueCodecState, 0xEA, 1, KaxCueTrackPositions, "CueCodecState", 0);
|
||||
DEFINE_MKX_MASTER (KaxCueReference, 0xDB, 1, KaxCueTrackPositions, "CueReference");
|
||||
DEFINE_MKX_UINTEGER (KaxCueRefTime, 0x96, 1, KaxCueReference, "CueRefTime");
|
||||
DEFINE_MKX_UINTEGER (KaxCueRefCluster, 0x97, 1, KaxCueRefTime, "CueRefCluster");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxCueRefNumber, 0x535F, 2, KaxCueRefTime, "CueRefNumber", 1);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxCueRefCodecState, 0xEB, 1, KaxCueRefTime, "CueRefCodecState", 0);
|
||||
#endif
|
||||
|
||||
/*!
|
||||
\todo handle codec state checking
|
||||
\todo remove duplicate references (reference to 2 frames that each reference the same frame)
|
||||
*/
|
||||
void KaxCuePoint::PositionSet(const KaxBlockGroup & BlockReference, uint64 GlobalTimecodeScale)
|
||||
{
|
||||
// fill me
|
||||
KaxCueTime & NewTime = GetChild<KaxCueTime>(*this);
|
||||
*static_cast<EbmlUInteger*>(&NewTime) = BlockReference.GlobalTimecode() / GlobalTimecodeScale;
|
||||
|
||||
KaxCueTrackPositions & NewPositions = AddNewChild<KaxCueTrackPositions>(*this);
|
||||
KaxCueTrack & TheTrack = GetChild<KaxCueTrack>(NewPositions);
|
||||
*static_cast<EbmlUInteger*>(&TheTrack) = BlockReference.TrackNumber();
|
||||
|
||||
KaxCueClusterPosition & TheClustPos = GetChild<KaxCueClusterPosition>(NewPositions);
|
||||
*static_cast<EbmlUInteger*>(&TheClustPos) = BlockReference.ClusterPosition();
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
// handle reference use
|
||||
if (BlockReference.ReferenceCount() != 0)
|
||||
{
|
||||
unsigned int i;
|
||||
for (i=0; i<BlockReference.ReferenceCount(); i++) {
|
||||
KaxCueReference & NewRefs = AddNewChild<KaxCueReference>(NewPositions);
|
||||
NewRefs.AddReference(BlockReference.Reference(i).RefBlock(), GlobalTimecodeScale);
|
||||
}
|
||||
}
|
||||
|
||||
KaxCodecState *CodecState = static_cast<KaxCodecState *>(BlockReference.FindFirstElt(EBML_INFO(KaxCodecState)));
|
||||
if (CodecState != NULL) {
|
||||
KaxCueCodecState &CueCodecState = AddNewChild<KaxCueCodecState>(NewPositions);
|
||||
*static_cast<EbmlUInteger*>(&CueCodecState) = BlockReference.GetParentCluster()->GetParentSegment()->GetRelativePosition(CodecState->GetElementPosition());
|
||||
}
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
SetValueIsSet();
|
||||
}
|
||||
|
||||
void KaxCuePoint::PositionSet(const KaxBlockBlob & BlobReference, uint64 GlobalTimecodeScale)
|
||||
{
|
||||
const KaxInternalBlock &BlockReference = BlobReference;
|
||||
|
||||
// fill me
|
||||
KaxCueTime & NewTime = GetChild<KaxCueTime>(*this);
|
||||
*static_cast<EbmlUInteger*>(&NewTime) = BlockReference.GlobalTimecode() / GlobalTimecodeScale;
|
||||
|
||||
KaxCueTrackPositions & NewPositions = AddNewChild<KaxCueTrackPositions>(*this);
|
||||
KaxCueTrack & TheTrack = GetChild<KaxCueTrack>(NewPositions);
|
||||
*static_cast<EbmlUInteger*>(&TheTrack) = BlockReference.TrackNum();
|
||||
|
||||
KaxCueClusterPosition & TheClustPos = GetChild<KaxCueClusterPosition>(NewPositions);
|
||||
*static_cast<EbmlUInteger*>(&TheClustPos) = BlockReference.ClusterPosition();
|
||||
|
||||
#if 0 // MATROSKA_VERSION >= 2
|
||||
// handle reference use
|
||||
if (BlockReference.ReferenceCount() != 0)
|
||||
{
|
||||
unsigned int i;
|
||||
for (i=0; i<BlockReference.ReferenceCount(); i++) {
|
||||
KaxCueReference & NewRefs = AddNewChild<KaxCueReference>(NewPositions);
|
||||
NewRefs.AddReference(BlockReference.Reference(i).RefBlock(), GlobalTimecodeScale);
|
||||
}
|
||||
}
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
if (!BlobReference.IsSimpleBlock()) {
|
||||
const KaxBlockGroup &BlockGroup = BlobReference;
|
||||
const KaxCodecState *CodecState = static_cast<KaxCodecState *>(BlockGroup.FindFirstElt(EBML_INFO(KaxCodecState)));
|
||||
if (CodecState != NULL) {
|
||||
KaxCueCodecState &CueCodecState = AddNewChild<KaxCueCodecState>(NewPositions);
|
||||
*static_cast<EbmlUInteger*>(&CueCodecState) = BlockGroup.GetParentCluster()->GetParentSegment()->GetRelativePosition(CodecState->GetElementPosition());
|
||||
}
|
||||
}
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
SetValueIsSet();
|
||||
}
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
/*!
|
||||
\todo handle codec state checking
|
||||
*/
|
||||
void KaxCueReference::AddReference(const KaxBlockBlob & BlockReference, uint64 GlobalTimecodeScale)
|
||||
{
|
||||
const KaxInternalBlock & theBlock = BlockReference;
|
||||
KaxCueRefTime & NewTime = GetChild<KaxCueRefTime>(*this);
|
||||
*static_cast<EbmlUInteger*>(&NewTime) = theBlock.GlobalTimecode() / GlobalTimecodeScale;
|
||||
|
||||
KaxCueRefCluster & TheClustPos = GetChild<KaxCueRefCluster>(*this);
|
||||
*static_cast<EbmlUInteger*>(&TheClustPos) = theBlock.ClusterPosition();
|
||||
|
||||
#ifdef OLD
|
||||
// handle recursive reference use
|
||||
if (BlockReference.ReferenceCount() != 0)
|
||||
{
|
||||
unsigned int i;
|
||||
for (i=0; i<BlockReference.ReferenceCount(); i++) {
|
||||
AddReference(BlockReference.Reference(i).RefBlock());
|
||||
}
|
||||
}
|
||||
#endif /* OLD */
|
||||
}
|
||||
#endif
|
||||
|
||||
bool KaxCuePoint::IsSmallerThan(const EbmlElement * EltB) const
|
||||
{
|
||||
assert(EbmlId(*this) == EBML_ID(KaxCuePoint));
|
||||
assert(EbmlId(*EltB) == EBML_ID(KaxCuePoint));
|
||||
|
||||
const KaxCuePoint & theEltB = *static_cast<const KaxCuePoint *>(EltB);
|
||||
|
||||
// compare timecode
|
||||
const KaxCueTime * TimeCodeA = static_cast<const KaxCueTime *>(FindElt(EBML_INFO(KaxCueTime)));
|
||||
if (TimeCodeA == NULL)
|
||||
return false;
|
||||
|
||||
const KaxCueTime * TimeCodeB = static_cast<const KaxCueTime *>(theEltB.FindElt(EBML_INFO(KaxCueTime)));
|
||||
if (TimeCodeB == NULL)
|
||||
return false;
|
||||
|
||||
if (TimeCodeA->IsSmallerThan(TimeCodeB))
|
||||
return true;
|
||||
|
||||
if (TimeCodeB->IsSmallerThan(TimeCodeA))
|
||||
return false;
|
||||
|
||||
// compare tracks (timecodes are equal)
|
||||
const KaxCueTrack * TrackA = static_cast<const KaxCueTrack *>(FindElt(EBML_INFO(KaxCueTrack)));
|
||||
if (TrackA == NULL)
|
||||
return false;
|
||||
|
||||
const KaxCueTrack * TrackB = static_cast<const KaxCueTrack *>(theEltB.FindElt(EBML_INFO(KaxCueTrack)));
|
||||
if (TrackB == NULL)
|
||||
return false;
|
||||
|
||||
if (TrackA->IsSmallerThan(TrackB))
|
||||
return true;
|
||||
|
||||
if (TrackB->IsSmallerThan(TrackA))
|
||||
return false;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool KaxCuePoint::Timecode(uint64 & aTimecode, uint64 GlobalTimecodeScale) const
|
||||
{
|
||||
const KaxCueTime *aTime = static_cast<const KaxCueTime *>(FindFirstElt(EBML_INFO(KaxCueTime)));
|
||||
if (aTime == NULL)
|
||||
return false;
|
||||
aTimecode = uint64(*aTime) * GlobalTimecodeScale;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief return the position of the Cluster to load
|
||||
*/
|
||||
const KaxCueTrackPositions * KaxCuePoint::GetSeekPosition() const
|
||||
{
|
||||
const KaxCueTrackPositions * result = NULL;
|
||||
uint64 aPosition = EBML_PRETTYLONGINT(0xFFFFFFFFFFFFFFF);
|
||||
// find the position of the "earlier" Cluster
|
||||
const KaxCueTrackPositions *aPoss = static_cast<const KaxCueTrackPositions *>(FindFirstElt(EBML_INFO(KaxCueTrackPositions)));
|
||||
while (aPoss != NULL)
|
||||
{
|
||||
const KaxCueClusterPosition *aPos = static_cast<const KaxCueClusterPosition *>(aPoss->FindFirstElt(EBML_INFO(KaxCueClusterPosition)));
|
||||
if (aPos != NULL && uint64(*aPos) < aPosition) {
|
||||
aPosition = uint64(*aPos);
|
||||
result = aPoss;
|
||||
}
|
||||
|
||||
aPoss = static_cast<const KaxCueTrackPositions *>(FindNextElt(*aPoss));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
uint64 KaxCueTrackPositions::ClusterPosition() const
|
||||
{
|
||||
const KaxCueClusterPosition *aPos = static_cast<const KaxCueClusterPosition *>(FindFirstElt(EBML_INFO(KaxCueClusterPosition)));
|
||||
if (aPos == NULL)
|
||||
return 0;
|
||||
|
||||
return uint64(*aPos);
|
||||
}
|
||||
|
||||
uint16 KaxCueTrackPositions::TrackNumber() const
|
||||
{
|
||||
const KaxCueTrack *aTrack = static_cast<const KaxCueTrack *>(FindFirstElt(EBML_INFO(KaxCueTrack)));
|
||||
if (aTrack == NULL)
|
||||
return 0;
|
||||
|
||||
return uint16(*aTrack);
|
||||
}
|
||||
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
65
src/KaxInfo.cpp
Normal file
65
src/KaxInfo.cpp
Normal file
@@ -0,0 +1,65 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxInfo.cpp 1078 2005-03-03 13:13:04Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxInfo.h"
|
||||
#include "matroska/KaxInfoData.h"
|
||||
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxInfo)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxSegmentUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxSegmentFilename)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxPrevUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxPrevFilename)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxNextUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxNextFilename)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxSegmentFamily)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxChapterTranslate)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTimecodeScale)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxDuration)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxDateUTC)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTitle)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxMuxingApp)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxWritingApp)
|
||||
DEFINE_END_SEMANTIC(KaxInfo)
|
||||
|
||||
DEFINE_MKX_MASTER (KaxInfo, 0x1549A966, 4, KaxSegment, "Info");
|
||||
DEFINE_MKX_UNISTRING(KaxMuxingApp, 0x4D80, 2, KaxInfo, "MuxingApp");
|
||||
DEFINE_MKX_UNISTRING(KaxWritingApp, 0x5741, 2, KaxInfo, "WritingApp");
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
@@ -19,9 +19,9 @@
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -36,10 +36,31 @@
|
||||
#include "matroska/KaxInfoData.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
#include "matroska/KaxSemantic.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxChapterTranslate)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxChapterTranslateEditionUID)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterTranslateCodec)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterTranslateID)
|
||||
DEFINE_END_SEMANTIC(KaxChapterTranslate)
|
||||
|
||||
DEFINE_MKX_BINARY (KaxSegmentUID, 0x73A4, 2, KaxInfo, "SegmentUID");
|
||||
DEFINE_MKX_UNISTRING (KaxSegmentFilename, 0x7384, 2, KaxInfo, "SegmentFilename");
|
||||
DEFINE_MKX_BINARY_CONS (KaxPrevUID, 0x3CB923, 3, KaxInfo, "PrevUID");
|
||||
DEFINE_MKX_UNISTRING (KaxPrevFilename, 0x3C83AB, 3, KaxInfo, "PrevFilename");
|
||||
DEFINE_MKX_BINARY_CONS (KaxNextUID, 0x3EB923, 3, KaxInfo, "NextUID");
|
||||
DEFINE_MKX_UNISTRING (KaxNextFilename, 0x3E83BB, 3, KaxInfo, "NextFilename");
|
||||
DEFINE_MKX_BINARY (KaxSegmentFamily, 0x4444, 2, KaxInfo, "SegmentFamily");
|
||||
DEFINE_MKX_MASTER (KaxChapterTranslate, 0x6924, 2, KaxInfo, "ChapterTranslate");
|
||||
DEFINE_MKX_UINTEGER (KaxChapterTranslateEditionUID, 0x69FC, 2, KaxChapterTranslate, "ChapterTranslateEditionUID");
|
||||
DEFINE_MKX_UINTEGER (KaxChapterTranslateCodec, 0x69BF, 2, KaxChapterTranslate, "ChapterTranslateCodec");
|
||||
DEFINE_MKX_BINARY (KaxChapterTranslateID, 0x69A5, 2, KaxChapterTranslate, "ChapterTranslateID");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTimecodeScale, 0x2AD7B1, 3, KaxInfo, "TimecodeScale", 1000000);
|
||||
DEFINE_MKX_FLOAT (KaxDuration, 0x4489, 2, KaxInfo, "Duration");
|
||||
DEFINE_MKX_DATE (KaxDateUTC, 0x4461, 2, KaxInfo, "DateUTC");
|
||||
DEFINE_MKX_UNISTRING (KaxTitle, 0x7BA9, 2, KaxInfo, "Title");
|
||||
|
||||
KaxPrevUID::KaxPrevUID(EBML_EXTRA_DEF)
|
||||
:KaxSegmentUID(EBML_DEF_BINARY_CTX(KaxPrevUID) EBML_DEF_SEP EBML_EXTRA_CALL)
|
||||
{
|
||||
@@ -50,7 +71,7 @@ KaxNextUID::KaxNextUID(EBML_EXTRA_DEF)
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(HAVE_EBML2) || defined(HAS_EBML2)
|
||||
#if defined(HAVE_EBML2)
|
||||
KaxSegmentUID::KaxSegmentUID(EBML_DEF_CONS EBML_DEF_SEP EBML_EXTRA_DEF)
|
||||
:EbmlBinary(EBML_DEF_PARAM EBML_DEF_SEP EBML_EXTRA_CALL)
|
||||
{
|
||||
|
@@ -19,9 +19,9 @@
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -43,6 +43,20 @@ using namespace LIBEBML_NAMESPACE;
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxSeekHead)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxSeek)
|
||||
DEFINE_END_SEMANTIC(KaxSeekHead)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxSeek)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxSeekID)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxSeekPosition)
|
||||
DEFINE_END_SEMANTIC(KaxSeek)
|
||||
|
||||
DEFINE_MKX_MASTER (KaxSeekHead, 0x114D9B74, 4, KaxSegment, "SeekHeader");
|
||||
DEFINE_MKX_MASTER (KaxSeek, 0x4DBB, 2, KaxSeekHead, "SeekPoint");
|
||||
DEFINE_MKX_BINARY (KaxSeekID, 0x53AB, 2, KaxSeek, "SeekID");
|
||||
DEFINE_MKX_UINTEGER(KaxSeekPosition, 0x53AC, 2, KaxSeek, "SeekPosition");
|
||||
|
||||
/*!
|
||||
\todo verify that the element is not already in the list
|
||||
*/
|
||||
|
@@ -1,85 +1,109 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxSegment.cpp 1096 2005-03-17 09:14:52Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxSegment.h"
|
||||
#include "ebml/EbmlHead.h"
|
||||
|
||||
// sub elements
|
||||
#include "matroska/KaxCluster.h"
|
||||
#include "matroska/KaxSeekHead.h"
|
||||
#include "matroska/KaxCues.h"
|
||||
#include "matroska/KaxTracks.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
KaxSegment::KaxSegment(EBML_EXTRA_DEF)
|
||||
:EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxSegment) EBML_DEF_SEP EBML_EXTRA_CALL)
|
||||
{
|
||||
SetSizeLength(5); // mandatory min size support (for easier updating) (2^(7*5)-2 = 32Go)
|
||||
SetSizeInfinite(); // by default a segment is big and the size is unknown in advance
|
||||
}
|
||||
|
||||
KaxSegment::KaxSegment(const KaxSegment & ElementToClone)
|
||||
:EbmlMaster(ElementToClone)
|
||||
{
|
||||
// update the parent of each children
|
||||
EBML_MASTER_ITERATOR Itr = begin();
|
||||
while (Itr != end())
|
||||
{
|
||||
if (EbmlId(**Itr) == EBML_ID(KaxCluster)) {
|
||||
static_cast<KaxCluster *>(*Itr)->SetParent(*this);
|
||||
}
|
||||
++Itr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uint64 KaxSegment::GetRelativePosition(uint64 aGlobalPosition) const
|
||||
{
|
||||
return aGlobalPosition - GetElementPosition() - HeadSize();
|
||||
}
|
||||
|
||||
uint64 KaxSegment::GetRelativePosition(const EbmlElement & Elt) const
|
||||
{
|
||||
return GetRelativePosition(Elt.GetElementPosition());
|
||||
}
|
||||
|
||||
uint64 KaxSegment::GetGlobalPosition(uint64 aRelativePosition) const
|
||||
{
|
||||
return aRelativePosition + GetElementPosition() + HeadSize();
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxSegment.cpp 1096 2005-03-17 09:14:52Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxSegment.h"
|
||||
#include "ebml/EbmlHead.h"
|
||||
|
||||
// sub elements
|
||||
#include "matroska/KaxCluster.h"
|
||||
#include "matroska/KaxSeekHead.h"
|
||||
#include "matroska/KaxCues.h"
|
||||
#include "matroska/KaxTracks.h"
|
||||
#include "matroska/KaxInfo.h"
|
||||
#include "matroska/KaxChapters.h"
|
||||
#include "matroska/KaxAttachments.h"
|
||||
#include "matroska/KaxTags.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxMatroska)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, EbmlHead)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxSegment)
|
||||
DEFINE_END_SEMANTIC(KaxMatroska)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxSegment)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxCluster)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxSeekHead)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCues)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTracks)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxInfo)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxChapters)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxAttachments)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTags)
|
||||
DEFINE_END_SEMANTIC(KaxSegment)
|
||||
|
||||
DEFINE_MKX_CONTEXT(KaxMatroska);
|
||||
|
||||
DEFINE_MKX_MASTER_ORPHAN(KaxSegment, 0x18538067, 4, "Segment\0rotomopogo");
|
||||
|
||||
KaxSegment::KaxSegment(EBML_EXTRA_DEF)
|
||||
:EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxSegment) EBML_DEF_SEP EBML_EXTRA_CALL)
|
||||
{
|
||||
SetSizeLength(5); // mandatory min size support (for easier updating) (2^(7*5)-2 = 32Go)
|
||||
SetSizeInfinite(); // by default a segment is big and the size is unknown in advance
|
||||
}
|
||||
|
||||
KaxSegment::KaxSegment(const KaxSegment & ElementToClone)
|
||||
:EbmlMaster(ElementToClone)
|
||||
{
|
||||
// update the parent of each children
|
||||
EBML_MASTER_ITERATOR Itr = begin();
|
||||
while (Itr != end())
|
||||
{
|
||||
if (EbmlId(**Itr) == EBML_ID(KaxCluster)) {
|
||||
static_cast<KaxCluster *>(*Itr)->SetParent(*this);
|
||||
}
|
||||
++Itr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uint64 KaxSegment::GetRelativePosition(uint64 aGlobalPosition) const
|
||||
{
|
||||
return aGlobalPosition - GetElementPosition() - HeadSize();
|
||||
}
|
||||
|
||||
uint64 KaxSegment::GetRelativePosition(const EbmlElement & Elt) const
|
||||
{
|
||||
return GetRelativePosition(Elt.GetElementPosition());
|
||||
}
|
||||
|
||||
uint64 KaxSegment::GetGlobalPosition(uint64 aRelativePosition) const
|
||||
{
|
||||
return aRelativePosition + GetElementPosition() + HeadSize();
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
@@ -1,801 +0,0 @@
|
||||
/**********************************************************************
|
||||
** DO NOT EDIT, GENERATED WITH DATA2LIB
|
||||
**
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** Copyright (c) 2002-2010, Matroska (non-profit organisation)
|
||||
** All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxSemantic.h"
|
||||
#include "matroska/KaxSegment.h"
|
||||
#include "matroska/KaxSeekHead.h"
|
||||
#include "matroska/KaxCluster.h"
|
||||
#include "matroska/KaxTracks.h"
|
||||
#include "matroska/KaxCues.h"
|
||||
#include "matroska/KaxInfoData.h"
|
||||
#include "matroska/KaxBlockData.h"
|
||||
#include "matroska/KaxCuesData.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxSegment)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxSeekHead)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxInfo)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxCluster)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTracks)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCues)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxAttachments)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxChapters)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTags)
|
||||
DEFINE_END_SEMANTIC(KaxSegment)
|
||||
|
||||
DEFINE_MKX_MASTER_ORPHAN(KaxSegment, 0x18538067, 4, "Segment");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxSeekHead)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxSeek)
|
||||
DEFINE_END_SEMANTIC(KaxSeekHead)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxSeekHead, 0x114D9B74, 4, KaxSegment, "SeekHeader");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxSeek)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxSeekID)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxSeekPosition)
|
||||
DEFINE_END_SEMANTIC(KaxSeek)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxSeek, 0x4DBB, 2, KaxSeekHead, "SeekPoint");
|
||||
DEFINE_MKX_BINARY (KaxSeekID, 0x53AB, 2, KaxSeek, "SeekID");
|
||||
DEFINE_MKX_UINTEGER(KaxSeekPosition, 0x53AC, 2, KaxSeek, "SeekPosition");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxInfo)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxSegmentUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxSegmentFilename)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxPrevUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxPrevFilename)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxNextUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxNextFilename)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxSegmentFamily)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxChapterTranslate)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTimecodeScale)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxDuration)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxDateUTC)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTitle)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxMuxingApp)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxWritingApp)
|
||||
DEFINE_END_SEMANTIC(KaxInfo)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxInfo, 0x1549A966, 4, KaxSegment, "Info");
|
||||
DEFINE_MKX_BINARY (KaxSegmentUID, 0x73A4, 2, KaxInfo, "SegmentUID");
|
||||
DEFINE_MKX_UNISTRING(KaxSegmentFilename, 0x7384, 2, KaxInfo, "SegmentFilename");
|
||||
DEFINE_MKX_BINARY_CONS(KaxPrevUID, 0x3CB923, 3, KaxInfo, "PrevUID");
|
||||
DEFINE_MKX_UNISTRING(KaxPrevFilename, 0x3C83AB, 3, KaxInfo, "PrevFilename");
|
||||
DEFINE_MKX_BINARY_CONS(KaxNextUID, 0x3EB923, 3, KaxInfo, "NextUID");
|
||||
DEFINE_MKX_UNISTRING(KaxNextFilename, 0x3E83BB, 3, KaxInfo, "NextFilename");
|
||||
DEFINE_MKX_BINARY (KaxSegmentFamily, 0x4444, 2, KaxInfo, "SegmentFamily");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxChapterTranslate)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxChapterTranslateEditionUID)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterTranslateCodec)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterTranslateID)
|
||||
DEFINE_END_SEMANTIC(KaxChapterTranslate)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxChapterTranslate, 0x6924, 2, KaxInfo, "ChapterTranslate");
|
||||
DEFINE_MKX_UINTEGER(KaxChapterTranslateEditionUID, 0x69FC, 2, KaxChapterTranslate, "ChapterTranslateEditionUID");
|
||||
DEFINE_MKX_UINTEGER(KaxChapterTranslateCodec, 0x69BF, 2, KaxChapterTranslate, "ChapterTranslateCodec");
|
||||
DEFINE_MKX_BINARY (KaxChapterTranslateID, 0x69A5, 2, KaxChapterTranslate, "ChapterTranslateID");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTimecodeScale, 0x2AD7B1, 3, KaxInfo, "TimecodeScale", 1000000);
|
||||
DEFINE_MKX_FLOAT(KaxDuration, 0x4489, 2, KaxInfo, "Duration");
|
||||
DEFINE_MKX_DATE (KaxDateUTC, 0x4461, 2, KaxInfo, "DateUTC");
|
||||
DEFINE_MKX_UNISTRING(KaxTitle, 0x7BA9, 2, KaxInfo, "Title");
|
||||
DEFINE_MKX_UNISTRING(KaxMuxingApp, 0x4D80, 2, KaxInfo, "MuxingApp");
|
||||
DEFINE_MKX_UNISTRING(KaxWritingApp, 0x5741, 2, KaxInfo, "WritingApp");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxCluster)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxClusterTimecode)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxClusterSilentTracks)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxClusterPosition)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxClusterPrevSize)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxSimpleBlock)
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxBlockGroup)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxEncryptedBlock) // not supported
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_END_SEMANTIC(KaxCluster)
|
||||
|
||||
DEFINE_MKX_MASTER_CONS(KaxCluster, 0x1F43B675, 4, KaxSegment, "Cluster");
|
||||
DEFINE_MKX_UINTEGER(KaxClusterTimecode, 0xE7, 1, KaxCluster, "ClusterTimecode");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxClusterSilentTracks)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxClusterSilentTrackNumber)
|
||||
DEFINE_END_SEMANTIC(KaxClusterSilentTracks)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxClusterSilentTracks, 0x5854, 2, KaxCluster, "ClusterSilentTracks");
|
||||
DEFINE_MKX_UINTEGER(KaxClusterSilentTrackNumber, 0x58D7, 2, KaxClusterSilentTracks, "ClusterSilentTrackNumber");
|
||||
DEFINE_MKX_UINTEGER(KaxClusterPosition, 0xA7, 1, KaxCluster, "ClusterPosition");
|
||||
DEFINE_MKX_UINTEGER(KaxClusterPrevSize, 0xAB, 1, KaxCluster, "ClusterPrevSize");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_BINARY_CONS(KaxSimpleBlock, 0xA3, 1, KaxCluster, "SimpleBlock");
|
||||
#endif
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxBlockGroup)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxBlock)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxBlockVirtual) // not supported
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxBlockAdditions)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxBlockDuration)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxReferencePriority)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxReferenceBlock)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxReferenceVirtual) // not supported
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCodecState)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxDiscardPadding)
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxSlices)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxReferenceFrame) // DivX specific
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_END_SEMANTIC(KaxBlockGroup)
|
||||
|
||||
DEFINE_MKX_MASTER_CONS(KaxBlockGroup, 0xA0, 1, KaxCluster, "BlockGroup");
|
||||
DEFINE_MKX_BINARY_CONS(KaxBlock, 0xA1, 1, KaxBlockGroup, "Block");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_BINARY_CONS(KaxBlockVirtual, 0xA2, 1, KaxBlockGroup, "BlockVirtual");
|
||||
#endif
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxBlockAdditions)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxBlockMore)
|
||||
DEFINE_END_SEMANTIC(KaxBlockAdditions)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxBlockAdditions, 0x75A1, 2, KaxBlockGroup, "BlockAdditions");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxBlockMore)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxBlockAddID)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxBlockAdditional)
|
||||
DEFINE_END_SEMANTIC(KaxBlockMore)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxBlockMore, 0xA6, 1, KaxBlockAdditions, "BlockMore");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxBlockAddID, 0xEE, 1, KaxBlockMore, "BlockAddID", 1);
|
||||
DEFINE_MKX_BINARY (KaxBlockAdditional, 0xA5, 1, KaxBlockMore, "BlockAdditional");
|
||||
DEFINE_MKX_UINTEGER(KaxBlockDuration, 0x9B, 1, KaxBlockGroup, "BlockDuration");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxReferencePriority, 0xFA, 1, KaxBlockGroup, "FlagReferenced", 0);
|
||||
DEFINE_MKX_SINTEGER_CONS(KaxReferenceBlock, 0xFB, 1, KaxBlockGroup, "ReferenceBlock");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_SINTEGER(KaxReferenceVirtual, 0xFD, 1, KaxBlockGroup, "ReferenceVirtual");
|
||||
DEFINE_MKX_BINARY (KaxCodecState, 0xA4, 1, KaxBlockGroup, "CodecState");
|
||||
DEFINE_MKX_SINTEGER(KaxDiscardPadding, 0x75A2, 2, KaxBlockGroup, "DiscardPadding");
|
||||
#endif
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxSlices)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTimeSlice)
|
||||
DEFINE_END_SEMANTIC(KaxSlices)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxSlices, 0x8E, 1, KaxBlockGroup, "Slices");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTimeSlice)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxSliceLaceNumber)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxSliceFrameNumber) // not supported
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxSliceBlockAddID) // not supported
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxSliceDelay) // not supported
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxSliceDuration) // not supported
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_END_SEMANTIC(KaxTimeSlice)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxTimeSlice, 0xE8, 1, KaxSlices, "TimeSlice");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxSliceLaceNumber, 0xCC, 1, KaxTimeSlice, "SliceLaceNumber", 0);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxSliceFrameNumber, 0xCD, 1, KaxTimeSlice, "SliceFrameNumber", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxSliceBlockAddID, 0xCB, 1, KaxTimeSlice, "SliceBlockAddID", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxSliceDelay, 0xCE, 1, KaxTimeSlice, "SliceDelay", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxSliceDuration, 0xCF, 1, KaxTimeSlice, "SliceDuration", 0);
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxReferenceFrame)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxReferenceOffset) // DivX specific
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxReferenceTimeCode) // DivX specific
|
||||
DEFINE_END_SEMANTIC(KaxReferenceFrame)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxReferenceFrame, 0xC8, 1, KaxBlockGroup, "ReferenceFrame");
|
||||
DEFINE_MKX_UINTEGER(KaxReferenceOffset, 0xC9, 1, KaxReferenceFrame, "ReferenceOffset");
|
||||
DEFINE_MKX_UINTEGER(KaxReferenceTimeCode, 0xCA, 1, KaxReferenceFrame, "ReferenceTimeCode");
|
||||
DEFINE_MKX_BINARY (KaxEncryptedBlock, 0xAF, 1, KaxCluster, "EncryptedBlock");
|
||||
#endif
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTracks)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxTrackEntry)
|
||||
DEFINE_END_SEMANTIC(KaxTracks)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxTracks, 0x1654AE6B, 4, KaxSegment, "Tracks");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTrackEntry)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackNumber)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackUID)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackType)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagEnabled)
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagDefault)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagForced)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagLacing)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackMinCache)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackMaxCache)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackDefaultDuration)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackDefaultDecodedFieldDuration)
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackTimecodeScale)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackOffset) // not supported
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxMaxBlockAdditionID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackName)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackLanguage)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxCodecID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCodecPrivate)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCodecName)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackAttachmentLink)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCodecSettings) // not supported
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxCodecInfoURL) // not supported
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxCodecDownloadURL) // not supported
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxCodecDecodeAll)
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTrackOverlay)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCodecDelay)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxSeekPreRoll)
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTrackTranslate)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackVideo)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackAudio)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackOperation)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrickTrackUID) // DivX specific
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrickTrackSegmentUID) // DivX specific
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrickTrackFlag) // DivX specific
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrickMasterTrackUID) // DivX specific
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrickMasterTrackSegmentUID) // DivX specific
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncodings)
|
||||
DEFINE_END_SEMANTIC(KaxTrackEntry)
|
||||
|
||||
DEFINE_MKX_MASTER_CONS(KaxTrackEntry, 0xAE, 1, KaxTracks, "TrackEntry");
|
||||
DEFINE_MKX_UINTEGER(KaxTrackNumber, 0xD7, 1, KaxTrackEntry, "TrackNumber");
|
||||
DEFINE_MKX_UINTEGER(KaxTrackUID, 0x73C5, 2, KaxTrackEntry, "TrackUID");
|
||||
DEFINE_MKX_UINTEGER(KaxTrackType, 0x83, 1, KaxTrackEntry, "TrackType");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagEnabled, 0xB9, 1, KaxTrackEntry, "TrackFlagEnabled", 1);
|
||||
#endif
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagDefault, 0x88, 1, KaxTrackEntry, "TrackFlagDefault", 1);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagForced, 0x55AA, 2, KaxTrackEntry, "TrackFlagForced", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagLacing, 0x9C, 1, KaxTrackEntry, "TrackFlagLacing", 1);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTrackMinCache, 0x6DE7, 2, KaxTrackEntry, "TrackMinCache", 0);
|
||||
DEFINE_MKX_UINTEGER(KaxTrackMaxCache, 0x6DF8, 2, KaxTrackEntry, "TrackMaxCache");
|
||||
DEFINE_MKX_UINTEGER(KaxTrackDefaultDuration, 0x23E383, 3, KaxTrackEntry, "TrackDefaultDuration");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_UINTEGER(KaxTrackDefaultDecodedFieldDuration, 0x234E7A, 3, KaxTrackEntry, "TrackDefaultDecodedFieldDuration");
|
||||
#endif
|
||||
DEFINE_MKX_FLOAT_DEF(KaxTrackTimecodeScale, 0x23314F, 3, KaxTrackEntry, "TrackTimecodeScale", 1);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_SINTEGER_DEF(KaxTrackOffset, 0x537F, 2, KaxTrackEntry, "TrackOffset", 0);
|
||||
#endif
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxMaxBlockAdditionID, 0x55EE, 2, KaxTrackEntry, "MaxBlockAdditionID", 0);
|
||||
DEFINE_MKX_UNISTRING(KaxTrackName, 0x536E, 2, KaxTrackEntry, "TrackName");
|
||||
DEFINE_MKX_STRING_DEF(KaxTrackLanguage, 0x22B59C, 3, KaxTrackEntry, "TrackLanguage", "eng");
|
||||
DEFINE_MKX_STRING(KaxCodecID, 0x86, 1, KaxTrackEntry, "CodecID");
|
||||
DEFINE_MKX_BINARY (KaxCodecPrivate, 0x63A2, 2, KaxTrackEntry, "CodecPrivate");
|
||||
DEFINE_MKX_UNISTRING(KaxCodecName, 0x258688, 3, KaxTrackEntry, "CodecName");
|
||||
DEFINE_MKX_UINTEGER(KaxTrackAttachmentLink, 0x7446, 2, KaxTrackEntry, "TrackAttachmentLink");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_UNISTRING(KaxCodecSettings, 0x3A9697, 3, KaxTrackEntry, "CodecSettings");
|
||||
DEFINE_MKX_STRING(KaxCodecInfoURL, 0x3B4040, 3, KaxTrackEntry, "CodecInfoURL");
|
||||
DEFINE_MKX_STRING(KaxCodecDownloadURL, 0x26B240, 3, KaxTrackEntry, "CodecDownloadURL");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxCodecDecodeAll, 0xAA, 1, KaxTrackEntry, "CodecDecodeAll", 1);
|
||||
#endif
|
||||
DEFINE_MKX_UINTEGER(KaxTrackOverlay, 0x6FAB, 2, KaxTrackEntry, "TrackOverlay");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxCodecDelay, 0x56AA, 2, KaxTrackEntry, "CodecDelay", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxSeekPreRoll, 0x56BB, 2, KaxTrackEntry, "SeekPreRoll", 0);
|
||||
#endif
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTrackTranslate)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTrackTranslateEditionUID)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackTranslateCodec)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackTranslateTrackID)
|
||||
DEFINE_END_SEMANTIC(KaxTrackTranslate)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxTrackTranslate, 0x6624, 2, KaxTrackEntry, "TrackTranslate");
|
||||
DEFINE_MKX_UINTEGER(KaxTrackTranslateEditionUID, 0x66FC, 2, KaxTrackTranslate, "TrackTranslateEditionUID");
|
||||
DEFINE_MKX_UINTEGER(KaxTrackTranslateCodec, 0x66BF, 2, KaxTrackTranslate, "TrackTranslateCodec");
|
||||
DEFINE_MKX_BINARY (KaxTrackTranslateTrackID, 0x66A5, 2, KaxTrackTranslate, "TrackTranslateTrackID");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTrackVideo)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxVideoFlagInterlaced)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoStereoMode)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoAlphaMode)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxOldStereoMode) // not supported
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxVideoPixelWidth)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxVideoPixelHeight)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropBottom)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropTop)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropLeft)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropRight)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoDisplayWidth)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoDisplayHeight)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoDisplayUnit)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoAspectRatio)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoColourSpace)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoGamma) // not supported
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoFrameRate) // not supported
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_END_SEMANTIC(KaxTrackVideo)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxTrackVideo, 0xE0, 1, KaxTrackEntry, "TrackVideo");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoFlagInterlaced, 0x9A, 1, KaxTrackVideo, "VideoFlagInterlaced", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoStereoMode, 0x53B8, 2, KaxTrackVideo, "VideoStereoMode", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoAlphaMode, 0x53C0, 2, KaxTrackVideo, "VideoAlphaMode", 0);
|
||||
DEFINE_MKX_UINTEGER(KaxOldStereoMode, 0x53B9, 2, KaxTrackVideo, "OldStereoMode");
|
||||
#endif
|
||||
DEFINE_MKX_UINTEGER(KaxVideoPixelWidth, 0xB0, 1, KaxTrackVideo, "VideoPixelWidth");
|
||||
DEFINE_MKX_UINTEGER(KaxVideoPixelHeight, 0xBA, 1, KaxTrackVideo, "VideoPixelHeight");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropBottom, 0x54AA, 2, KaxTrackVideo, "VideoPixelCropBottom", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropTop, 0x54BB, 2, KaxTrackVideo, "VideoPixelCropTop", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropLeft, 0x54CC, 2, KaxTrackVideo, "VideoPixelCropLeft", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropRight, 0x54DD, 2, KaxTrackVideo, "VideoPixelCropRight", 0);
|
||||
DEFINE_MKX_UINTEGER(KaxVideoDisplayWidth, 0x54B0, 2, KaxTrackVideo, "VideoDisplayWidth");
|
||||
DEFINE_MKX_UINTEGER(KaxVideoDisplayHeight, 0x54BA, 2, KaxTrackVideo, "VideoDisplayHeight");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoDisplayUnit, 0x54B2, 2, KaxTrackVideo, "VideoDisplayUnit", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoAspectRatio, 0x54B3, 2, KaxTrackVideo, "VideoAspectRatio", 0);
|
||||
DEFINE_MKX_BINARY (KaxVideoColourSpace, 0x2EB524, 3, KaxTrackVideo, "VideoColourSpace");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_FLOAT(KaxVideoGamma, 0x2FB523, 3, KaxTrackVideo, "VideoGamma");
|
||||
DEFINE_MKX_FLOAT(KaxVideoFrameRate, 0x2383E3, 3, KaxTrackVideo, "VideoFrameRate");
|
||||
#endif
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTrackAudio)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxAudioSamplingFreq)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxAudioOutputSamplingFreq)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxAudioChannels)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxAudioPosition) // not supported
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxAudioBitDepth)
|
||||
DEFINE_END_SEMANTIC(KaxTrackAudio)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxTrackAudio, 0xE1, 1, KaxTrackEntry, "TrackAudio");
|
||||
DEFINE_MKX_FLOAT_DEF(KaxAudioSamplingFreq, 0xB5, 1, KaxTrackAudio, "AudioSamplingFreq", 8000);
|
||||
DEFINE_MKX_FLOAT(KaxAudioOutputSamplingFreq, 0x78B5, 2, KaxTrackAudio, "AudioOutputSamplingFreq");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxAudioChannels, 0x9F, 1, KaxTrackAudio, "AudioChannels", 1);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_BINARY (KaxAudioPosition, 0x7D7B, 2, KaxTrackAudio, "AudioPosition");
|
||||
#endif
|
||||
DEFINE_MKX_UINTEGER(KaxAudioBitDepth, 0x6264, 2, KaxTrackAudio, "AudioBitDepth");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTrackOperation)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackCombinePlanes)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackJoinBlocks)
|
||||
DEFINE_END_SEMANTIC(KaxTrackOperation)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxTrackOperation, 0xE2, 1, KaxTrackEntry, "TrackOperation");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTrackCombinePlanes)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxTrackPlane)
|
||||
DEFINE_END_SEMANTIC(KaxTrackCombinePlanes)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxTrackCombinePlanes, 0xE3, 1, KaxTrackOperation, "TrackCombinePlanes");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTrackPlane)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackPlaneUID)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackPlaneType)
|
||||
DEFINE_END_SEMANTIC(KaxTrackPlane)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxTrackPlane, 0xE4, 1, KaxTrackCombinePlanes, "TrackPlane");
|
||||
DEFINE_MKX_UINTEGER(KaxTrackPlaneUID, 0xE5, 1, KaxTrackPlane, "TrackPlaneUID");
|
||||
DEFINE_MKX_UINTEGER(KaxTrackPlaneType, 0xE6, 1, KaxTrackPlane, "TrackPlaneType");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTrackJoinBlocks)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxTrackJoinUID)
|
||||
DEFINE_END_SEMANTIC(KaxTrackJoinBlocks)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxTrackJoinBlocks, 0xE9, 1, KaxTrackOperation, "TrackJoinBlocks");
|
||||
DEFINE_MKX_UINTEGER(KaxTrackJoinUID, 0xED, 1, KaxTrackJoinBlocks, "TrackJoinUID");
|
||||
DEFINE_MKX_UINTEGER(KaxTrickTrackUID, 0xC0, 1, KaxTrackEntry, "TrickTrackUID");
|
||||
DEFINE_MKX_BINARY (KaxTrickTrackSegmentUID, 0xC1, 1, KaxTrackEntry, "TrickTrackSegmentUID");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTrickTrackFlag, 0xC6, 1, KaxTrackEntry, "TrickTrackFlag", 0);
|
||||
DEFINE_MKX_UINTEGER(KaxTrickMasterTrackUID, 0xC7, 1, KaxTrackEntry, "TrickMasterTrackUID");
|
||||
DEFINE_MKX_BINARY (KaxTrickMasterTrackSegmentUID, 0xC4, 1, KaxTrackEntry, "TrickMasterTrackSegmentUID");
|
||||
#endif
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxContentEncodings)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxContentEncoding)
|
||||
DEFINE_END_SEMANTIC(KaxContentEncodings)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxContentEncodings, 0x6D80, 2, KaxTrackEntry, "ContentEncodings");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxContentEncoding)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxContentEncodingOrder)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxContentEncodingScope)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxContentEncodingType)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentCompression)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncryption)
|
||||
DEFINE_END_SEMANTIC(KaxContentEncoding)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxContentEncoding, 0x6240, 2, KaxContentEncodings, "ContentEncoding");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxContentEncodingOrder, 0x5031, 2, KaxContentEncoding, "ContentEncodingOrder", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxContentEncodingScope, 0x5032, 2, KaxContentEncoding, "ContentEncodingScope", 1);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxContentEncodingType, 0x5033, 2, KaxContentEncoding, "ContentEncodingType", 0);
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxContentCompression)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxContentCompAlgo)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentCompSettings)
|
||||
DEFINE_END_SEMANTIC(KaxContentCompression)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxContentCompression, 0x5034, 2, KaxContentEncoding, "ContentCompression");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxContentCompAlgo, 0x4254, 2, KaxContentCompression, "ContentCompAlgo", 0);
|
||||
DEFINE_MKX_BINARY (KaxContentCompSettings, 0x4255, 2, KaxContentCompression, "ContentCompSettings");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxContentEncryption)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncAlgo)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncKeyID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentSignature)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentSigKeyID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentSigAlgo)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentSigHashAlgo)
|
||||
DEFINE_END_SEMANTIC(KaxContentEncryption)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxContentEncryption, 0x5035, 2, KaxContentEncoding, "ContentEncryption");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxContentEncAlgo, 0x47E1, 2, KaxContentEncryption, "ContentEncAlgo", 0);
|
||||
DEFINE_MKX_BINARY (KaxContentEncKeyID, 0x47E2, 2, KaxContentEncryption, "ContentEncKeyID");
|
||||
DEFINE_MKX_BINARY (KaxContentSignature, 0x47E3, 2, KaxContentEncryption, "ContentSignature");
|
||||
DEFINE_MKX_BINARY (KaxContentSigKeyID, 0x47E4, 2, KaxContentEncryption, "ContentSigKeyID");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxContentSigAlgo, 0x47E5, 2, KaxContentEncryption, "ContentSigAlgo", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxContentSigHashAlgo, 0x47E6, 2, KaxContentEncryption, "ContentSigHashAlgo", 0);
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxCues)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxCuePoint)
|
||||
DEFINE_END_SEMANTIC(KaxCues)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxCues, 0x1C53BB6B, 4, KaxSegment, "Cues");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxCuePoint)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxCueTime)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxCueTrackPositions)
|
||||
DEFINE_END_SEMANTIC(KaxCuePoint)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxCuePoint, 0xBB, 1, KaxCues, "CuePoint");
|
||||
DEFINE_MKX_UINTEGER(KaxCueTime, 0xB3, 1, KaxCuePoint, "CueTime");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxCueTrackPositions)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxCueTrack)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxCueClusterPosition)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCueRelativePosition)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCueDuration)
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCueBlockNumber)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCueCodecState)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxCueReference)
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_END_SEMANTIC(KaxCueTrackPositions)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxCueTrackPositions, 0xB7, 1, KaxCuePoint, "CueTrackPositions");
|
||||
DEFINE_MKX_UINTEGER(KaxCueTrack, 0xF7, 1, KaxCueTrackPositions, "CueTrack");
|
||||
DEFINE_MKX_UINTEGER(KaxCueClusterPosition, 0xF1, 1, KaxCueTrackPositions, "CueClusterPosition");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_UINTEGER(KaxCueRelativePosition, 0xF0, 1, KaxCueTrackPositions, "CueRelativePosition");
|
||||
DEFINE_MKX_UINTEGER(KaxCueDuration, 0xB2, 1, KaxCueTrackPositions, "CueDuration");
|
||||
#endif
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxCueBlockNumber, 0x5378, 2, KaxCueTrackPositions, "CueBlockNumber", 1);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxCueCodecState, 0xEA, 1, KaxCueTrackPositions, "CueCodecState", 0);
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxCueReference)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxCueRefTime)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxCueRefCluster) // not supported
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCueRefNumber) // not supported
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCueRefCodecState) // not supported
|
||||
DEFINE_END_SEMANTIC(KaxCueReference)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxCueReference, 0xDB, 1, KaxCueTrackPositions, "CueReference");
|
||||
DEFINE_MKX_UINTEGER(KaxCueRefTime, 0x96, 1, KaxCueReference, "CueRefTime");
|
||||
DEFINE_MKX_UINTEGER(KaxCueRefCluster, 0x97, 1, KaxCueReference, "CueRefCluster");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxCueRefNumber, 0x535F, 2, KaxCueReference, "CueRefNumber", 1);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxCueRefCodecState, 0xEB, 1, KaxCueReference, "CueRefCodecState", 0);
|
||||
#endif
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxAttachments)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxAttached)
|
||||
DEFINE_END_SEMANTIC(KaxAttachments)
|
||||
|
||||
DEFINE_MKX_MASTER_CONS(KaxAttachments, 0x1941A469, 4, KaxSegment, "Attachments");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxAttached)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxFileDescription)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxFileName)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxMimeType)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxFileData)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxFileUID)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxFileReferral) // not supported
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxFileUsedStartTime) // DivX specific
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxFileUsedEndTime) // DivX specific
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_END_SEMANTIC(KaxAttached)
|
||||
|
||||
DEFINE_MKX_MASTER_CONS(KaxAttached, 0x61A7, 2, KaxAttachments, "AttachedFile");
|
||||
DEFINE_MKX_UNISTRING(KaxFileDescription, 0x467E, 2, KaxAttached, "FileDescription");
|
||||
DEFINE_MKX_UNISTRING(KaxFileName, 0x466E, 2, KaxAttached, "FileName");
|
||||
DEFINE_MKX_STRING(KaxMimeType, 0x4660, 2, KaxAttached, "FileMimeType");
|
||||
DEFINE_MKX_BINARY (KaxFileData, 0x465C, 2, KaxAttached, "FileData");
|
||||
DEFINE_MKX_UINTEGER(KaxFileUID, 0x46AE, 2, KaxAttached, "FileUID");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_BINARY (KaxFileReferral, 0x4675, 2, KaxAttached, "FileReferral");
|
||||
DEFINE_MKX_UINTEGER(KaxFileUsedStartTime, 0x4661, 2, KaxAttached, "FileUsedStartTime");
|
||||
DEFINE_MKX_UINTEGER(KaxFileUsedEndTime, 0x4662, 2, KaxAttached, "FileUsedEndTime");
|
||||
#endif
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxChapters)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxEditionEntry)
|
||||
DEFINE_END_SEMANTIC(KaxChapters)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxChapters, 0x1043A770, 4, KaxSegment, "Chapters");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxEditionEntry)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxEditionUID)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxEditionFlagHidden)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxEditionFlagDefault)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxEditionFlagOrdered)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxChapterAtom)
|
||||
DEFINE_END_SEMANTIC(KaxEditionEntry)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxEditionEntry, 0x45B9, 2, KaxChapters, "EditionEntry");
|
||||
DEFINE_MKX_UINTEGER(KaxEditionUID, 0x45BC, 2, KaxEditionEntry, "EditionUID");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxEditionFlagHidden, 0x45BD, 2, KaxEditionEntry, "EditionFlagHidden", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxEditionFlagDefault, 0x45DB, 2, KaxEditionEntry, "EditionFlagDefault", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxEditionFlagOrdered, 0x45DD, 2, KaxEditionEntry, "EditionFlagOrdered", 0);
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxChapterAtom)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxChapterAtom) // recursive
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterUID)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxChapterStringUID)
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterTimeStart)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxChapterTimeEnd)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterFlagHidden)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterFlagEnabled)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxChapterSegmentUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxChapterSegmentEditionUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxChapterPhysicalEquiv)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxChapterTrack)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxChapterDisplay)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxChapterProcess)
|
||||
DEFINE_END_SEMANTIC(KaxChapterAtom)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxChapterAtom, 0xB6, 1, KaxEditionEntry, "ChapterAtom");
|
||||
DEFINE_MKX_UINTEGER(KaxChapterUID, 0x73C4, 2, KaxChapterAtom, "ChapterUID");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_UNISTRING(KaxChapterStringUID, 0x5654, 2, KaxChapterAtom, "ChapterStringUID");
|
||||
#endif
|
||||
DEFINE_MKX_UINTEGER(KaxChapterTimeStart, 0x91, 1, KaxChapterAtom, "ChapterTimeStart");
|
||||
DEFINE_MKX_UINTEGER(KaxChapterTimeEnd, 0x92, 1, KaxChapterAtom, "ChapterTimeEnd");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxChapterFlagHidden, 0x98, 1, KaxChapterAtom, "ChapterFlagHidden", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxChapterFlagEnabled, 0x4598, 2, KaxChapterAtom, "ChapterFlagEnabled", 1);
|
||||
DEFINE_MKX_BINARY (KaxChapterSegmentUID, 0x6E67, 2, KaxChapterAtom, "ChapterSegmentUID");
|
||||
DEFINE_MKX_UINTEGER(KaxChapterSegmentEditionUID, 0x6EBC, 2, KaxChapterAtom, "ChapterSegmentEditionUID");
|
||||
DEFINE_MKX_UINTEGER(KaxChapterPhysicalEquiv, 0x63C3, 2, KaxChapterAtom, "ChapterPhysicalEquiv");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxChapterTrack)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxChapterTrackNumber)
|
||||
DEFINE_END_SEMANTIC(KaxChapterTrack)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxChapterTrack, 0x8F, 1, KaxChapterAtom, "ChapterTrack");
|
||||
DEFINE_MKX_UINTEGER(KaxChapterTrackNumber, 0x89, 1, KaxChapterTrack, "ChapterTrackNumber");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxChapterDisplay)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterString)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxChapterLanguage)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxChapterCountry)
|
||||
DEFINE_END_SEMANTIC(KaxChapterDisplay)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxChapterDisplay, 0x80, 1, KaxChapterAtom, "ChapterDisplay");
|
||||
DEFINE_MKX_UNISTRING(KaxChapterString, 0x85, 1, KaxChapterDisplay, "ChapterString");
|
||||
DEFINE_MKX_STRING_DEF(KaxChapterLanguage, 0x437C, 2, KaxChapterDisplay, "ChapterLanguage", "eng");
|
||||
DEFINE_MKX_STRING(KaxChapterCountry, 0x437E, 2, KaxChapterDisplay, "ChapterCountry");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxChapterProcess)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterProcessCodecID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxChapterProcessPrivate)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxChapterProcessCommand)
|
||||
DEFINE_END_SEMANTIC(KaxChapterProcess)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxChapterProcess, 0x6944, 2, KaxChapterAtom, "ChapterProcess");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxChapterProcessCodecID, 0x6955, 2, KaxChapterProcess, "ChapterProcessCodecID", 0);
|
||||
DEFINE_MKX_BINARY (KaxChapterProcessPrivate, 0x450D, 2, KaxChapterProcess, "ChapterProcessPrivate");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxChapterProcessCommand)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterProcessTime)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxChapterProcessData)
|
||||
DEFINE_END_SEMANTIC(KaxChapterProcessCommand)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxChapterProcessCommand, 0x6911, 2, KaxChapterProcess, "ChapterProcessCommand");
|
||||
DEFINE_MKX_UINTEGER(KaxChapterProcessTime, 0x6922, 2, KaxChapterProcessCommand, "ChapterProcessTime");
|
||||
DEFINE_MKX_BINARY (KaxChapterProcessData, 0x6933, 2, KaxChapterProcessCommand, "ChapterProcessData");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTags)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxTag)
|
||||
DEFINE_END_SEMANTIC(KaxTags)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxTags, 0x1254C367, 4, KaxSegment, "Tags");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTag)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTagTargets)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxTagSimple)
|
||||
DEFINE_END_SEMANTIC(KaxTag)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxTag, 0x7373, 2, KaxTags, "Tag");
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagTargets)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagTargetTypeValue)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagTargetType)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagTrackUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagEditionUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagChapterUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagAttachmentUID)
|
||||
DEFINE_END_SEMANTIC(KaxTagTargets)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxTagTargets, 0x63C0, 2, KaxTag, "TagTargets");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTagTargetTypeValue, 0x68CA, 2, KaxTagTargets, "TagTargetTypeValue", 50);
|
||||
DEFINE_MKX_STRING(KaxTagTargetType, 0x63CA, 2, KaxTagTargets, "TagTargetType");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTagTrackUID, 0x63C5, 2, KaxTagTargets, "TagTrackUID", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTagEditionUID, 0x63C9, 2, KaxTagTargets, "TagEditionUID", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTagChapterUID, 0x63C4, 2, KaxTagTargets, "TagChapterUID", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTagAttachmentUID, 0x63C6, 2, KaxTagTargets, "TagAttachmentUID", 0);
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagSimple)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagSimple) // recursive
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTagName)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTagLangue)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTagDefault)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagString)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagBinary)
|
||||
DEFINE_END_SEMANTIC(KaxTagSimple)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxTagSimple, 0x67C8, 2, KaxTag, "TagSimple");
|
||||
DEFINE_MKX_UNISTRING(KaxTagName, 0x45A3, 2, KaxTagSimple, "TagName");
|
||||
DEFINE_MKX_STRING_DEF(KaxTagLangue, 0x447A, 2, KaxTagSimple, "TagLanguage", "und");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTagDefault, 0x4484, 2, KaxTagSimple, "TagDefault", 1);
|
||||
DEFINE_MKX_UNISTRING(KaxTagString, 0x4487, 2, KaxTagSimple, "TagString");
|
||||
DEFINE_MKX_BINARY (KaxTagBinary, 0x4485, 2, KaxTagSimple, "TagBinary");
|
||||
|
||||
filepos_t KaxBlockVirtual::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxReferenceVirtual::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxSliceFrameNumber::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxSliceBlockAddID::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxSliceDelay::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxSliceDuration::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxEncryptedBlock::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxTrackTimecodeScale::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxTrackOffset::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxCodecSettings::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxCodecInfoURL::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxCodecDownloadURL::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxOldStereoMode::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxVideoGamma::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxVideoFrameRate::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxAudioPosition::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxCueRefCluster::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxCueRefNumber::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxCueRefCodecState::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
filepos_t KaxFileReferral::RenderData(IOCallback & /* output */, bool /* bForceRender */, bool /* bSaveDefault */) {
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
193
src/KaxTag.cpp
Normal file
193
src/KaxTag.cpp
Normal file
@@ -0,0 +1,193 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTag.cpp 1325 2009-03-30 07:56:54Z robux4 $
|
||||
\author Jory Stone <jcsston @ toughguy.net>
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxTag.h"
|
||||
#include "matroska/KaxTagMulti.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTag)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTagTargets)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagGeneral)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagGenres)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagAudioSpecific)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagImageSpecific)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiCommercial)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiDate)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiEntity)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiIdentifier)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiLegal)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitle)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiAttachment)
|
||||
//DEFINE_SEMANTIC_ITEM(false, false, KaxTagLength)
|
||||
//DEFINE_SEMANTIC_ITEM(false, false, KaxTagPlaylistDelay)
|
||||
//DEFINE_SEMANTIC_ITEM(false, false, KaxTagUnsynchronisedText)
|
||||
//DEFINE_SEMANTIC_ITEM(false, false, KaxTagUserDefinedURL)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiComment)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxTagSimple)
|
||||
DEFINE_END_SEMANTIC(KaxTag)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagTargets)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagTargetTypeValue)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagTargetType)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagTrackUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagEditionUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagChapterUID)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagAttachmentUID)
|
||||
DEFINE_END_SEMANTIC(KaxTagTargets)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagGeneral)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagArchivalLocation)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagFile)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagKeywords)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMood)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagRecordLocation)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagSource)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagSourceForm)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagProduct)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagOriginalMediaType)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagPlayCounter)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagPopularimeter)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagSubject)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagBibliography)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagLanguage)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagRating)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagEncoder)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagEncodeSettings)
|
||||
DEFINE_END_SEMANTIC(KaxTagGeneral)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagGenres)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagAudioGenre)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagVideoGenre)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagSubGenre)
|
||||
DEFINE_END_SEMANTIC(KaxTagGenres)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagAudioSpecific)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagAudioPeak)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagAudioEncryption)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagAudioGain)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagBPM)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagDiscTrack)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagSetPart)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagEqualisation)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagInitialKey)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagOfficialAudioFileURL)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagOfficialAudioSourceURL)
|
||||
DEFINE_END_SEMANTIC(KaxTagAudioSpecific)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagImageSpecific)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagCaptureDPI)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagCaptureLightness)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagCapturePaletteSetting)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagCaptureSharpness)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagCropped)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagOriginalDimensions)
|
||||
DEFINE_END_SEMANTIC(KaxTagImageSpecific)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagSimple)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTagName)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTagLangue)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTagDefault)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagString)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagBinary)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagSimple)
|
||||
DEFINE_END_SEMANTIC(KaxTagSimple)
|
||||
|
||||
DEFINE_MKX_MASTER (KaxTag, 0x7373, 2, KaxTags, "Tag");
|
||||
DEFINE_MKX_MASTER (KaxTagTargets, 0x63C0, 2, KaxTag, "TagTargets");
|
||||
DEFINE_MKX_MASTER (KaxTagGeneral, 0x67C9, 2, KaxTag, "TagGeneral");
|
||||
DEFINE_MKX_MASTER (KaxTagGenres, 0x6583, 2, KaxTag, "TagGenres");
|
||||
DEFINE_MKX_MASTER (KaxTagAudioSpecific, 0x41C5, 2, KaxTag, "TagAudioSpecific");
|
||||
DEFINE_MKX_MASTER (KaxTagImageSpecific, 0x4990, 2, KaxTag, "TagImageSpecific");
|
||||
DEFINE_MKX_UNISTRING (KaxTagBibliography, 0x4488, 2, KaxTag, "Bibliography");
|
||||
DEFINE_MKX_UNISTRING (KaxTagEncoder, 0x4431, 2, KaxTag, "Encoder");
|
||||
DEFINE_MKX_UNISTRING (KaxTagEncodeSettings, 0x6526, 2, KaxTag, "EncodeSettings");
|
||||
DEFINE_MKX_STRING (KaxTagLanguage, 0x22B59F, 3, KaxTag, "Language");
|
||||
DEFINE_MKX_UINTEGER (KaxTagLength, 0x5243, 2, KaxTag, "Length");
|
||||
DEFINE_MKX_UINTEGER (KaxTagPlaylistDelay, 0x72CC, 2, KaxTag, "PlaylistDelay");
|
||||
DEFINE_MKX_BINARY (KaxTagRating, 0x52BC, 2, KaxTag, "Rating");
|
||||
DEFINE_MKX_UNISTRING (KaxTagSubject, 0x49C1, 2, KaxTag, "Subject");
|
||||
DEFINE_MKX_UNISTRING (KaxTagUnsynchronisedText, 0x874B, 2, KaxTag, "UnsynchronisedText");
|
||||
DEFINE_MKX_STRING (KaxTagUserDefinedURL, 0x434A, 2, KaxTag, "UserDefinedURL");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTagTargetTypeValue, 0x68CA, 2, KaxTagTargets, "TagTargetTypeValue", 50);
|
||||
DEFINE_MKX_STRING (KaxTagTargetType, 0x63CA, 2, KaxTagTargets, "TagTargetType");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTagTrackUID, 0x63C5, 2, KaxTagTargets, "TagTrackUID", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTagEditionUID, 0x63C9, 2, KaxTagTargets, "TagEditionUID", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTagChapterUID, 0x63C4, 2, KaxTagTargets, "TagChapterUID", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTagAttachmentUID, 0x63C6, 2, KaxTagTargets, "TagAttachmentUID", 0);
|
||||
DEFINE_MKX_UNISTRING (KaxTagArchivalLocation, 0x45A4, 2, KaxTagGeneral, "ArchivalLocation");
|
||||
DEFINE_MKX_UNISTRING (KaxTagFile, 0x454E, 2, KaxTagGeneral, "File");
|
||||
DEFINE_MKX_UNISTRING (KaxTagKeywords, 0x458C, 2, KaxTagGeneral, "Keywords");
|
||||
DEFINE_MKX_UNISTRING (KaxTagMood, 0x45AE, 2, KaxTagGeneral, "Mood");
|
||||
DEFINE_MKX_STRING (KaxTagRecordLocation, 0x457E, 2, KaxTagGeneral, "RecordLocation");
|
||||
DEFINE_MKX_UNISTRING (KaxTagSource, 0x458A, 2, KaxTagGeneral, "Source");
|
||||
DEFINE_MKX_UNISTRING (KaxTagSourceForm, 0x45B5, 2, KaxTagGeneral, "SourceForm");
|
||||
DEFINE_MKX_UNISTRING (KaxTagProduct, 0x45E3, 2, KaxTagGeneral, "Product");
|
||||
DEFINE_MKX_UNISTRING (KaxTagOriginalMediaType, 0x45A7, 2, KaxTagGeneral, "OriginalMediaType");
|
||||
DEFINE_MKX_UINTEGER (KaxTagPlayCounter, 0x4566, 2, KaxTagTargets, "PlayCounter");
|
||||
DEFINE_MKX_SINTEGER (KaxTagPopularimeter, 0x4532, 2, KaxTagTargets, "Popularimeter");
|
||||
DEFINE_MKX_STRING (KaxTagAudioGenre, 0x65C2, 2, KaxTagGenres, "AudioGenre");
|
||||
DEFINE_MKX_BINARY (KaxTagVideoGenre, 0x65A1, 2, KaxTagGenres, "VideoGenre");
|
||||
DEFINE_MKX_STRING (KaxTagSubGenre, 0x65AC, 2, KaxTagGenres, "SubGenre");
|
||||
DEFINE_MKX_BINARY (KaxTagAudioEncryption, 0x41B4, 2, KaxTagAudioSpecific, "AudioEncryption");
|
||||
DEFINE_MKX_FLOAT (KaxTagAudioGain, 0x4199, 2, KaxTagAudioSpecific, "AudioGain");
|
||||
DEFINE_MKX_FLOAT (KaxTagAudioPeak, 0x4189, 2, KaxTagAudioSpecific, "AudioPeak");
|
||||
DEFINE_MKX_FLOAT (KaxTagBPM, 0x41A1, 2, KaxTagAudioSpecific, "BPM");
|
||||
DEFINE_MKX_UINTEGER (KaxTagDiscTrack, 0x41B6, 2, KaxTagAudioSpecific, "DiscTrack");
|
||||
DEFINE_MKX_UINTEGER (KaxTagSetPart, 0x416E, 2, KaxTagAudioSpecific, "SetPart");
|
||||
DEFINE_MKX_BINARY (KaxTagEqualisation, 0x41B1, 2, KaxTagAudioSpecific, "Equalisation");
|
||||
DEFINE_MKX_STRING (KaxTagInitialKey, 0x413A, 2, KaxTagAudioSpecific, "InitialKey");
|
||||
DEFINE_MKX_STRING (KaxTagOfficialAudioFileURL, 0x4133, 2, KaxTagAudioSpecific, "OfficialAudioFileURL");
|
||||
DEFINE_MKX_STRING (KaxTagOfficialAudioSourceURL, 0x413E, 2, KaxTagAudioSpecific, "AudioSourceURL");
|
||||
DEFINE_MKX_UINTEGER (KaxTagCaptureDPI, 0x49C7, 2, KaxTagImageSpecific, "CaptureDPI");
|
||||
DEFINE_MKX_BINARY (KaxTagCaptureLightness, 0x49E1, 2, KaxTagImageSpecific, "CaptureLightness");
|
||||
DEFINE_MKX_UINTEGER (KaxTagCapturePaletteSetting, 0x4934, 2, KaxTagImageSpecific, "CapturePaletteSetting");
|
||||
DEFINE_MKX_BINARY (KaxTagCaptureSharpness, 0x4922, 2, KaxTagImageSpecific, "CaptureSharpness");
|
||||
DEFINE_MKX_UNISTRING (KaxTagCropped, 0x4987, 2, KaxTagImageSpecific, "Cropped");
|
||||
DEFINE_MKX_STRING (KaxTagOriginalDimensions, 0x4933, 2, KaxTagImageSpecific, "OriginalDimensions");
|
||||
|
||||
DEFINE_MKX_MASTER (KaxTagSimple, 0x67C8, 2, KaxTag, "TagSimple");
|
||||
DEFINE_MKX_UNISTRING (KaxTagName, 0x45A3, 2, KaxTagSimple, "TagName");
|
||||
DEFINE_MKX_STRING_DEF (KaxTagLangue, 0x447A, 2, KaxTagSimple, "TagLanguage", "und");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTagDefault, 0x4484, 2, KaxTagSimple, "TagDefault", 1);
|
||||
DEFINE_MKX_UNISTRING (KaxTagString, 0x4487, 2, KaxTagSimple, "TagString");
|
||||
DEFINE_MKX_BINARY (KaxTagBinary, 0x4485, 2, KaxTagSimple, "TagBinary");
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
212
src/KaxTagMulti.cpp
Normal file
212
src/KaxTagMulti.cpp
Normal file
@@ -0,0 +1,212 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id$
|
||||
\author Jory Stone <jcsston @ toughguy.net>
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxTagMulti.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagMultiGlobal)
|
||||
// TODO: have the default EBML global semantic as well
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiComment)
|
||||
DEFINE_END_SEMANTIC(KaxTagMultiGlobal)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagMultiComment)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiCommentName)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiCommentComments)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiCommentLanguage)
|
||||
DEFINE_END_SEMANTIC(KaxTagMultiComment)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagMultiCommercial)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxTagCommercial)
|
||||
DEFINE_END_SEMANTIC(KaxTagMultiCommercial)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagCommercial)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiCommercialType)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiCommercialAddress)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiCommercialURL)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiCommercialEmail)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiPrice)
|
||||
DEFINE_END_SEMANTIC(KaxTagCommercial)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagMultiPrice)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiPriceCurrency)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiPriceAmount)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiPricePriceDate)
|
||||
DEFINE_END_SEMANTIC(KaxTagMultiPrice)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagMultiDate)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxTagDate)
|
||||
DEFINE_END_SEMANTIC(KaxTagMultiDate)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagDate)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiDateType)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiDateDateBegin)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiDateDateEnd)
|
||||
DEFINE_END_SEMANTIC(KaxTagDate)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagMultiEntity)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxTagEntity)
|
||||
DEFINE_END_SEMANTIC(KaxTagMultiEntity)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagEntity)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiEntityType)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiEntityName)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiEntityURL)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiEntityEmail)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiEntityAddress)
|
||||
DEFINE_END_SEMANTIC(KaxTagEntity)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagMultiIdentifier)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxTagIdentifier)
|
||||
DEFINE_END_SEMANTIC(KaxTagMultiIdentifier)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagIdentifier)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiIdentifierType)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiIdentifierBinary)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiIdentifierString)
|
||||
DEFINE_END_SEMANTIC(KaxTagIdentifier)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagMultiLegal)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxTagLegal)
|
||||
DEFINE_END_SEMANTIC(KaxTagMultiLegal)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagLegal)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiLegalType)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiLegalContent)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiLegalURL)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiLegalAddress)
|
||||
DEFINE_END_SEMANTIC(KaxTagLegal)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagMultiTitle)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxTagTitle)
|
||||
DEFINE_END_SEMANTIC(KaxTagMultiTitle)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagTitle)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTagMultiTitleType)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitleName)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitleSubTitle)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitleEdition)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitleAddress)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiTitleURL)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTagMultiTitleEmail)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagMultiTitleLanguage)
|
||||
DEFINE_END_SEMANTIC(KaxTagTitle)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagMultiAttachment)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxTagAttachment)
|
||||
DEFINE_END_SEMANTIC(KaxTagMultiAttachment)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTagAttachment)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTagAttachmentID)
|
||||
DEFINE_END_SEMANTIC(KaxTagAttachment)
|
||||
|
||||
|
||||
DEFINE_MKX_CONTEXT(KaxTagMultiGlobal);
|
||||
|
||||
const EbmlSemanticContext & GetKaxTagsGlobal_Context()
|
||||
{
|
||||
return EBML_CLASS_SEMCONTEXT(KaxTagMultiGlobal);
|
||||
}
|
||||
|
||||
#if defined(HAVE_EBML2)
|
||||
#define DEFINE_TAG_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,d,e,EBML_SemanticKaxTagMultiGlobal)
|
||||
#else
|
||||
#define DEFINE_TAG_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,c,d,e,*GetKaxTagsGlobal_Context)
|
||||
#endif
|
||||
|
||||
|
||||
DEFINE_MKX_MASTER (KaxTagMultiComment, 0x5B7B, 2, KaxTag, "MultiComment");
|
||||
DEFINE_MKX_STRING (KaxTagMultiCommentName, 0x5F7D, 2, KaxTagMultiComment, "MultiCommentName");
|
||||
DEFINE_MKX_UNISTRING(KaxTagMultiCommentComments, 0x5F7C, 2, KaxTagMultiComment, "MultiCommentComments");
|
||||
DEFINE_MKX_STRING (KaxTagMultiCommentLanguage, 0x22B59D, 3, KaxTagMultiComment, "MultiCommentLanguage");
|
||||
|
||||
DEFINE_TAG_MASTER (KaxTagMultiCommercial, 0x4DC7, 2, KaxTag, "MultiCommercial");
|
||||
DEFINE_TAG_MASTER (KaxTagCommercial, 0x4EC7, 2, KaxTagMultiCommercial, "Commercial");
|
||||
DEFINE_MKX_UINTEGER (KaxTagMultiCommercialType, 0x5BD7, 2, KaxTagCommercial, "MultiCommercialType");
|
||||
DEFINE_MKX_UNISTRING(KaxTagMultiCommercialAddress, 0x5BBB, 2, KaxTagCommercial, "MultiCommercialAddress");
|
||||
DEFINE_MKX_STRING (KaxTagMultiCommercialURL, 0x5BDA, 2, KaxTagCommercial, "MultiCommercialURL");
|
||||
DEFINE_MKX_STRING (KaxTagMultiCommercialEmail, 0x5BC0, 2, KaxTagCommercial, "MultiCommercialEmail");
|
||||
DEFINE_TAG_MASTER (KaxTagMultiPrice, 0x5BC3, 2, KaxTagCommercial, "MultiPrice");
|
||||
DEFINE_MKX_STRING (KaxTagMultiPriceCurrency, 0x5B6C, 2, KaxTagMultiPrice, "MultiPriceCurrency");
|
||||
DEFINE_MKX_FLOAT (KaxTagMultiPriceAmount, 0x5B6E, 2, KaxTagMultiPrice, "MultiPriceAmount");
|
||||
DEFINE_MKX_DATE (KaxTagMultiPricePriceDate, 0x5B6F, 2, KaxTagMultiPrice, "MultiPricePriceDate");
|
||||
|
||||
DEFINE_TAG_MASTER (KaxTagMultiDate, 0x4DC8, 2, KaxTag, "MultiDate");
|
||||
DEFINE_TAG_MASTER (KaxTagDate, 0x4EC8, 2, KaxTagMultiDate, "Date");
|
||||
DEFINE_MKX_UINTEGER (KaxTagMultiDateType, 0x5BD8, 2, KaxTagDate, "MultiDateType");
|
||||
DEFINE_MKX_DATE (KaxTagMultiDateDateBegin, 0x4460, 2, KaxTagDate, "MultiDateDateBegin");
|
||||
DEFINE_MKX_DATE (KaxTagMultiDateDateEnd, 0x4462, 2, KaxTagDate, "MultiDateDateEnd");
|
||||
|
||||
DEFINE_TAG_MASTER (KaxTagMultiEntity, 0x4DC9, 2, KaxTag, "MultiEntity");
|
||||
DEFINE_TAG_MASTER (KaxTagEntity, 0x4EC9, 2, KaxTagMultiEntity, "Entity");
|
||||
DEFINE_MKX_UINTEGER (KaxTagMultiEntityType, 0x5BD9, 2, KaxTagEntity, "MultiEntityType");
|
||||
DEFINE_MKX_UNISTRING(KaxTagMultiEntityName, 0x5BED, 2, KaxTagEntity, "MultiEntityName");
|
||||
DEFINE_MKX_STRING (KaxTagMultiEntityURL, 0x5BDB, 2, KaxTagEntity, "MultiEntityURL");
|
||||
DEFINE_MKX_STRING (KaxTagMultiEntityEmail, 0x5BC1, 2, KaxTagEntity, "MultiEntityEmail");
|
||||
DEFINE_MKX_UNISTRING(KaxTagMultiEntityAddress, 0x5BDC, 2, KaxTagEntity, "MultiEntityAddress");
|
||||
|
||||
DEFINE_TAG_MASTER (KaxTagMultiIdentifier, 0x4DC6, 2, KaxTag, "MultiIdentifier");
|
||||
DEFINE_TAG_MASTER (KaxTagIdentifier, 0x4EC6, 2, KaxTagMultiIdentifier, "Identifier");
|
||||
DEFINE_MKX_UINTEGER (KaxTagMultiIdentifierType, 0x5BAD, 2, KaxTagIdentifier, "MultiIdentifierType");
|
||||
DEFINE_MKX_BINARY (KaxTagMultiIdentifierBinary, 0x6B67, 2, KaxTagIdentifier, "MultiIdentifierBinary");
|
||||
DEFINE_MKX_UNISTRING(KaxTagMultiIdentifierString, 0x6B68, 2, KaxTagIdentifier, "MultiIdentifierString");
|
||||
|
||||
DEFINE_TAG_MASTER (KaxTagMultiLegal, 0x4DC5, 2, KaxTag, "MultiLegal");
|
||||
DEFINE_TAG_MASTER (KaxTagLegal, 0x4EC5, 2, KaxTagMultiLegal, "Legal");
|
||||
DEFINE_MKX_UINTEGER (KaxTagMultiLegalType, 0x5BBD, 2, KaxTagLegal, "MultiLegalType");
|
||||
DEFINE_MKX_UNISTRING(KaxTagMultiLegalContent, 0x5BB2, 2, KaxTagLegal, "MultiLegalContent");
|
||||
DEFINE_MKX_STRING (KaxTagMultiLegalURL, 0x5B34, 2, KaxTagLegal, "MultiLegalURL");
|
||||
DEFINE_MKX_UNISTRING(KaxTagMultiLegalAddress, 0x5B9B, 2, KaxTagLegal, "MultiLegalAddress");
|
||||
|
||||
DEFINE_TAG_MASTER (KaxTagMultiTitle, 0x4DC4, 2, KaxTag, "MultiTitle");
|
||||
DEFINE_TAG_MASTER (KaxTagTitle, 0x4EC4, 2, KaxTagMultiTitle, "Title");
|
||||
DEFINE_MKX_UINTEGER (KaxTagMultiTitleType, 0x5B7D, 2, KaxTagTitle, "MultiTitleType");
|
||||
DEFINE_MKX_UNISTRING(KaxTagMultiTitleName, 0x5BB9, 2, KaxTagTitle, "MultiTitleName");
|
||||
DEFINE_MKX_UNISTRING(KaxTagMultiTitleSubTitle, 0x5B5B, 2, KaxTagTitle, "MultiTitleSubTitle");
|
||||
DEFINE_MKX_UNISTRING(KaxTagMultiTitleEdition, 0x5BAE, 2, KaxTagTitle, "MultiTitleEdition");
|
||||
DEFINE_MKX_UNISTRING(KaxTagMultiTitleAddress, 0x5B33, 2, KaxTagTitle, "MultiTitleAddress");
|
||||
DEFINE_MKX_STRING (KaxTagMultiTitleURL, 0x5BA9, 2, KaxTagTitle, "MultiTitleURL");
|
||||
DEFINE_MKX_STRING (KaxTagMultiTitleEmail, 0x5BC9, 2, KaxTagTitle, "MultiTitleEmail");
|
||||
DEFINE_MKX_STRING (KaxTagMultiTitleLanguage, 0x22B59E, 3, KaxTagTitle, "MultiTitleLanguage");
|
||||
|
||||
DEFINE_TAG_MASTER (KaxTagMultiAttachment, 0x4DC3, 2, KaxTag, "MultiAttachment");
|
||||
DEFINE_TAG_MASTER (KaxTagAttachment, 0x4EC3, 2, KaxTagMultiAttachment, "Attachment");
|
||||
DEFINE_MKX_UINTEGER (KaxTagAttachmentID, 0x5BA0, 2, KaxTagAttachment, "AttachmentID");
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
52
src/KaxTags.cpp
Normal file
52
src/KaxTags.cpp
Normal file
@@ -0,0 +1,52 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTags.cpp 711 2004-08-10 12:58:47Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author Jory Stone <jcsston @ toughguy.net>
|
||||
*/
|
||||
#include "matroska/KaxTags.h"
|
||||
#include "matroska/KaxTag.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTags)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxTag)
|
||||
DEFINE_END_SEMANTIC(KaxTags)
|
||||
|
||||
DEFINE_MKX_MASTER(KaxTags, 0x1254C367, 4, KaxSegment, "Tags");
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
62
src/KaxTrackAudio.cpp
Normal file
62
src/KaxTrackAudio.cpp
Normal file
@@ -0,0 +1,62 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTrackAudio.cpp 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxTrackAudio.h"
|
||||
|
||||
// sub elements
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTrackAudio)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxAudioSamplingFreq)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxAudioChannels)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxAudioBitDepth)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxAudioOutputSamplingFreq)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxAudioPosition)
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_END_SEMANTIC(KaxTrackAudio)
|
||||
|
||||
DEFINE_MKX_MASTER (KaxTrackAudio, 0xE1, 1, KaxTrackEntry, "TrackAudio");
|
||||
DEFINE_MKX_FLOAT_DEF (KaxAudioSamplingFreq, 0xB5, 1, KaxTrackAudio, "AudioSamplingFreq", 8000.0);
|
||||
DEFINE_MKX_FLOAT (KaxAudioOutputSamplingFreq, 0x78B5, 2, KaxTrackAudio, "AudioOutputSamplingFreq");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxAudioChannels, 0x9F, 1, KaxTrackAudio, "AudioChannels", 1);
|
||||
DEFINE_MKX_UINTEGER (KaxAudioBitDepth, 0x6264, 2, KaxTrackAudio, "AudioBitDepth");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_BINARY (KaxAudioPosition, 0x7D7B, 2, KaxTrackAudio, "AudioPosition");
|
||||
#endif
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
79
src/KaxTrackEntryData.cpp
Normal file
79
src/KaxTrackEntryData.cpp
Normal file
@@ -0,0 +1,79 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTrackEntryData.cpp 1201 2005-08-30 14:28:27Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author John Cannon <spyder2555 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxTrackEntryData.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTrackTranslate)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTrackTranslateEditionUID)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackTranslateCodec)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackTranslateTrackID)
|
||||
DEFINE_END_SEMANTIC(KaxTrackTranslate)
|
||||
|
||||
DEFINE_MKX_UINTEGER (KaxTrackNumber, 0xD7, 1, KaxTracks, "TrackNumber");
|
||||
DEFINE_MKX_UINTEGER (KaxTrackUID, 0x73C5, 2, KaxTracks, "TrackUID");
|
||||
DEFINE_MKX_UINTEGER (KaxTrackType, 0x83, 1, KaxTracks, "TrackType");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagDefault, 0x88, 1, KaxTracks, "TrackFlagEnabled", 1);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagForced, 0x55AA, 2, KaxTracks, "TrackFlagForced", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagLacing, 0x9C, 1, KaxTracks, "TrackFlagLacing", 1);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTrackMinCache, 0x6DE7, 2, KaxTracks, "TrackMinCache", 0);
|
||||
DEFINE_MKX_UINTEGER (KaxTrackMaxCache, 0x6DF8, 2, KaxTracks, "TrackMaxCache\0rotomodobopo");
|
||||
DEFINE_MKX_UINTEGER (KaxTrackDefaultDuration, 0x23E383, 3, KaxTracks, "TrackDefaultDuration");
|
||||
DEFINE_MKX_FLOAT_DEF (KaxTrackTimecodeScale, 0x23314F, 3, KaxTracks, "TrackTimecodeScale", 1.0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxMaxBlockAdditionID, 0x55EE, 2, KaxTracks, "MaxBlockAdditionID", 0);
|
||||
//DEFINE_MKX_SINTEGER_DEF(KaxTrackOffset, 0x537F, 2, KaxTracks, "TrackOffset", 0);
|
||||
DEFINE_MKX_UNISTRING (KaxTrackName, 0x536E, 2, KaxTracks, "TrackName");
|
||||
DEFINE_MKX_STRING_DEF (KaxTrackLanguage, 0x22B59C, 3, KaxTracks, "TrackLanguage", "eng");
|
||||
DEFINE_MKX_STRING (KaxCodecID, 0x86, 1, KaxTracks, "CodecID");
|
||||
DEFINE_MKX_BINARY (KaxCodecPrivate, 0x63A2, 2, KaxTracks, "CodecPrivate");
|
||||
DEFINE_MKX_UNISTRING (KaxCodecName, 0x258688, 3, KaxTracks, "CodecName");
|
||||
DEFINE_MKX_BINARY (KaxTrackAttachmentLink, 0x7446, 2, KaxTracks, "TrackAttachmentLink");
|
||||
DEFINE_MKX_UINTEGER (KaxTrackOverlay, 0x6FAB, 2, KaxTracks, "TrackOverlay");
|
||||
DEFINE_MKX_MASTER (KaxTrackTranslate, 0x6624, 2, KaxTracks, "TrackTranslate");
|
||||
DEFINE_MKX_UINTEGER (KaxTrackTranslateEditionUID, 0x66FC, 2, KaxTrackTranslate, "TrackTranslateEditionUID");
|
||||
DEFINE_MKX_UINTEGER (KaxTrackTranslateCodec, 0x66BF, 2, KaxTrackTranslate, "TrackTranslateCodec");
|
||||
DEFINE_MKX_BINARY (KaxTrackTranslateTrackID, 0x66A5, 2, KaxTrackTranslate, "TrackTranslateTrackID");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxTrackFlagEnabled, 0xB9, 1, KaxTracks, "TrackFlagDefault", 1);
|
||||
DEFINE_MKX_UNISTRING (KaxCodecSettings, 0x3A9697, 3, KaxTracks, "CodecSettings");
|
||||
DEFINE_MKX_STRING (KaxCodecInfoURL, 0x3B4040, 3, KaxTracks, "CodecInfoURL");
|
||||
DEFINE_MKX_STRING (KaxCodecDownloadURL, 0x26B240, 3, KaxTracks, "CodecDownloadURL");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxCodecDecodeAll, 0xAA, 1, KaxTracks, "CodecDecodeAll", 1);
|
||||
#endif
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
88
src/KaxTrackVideo.cpp
Normal file
88
src/KaxTrackVideo.cpp
Normal file
@@ -0,0 +1,88 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTrackVideo.cpp 738 2004-08-30 09:21:46Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxTrackVideo.h"
|
||||
|
||||
// sub elements
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTrackVideo)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxVideoPixelWidth)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxVideoPixelHeight)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropBottom)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropTop)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropLeft)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoPixelCropRight)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoDisplayWidth)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoDisplayHeight)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoColourSpace)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoFrameRate)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxVideoFlagInterlaced)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoStereoMode)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoDisplayUnit)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoAspectRatio)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxVideoGamma)
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_END_SEMANTIC(KaxTrackVideo)
|
||||
|
||||
DEFINE_MKX_MASTER (KaxTrackVideo, 0xE0, 1, KaxTrackEntry, "TrackVideo");
|
||||
DEFINE_MKX_UINTEGER (KaxVideoPixelWidth, 0xB0, 1, KaxTrackVideo, "VideoPixelWidth");
|
||||
DEFINE_MKX_UINTEGER (KaxVideoPixelHeight, 0xBA, 1, KaxTrackVideo, "VideoPixelHeight");
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropBottom, 0x54AA, 2, KaxTrackVideo, "VideoPixelCropBottom", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropTop, 0x54BB, 2, KaxTrackVideo, "VideoPixelCropTop", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropLeft, 0x54CC, 2, KaxTrackVideo, "VideoPixelCropLeft", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoPixelCropRight, 0x54DD, 2, KaxTrackVideo, "VideoPixelCropRight", 0);
|
||||
DEFINE_MKX_UINTEGER (KaxVideoDisplayWidth, 0x54B0, 2, KaxTrackVideo, "VideoDisplayWidth");
|
||||
DEFINE_MKX_UINTEGER (KaxVideoDisplayHeight, 0x54BA, 2, KaxTrackVideo, "VideoDisplayHeight");
|
||||
DEFINE_MKX_BINARY (KaxVideoColourSpace, 0x2EB524, 3, KaxTrackVideo, "VideoColourSpace");
|
||||
DEFINE_MKX_FLOAT (KaxVideoFrameRate, 0x2383E3, 3, KaxTrackVideo, "VideoFrameRate");
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoFlagInterlaced, 0x9A, 1, KaxTrackVideo, "VideoFlagInterlaced", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoStereoMode, 0x53B8, 2, KaxTrackVideo, "VideoStereoMode", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoDisplayUnit, 0x54B2, 2, KaxTrackVideo, "VideoDisplayUnit", 0);
|
||||
DEFINE_MKX_UINTEGER_DEF(KaxVideoAspectRatio, 0x54B3, 2, KaxTrackVideo, "VideoAspectRatio", 0);
|
||||
DEFINE_MKX_FLOAT (KaxVideoGamma, 0x2FB523, 3, KaxTrackVideo, "VideoGamma");
|
||||
#endif
|
||||
|
||||
filepos_t KaxVideoFrameRate::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
|
||||
{
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
@@ -1,54 +1,99 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTracks.cpp 1202 2005-08-30 14:39:01Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxTracks.h"
|
||||
|
||||
// sub elements
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
KaxTrackEntry::KaxTrackEntry(EBML_EXTRA_DEF)
|
||||
:EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxTrackEntry) EBML_DEF_SEP EBML_EXTRA_CALL)
|
||||
,bGlobalTimecodeScaleIsSet(false)
|
||||
{}
|
||||
|
||||
void KaxTrackEntry::EnableLacing(bool bEnable)
|
||||
{
|
||||
KaxTrackFlagLacing & myLacing = GetChild<KaxTrackFlagLacing>(*this);
|
||||
*(static_cast<EbmlUInteger *>(&myLacing)) = bEnable ? 1 : 0;
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxTracks.cpp 1202 2005-08-30 14:39:01Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxTracks.h"
|
||||
|
||||
// sub elements
|
||||
#include "matroska/KaxTrackEntryData.h"
|
||||
#include "matroska/KaxTrackAudio.h"
|
||||
#include "matroska/KaxTrackVideo.h"
|
||||
#include "matroska/KaxContentEncoding.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxDefines.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTracks)
|
||||
DEFINE_SEMANTIC_ITEM(true, false, KaxTrackEntry)
|
||||
DEFINE_END_SEMANTIC(KaxTracks)
|
||||
|
||||
DEFINE_START_SEMANTIC(KaxTrackEntry)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackNumber)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackUID)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackType)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagEnabled)
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagDefault)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagForced)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackFlagLacing)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackMinCache)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackMaxCache)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackDefaultDuration)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxTrackTimecodeScale)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxMaxBlockAdditionID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackName)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackLanguage)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxCodecID)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCodecPrivate)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCodecName)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackAttachmentLink)
|
||||
#if MATROSKA_VERSION >= 2
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxCodecSettings)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxCodecInfoURL)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxCodecDownloadURL)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, KaxCodecDecodeAll)
|
||||
#endif // MATROSKA_VERSION
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTrackOverlay)
|
||||
DEFINE_SEMANTIC_ITEM(false, false, KaxTrackTranslate)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackAudio)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxTrackVideo)
|
||||
DEFINE_SEMANTIC_ITEM(false, true, KaxContentEncodings)
|
||||
DEFINE_END_SEMANTIC(KaxTrackEntry)
|
||||
|
||||
DEFINE_MKX_MASTER (KaxTracks, 0x1654AE6B, 4, KaxSegment, "Tracks");
|
||||
DEFINE_MKX_MASTER_CONS(KaxTrackEntry, 0xAE, 1, KaxTracks, "TrackEntry");
|
||||
|
||||
KaxTrackEntry::KaxTrackEntry(EBML_EXTRA_DEF)
|
||||
:EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxTrackEntry) EBML_DEF_SEP EBML_EXTRA_CALL)
|
||||
,bGlobalTimecodeScaleIsSet(false)
|
||||
{}
|
||||
|
||||
void KaxTrackEntry::EnableLacing(bool bEnable)
|
||||
{
|
||||
KaxTrackFlagLacing & myLacing = GetChild<KaxTrackFlagLacing>(*this);
|
||||
*(static_cast<EbmlUInteger *>(&myLacing)) = bEnable ? 1 : 0;
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
@@ -1,43 +1,40 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxVersion.cpp 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
|
||||
#include "matroska/KaxVersion.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
const std::string KaxCodeVersion = "1.4.0";
|
||||
const std::string KaxCodeDate = __TIMESTAMP__;
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved.
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: KaxVersion.cpp 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
|
||||
#include "matroska/KaxVersion.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
@@ -1,10 +1,10 @@
|
||||
## libmatroska Makefile
|
||||
## (c) 2002 Steve Lhomme
|
||||
## This software is licensed under the LGPL, see LICENSE.LGPL
|
||||
|
||||
all: endian
|
||||
echo "Making endianess tests"
|
||||
(cd endian; make)
|
||||
clean:
|
||||
echo "Cleaning all tests"
|
||||
(cd endian; make $@)
|
||||
## libmatroska Makefile
|
||||
## (c) 2002 Steve Lhomme
|
||||
## This software is licensed under the LGPL, see LGPL.txt
|
||||
|
||||
all: endian
|
||||
echo "Making endianess tests"
|
||||
(cd endian; make)
|
||||
clean:
|
||||
echo "Cleaning all tests"
|
||||
(cd endian; make $@)
|
||||
|
@@ -1,62 +1,62 @@
|
||||
# libmatroska core Makefile (used in cygwin)
|
||||
# $Id: Makefile 640 2004-07-09 21:05:36Z mosu $
|
||||
|
||||
# Options
|
||||
EXTENSION=.cpp
|
||||
CXXFLAGS=-g -DDEBUG -Wall -Wno-unknown-pragmas -DWIN32 -I../../src/
|
||||
LDFLAGS=
|
||||
|
||||
SRC_DIR=../../src/
|
||||
|
||||
# Programs
|
||||
CXX=g++ -c
|
||||
LD=g++
|
||||
DEP=$(CXX) -MM
|
||||
DEPEND = makedepend
|
||||
AR = ar rcvu
|
||||
RANLIB = ranlib
|
||||
|
||||
# Librarires
|
||||
INCLUDE=
|
||||
LIBS=
|
||||
|
||||
# Names
|
||||
PROGRAM=test00
|
||||
|
||||
# source-files
|
||||
sources:=$(wildcard ${SRC_DIR}*$(EXTENSION))
|
||||
|
||||
# header files; replace .cxx extension with .h
|
||||
headers:=$(patsubst %$(EXTENSION),%.hpp,$(sources))
|
||||
|
||||
# files holding dependency information; replace .cxx extension with .dep
|
||||
dependencies:=$(patsubst %$(EXTENSION),%.dep,$(sources))
|
||||
|
||||
# object files; replace .cxx extension with .o
|
||||
objects:=$(patsubst %$(EXTENSION),%.o,$(sources))
|
||||
|
||||
OBJ=$(objects) test00.o
|
||||
|
||||
DEPENDFLAGS = ${CXXFLAGS} ${INCLUDE}
|
||||
|
||||
# Build rules
|
||||
%.o: %$(EXTENSION)
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDE) -o $@ $<
|
||||
|
||||
$(PROGRAM): $(OBJ)
|
||||
# $(AR) $@ $(objects)
|
||||
# $(RANLIB) $@
|
||||
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
${LD} -o $@ ${LDFLAGS} ${OBJ} ${LIBS} ${EXTRA_LIBS}
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ)
|
||||
rm -f $(dependencies)
|
||||
rm -f $(PROGRAM)
|
||||
rm -f CORE
|
||||
|
||||
# what are the source dependencies
|
||||
depend: $(sources)
|
||||
$(DEPEND) $(DEPENDFLAGS) $(sources)
|
||||
|
||||
# DO NOT DELETE
|
||||
# libmatroska core Makefile (used in cygwin)
|
||||
# $Id: Makefile 640 2004-07-09 21:05:36Z mosu $
|
||||
|
||||
# Options
|
||||
EXTENSION=.cpp
|
||||
CXXFLAGS=-g -DDEBUG -Wall -Wno-unknown-pragmas -DWIN32 -I../../src/
|
||||
LDFLAGS=
|
||||
|
||||
SRC_DIR=../../src/
|
||||
|
||||
# Programs
|
||||
CXX=g++ -c
|
||||
LD=g++
|
||||
DEP=$(CXX) -MM
|
||||
DEPEND = makedepend
|
||||
AR = ar rcvu
|
||||
RANLIB = ranlib
|
||||
|
||||
# Librarires
|
||||
INCLUDE=
|
||||
LIBS=
|
||||
|
||||
# Names
|
||||
PROGRAM=test00
|
||||
|
||||
# source-files
|
||||
sources:=$(wildcard ${SRC_DIR}*$(EXTENSION))
|
||||
|
||||
# header files; replace .cxx extension with .h
|
||||
headers:=$(patsubst %$(EXTENSION),%.hpp,$(sources))
|
||||
|
||||
# files holding dependency information; replace .cxx extension with .dep
|
||||
dependencies:=$(patsubst %$(EXTENSION),%.dep,$(sources))
|
||||
|
||||
# object files; replace .cxx extension with .o
|
||||
objects:=$(patsubst %$(EXTENSION),%.o,$(sources))
|
||||
|
||||
OBJ=$(objects) test00.o
|
||||
|
||||
DEPENDFLAGS = ${CXXFLAGS} ${INCLUDE}
|
||||
|
||||
# Build rules
|
||||
%.o: %$(EXTENSION)
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDE) -o $@ $<
|
||||
|
||||
$(PROGRAM): $(OBJ)
|
||||
# $(AR) $@ $(objects)
|
||||
# $(RANLIB) $@
|
||||
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
${LD} -o $@ ${LDFLAGS} ${OBJ} ${LIBS} ${EXTRA_LIBS}
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ)
|
||||
rm -f $(dependencies)
|
||||
rm -f $(PROGRAM)
|
||||
rm -f CORE
|
||||
|
||||
# what are the source dependencies
|
||||
depend: $(sources)
|
||||
$(DEPEND) $(DEPENDFLAGS) $(sources)
|
||||
|
||||
# DO NOT DELETE
|
||||
|
@@ -2,12 +2,10 @@
|
||||
|
||||
CON ebml-test00
|
||||
{
|
||||
USE matroska
|
||||
SOURCE test00.cpp
|
||||
}
|
||||
|
||||
CON ebml-test0
|
||||
{
|
||||
USE matroska
|
||||
SOURCE test0.cpp
|
||||
}
|
||||
|
@@ -7,21 +7,24 @@
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** This file may be distributed under the terms of the Q Public License
|
||||
** as defined by Trolltech AS of Norway and appearing in the file
|
||||
** LICENSE.QPL included in the packaging of this file.
|
||||
**
|
||||
** This file may be distributed and/or modified under the terms of the
|
||||
** GNU General Public License version 2 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file.
|
||||
**
|
||||
** Licensees holding an other license may use this file in accordance with
|
||||
** the Agreement provided with the Software.
|
||||
**
|
||||
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
**
|
||||
** See http://www.matroska.org/license/qpl/ for QPL licensing information.
|
||||
** See http://www.matroska.org/license/gpl/ for GPL licensing information.
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -29,7 +32,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id$
|
||||
\version \$Id: test0.cpp 1078 2005-03-03 13:13:04Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
Test the EBML write possibilities
|
||||
\see http://www.cl.cam.ac.uk/~mgk25/unicode.html
|
||||
@@ -38,19 +41,18 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ebml/StdIOCallback.h"
|
||||
#include "StdIOCallback.hpp"
|
||||
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "ebml/EbmlSInteger.h"
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "ebml/EbmlString.h"
|
||||
#include "ebml/EbmlUnicodeString.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlFloat.h"
|
||||
#include "ebml/EbmlStream.h"
|
||||
#include "ebml/StdIOCallback.h"
|
||||
#include "EbmlUInteger.hpp"
|
||||
#include "EbmlSInteger.hpp"
|
||||
#include "EbmlBinary.hpp"
|
||||
#include "EbmlString.hpp"
|
||||
#include "EbmlUnicodeString.hpp"
|
||||
#include "EbmlMaster.hpp"
|
||||
#include "EbmlFloat.hpp"
|
||||
#include "EbmlStream.hpp"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
using namespace LIBMATROSKA_NAMESPACE;
|
||||
|
||||
const char RW_FILENAME[] = "test.kax";
|
||||
|
||||
|
@@ -7,21 +7,24 @@
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** This file may be distributed under the terms of the Q Public License
|
||||
** as defined by Trolltech AS of Norway and appearing in the file
|
||||
** LICENSE.QPL included in the packaging of this file.
|
||||
**
|
||||
** This file may be distributed and/or modified under the terms of the
|
||||
** GNU General Public License version 2 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file.
|
||||
**
|
||||
** Licensees holding an other license may use this file in accordance with
|
||||
** the Agreement provided with the Software.
|
||||
**
|
||||
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
**
|
||||
** See http://www.matroska.org/license/qpl/ for QPL licensing information.
|
||||
** See http://www.matroska.org/license/gpl/ for GPL licensing information.
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -29,7 +32,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id$
|
||||
\version \$Id: test00.cpp 1078 2005-03-03 13:13:04Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
Test the writing a basic EBML file
|
||||
*/
|
||||
@@ -37,19 +40,20 @@
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
#include "ebml/StdIOCallback.h"
|
||||
#include "StdIOCallback.h"
|
||||
|
||||
#include "ebml/EbmlHead.h"
|
||||
#include "ebml/EbmlSubHead.h"
|
||||
#include "ebml/EbmlStream.h"
|
||||
#include "ebml/EbmlVoid.h"
|
||||
#include "ebml/EbmlContexts.h"
|
||||
#include "matroska/KaxSegment.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxSemantic.h"
|
||||
#include "EbmlHead.h"
|
||||
#include "EbmlSubHead.h"
|
||||
#include "EbmlStream.h"
|
||||
#include "EbmlVoid.h"
|
||||
#include "EbmlContexts.h"
|
||||
#include "KaxSegment.h"
|
||||
#include "KaxAttachments.h"
|
||||
#include "KaxAttached.h"
|
||||
#include "KaxContexts.h"
|
||||
|
||||
#include "ebml/EbmlVersion.h"
|
||||
#include "matroska/KaxVersion.h"
|
||||
#include "EbmlVersion.h"
|
||||
#include "KaxVersion.h"
|
||||
|
||||
using namespace LIBMATROSKA_NAMESPACE;
|
||||
|
||||
|
@@ -2,12 +2,10 @@
|
||||
|
||||
CON mux-test6
|
||||
{
|
||||
USE matroska
|
||||
SOURCE test6.cpp
|
||||
}
|
||||
|
||||
CON mux-test8
|
||||
{
|
||||
USE matroska
|
||||
SOURCE test8.cpp
|
||||
}
|
||||
|
@@ -19,9 +19,9 @@
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id$
|
||||
\version \$Id: test6.cpp 1078 2005-03-03 13:13:04Z robux4 $
|
||||
\brief Test muxing two tracks into valid clusters/blocks/frames
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
@@ -48,10 +48,19 @@
|
||||
#include "matroska/FileKax.h"
|
||||
#include "matroska/KaxSegment.h"
|
||||
#include "matroska/KaxTracks.h"
|
||||
#include "matroska/KaxTrackEntryData.h"
|
||||
#include "matroska/KaxTrackAudio.h"
|
||||
#include "matroska/KaxTrackVideo.h"
|
||||
#include "matroska/KaxCluster.h"
|
||||
#include "matroska/KaxClusterData.h"
|
||||
#include "matroska/KaxSeekHead.h"
|
||||
#include "matroska/KaxCues.h"
|
||||
#include "matroska/KaxInfo.h"
|
||||
#include "matroska/KaxInfoData.h"
|
||||
#include "matroska/KaxTags.h"
|
||||
#include "matroska/KaxTag.h"
|
||||
#include "matroska/KaxChapters.h"
|
||||
#include "matroska/KaxContentEncoding.h"
|
||||
|
||||
using namespace LIBMATROSKA_NAMESPACE;
|
||||
using namespace std;
|
||||
@@ -116,7 +125,7 @@ int main(int argc, char **argv)
|
||||
*((EbmlUnicodeString *)&GetChild<KaxWritingApp>(MyInfos)) = L"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
||||
GetChild<KaxWritingApp>(MyInfos).SetDefaultSize(25);
|
||||
|
||||
filepos_t InfoSize = MyInfos.Render(out_file);
|
||||
uint32 InfoSize = MyInfos.Render(out_file);
|
||||
MetaSeek.IndexThis(MyInfos, FileSegment);
|
||||
|
||||
// fill track 1 params
|
||||
@@ -243,17 +252,13 @@ int main(int argc, char **argv)
|
||||
Clust1.AddFrame(MyTrack2, 23 * TIMECODE_SCALE, *data5, MyNewBlock); // to test with another track
|
||||
|
||||
// add the "real" block to the cue entries
|
||||
KaxBlockBlob *Blob1 = new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE);
|
||||
Blob1->SetBlockGroup(*MyLastBlockTrk1);
|
||||
AllCues.AddBlockBlob(*Blob1);
|
||||
AllCues.AddBlockGroup(*MyLastBlockTrk1);
|
||||
|
||||
// frame for Track 2
|
||||
DataBuffer *data8 = new DataBuffer((binary *)"tttyyy", countof("tttyyy"));
|
||||
Clust1.AddFrame(MyTrack2, 107 * TIMECODE_SCALE, *data8, MyNewBlock, *MyLastBlockTrk2);
|
||||
|
||||
KaxBlockBlob *Blob2 = new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE);
|
||||
Blob2->SetBlockGroup(*MyNewBlock);
|
||||
AllCues.AddBlockBlob(*Blob2);
|
||||
AllCues.AddBlockGroup(*MyNewBlock);
|
||||
|
||||
// frame with a past reference
|
||||
DataBuffer *data4 = new DataBuffer((binary *)"tttyyy", countof("tttyyy"));
|
||||
@@ -270,9 +275,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
KaxBlockBlob *Blob3 = new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE);
|
||||
Blob3->SetBlockGroup(*MyLastBlockTrk1);
|
||||
AllCues.AddBlockBlob(*Blob3);
|
||||
AllCues.AddBlockGroup(*MyLastBlockTrk1);
|
||||
//AllCues.UpdateSize();
|
||||
|
||||
// simulate the writing of the stream :
|
||||
@@ -292,15 +295,13 @@ int main(int argc, char **argv)
|
||||
DataBuffer *data2 = new DataBuffer((binary *)"tttyyy", countof("tttyyy"));
|
||||
Clust2.AddFrame(MyTrack1, 350 * TIMECODE_SCALE, *data2, MyNewBlock, *MyLastBlockTrk1);
|
||||
|
||||
KaxBlockBlob *Blob4 = new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE);
|
||||
Blob4->SetBlockGroup(*MyNewBlock);
|
||||
AllCues.AddBlockBlob(*Blob4);
|
||||
AllCues.AddBlockGroup(*MyNewBlock);
|
||||
|
||||
ClusterSize += Clust2.Render(out_file, AllCues, bWriteDefaultValues);
|
||||
Clust2.ReleaseFrames();
|
||||
|
||||
// older version, write at the end AllCues.Render(out_file);
|
||||
filepos_t CueSize = AllCues.Render(out_file, bWriteDefaultValues);
|
||||
uint32 CueSize = AllCues.Render(out_file, bWriteDefaultValues);
|
||||
MetaSeek.IndexThis(AllCues, FileSegment);
|
||||
|
||||
// Chapters
|
||||
@@ -331,7 +332,7 @@ int main(int argc, char **argv)
|
||||
KaxChapterLanguage & aChapLang2 = GetChild<KaxChapterLanguage>(aDisplay2);
|
||||
*static_cast<EbmlString *>(&aChapLang2) = "eng";
|
||||
|
||||
filepos_t ChapterSize = Chapters.Render(out_file, bWriteDefaultValues);
|
||||
uint32 ChapterSize = Chapters.Render(out_file, bWriteDefaultValues);
|
||||
MetaSeek.IndexThis(Chapters, FileSegment);
|
||||
|
||||
// Write some tags
|
||||
@@ -339,7 +340,7 @@ int main(int argc, char **argv)
|
||||
AllTags.EnableChecksum();
|
||||
KaxTag & aTag = GetChild<KaxTag>(AllTags);
|
||||
KaxTagTargets & Targets = GetChild<KaxTagTargets>(aTag);
|
||||
KaxTagSimple & TagSimple = GetChild<KaxTagSimple>(aTag);
|
||||
KaxTagGeneral & TagGeneral = GetChild<KaxTagGeneral>(aTag);
|
||||
|
||||
KaxTagTrackUID & TrackUID = GetChild<KaxTagTrackUID>(Targets);
|
||||
*static_cast<EbmlUInteger *>(&TrackUID) = 0x12345;
|
||||
@@ -347,20 +348,26 @@ int main(int argc, char **argv)
|
||||
KaxTagChapterUID & ChapterUID = GetChild<KaxTagChapterUID>(Targets);
|
||||
*static_cast<EbmlUInteger *>(&ChapterUID) = 0x67890;
|
||||
|
||||
KaxTagName & aTagName = GetChild<KaxTagName>(TagSimple);
|
||||
*static_cast<EbmlUnicodeString *>(&aTagName) = L"NAME";
|
||||
KaxTagSubject & Subject = GetChild<KaxTagSubject>(TagGeneral);
|
||||
*static_cast<EbmlUnicodeString *>(&Subject) = L"Test<EFBFBD>123";
|
||||
|
||||
KaxTagString & aTagtring = GetChild<KaxTagString>(TagSimple);
|
||||
*static_cast<EbmlUnicodeString *>(&aTagtring) = L"Test<EFBFBD>123";
|
||||
KaxTagBibliography & Biblio = GetChild<KaxTagBibliography>(TagGeneral);
|
||||
*static_cast<EbmlUnicodeString *>(&Biblio) = L"<EFBFBD>a marche";
|
||||
|
||||
filepos_t TagsSize = AllTags.Render(out_file, bWriteDefaultValues);
|
||||
KaxTagFile & File = GetChild<KaxTagFile>(TagGeneral);
|
||||
*static_cast<EbmlUnicodeString *>(&File) = L"Fichier";
|
||||
|
||||
KaxTagLanguage & Lang = GetChild<KaxTagLanguage>(TagGeneral);
|
||||
*static_cast<EbmlString *>(&Lang) = "fra";
|
||||
|
||||
uint32 TagsSize = AllTags.Render(out_file, bWriteDefaultValues);
|
||||
MetaSeek.IndexThis(AllTags, FileSegment);
|
||||
|
||||
TrackSize += pMyTracks2->Render(out_file, bWriteDefaultValues);
|
||||
MetaSeek.IndexThis(*pMyTracks2, FileSegment);
|
||||
|
||||
// \todo put it just before the Cue Entries
|
||||
filepos_t MetaSeekSize = Dummy.ReplaceWith(MetaSeek, out_file, bWriteDefaultValues);
|
||||
uint32 MetaSeekSize = Dummy.ReplaceWith(MetaSeek, out_file, bWriteDefaultValues);
|
||||
|
||||
#ifdef VOID_TEST
|
||||
MyInfos.VoidMe(out_file);
|
||||
@@ -382,11 +389,6 @@ int main(int argc, char **argv)
|
||||
MuxedFile.Close(1000); // 1000 ms
|
||||
#endif // OLD
|
||||
out_file.close();
|
||||
|
||||
delete Blob1;
|
||||
delete Blob2;
|
||||
delete Blob3;
|
||||
delete Blob4;
|
||||
}
|
||||
catch (exception & Ex)
|
||||
{
|
||||
|
@@ -17,9 +17,9 @@
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id$
|
||||
\version \$Id: test8.cpp 675 2004-07-27 07:56:14Z mosu $
|
||||
\brief Test reading of the Header
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
@@ -49,11 +49,17 @@
|
||||
#include "matroska/KaxSegment.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxTracks.h"
|
||||
#include "matroska/KaxInfo.h"
|
||||
#include "matroska/KaxInfoData.h"
|
||||
#include "matroska/KaxCluster.h"
|
||||
#include "matroska/KaxClusterData.h"
|
||||
#include "matroska/KaxBlockData.h"
|
||||
#include "matroska/KaxSeekHead.h"
|
||||
#include "matroska/KaxCuesData.h"
|
||||
#include "matroska/KaxChapters.h"
|
||||
#include "matroska/KaxTags.h"
|
||||
#include "matroska/KaxTag.h"
|
||||
#include "matroska/KaxTagMulti.h"
|
||||
#include "ebml/StdIOCallback.h"
|
||||
|
||||
using namespace LIBMATROSKA_NAMESPACE;
|
||||
@@ -650,7 +656,6 @@ int main(int argc, char **argv)
|
||||
#endif // TEST_REMOVE
|
||||
} else if (Targets[Index2]->Generic().GlobalId == KaxTagChapterUID::ClassInfos.GlobalId) {
|
||||
printf(" Chapter UID\n");
|
||||
#if 0
|
||||
} else if (Targets[Index2]->Generic().GlobalId == KaxTagMultiComment::ClassInfos.GlobalId) {
|
||||
printf(" Comment\n");
|
||||
KaxTagMultiComment & Comment = *static_cast<KaxTagMultiComment *>(Targets[Index2]);
|
||||
@@ -662,7 +667,6 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
// } else if (Targets[Index2]->Generic().GlobalId == DummyRawElement::ClassInfos.GlobalId) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#ifdef TEST_REMOVE
|
||||
@@ -673,7 +677,6 @@ int main(int argc, char **argv)
|
||||
printf(" -- Done --\n");
|
||||
}
|
||||
#endif // TEST_REMOVE
|
||||
#if 0
|
||||
} else if (TagElt[Index1]->Generic().GlobalId == KaxTagGeneral::ClassInfos.GlobalId) {
|
||||
printf(" General\n");
|
||||
KaxTagGeneral & General = *static_cast<KaxTagGeneral *>(TagElt[Index1]);
|
||||
@@ -726,7 +729,6 @@ int main(int argc, char **argv)
|
||||
printf(" Comment Name \"%s\"\n", std::string(CommentName).c_str());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -7,21 +7,24 @@
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** This file may be distributed under the terms of the Q Public License
|
||||
** as defined by Trolltech AS of Norway and appearing in the file
|
||||
** LICENSE.QPL included in the packaging of this file.
|
||||
**
|
||||
** This file may be distributed and/or modified under the terms of the
|
||||
** GNU General Public License version 2 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file.
|
||||
**
|
||||
** Licensees holding an other license may use this file in accordance with
|
||||
** the Agreement provided with the Software.
|
||||
**
|
||||
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
**
|
||||
** See http://www.matroska.org/license/qpl/ for QPL licensing information.
|
||||
** See http://www.matroska.org/license/gpl/ for GPL licensing information.
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
@@ -55,6 +58,7 @@
|
||||
#include <matroska/KaxSegment.h>
|
||||
#include <matroska/KaxTags.h>
|
||||
#include <matroska/KaxTag.h>
|
||||
#include <matroska/KaxTagMulti.h>
|
||||
#include <matroska/KaxTracks.h>
|
||||
#include <matroska/KaxTrackEntryData.h>
|
||||
#include <matroska/KaxTrackAudio.h>
|
||||
@@ -97,7 +101,6 @@ int main() {
|
||||
*(static_cast<EbmlUInteger *>(&GetChild<KaxTagTrackUID>(targets))) =
|
||||
1234;
|
||||
|
||||
#if 0
|
||||
// comment of the Targets
|
||||
KaxTagMultiComment &mcomB = GetChild<KaxTagMultiComment>(targets);
|
||||
*(static_cast<EbmlString *>
|
||||
@@ -332,7 +335,6 @@ int main() {
|
||||
*(static_cast<EbmlString *>
|
||||
(&GetChild<KaxTagMultiTitleLanguage>(tit))) =
|
||||
"MultiTitleLanguage";
|
||||
#endif
|
||||
|
||||
KaxTagSimple &stag_l1 = GetChild<KaxTagSimple>(tag);
|
||||
*(static_cast<EbmlUnicodeString *>(&GetChild<KaxTagName>(stag_l1))) =
|
||||
|
@@ -1,9 +1 @@
|
||||
#include "*/*.proj"
|
||||
|
||||
WORKSPACE tests
|
||||
{
|
||||
USE mux-test6
|
||||
USE mux-test8
|
||||
USE ebml-test00
|
||||
USE ebml-test0
|
||||
}
|
||||
|
@@ -7,21 +7,24 @@
|
||||
**
|
||||
** This file is part of libmatroska.
|
||||
**
|
||||
** This library is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU Lesser General Public
|
||||
** License as published by the Free Software Foundation; either
|
||||
** version 2.1 of the License, or (at your option) any later version.
|
||||
**
|
||||
** This library is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
** Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public
|
||||
** License along with this library; if not, write to the Free Software
|
||||
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
** This file may be distributed under the terms of the Q Public License
|
||||
** as defined by Trolltech AS of Norway and appearing in the file
|
||||
** LICENSE.QPL included in the packaging of this file.
|
||||
**
|
||||
** This file may be distributed and/or modified under the terms of the
|
||||
** GNU General Public License version 2 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file.
|
||||
**
|
||||
** Licensees holding an other license may use this file in accordance with
|
||||
** the Agreement provided with the Software.
|
||||
**
|
||||
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
**
|
||||
** See http://www.matroska.org/license/qpl/ for QPL licensing information.
|
||||
** See http://www.matroska.org/license/gpl/ for GPL licensing information.
|
||||
**
|
||||
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.**
|
||||
** Contact license@matroska.org if any conditions of this licensing are
|
||||
** not clear to you.
|
||||
**
|
||||
|
Reference in New Issue
Block a user