Initial revision
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9682 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5d997962b8
commit
47bb36150e
449
src/add-ons/media/plugins/matroska/libmatroska/FileKax.cpp
Normal file
449
src/add-ons/media/plugins/matroska/libmatroska/FileKax.cpp
Normal file
@ -0,0 +1,449 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2003 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.cpp 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
//#include "StdInclude.h"
|
||||
#include "matroska/FileKax.h"
|
||||
//#include "Cluster.h"
|
||||
//#include "Track.h"
|
||||
//#include "Block.h"
|
||||
//#include "Frame.h"
|
||||
//#include "Version.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
//typedef Track *TrackID;
|
||||
|
||||
FileMatroska::FileMatroska(IOCallback & output)
|
||||
:myFile(output)
|
||||
#ifdef OLD
|
||||
,myCurrReadBlock(NULL)
|
||||
,myMinClusterSize(5*1024) // 5KB is the min size of a cluster
|
||||
,myMaxClusterSize(2*1024*1024) // 2MB is the max size of a cluster
|
||||
,myCurrReadBlockTrack(0)
|
||||
,myCurrWriteCluster(2*1024*1024) // myMaxClusterSize
|
||||
,myCurrReadCluster(NULL)
|
||||
,myReadBlockNumber(0)
|
||||
#endif // OLD
|
||||
{
|
||||
#ifdef OLD
|
||||
myStreamInfo.MainHeaderSize = TypeHeader::default_size() +
|
||||
ActualHeader::default_size() +
|
||||
ExtendedInfo::default_size() +
|
||||
ContentInfo::default_size();
|
||||
myStreamInfo.TrackEntrySize = Track::default_size();
|
||||
myStreamInfo.BlockHeadSize = BLOCK_HEADER_SIZE;
|
||||
myStreamInfo.ClusterHeadSize = CLUSTER_HEADER_SIZE;
|
||||
myStreamInfo.ClusterFootSize = CLUSTER_TRAILER_SIZE;
|
||||
#endif // OLD
|
||||
}
|
||||
|
||||
FileMatroska::~FileMatroska()
|
||||
{
|
||||
// if (myCurrCluster != NULL)
|
||||
// throw 0; // there are some data left to write
|
||||
// if (myCurrReadCluster != NULL || myCurrReadBlock != NULL)
|
||||
// throw 0; // there are some data left to write
|
||||
}
|
||||
|
||||
#ifdef OLD
|
||||
void FileMatroska::SetMaxClusterSize(const uint32 value)
|
||||
{
|
||||
myMaxClusterSize = value;
|
||||
myCurrWriteCluster.setMaxSize(value);
|
||||
}
|
||||
|
||||
void FileMatroska::Close(const uint32 aTimeLength)
|
||||
{
|
||||
Flush();
|
||||
|
||||
// get the file size
|
||||
myFile.setFilePointer(0,seek_end);
|
||||
myMainHeader.type_SetSize(myFile.getFilePointer());
|
||||
|
||||
// rewrite the header at the beginning
|
||||
myFile.setFilePointer(0,seek_beginning);
|
||||
|
||||
// get the Track-entry size
|
||||
uint32 track_entries_size = 0;
|
||||
for (size_t i=0; i<myTracks.size(); i++)
|
||||
{
|
||||
track_entries_size += myTracks[i]->default_size();
|
||||
}
|
||||
|
||||
myStreamInfo.TrackEntriesSize = track_entries_size;
|
||||
myStreamInfo.TimeLength = aTimeLength;
|
||||
myMainHeader.Render(myFile, myStreamInfo);
|
||||
|
||||
for (i=0; i<myTracks.size(); i++)
|
||||
{
|
||||
delete myTracks[i];
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\warning after rendering the head, some parameters are locked
|
||||
*/
|
||||
uint32 FileMatroska::RenderHead(const std::string & aEncoderApp)
|
||||
{
|
||||
try {
|
||||
uint32 track_entries_size = 0;
|
||||
for (size_t i=0; i<myTracks.size(); i++)
|
||||
{
|
||||
track_entries_size += myTracks[i]->default_size();
|
||||
}
|
||||
|
||||
std::string aStr = LIB_NAME;
|
||||
aStr += " ";
|
||||
aStr += VERSION;
|
||||
myStreamInfo.EncoderLib = aStr;
|
||||
|
||||
myStreamInfo.EncoderApp = aEncoderApp;
|
||||
|
||||
myStreamInfo.TrackEntryPosition = 0 + myStreamInfo.MainHeaderSize;
|
||||
myStreamInfo.TrackEntriesSize = myTracks.size() * myStreamInfo.TrackEntrySize;
|
||||
|
||||
myStreamInfo.CodecEntryPosition = myStreamInfo.MainHeaderSize + myStreamInfo.TrackEntriesSize;
|
||||
myStreamInfo.CodecEntrySize = 4;
|
||||
for (i=0; i<myTracks.size(); i++)
|
||||
{
|
||||
myStreamInfo.CodecEntrySize += myTracks[i]->CodecSize();
|
||||
}
|
||||
|
||||
// Main Header
|
||||
uint32 result = myMainHeader.Render(myFile, myStreamInfo);
|
||||
|
||||
// Track Entries
|
||||
for (i=0; i<myTracks.size(); i++)
|
||||
{
|
||||
myTracks[i]->RenderEntry(myFile, i+1);
|
||||
}
|
||||
myStreamInfo.ClusterPosition = myStreamInfo.CodecEntryPosition + myStreamInfo.CodecEntrySize;
|
||||
|
||||
// Codec Header
|
||||
result = CodecHeader::Render(myFile, myTracks);
|
||||
|
||||
return result;
|
||||
}
|
||||
catch (exception & Ex)
|
||||
{
|
||||
throw Ex;
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\return 0 if the track was not created, or a valid track number
|
||||
*/
|
||||
Track * FileMatroska::CreateTrack(const track_type aType)
|
||||
{
|
||||
myTracks.push_back(new Track(aType));
|
||||
return myTracks.back();
|
||||
}
|
||||
|
||||
/*Track *FileMatroska::findTrack(Track * aTrack) const
|
||||
{
|
||||
for (size_t i=0; i<myTracks.size(); i++)
|
||||
{
|
||||
if (myTracks[i] == aTrack)
|
||||
return myTracks[i];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}*/
|
||||
|
||||
void FileMatroska::track_SetName(Track * aTrack, const std::string & aName)
|
||||
{
|
||||
if (IsMyTrack(aTrack))
|
||||
{
|
||||
aTrack->SetName(aName);
|
||||
}
|
||||
}
|
||||
|
||||
void FileMatroska::track_SetLaced(Track * aTrack, const bool bLaced)
|
||||
{
|
||||
if (IsMyTrack(aTrack))
|
||||
{
|
||||
aTrack->SetLaced(bLaced);
|
||||
}
|
||||
}
|
||||
|
||||
bool FileMatroska::AddFrame(Track * aTrack, const uint32 aTimecode, const binary *aFrame, const uint32 aFrameSize,
|
||||
const bool aKeyFrame, const bool aBFrame)
|
||||
{
|
||||
try {
|
||||
// make sure we know that track
|
||||
if (IsMyTrack(aTrack))
|
||||
{
|
||||
// pass the cluster to the track
|
||||
// handle the creation of a new cluster if needed
|
||||
if (aTrack->AddFrame(aTimecode, aFrame, aFrameSize, aKeyFrame, aBFrame))
|
||||
{
|
||||
while (!aTrack->SerialiseBlock(myCurrWriteCluster))
|
||||
{
|
||||
/// \todo handle errors
|
||||
uint32 aNbBlock;
|
||||
myStreamInfo.ClusterSize += myCurrWriteCluster.Render(myFile, aNbBlock);
|
||||
myStreamInfo.NumberBlock += aNbBlock;
|
||||
myCurrWriteCluster.Flush();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
catch (exception & Ex)
|
||||
{
|
||||
throw Ex;
|
||||
}
|
||||
}
|
||||
|
||||
void FileMatroska::Flush()
|
||||
{
|
||||
uint32 aNbBlock;
|
||||
myStreamInfo.ClusterSize += myCurrWriteCluster.Render(myFile,aNbBlock);
|
||||
myStreamInfo.NumberBlock += aNbBlock;
|
||||
}
|
||||
|
||||
uint32 FileMatroska::ReadHead()
|
||||
{
|
||||
try {
|
||||
uint32 result = myMainHeader.Read(myFile, myStreamInfo);
|
||||
|
||||
return result;
|
||||
}
|
||||
catch (exception & Ex)
|
||||
{
|
||||
throw Ex;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 FileMatroska::ReadTracks()
|
||||
{
|
||||
try {
|
||||
uint32 result = 0;
|
||||
|
||||
// seek to the start of the Track Entries
|
||||
myFile.setFilePointer(myStreamInfo.TrackEntryPosition);
|
||||
// get the number of Track Entries
|
||||
uint8 TrackNumber = myStreamInfo.TrackEntriesSize / myStreamInfo.TrackEntrySize;
|
||||
// read all the Track Entries
|
||||
myTracks.clear();
|
||||
for (uint8 TrackIdx = 0; TrackIdx<TrackNumber; TrackIdx ++) {
|
||||
Track * tmpTrack = Track::ReadEntry(myFile, TrackIdx+1, myStreamInfo);
|
||||
if (tmpTrack == NULL)
|
||||
throw 0;
|
||||
|
||||
myTracks.push_back(tmpTrack);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
catch (exception & Ex)
|
||||
{
|
||||
throw Ex;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 FileMatroska::ReadCodec()
|
||||
{
|
||||
try {
|
||||
// seek to the start of the Track Entries
|
||||
myFile.setFilePointer(myStreamInfo.CodecEntryPosition);
|
||||
|
||||
uint32 result = CodecHeader::Read(myFile, myTracks);
|
||||
|
||||
return result;
|
||||
}
|
||||
catch (exception & Ex)
|
||||
{
|
||||
throw Ex;
|
||||
}
|
||||
}
|
||||
|
||||
inline bool FileMatroska::IsMyTrack(const Track * aTrack) const
|
||||
{
|
||||
if (aTrack == 0)
|
||||
throw 0;
|
||||
|
||||
for (std::vector<Track*>::const_iterator i = myTracks.begin(); i != myTracks.end(); i ++)
|
||||
{
|
||||
if (*i == aTrack)
|
||||
break;
|
||||
}
|
||||
|
||||
if (i != myTracks.end())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
void FileMatroska::SelectReadingTrack(Track * aTrack, bool select)
|
||||
{
|
||||
if (IsMyTrack(aTrack))
|
||||
{
|
||||
// here we have the right track
|
||||
// check if it's not already selected
|
||||
for (std::vector<uint8>::iterator j = mySelectedTracks.begin();
|
||||
j != mySelectedTracks.end(); j ++)
|
||||
{
|
||||
if (*j == aTrack->TrackNumber())
|
||||
break;
|
||||
}
|
||||
|
||||
if (select && j == mySelectedTracks.end())
|
||||
mySelectedTracks.push_back(aTrack->TrackNumber());
|
||||
else if (!select && j != mySelectedTracks.end())
|
||||
mySelectedTracks.erase(j);
|
||||
|
||||
std::sort(mySelectedTracks.begin(), mySelectedTracks.end());
|
||||
}
|
||||
}
|
||||
|
||||
inline bool FileMatroska::IsReadingTrack(const uint8 aTrackNumber) const
|
||||
{
|
||||
for (std::vector<uint8>::const_iterator trackIdx = mySelectedTracks.begin();
|
||||
trackIdx != mySelectedTracks.end() && *trackIdx < aTrackNumber;
|
||||
trackIdx++)
|
||||
{}
|
||||
|
||||
if (trackIdx == mySelectedTracks.end())
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
void FileMatroska::Track_GetInfo(const Track * aTrack, TrackInfo & aTrackInfo) const
|
||||
{
|
||||
if (IsMyTrack(aTrack))
|
||||
{
|
||||
aTrack->GetInfo(aTrackInfo);
|
||||
}
|
||||
}
|
||||
|
||||
// Audio related getters/setters
|
||||
|
||||
void FileMatroska::Track_GetInfo_Audio(const Track * aTrack, TrackInfoAudio & aTrackInfo) const
|
||||
{
|
||||
if (IsMyTrack(aTrack))
|
||||
{
|
||||
aTrack->GetInfoAudio(aTrackInfo);
|
||||
}
|
||||
}
|
||||
|
||||
void FileMatroska::Track_SetInfo_Audio(Track * aTrack, const TrackInfoAudio & aTrackInfo)
|
||||
{
|
||||
if (IsMyTrack(aTrack))
|
||||
{
|
||||
aTrack->SetInfoAudio(aTrackInfo);
|
||||
}
|
||||
}
|
||||
|
||||
// Video related getters/setters
|
||||
|
||||
void FileMatroska::Track_GetInfo_Video(const Track * aTrack, TrackInfoVideo & aTrackInfo) const
|
||||
{
|
||||
if (IsMyTrack(aTrack))
|
||||
{
|
||||
aTrack->GetInfoVideo(aTrackInfo);
|
||||
}
|
||||
}
|
||||
|
||||
void FileMatroska::Track_SetInfo_Video(Track * aTrack, const TrackInfoVideo & aTrackInfo)
|
||||
{
|
||||
if (IsMyTrack(aTrack))
|
||||
{
|
||||
aTrack->SetInfoVideo(aTrackInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\todo exit when there is no Block left
|
||||
*/
|
||||
bool FileMatroska::ReadFrame(Track * & aTrack, uint32 & aTimecode, const binary * & aFrame, uint32 & aFrameSize,
|
||||
bool & aKeyFrame, bool & aBFrame)
|
||||
{
|
||||
if (myCurrReadBlockTrack == 0)
|
||||
{
|
||||
do {
|
||||
if (myReadBlockNumber >= myStreamInfo.NumberBlock)
|
||||
{
|
||||
// myReadBlockNumber = myStreamInfo.NumberBlock;
|
||||
return false;
|
||||
}
|
||||
|
||||
// get the next frame in the file
|
||||
if (!myCurrReadCluster.BlockLeft())
|
||||
{
|
||||
myCurrReadCluster.Flush();
|
||||
try {
|
||||
myCurrReadCluster.FindHead(myFile);
|
||||
}
|
||||
catch (exception & Ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
myCurrReadCluster.GetBlock( myCurrReadBlock, myCurrReadBlockSize, myCurrReadBlockTrack );
|
||||
myReadBlockNumber++;
|
||||
} while (!IsReadingTrack(myCurrReadBlockTrack));
|
||||
|
||||
// get the track associated (normally from myTracks)
|
||||
aTrack = myTracks[myCurrReadBlockTrack-1];
|
||||
// get the next frame from the current block
|
||||
aTrack->HandleBlock(myCurrReadBlock, myCurrReadBlockSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
// get the track associated (normally from myTracks)
|
||||
aTrack = myTracks[myCurrReadBlockTrack-1];
|
||||
}
|
||||
|
||||
Frame * myReadFrame;
|
||||
aTrack->GetNextFrame(aTimecode, myReadFrame, aKeyFrame, aBFrame);
|
||||
aFrame = myReadFrame->buf();
|
||||
aFrameSize = myReadFrame->length();
|
||||
|
||||
if (aTrack->NoFrameLeft())
|
||||
{
|
||||
aTrack->FlushBlock();
|
||||
myCurrReadBlockTrack = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif // OLD
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
@ -0,0 +1,80 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxAttached.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
|
||||
// sub elements
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
EbmlSemantic KaxAttached_ContextList[5] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxFileName::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxMimeType::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxFileData::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxFileDescription::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxFileUID::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlId KaxAttached_TheId (0x61A7, 2);
|
||||
EbmlId KaxFileDescription_TheId(0x467E, 2);
|
||||
EbmlId KaxFileName_TheId (0x466E, 2);
|
||||
EbmlId KaxMimeType_TheId (0x4660, 2);
|
||||
EbmlId KaxFileData_TheId (0x465C, 2);
|
||||
EbmlId KaxFileUID_TheId (0x46AE, 2);
|
||||
|
||||
const EbmlSemanticContext KaxAttached_Context = EbmlSemanticContext(countof(KaxAttached_ContextList), KaxAttached_ContextList, &KaxAttachments_Context, *GetKaxGlobal_Context, &KaxAttached::ClassInfos);
|
||||
const EbmlSemanticContext KaxFileDescription_Context = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &KaxFileDescription::ClassInfos);
|
||||
const EbmlSemanticContext KaxFileName_Context = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &KaxFileName::ClassInfos);
|
||||
const EbmlSemanticContext KaxMimeType_Context = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &KaxMimeType::ClassInfos);
|
||||
const EbmlSemanticContext KaxFileData_Context = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &KaxFileData::ClassInfos);
|
||||
const EbmlSemanticContext KaxFileUID_Context = EbmlSemanticContext(0, NULL, &KaxAttachments_Context, *GetKaxGlobal_Context, &KaxFileUID::ClassInfos);
|
||||
|
||||
const EbmlCallbacks KaxAttached::ClassInfos(KaxAttached::Create, KaxAttached_TheId, "AttachedFile", KaxAttached_Context);
|
||||
const EbmlCallbacks KaxFileDescription::ClassInfos(KaxFileDescription::Create, KaxFileDescription_TheId, "FileDescription", KaxFileDescription_Context);
|
||||
const EbmlCallbacks KaxFileName::ClassInfos(KaxFileName::Create, KaxFileName_TheId, "FileName", KaxFileName_Context);
|
||||
const EbmlCallbacks KaxMimeType::ClassInfos(KaxMimeType::Create, KaxMimeType_TheId, "FileMimeType", KaxMimeType_Context);
|
||||
const EbmlCallbacks KaxFileData::ClassInfos(KaxFileData::Create, KaxFileData_TheId, "FileData", KaxFileData_Context);
|
||||
const EbmlCallbacks KaxFileUID::ClassInfos(KaxFileUID::Create, KaxFileUID_TheId, "FileUID", KaxFileUID_Context);
|
||||
|
||||
KaxAttached::KaxAttached()
|
||||
:EbmlMaster(KaxAttached_Context)
|
||||
{
|
||||
SetSizeLength(2); // mandatory min size support (for easier updating) (2^(7*2)-2 = 16Ko)
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
@ -0,0 +1,60 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
EbmlSemantic KaxAttachments_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(true, false, KaxAttached::ClassInfos), ///< EBMLVersion
|
||||
};
|
||||
|
||||
const EbmlSemanticContext KaxAttachments_Context = EbmlSemanticContext(countof(KaxAttachments_ContextList), KaxAttachments_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &KaxAttachments::ClassInfos);
|
||||
|
||||
EbmlId KaxAttachments_TheId(0x1941A469, 4);
|
||||
const EbmlCallbacks KaxAttachments::ClassInfos(KaxAttachments::Create, KaxAttachments_TheId, "Attachments", KaxAttachments_Context);
|
||||
|
||||
KaxAttachments::KaxAttachments()
|
||||
:EbmlMaster(KaxAttachments_Context)
|
||||
{
|
||||
SetSizeLength(2); // mandatory min size support (for easier updating) (2^(7*2)-2 = 16Ko)
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
903
src/add-ons/media/plugins/matroska/libmatroska/KaxBlock.cpp
Normal file
903
src/add-ons/media/plugins/matroska/libmatroska/KaxBlock.cpp
Normal file
@ -0,0 +1,903 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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: KaxBlock.cpp 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author Julien Coloos <suiryc @ users.sf.net>
|
||||
*/
|
||||
#include <cassert>
|
||||
|
||||
//#include <streams.h>
|
||||
|
||||
#include "matroska/KaxBlock.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxBlockData.h"
|
||||
#include "matroska/KaxCluster.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#if MATROSKA_VERSION == 1
|
||||
const EbmlSemantic KaxBlockGroup_ContextList[5] =
|
||||
#else // MATROSKA_VERSION
|
||||
const EbmlSemantic KaxBlockGroup_ContextList[8] =
|
||||
#endif // MATROSKA_VERSION
|
||||
{
|
||||
EbmlSemantic(true, true, KaxBlock::ClassInfos),
|
||||
#if MATROSKA_VERSION >= 2
|
||||
EbmlSemantic(false, true, KaxBlockVirtual::ClassInfos),
|
||||
#endif // MATROSKA_VERSION
|
||||
EbmlSemantic(false, true, KaxBlockDuration::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxSlices::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxReferencePriority::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxReferenceBlock::ClassInfos),
|
||||
#if MATROSKA_VERSION >= 2
|
||||
EbmlSemantic(false, true, KaxReferenceVirtual::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxBlockAdditions::ClassInfos),
|
||||
#endif // MATROSKA_VERSION
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
const EbmlSemantic KaxBlockAdditions_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(true, false, KaxBlockMore::ClassInfos)
|
||||
};
|
||||
|
||||
const EbmlSemantic KaxBlockMore_ContextList[2] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxBlockAddID::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxBlockAdditional::ClassInfos)
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
EbmlId KaxBlockGroup_TheId (0xA0, 1);
|
||||
EbmlId KaxBlock_TheId (0xA1, 1);
|
||||
EbmlId KaxBlockDuration_TheId (0x9B, 1);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
EbmlId KaxBlockVirtual_TheId (0xA2, 1);
|
||||
EbmlId KaxBlockAdditions_TheId (0x75A1, 2);
|
||||
EbmlId KaxBlockMore_TheId (0xA6, 1);
|
||||
EbmlId KaxBlockAddID_TheId (0xEE, 1);
|
||||
EbmlId KaxBlockAdditional_TheId(0xA5, 1);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
const EbmlSemanticContext KaxBlockGroup_Context = EbmlSemanticContext(countof(KaxBlockGroup_ContextList), KaxBlockGroup_ContextList, &KaxCluster_Context, *GetKaxGlobal_Context, &KaxBlockGroup::ClassInfos);
|
||||
const EbmlSemanticContext KaxBlock_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &KaxBlock::ClassInfos);
|
||||
const EbmlSemanticContext KaxBlockDuration_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &KaxBlockDuration::ClassInfos);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
const EbmlSemanticContext KaxBlockVirtual_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &KaxBlockVirtual::ClassInfos);
|
||||
const EbmlSemanticContext KaxBlockAdditions_Context = EbmlSemanticContext(countof(KaxBlockAdditions_ContextList), KaxBlockAdditions_ContextList, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &KaxBlockAdditions::ClassInfos);
|
||||
const EbmlSemanticContext KaxBlockMore_Context = EbmlSemanticContext(countof(KaxBlockMore_ContextList), KaxBlockMore_ContextList, &KaxBlockAdditions_Context, *GetKaxGlobal_Context, &KaxBlockMore::ClassInfos);
|
||||
const EbmlSemanticContext KaxBlockAddID_Context = EbmlSemanticContext(0, NULL, &KaxBlockMore_Context, *GetKaxGlobal_Context, &KaxBlockAddID::ClassInfos);
|
||||
const EbmlSemanticContext KaxBlockAdditional_Context = EbmlSemanticContext(0, NULL, &KaxBlockMore_Context, *GetKaxGlobal_Context, &KaxBlockAdditional::ClassInfos);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
const EbmlCallbacks KaxBlockGroup::ClassInfos(KaxBlockGroup::Create, KaxBlockGroup_TheId, "BlockGroup", KaxBlockGroup_Context);
|
||||
const EbmlCallbacks KaxBlock::ClassInfos(KaxBlock::Create, KaxBlock_TheId, "Block", KaxBlock_Context);
|
||||
const EbmlCallbacks KaxBlockDuration::ClassInfos(KaxBlockDuration::Create, KaxBlockDuration_TheId, "BlockDuration", KaxBlockDuration_Context);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
const EbmlCallbacks KaxBlockVirtual::ClassInfos(KaxBlockVirtual::Create, KaxBlockVirtual_TheId, "BlockVirtual", KaxBlockVirtual_Context);
|
||||
const EbmlCallbacks KaxBlockAdditions::ClassInfos(KaxBlockAdditions::Create, KaxBlockAdditions_TheId, "BlockAdditions", KaxBlockAdditions_Context);
|
||||
const EbmlCallbacks KaxBlockMore::ClassInfos(KaxBlockMore::Create, KaxBlockMore_TheId, "BlockMore", KaxBlockMore_Context);
|
||||
const EbmlCallbacks KaxBlockAddID::ClassInfos(KaxBlockAddID::Create, KaxBlockAddID_TheId, "BlockAddID", KaxBlockAddID_Context);
|
||||
const EbmlCallbacks KaxBlockAdditional::ClassInfos(KaxBlockAdditional::Create, KaxBlockAdditional_TheId, "BlockAdditional", KaxBlockAdditional_Context);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
DataBuffer * DataBuffer::Clone()
|
||||
{
|
||||
binary *ClonedData = new binary[mySize];
|
||||
memcpy(ClonedData, myBuffer ,mySize );
|
||||
|
||||
SimpleDataBuffer * result = new SimpleDataBuffer(ClonedData, mySize, 0);
|
||||
result->bValidValue = bValidValue;
|
||||
return result;
|
||||
}
|
||||
|
||||
SimpleDataBuffer::SimpleDataBuffer(const SimpleDataBuffer & ToClone)
|
||||
:DataBuffer(new binary[ToClone.mySize], ToClone.mySize, myFreeBuffer)
|
||||
{
|
||||
memcpy(myBuffer, ToClone.myBuffer ,mySize );
|
||||
bValidValue = ToClone.bValidValue;
|
||||
}
|
||||
|
||||
bool KaxBlock::ValidateSize() const
|
||||
{
|
||||
return (Size >= 4); /// for the moment
|
||||
}
|
||||
|
||||
KaxBlock::~KaxBlock()
|
||||
{
|
||||
ReleaseFrames();
|
||||
}
|
||||
|
||||
KaxBlock::KaxBlock(const KaxBlock & ElementToClone)
|
||||
:EbmlBinary(ElementToClone)
|
||||
,myBuffers(ElementToClone.myBuffers.size())
|
||||
,Timecode(ElementToClone.Timecode)
|
||||
,LocalTimecode(ElementToClone.LocalTimecode)
|
||||
,bLocalTimecodeUsed(ElementToClone.bLocalTimecodeUsed)
|
||||
,TrackNumber(ElementToClone.TrackNumber)
|
||||
,bGap(ElementToClone.bGap)
|
||||
,ParentCluster(ElementToClone.ParentCluster) ///< \todo not exactly
|
||||
{
|
||||
// add a clone of the list
|
||||
std::vector<DataBuffer *>::const_iterator Itr = ElementToClone.myBuffers.begin();
|
||||
std::vector<DataBuffer *>::iterator myItr = myBuffers.begin();
|
||||
while (Itr != ElementToClone.myBuffers.end())
|
||||
{
|
||||
*myItr = (*Itr)->Clone();
|
||||
Itr++; myItr++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
KaxBlockGroup::~KaxBlockGroup()
|
||||
{
|
||||
//NOTE("KaxBlockGroup::~KaxBlockGroup");
|
||||
}
|
||||
|
||||
KaxBlockGroup::KaxBlockGroup()
|
||||
:EbmlMaster(KaxBlockGroup_Context)
|
||||
,ParentCluster(NULL)
|
||||
,ParentTrack(NULL)
|
||||
{}
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
KaxBlockAdditions::KaxBlockAdditions()
|
||||
:EbmlMaster(KaxBlockAdditions_Context)
|
||||
{}
|
||||
|
||||
KaxBlockMore::KaxBlockMore()
|
||||
:EbmlMaster(KaxBlockMore_Context)
|
||||
{}
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
/*!
|
||||
\todo handle flags
|
||||
\todo hardcoded limit of the number of frames in a lace should be a parameter
|
||||
\return true if more frames can be added to this Block
|
||||
*/
|
||||
bool KaxBlock::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing)
|
||||
{
|
||||
bValueIsSet = true;
|
||||
if (myBuffers.size() == 0) {
|
||||
// first frame
|
||||
Timecode = timecode;
|
||||
TrackNumber = track.TrackNumber();
|
||||
mLacing = lacing;
|
||||
}
|
||||
myBuffers.push_back(&buffer);
|
||||
|
||||
// we don't allow more than 8 frames in a Block because the overhead improvement is minimal
|
||||
if (myBuffers.size() >= 8)
|
||||
return false;
|
||||
|
||||
// decide wether a new frame can be added or not
|
||||
// a frame in a lace is not efficient when the place necessary to code it in a lace is bigger
|
||||
// than the size of a simple Block. That means more than 6 bytes (4 in struct + 2 for EBML) to code the size
|
||||
return (buffer.Size() < 6*0xFF);
|
||||
}
|
||||
|
||||
/*!
|
||||
\return Returns the lacing type that produces the smallest footprint.
|
||||
*/
|
||||
LacingType KaxBlock::GetBestLacingType() const {
|
||||
int XiphLacingSize, EbmlLacingSize, i;
|
||||
bool SameSize = true;
|
||||
|
||||
if (myBuffers.size() <= 1)
|
||||
return LACING_NONE;
|
||||
|
||||
XiphLacingSize = 1; // Number of laces is stored in 1 byte.
|
||||
EbmlLacingSize = 1;
|
||||
for (i = 0; i < (int)myBuffers.size() - 1; i++) {
|
||||
if (myBuffers[i]->Size() != myBuffers[i + 1]->Size())
|
||||
SameSize = false;
|
||||
XiphLacingSize += myBuffers[i]->Size() / 255 + 1;
|
||||
}
|
||||
EbmlLacingSize += CodedSizeLength(myBuffers[0]->Size(), 0);
|
||||
for (i = 1; i < (int)myBuffers.size() - 1; i++)
|
||||
EbmlLacingSize += CodedSizeLengthSigned(int64(myBuffers[i]->Size()) - int64(myBuffers[i - 1]->Size()), 0);
|
||||
if (SameSize)
|
||||
return LACING_FIXED;
|
||||
else if (XiphLacingSize < EbmlLacingSize)
|
||||
return LACING_XIPH;
|
||||
else
|
||||
return LACING_EBML;
|
||||
}
|
||||
|
||||
/*!
|
||||
\todo handle gap flag
|
||||
*/
|
||||
uint64 KaxBlock::UpdateSize(bool bSaveDefault, bool bForceRender)
|
||||
{
|
||||
LacingType LacingHere;
|
||||
assert(Data == NULL); // Data is not used for KaxBlock
|
||||
assert(TrackNumber < 0x4000); // no more allowed for the moment
|
||||
unsigned int i;
|
||||
|
||||
// compute the final size of the data
|
||||
switch (myBuffers.size()) {
|
||||
case 0:
|
||||
Size = 0;
|
||||
break;
|
||||
case 1:
|
||||
Size = 4 + myBuffers[0]->Size();
|
||||
break;
|
||||
default:
|
||||
Size = 4 + 1; // 1 for the lacing head
|
||||
if (mLacing == LACING_AUTO)
|
||||
LacingHere = GetBestLacingType();
|
||||
else
|
||||
LacingHere = mLacing;
|
||||
switch (LacingHere)
|
||||
{
|
||||
case LACING_XIPH:
|
||||
for (i=0; i<myBuffers.size()-1; i++) {
|
||||
Size += myBuffers[i]->Size() + (myBuffers[i]->Size() / 0xFF + 1);
|
||||
}
|
||||
break;
|
||||
case LACING_EBML:
|
||||
Size += myBuffers[0]->Size() + CodedSizeLength(myBuffers[0]->Size(), 0);
|
||||
for (i=1; i<myBuffers.size()-1; i++) {
|
||||
Size += myBuffers[i]->Size()
|
||||
+ CodedSizeLengthSigned(int64(myBuffers[i]->Size()) - int64(myBuffers[i-1]->Size()), 0);;
|
||||
}
|
||||
break;
|
||||
case LACING_FIXED:
|
||||
for (i=0; i<myBuffers.size()-1; i++) {
|
||||
Size += myBuffers[i]->Size();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
// Size of the last frame (not in lace)
|
||||
Size += myBuffers[i]->Size();
|
||||
break;
|
||||
}
|
||||
|
||||
if (TrackNumber >= 0x80)
|
||||
Size++; // the size will be coded with one more octet
|
||||
|
||||
return Size;
|
||||
}
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
KaxBlockVirtual::KaxBlockVirtual(const KaxBlockVirtual & ElementToClone)
|
||||
:EbmlBinary(ElementToClone)
|
||||
,Timecode(ElementToClone.Timecode)
|
||||
,TrackNumber(ElementToClone.TrackNumber)
|
||||
,ParentCluster(ElementToClone.ParentCluster) ///< \todo not exactly
|
||||
{
|
||||
Data = DataBlock;
|
||||
}
|
||||
|
||||
/*!
|
||||
\todo handle the gap flag
|
||||
*/
|
||||
uint64 KaxBlockVirtual::UpdateSize(bool bSaveDefault, bool bForceRender)
|
||||
{
|
||||
assert(TrackNumber < 0x4000);
|
||||
binary *cursor = Data;
|
||||
// fill data
|
||||
if (TrackNumber < 0x80) {
|
||||
*cursor++ = TrackNumber | 0x80; // set the first bit to 1
|
||||
} else {
|
||||
*cursor++ = (TrackNumber >> 8) | 0x40; // set the second bit to 1
|
||||
*cursor++ = TrackNumber & 0xFF;
|
||||
}
|
||||
|
||||
assert(ParentCluster != NULL);
|
||||
int16 ActualTimecode = ParentCluster->GetBlockLocalTimecode(Timecode);
|
||||
big_int16 b16(ActualTimecode);
|
||||
b16.Fill(cursor);
|
||||
cursor += 2;
|
||||
|
||||
*cursor++ = (0 << 0); // no gap
|
||||
|
||||
return Size;
|
||||
}
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
/*!
|
||||
\todo more optimisation is possible (render the Block head and don't copy the buffer in memory, care should be taken with the allocation of Data)
|
||||
\todo the actual timecode to write should be retrieved from the Cluster from here
|
||||
*/
|
||||
uint32 KaxBlock::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
|
||||
{
|
||||
if (myBuffers.size() == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
assert(TrackNumber < 0x4000);
|
||||
binary BlockHead[5], *cursor = BlockHead;
|
||||
unsigned int i;
|
||||
|
||||
if (myBuffers.size() == 1) {
|
||||
Size = 4;
|
||||
mLacing = LACING_NONE;
|
||||
} else {
|
||||
if (mLacing == LACING_NONE)
|
||||
mLacing = LACING_EBML; // supposedly the best of all
|
||||
Size = 4 + 1; // 1 for the lacing head (number of laced elements)
|
||||
}
|
||||
if (TrackNumber > 0x80)
|
||||
Size++;
|
||||
|
||||
// write Block Head
|
||||
if (TrackNumber < 0x80) {
|
||||
*cursor++ = TrackNumber | 0x80; // set the first bit to 1
|
||||
} else {
|
||||
*cursor++ = (TrackNumber >> 8) | 0x40; // set the second bit to 1
|
||||
*cursor++ = TrackNumber & 0xFF;
|
||||
}
|
||||
|
||||
assert(ParentCluster != NULL);
|
||||
int16 ActualTimecode = ParentCluster->GetBlockLocalTimecode(Timecode);
|
||||
big_int16 b16(ActualTimecode);
|
||||
b16.Fill(cursor);
|
||||
cursor += 2;
|
||||
|
||||
*cursor = (0 << 0); // no gap
|
||||
|
||||
if (mLacing == LACING_AUTO) {
|
||||
mLacing = GetBestLacingType();
|
||||
}
|
||||
|
||||
switch (mLacing)
|
||||
{
|
||||
case LACING_XIPH:
|
||||
*cursor++ |= 0x2;
|
||||
break;
|
||||
case LACING_EBML:
|
||||
*cursor++ |= 0x6;
|
||||
break;
|
||||
case LACING_FIXED:
|
||||
*cursor++ |= 0x4;
|
||||
break;
|
||||
case LACING_NONE:
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
||||
output.writeFully(BlockHead, 4 + ((TrackNumber > 0x80) ? 1 : 0));
|
||||
|
||||
binary tmpValue;
|
||||
switch (mLacing)
|
||||
{
|
||||
case LACING_XIPH:
|
||||
// number of laces
|
||||
tmpValue = myBuffers.size()-1;
|
||||
output.writeFully(&tmpValue, 1);
|
||||
|
||||
// set the size of each member in the lace
|
||||
for (i=0; i<myBuffers.size()-1; i++) {
|
||||
tmpValue = 0xFF;
|
||||
uint16 tmpSize = myBuffers[i]->Size();
|
||||
while (tmpSize >= 0xFF) {
|
||||
output.writeFully(&tmpValue, 1);
|
||||
Size++;
|
||||
tmpSize -= 0xFF;
|
||||
}
|
||||
tmpValue = binary(tmpSize);
|
||||
output.writeFully(&tmpValue, 1);
|
||||
Size++;
|
||||
}
|
||||
break;
|
||||
case LACING_EBML:
|
||||
// number of laces
|
||||
tmpValue = myBuffers.size()-1;
|
||||
output.writeFully(&tmpValue, 1);
|
||||
|
||||
{
|
||||
int64 _Size;
|
||||
int _CodedSize;
|
||||
binary _FinalHead[8]; // 64 bits max coded size
|
||||
|
||||
_Size = myBuffers[0]->Size();
|
||||
|
||||
_CodedSize = CodedSizeLength(_Size, 0);
|
||||
|
||||
// first size in the lace is not a signed
|
||||
CodedValueLength(_Size, _CodedSize, _FinalHead);
|
||||
output.writeFully(_FinalHead, _CodedSize);
|
||||
Size += _CodedSize;
|
||||
|
||||
// set the size of each member in the lace
|
||||
for (i=1; i<myBuffers.size()-1; i++) {
|
||||
_Size = int64(myBuffers[i]->Size()) - int64(myBuffers[i-1]->Size());
|
||||
_CodedSize = CodedSizeLengthSigned(_Size, 0);
|
||||
CodedValueLengthSigned(_Size, _CodedSize, _FinalHead);
|
||||
output.writeFully(_FinalHead, _CodedSize);
|
||||
Size += _CodedSize;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LACING_FIXED:
|
||||
// number of laces
|
||||
tmpValue = myBuffers.size()-1;
|
||||
output.writeFully(&tmpValue, 1);
|
||||
break;
|
||||
case LACING_NONE:
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
||||
// put the data of each frame
|
||||
for (i=0; i<myBuffers.size(); i++) {
|
||||
output.writeFully(myBuffers[i]->Buffer(), myBuffers[i]->Size());
|
||||
Size += myBuffers[i]->Size();
|
||||
}
|
||||
}
|
||||
|
||||
return Size;
|
||||
}
|
||||
|
||||
uint64 KaxBlock::ReadInternalHead(IOCallback & input)
|
||||
{
|
||||
binary Buffer[5], *cursor = Buffer;
|
||||
uint64 Result = input.read(cursor, 4);
|
||||
if (Result != 4)
|
||||
return Result;
|
||||
|
||||
// update internal values
|
||||
TrackNumber = *cursor++;
|
||||
if ((TrackNumber & 0x80) == 0) {
|
||||
// there is extra data
|
||||
if ((TrackNumber & 0x40) == 0) {
|
||||
// We don't support track numbers that large !
|
||||
return Result;
|
||||
}
|
||||
Result += input.read(&Buffer[4], 1);
|
||||
TrackNumber = (TrackNumber & 0x3F) << 8;
|
||||
TrackNumber += *cursor++;
|
||||
} else {
|
||||
TrackNumber &= 0x7F;
|
||||
}
|
||||
|
||||
|
||||
big_int16 b16;
|
||||
b16.Eval(cursor);
|
||||
assert(ParentCluster != NULL);
|
||||
Timecode = ParentCluster->GetBlockGlobalTimecode(int16(b16));
|
||||
bLocalTimecodeUsed = false;
|
||||
cursor += 2;
|
||||
|
||||
bGap = (*cursor && 0x01);
|
||||
return Result;
|
||||
}
|
||||
|
||||
/*!
|
||||
\todo better zero copy handling
|
||||
*/
|
||||
uint64 KaxBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
|
||||
{
|
||||
uint64 Result;
|
||||
|
||||
FirstFrameLocation = input.getFilePointer(); // will be updated accordingly below
|
||||
|
||||
if (ReadFully == SCOPE_ALL_DATA)
|
||||
{
|
||||
Result = EbmlBinary::ReadData(input, ReadFully);
|
||||
binary *cursor = Data;
|
||||
uint8 BlockHeadSize = 4;
|
||||
|
||||
// update internal values
|
||||
TrackNumber = *cursor++;
|
||||
if ((TrackNumber & 0x80) == 0) {
|
||||
// there is extra data
|
||||
if ((TrackNumber & 0x40) == 0) {
|
||||
// We don't support track numbers that large !
|
||||
return Result;
|
||||
}
|
||||
TrackNumber = (TrackNumber & 0x3F) << 8;
|
||||
TrackNumber += *cursor++;
|
||||
BlockHeadSize++;
|
||||
} else {
|
||||
TrackNumber &= 0x7F;
|
||||
}
|
||||
|
||||
big_int16 b16;
|
||||
b16.Eval(cursor);
|
||||
LocalTimecode = int16(b16);
|
||||
bLocalTimecodeUsed = true;
|
||||
cursor += 2;
|
||||
|
||||
bGap = (*cursor && 0x01);
|
||||
mLacing = LacingType((*cursor++ & 0x06) >> 1);
|
||||
|
||||
// put all Frames in the list
|
||||
if (mLacing == LACING_NONE) {
|
||||
FirstFrameLocation += cursor - Data;
|
||||
DataBuffer * soloFrame = new DataBuffer(cursor, Size - BlockHeadSize);
|
||||
myBuffers.push_back(soloFrame);
|
||||
SizeList.resize(1);
|
||||
SizeList[0] = Size - BlockHeadSize;
|
||||
} else {
|
||||
// read the number of frames in the lace
|
||||
uint32 LastBufferSize = Size - BlockHeadSize - 1; // 1 for number of frame
|
||||
uint8 FrameNum = *cursor++; // number of frames in the lace - 1
|
||||
// read the list of frame sizes
|
||||
uint8 Index;
|
||||
int32 FrameSize;
|
||||
uint32 SizeRead;
|
||||
uint64 SizeUnknown;
|
||||
|
||||
SizeList.resize(FrameNum + 1);
|
||||
|
||||
switch (mLacing)
|
||||
{
|
||||
case LACING_XIPH:
|
||||
for (Index=0; Index<FrameNum; Index++) {
|
||||
// get the size of the frame
|
||||
FrameSize = 0;
|
||||
do {
|
||||
FrameSize += uint8(*cursor);
|
||||
LastBufferSize--;
|
||||
} while (*cursor++ == 0xFF);
|
||||
SizeList[Index] = FrameSize;
|
||||
LastBufferSize -= FrameSize;
|
||||
}
|
||||
SizeList[Index] = LastBufferSize;
|
||||
break;
|
||||
case LACING_EBML:
|
||||
SizeRead = LastBufferSize;
|
||||
FrameSize = ReadCodedSizeValue(cursor, SizeRead, SizeUnknown);
|
||||
SizeList[0] = FrameSize;
|
||||
cursor += SizeRead;
|
||||
LastBufferSize -= FrameSize + SizeRead;
|
||||
|
||||
for (Index=1; Index<FrameNum; Index++) {
|
||||
// get the size of the frame
|
||||
SizeRead = LastBufferSize;
|
||||
FrameSize += ReadCodedSizeSignedValue(cursor, SizeRead, SizeUnknown);
|
||||
SizeList[Index] = FrameSize;
|
||||
cursor += SizeRead;
|
||||
LastBufferSize -= FrameSize + SizeRead;
|
||||
}
|
||||
SizeList[Index] = LastBufferSize;
|
||||
break;
|
||||
case LACING_FIXED:
|
||||
for (Index=0; Index<=FrameNum; Index++) {
|
||||
// get the size of the frame
|
||||
SizeList[Index] = LastBufferSize / (FrameNum + 1);
|
||||
}
|
||||
break;
|
||||
default: // other lacing not supported
|
||||
assert(0);
|
||||
}
|
||||
|
||||
FirstFrameLocation += cursor - Data;
|
||||
|
||||
for (Index=0; Index<=FrameNum; Index++) {
|
||||
DataBuffer * lacedFrame = new DataBuffer(cursor, SizeList[Index]);
|
||||
myBuffers.push_back(lacedFrame);
|
||||
cursor += SizeList[Index];
|
||||
}
|
||||
}
|
||||
bValueIsSet = true;
|
||||
}
|
||||
else if (ReadFully == SCOPE_PARTIAL_DATA)
|
||||
{
|
||||
binary _TempHead[5];
|
||||
Result = input.read(_TempHead, 5);
|
||||
binary *cursor = _TempHead;
|
||||
binary *_tmpBuf;
|
||||
uint8 BlockHeadSize = 4;
|
||||
|
||||
// update internal values
|
||||
TrackNumber = *cursor++;
|
||||
if ((TrackNumber & 0x80) == 0) {
|
||||
// there is extra data
|
||||
if ((TrackNumber & 0x40) == 0) {
|
||||
// We don't support track numbers that large !
|
||||
return Result;
|
||||
}
|
||||
TrackNumber = (TrackNumber & 0x3F) << 8;
|
||||
TrackNumber += *cursor++;
|
||||
BlockHeadSize++;
|
||||
} else {
|
||||
TrackNumber &= 0x7F;
|
||||
}
|
||||
|
||||
big_int16 b16;
|
||||
b16.Eval(cursor);
|
||||
LocalTimecode = int16(b16);
|
||||
bLocalTimecodeUsed = true;
|
||||
cursor += 2;
|
||||
|
||||
bGap = (*cursor && 0x01);
|
||||
mLacing = LacingType((*cursor++ & 0x06) >> 1);
|
||||
if (cursor == &_TempHead[4])
|
||||
{
|
||||
_TempHead[0] = _TempHead[4];
|
||||
} else {
|
||||
Result += input.read(_TempHead, 1);
|
||||
}
|
||||
|
||||
FirstFrameLocation += cursor - _TempHead;
|
||||
|
||||
// put all Frames in the list
|
||||
if (mLacing != LACING_NONE) {
|
||||
// read the number of frames in the lace
|
||||
uint32 LastBufferSize = Size - BlockHeadSize - 1; // 1 for number of frame
|
||||
uint8 FrameNum = _TempHead[0]; // number of frames in the lace - 1
|
||||
// read the list of frame sizes
|
||||
uint8 Index;
|
||||
int32 FrameSize;
|
||||
uint32 SizeRead;
|
||||
uint64 SizeUnknown;
|
||||
|
||||
SizeList.resize(FrameNum + 1);
|
||||
|
||||
switch (mLacing)
|
||||
{
|
||||
case LACING_XIPH:
|
||||
for (Index=0; Index<FrameNum; Index++) {
|
||||
// get the size of the frame
|
||||
FrameSize = 0;
|
||||
do {
|
||||
Result += input.read(_TempHead, 1);
|
||||
FrameSize += uint8(_TempHead[0]);
|
||||
LastBufferSize--;
|
||||
|
||||
FirstFrameLocation++;
|
||||
} while (_TempHead[0] == 0xFF);
|
||||
|
||||
FirstFrameLocation++;
|
||||
SizeList[Index] = FrameSize;
|
||||
LastBufferSize -= FrameSize;
|
||||
}
|
||||
SizeList[Index] = LastBufferSize;
|
||||
break;
|
||||
case LACING_EBML:
|
||||
SizeRead = LastBufferSize;
|
||||
cursor = _tmpBuf = new binary[FrameNum*4]; /// \warning assume the mean size will be coded in less than 4 bytes
|
||||
Result += input.read(cursor, FrameNum*4);
|
||||
FrameSize = ReadCodedSizeValue(cursor, SizeRead, SizeUnknown);
|
||||
SizeList[0] = FrameSize;
|
||||
cursor += SizeRead;
|
||||
LastBufferSize -= FrameSize + SizeRead;
|
||||
|
||||
for (Index=1; Index<FrameNum; Index++) {
|
||||
// get the size of the frame
|
||||
SizeRead = LastBufferSize;
|
||||
FrameSize += ReadCodedSizeSignedValue(cursor, SizeRead, SizeUnknown);
|
||||
SizeList[Index] = FrameSize;
|
||||
cursor += SizeRead;
|
||||
LastBufferSize -= FrameSize + SizeRead;
|
||||
}
|
||||
|
||||
FirstFrameLocation += cursor - _tmpBuf;
|
||||
|
||||
SizeList[Index] = LastBufferSize;
|
||||
delete [] _tmpBuf;
|
||||
break;
|
||||
case LACING_FIXED:
|
||||
for (Index=0; Index<=FrameNum; Index++) {
|
||||
// get the size of the frame
|
||||
SizeList[Index] = LastBufferSize / (FrameNum + 1);
|
||||
}
|
||||
break;
|
||||
default: // other lacing not supported
|
||||
assert(0);
|
||||
}
|
||||
} else {
|
||||
SizeList.resize(1);
|
||||
SizeList[0] = Size - BlockHeadSize;
|
||||
}
|
||||
bValueIsSet = false;
|
||||
Result = Size;
|
||||
} else {
|
||||
bValueIsSet = false;
|
||||
Result = Size;
|
||||
}
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
bool KaxBlockGroup::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing)
|
||||
{
|
||||
KaxBlock & theBlock = GetChild<KaxBlock>(*this);
|
||||
assert(ParentCluster != NULL);
|
||||
theBlock.SetParent(*ParentCluster);
|
||||
ParentTrack = &track;
|
||||
return theBlock.AddFrame(track, timecode, buffer, lacing);
|
||||
}
|
||||
|
||||
bool KaxBlockGroup::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockGroup & PastBlock, LacingType lacing)
|
||||
{
|
||||
// assert(past_timecode < 0);
|
||||
|
||||
KaxBlock & theBlock = GetChild<KaxBlock>(*this);
|
||||
assert(ParentCluster != NULL);
|
||||
theBlock.SetParent(*ParentCluster);
|
||||
ParentTrack = &track;
|
||||
bool bRes = theBlock.AddFrame(track, timecode, buffer, lacing);
|
||||
|
||||
KaxReferenceBlock & thePastRef = GetChild<KaxReferenceBlock>(*this);
|
||||
thePastRef.SetReferencedBlock(PastBlock);
|
||||
thePastRef.SetParentBlock(*this);
|
||||
|
||||
return bRes;
|
||||
}
|
||||
|
||||
bool KaxBlockGroup::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing)
|
||||
{
|
||||
// assert(past_timecode < 0);
|
||||
|
||||
// assert(forw_timecode > 0);
|
||||
|
||||
KaxBlock & theBlock = GetChild<KaxBlock>(*this);
|
||||
assert(ParentCluster != NULL);
|
||||
theBlock.SetParent(*ParentCluster);
|
||||
ParentTrack = &track;
|
||||
bool bRes = theBlock.AddFrame(track, timecode, buffer, lacing);
|
||||
|
||||
KaxReferenceBlock & thePastRef = GetChild<KaxReferenceBlock>(*this);
|
||||
thePastRef.SetReferencedBlock(PastBlock);
|
||||
thePastRef.SetParentBlock(*this);
|
||||
|
||||
KaxReferenceBlock & theFutureRef = AddNewChild<KaxReferenceBlock>(*this);
|
||||
theFutureRef.SetReferencedBlock(ForwBlock);
|
||||
theFutureRef.SetParentBlock(*this);
|
||||
|
||||
return bRes;
|
||||
}
|
||||
|
||||
/*!
|
||||
\todo we may cache the reference to the timecode block
|
||||
*/
|
||||
uint64 KaxBlockGroup::GlobalTimecode() const
|
||||
{
|
||||
assert(ParentCluster != NULL); // impossible otherwise
|
||||
KaxBlock & MyBlock = *static_cast<KaxBlock *>(this->FindElt(KaxBlock::ClassInfos));
|
||||
return MyBlock.GlobalTimecode();
|
||||
|
||||
}
|
||||
|
||||
uint16 KaxBlockGroup::TrackNumber() const
|
||||
{
|
||||
KaxBlock & MyBlock = *static_cast<KaxBlock *>(this->FindElt(KaxBlock::ClassInfos));
|
||||
return MyBlock.TrackNum();
|
||||
}
|
||||
|
||||
uint64 KaxBlockGroup::ClusterPosition() const
|
||||
{
|
||||
assert(ParentCluster != NULL); // impossible otherwise
|
||||
return ParentCluster->GetPosition();
|
||||
}
|
||||
|
||||
unsigned int KaxBlockGroup::ReferenceCount() const
|
||||
{
|
||||
unsigned int Result = 0;
|
||||
KaxReferenceBlock * MyBlockAdds = static_cast<KaxReferenceBlock *>(FindFirstElt(KaxReferenceBlock::ClassInfos));
|
||||
if (MyBlockAdds != NULL) {
|
||||
Result++;
|
||||
while ((MyBlockAdds = static_cast<KaxReferenceBlock *>(FindNextElt(*MyBlockAdds))) != NULL)
|
||||
{
|
||||
Result++;
|
||||
}
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
|
||||
const KaxReferenceBlock & KaxBlockGroup::Reference(unsigned int Index) const
|
||||
{
|
||||
KaxReferenceBlock * MyBlockAdds = static_cast<KaxReferenceBlock *>(FindFirstElt(KaxReferenceBlock::ClassInfos));
|
||||
assert(MyBlockAdds != NULL); // call of a non existing reference
|
||||
|
||||
while (Index != 0) {
|
||||
MyBlockAdds = static_cast<KaxReferenceBlock *>(FindNextElt(*MyBlockAdds));
|
||||
assert(MyBlockAdds != NULL);
|
||||
Index--;
|
||||
}
|
||||
return *MyBlockAdds;
|
||||
}
|
||||
|
||||
void KaxBlockGroup::ReleaseFrames()
|
||||
{
|
||||
KaxBlock & MyBlock = *static_cast<KaxBlock *>(this->FindElt(KaxBlock::ClassInfos));
|
||||
MyBlock.ReleaseFrames();
|
||||
}
|
||||
|
||||
void KaxBlock::ReleaseFrames()
|
||||
{
|
||||
// free the allocated Frames
|
||||
int i;
|
||||
for (i=myBuffers.size()-1; i>=0; i--) {
|
||||
if (myBuffers[i] != NULL) {
|
||||
myBuffers[i]->FreeBuffer(*myBuffers[i]);
|
||||
delete myBuffers[i];
|
||||
myBuffers[i] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void KaxBlockGroup::SetBlockDuration(uint64 TimeLength)
|
||||
{
|
||||
assert(ParentTrack != NULL);
|
||||
int64 scale = ParentTrack->GlobalTimecodeScale();
|
||||
KaxBlockDuration & myDuration = *static_cast<KaxBlockDuration *>(FindFirstElt(KaxBlockDuration::ClassInfos, true));
|
||||
*(static_cast<EbmlUInteger *>(&myDuration)) = TimeLength / uint64(scale);
|
||||
}
|
||||
|
||||
bool KaxBlockGroup::GetBlockDuration(uint64 &TheTimecode) const
|
||||
{
|
||||
KaxBlockDuration * myDuration = static_cast<KaxBlockDuration *>(FindElt(KaxBlockDuration::ClassInfos));
|
||||
if (myDuration == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
assert(ParentTrack != NULL);
|
||||
TheTimecode = uint64(*myDuration) * ParentTrack->GlobalTimecodeScale();
|
||||
return true;
|
||||
}
|
||||
|
||||
void KaxBlock::SetParent(KaxCluster & aParentCluster)
|
||||
{
|
||||
ParentCluster = &aParentCluster;
|
||||
if (bLocalTimecodeUsed) {
|
||||
Timecode = aParentCluster.GetBlockGlobalTimecode(LocalTimecode);
|
||||
bLocalTimecodeUsed = false;
|
||||
}
|
||||
}
|
||||
|
||||
int64 KaxBlock::GetDataPosition(size_t FrameNumber)
|
||||
{
|
||||
int64 _Result = -1;
|
||||
|
||||
if (bValueIsSet && FrameNumber < SizeList.size())
|
||||
{
|
||||
_Result = FirstFrameLocation;
|
||||
|
||||
size_t _Idx = 0;
|
||||
while(FrameNumber--)
|
||||
{
|
||||
_Result += SizeList[_Idx++];
|
||||
}
|
||||
}
|
||||
|
||||
return _Result;
|
||||
}
|
||||
|
||||
int64 KaxBlock::GetFrameSize(size_t FrameNumber)
|
||||
{
|
||||
int64 _Result = -1;
|
||||
|
||||
if (/*bValueIsSet &&*/ FrameNumber < SizeList.size())
|
||||
{
|
||||
_Result = SizeList[FrameNumber];
|
||||
}
|
||||
|
||||
return _Result;
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
121
src/add-ons/media/plugins/matroska/libmatroska/KaxBlockData.cpp
Normal file
121
src/add-ons/media/plugins/matroska/libmatroska/KaxBlockData.cpp
Normal file
@ -0,0 +1,121 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include <cassert>
|
||||
|
||||
#include "matroska/KaxBlockData.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxBlock.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
const EbmlSemantic KaxSlices_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(false, false, KaxTimeSlice::ClassInfos),
|
||||
};
|
||||
|
||||
const EbmlSemantic KaxTimeSlice_ContextList[5] =
|
||||
{
|
||||
EbmlSemantic(false, true, KaxSliceLaceNumber::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxSliceFrameNumber::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxSliceBlockAddID::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxSliceDelay::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxSliceDuration::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlId KaxReferencePriority_TheId(0xFA, 1);
|
||||
EbmlId KaxReferenceBlock_TheId (0xFB, 1);
|
||||
EbmlId KaxSlices_TheId (0x8E, 1);
|
||||
EbmlId KaxTimeSlice_TheId (0xE8, 1);
|
||||
EbmlId KaxSliceLaceNumber_TheId (0xCC, 1);
|
||||
EbmlId KaxSliceFrameNumber_TheId (0xCD, 1);
|
||||
EbmlId KaxSliceBlockAddID_TheId (0xCB, 1);
|
||||
EbmlId KaxSliceDelay_TheId (0xCE, 1);
|
||||
EbmlId KaxSliceDuration_TheId (0xCF, 1);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
EbmlId KaxReferenceVirtual_TheId (0xFD, 1);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
const EbmlSemanticContext KaxReferencePriority_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &KaxReferencePriority::ClassInfos);
|
||||
const EbmlSemanticContext KaxReferenceBlock_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &KaxReferenceBlock::ClassInfos);
|
||||
const EbmlSemanticContext KaxSlices_Context = EbmlSemanticContext(countof(KaxSlices_ContextList), KaxSlices_ContextList, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &KaxSlices::ClassInfos);
|
||||
const EbmlSemanticContext KaxTimeSlice_Context = EbmlSemanticContext(countof(KaxTimeSlice_ContextList), KaxTimeSlice_ContextList, &KaxSlices_Context, *GetKaxGlobal_Context, &KaxTimeSlice::ClassInfos);
|
||||
const EbmlSemanticContext KaxSliceLaceNumber_Context = EbmlSemanticContext(0, NULL, &KaxTimeSlice_Context, *GetKaxGlobal_Context, &KaxSliceLaceNumber::ClassInfos);
|
||||
const EbmlSemanticContext KaxSliceFrameNumber_Context = EbmlSemanticContext(0, NULL, &KaxTimeSlice_Context, *GetKaxGlobal_Context, &KaxSliceFrameNumber::ClassInfos);
|
||||
const EbmlSemanticContext KaxSliceBlockAddID_Context = EbmlSemanticContext(0, NULL, &KaxTimeSlice_Context, *GetKaxGlobal_Context, &KaxSliceBlockAddID::ClassInfos);
|
||||
const EbmlSemanticContext KaxSliceDelay_Context = EbmlSemanticContext(0, NULL, &KaxTimeSlice_Context, *GetKaxGlobal_Context, &KaxSliceDelay::ClassInfos);
|
||||
const EbmlSemanticContext KaxSliceDuration_Context = EbmlSemanticContext(0, NULL, &KaxTimeSlice_Context, *GetKaxGlobal_Context, &KaxSliceDuration::ClassInfos);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
const EbmlSemanticContext KaxReferenceVirtual_Context = EbmlSemanticContext(0, NULL, &KaxBlockGroup_Context, *GetKaxGlobal_Context, &KaxReferenceVirtual::ClassInfos);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
const EbmlCallbacks KaxReferencePriority::ClassInfos(KaxReferencePriority::Create, KaxReferencePriority_TheId, "FlagReferenced", KaxReferencePriority_Context);
|
||||
const EbmlCallbacks KaxReferenceBlock::ClassInfos(KaxReferenceBlock::Create, KaxReferenceBlock_TheId, "ReferenceBlock", KaxReferenceBlock_Context);
|
||||
const EbmlCallbacks KaxSlices::ClassInfos(KaxSlices::Create, KaxSlices_TheId, "Slices", KaxSlices_Context);
|
||||
const EbmlCallbacks KaxTimeSlice::ClassInfos(KaxTimeSlice::Create, KaxTimeSlice_TheId, "TimeSlice", KaxTimeSlice_Context);
|
||||
const EbmlCallbacks KaxSliceLaceNumber::ClassInfos(KaxSliceLaceNumber::Create, KaxSliceLaceNumber_TheId, "SliceLaceNumber", KaxSliceLaceNumber_Context);
|
||||
const EbmlCallbacks KaxSliceFrameNumber::ClassInfos(KaxSliceFrameNumber::Create, KaxSliceFrameNumber_TheId, "SliceFrameNumber", KaxSliceFrameNumber_Context);
|
||||
const EbmlCallbacks KaxSliceBlockAddID::ClassInfos(KaxSliceBlockAddID::Create, KaxSliceBlockAddID_TheId, "SliceBlockAddID", KaxSliceBlockAddID_Context);
|
||||
const EbmlCallbacks KaxSliceDelay::ClassInfos(KaxSliceDelay::Create, KaxSliceDelay_TheId, "SliceDelay", KaxSliceDelay_Context);
|
||||
const EbmlCallbacks KaxSliceDuration::ClassInfos(KaxSliceDuration::Create, KaxSliceDuration_TheId, "SliceDuration", KaxSliceDuration_Context);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
const EbmlCallbacks KaxReferenceVirtual::ClassInfos(KaxReferenceVirtual::Create, KaxReferenceVirtual_TheId, "ReferenceVirtual", KaxReferenceVirtual_Context);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
KaxSlices::KaxSlices()
|
||||
:EbmlMaster(KaxSlices_Context)
|
||||
{}
|
||||
|
||||
KaxTimeSlice::KaxTimeSlice()
|
||||
:EbmlMaster(KaxTimeSlice_Context)
|
||||
{}
|
||||
|
||||
const KaxBlockGroup & KaxReferenceBlock::RefBlock() const
|
||||
{
|
||||
assert(RefdBlock != NULL);
|
||||
return *RefdBlock;
|
||||
}
|
||||
|
||||
uint64 KaxReferenceBlock::UpdateSize(bool bSaveDefault, bool bForceRender)
|
||||
{
|
||||
if (!bTimecodeSet) {
|
||||
assert(RefdBlock != NULL);
|
||||
assert(ParentBlock != NULL);
|
||||
|
||||
Value = (int64(RefdBlock->GlobalTimecode()) - int64(ParentBlock->GlobalTimecode())) / int64(ParentBlock->GlobalTimecodeScale());
|
||||
}
|
||||
return EbmlSInteger::UpdateSize(bSaveDefault, bForceRender);
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
184
src/add-ons/media/plugins/matroska/libmatroska/KaxChapters.cpp
Normal file
184
src/add-ons/media/plugins/matroska/libmatroska/KaxChapters.cpp
Normal file
@ -0,0 +1,184 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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 745 2004-09-04 16:29:03Z robux4 $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxChapters.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
EbmlSemantic KaxChapters_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(true, false, KaxEditionEntry::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxEditionEntry_ContextList[5] =
|
||||
{
|
||||
EbmlSemantic(false, true , KaxEditionUID::ClassInfos),
|
||||
EbmlSemantic(true , true , KaxEditionFlagHidden::ClassInfos),
|
||||
EbmlSemantic(true , true , KaxEditionFlagDefault::ClassInfos),
|
||||
EbmlSemantic(true , true , KaxEditionProcessed::ClassInfos),
|
||||
EbmlSemantic(true , false, KaxChapterAtom::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxChapterAtom_ContextList[11] =
|
||||
{
|
||||
EbmlSemantic(false, false, KaxChapterAtom::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxChapterUID::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxChapterTimeStart::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxChapterTimeEnd::ClassInfos),
|
||||
EbmlSemantic(true , true, KaxChapterFlagHidden::ClassInfos),
|
||||
EbmlSemantic(true , true, KaxChapterFlagEnabled::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxChapterPhysicalEquiv::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxChapterTrack::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxChapterDisplay::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxChapterProcess::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxChapterProcessedPrivate::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxChapterTrack_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(true, false, KaxChapterTrackNumber::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxChapterDisplay_ContextList[3] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxChapterString::ClassInfos),
|
||||
EbmlSemantic(true, false, KaxChapterLanguage::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxChapterCountry::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxChapterProcess_ContextList[2] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxChapterProcessTime::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxChapterProcessCommand::ClassInfos),
|
||||
};
|
||||
|
||||
const EbmlSemanticContext KaxChapters_Context = EbmlSemanticContext(countof(KaxChapters_ContextList), KaxChapters_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &KaxChapters::ClassInfos);
|
||||
const EbmlSemanticContext KaxEditionEntry_Context = EbmlSemanticContext(countof(KaxEditionEntry_ContextList), KaxEditionEntry_ContextList, &KaxChapters_Context, *GetKaxGlobal_Context, &KaxEditionEntry::ClassInfos);
|
||||
const EbmlSemanticContext KaxEditionUID_Context = EbmlSemanticContext(0, NULL, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &KaxEditionUID::ClassInfos);
|
||||
const EbmlSemanticContext KaxEditionFlagHidden_Context = EbmlSemanticContext(0, NULL, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &KaxEditionFlagHidden::ClassInfos);
|
||||
const EbmlSemanticContext KaxEditionFlagDefault_Context = EbmlSemanticContext(0, NULL, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &KaxEditionFlagDefault::ClassInfos);
|
||||
const EbmlSemanticContext KaxEditionProcessed_Context = EbmlSemanticContext(0, NULL, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &KaxEditionProcessed::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterProcessedPrivate_Context = EbmlSemanticContext(0, NULL, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &KaxChapterProcessedPrivate::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterAtom_Context = EbmlSemanticContext(countof(KaxChapterAtom_ContextList), KaxChapterAtom_ContextList, &KaxEditionEntry_Context, *GetKaxGlobal_Context, &KaxChapterAtom::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterTrack_Context = EbmlSemanticContext(countof(KaxChapterTrack_ContextList), KaxChapterTrack_ContextList, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &KaxChapterTrack::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterDisplay_Context = EbmlSemanticContext(countof(KaxChapterDisplay_ContextList), KaxChapterDisplay_ContextList, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &KaxChapterDisplay::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterUID_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &KaxChapterUID::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterTimeStart_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &KaxChapterTimeStart::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterTimeEnd_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &KaxChapterTimeEnd::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterFlagHidden_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &KaxChapterFlagHidden::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterFlagEnabled_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &KaxChapterFlagEnabled::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterPhysicalEquiv_Context = EbmlSemanticContext(0, NULL, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &KaxChapterPhysicalEquiv::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterTrackNumber_Context = EbmlSemanticContext(0, NULL, &KaxChapterTrack_Context, *GetKaxGlobal_Context, &KaxChapterTrackNumber::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterString_Context = EbmlSemanticContext(0, NULL, &KaxChapterDisplay_Context, *GetKaxGlobal_Context, &KaxChapterString::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterLanguage_Context = EbmlSemanticContext(0, NULL, &KaxChapterLanguage_Context, *GetKaxGlobal_Context, &KaxChapterLanguage::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterCountry_Context = EbmlSemanticContext(0, NULL, &KaxChapterCountry_Context, *GetKaxGlobal_Context, &KaxChapterCountry::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterProcess_Context = EbmlSemanticContext(countof(KaxChapterProcess_ContextList), KaxChapterProcess_ContextList, &KaxChapterAtom_Context, *GetKaxGlobal_Context, &KaxChapterProcess::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterProcessTime_Context = EbmlSemanticContext(0, NULL, &KaxChapterProcess_Context, *GetKaxGlobal_Context, &KaxChapterProcessTime::ClassInfos);
|
||||
const EbmlSemanticContext KaxChapterProcessCommand_Context = EbmlSemanticContext(0, NULL, &KaxChapterProcess_Context, *GetKaxGlobal_Context, &KaxChapterProcessCommand::ClassInfos);
|
||||
|
||||
EbmlId KaxChapters_TheId (0x1043A770, 4);
|
||||
EbmlId KaxEditionEntry_TheId (0x45B9, 2);
|
||||
EbmlId KaxEditionUID_TheId (0x45BC, 2);
|
||||
EbmlId KaxEditionFlagHidden_TheId (0x45BD, 2);
|
||||
EbmlId KaxEditionFlagDefault_TheId (0x45DB, 2);
|
||||
EbmlId KaxEditionProcessed_TheId (0x45DD, 2);
|
||||
EbmlId KaxChapterProcessedPrivate_TheId(0x450D, 2);
|
||||
EbmlId KaxChapterAtom_TheId (0xB6, 1);
|
||||
EbmlId KaxChapterUID_TheId (0x73C4, 2);
|
||||
EbmlId KaxChapterTimeStart_TheId (0x91, 1);
|
||||
EbmlId KaxChapterTimeEnd_TheId (0x92, 1);
|
||||
EbmlId KaxChapterFlagHidden_TheId (0x98, 1);
|
||||
EbmlId KaxChapterFlagEnabled_TheId (0x4598, 2);
|
||||
EbmlId KaxChapterPhysicalEquiv_TheId (0x63C3, 2);
|
||||
EbmlId KaxChapterTrack_TheId (0x8F, 1);
|
||||
EbmlId KaxChapterTrackNumber_TheId (0x89, 1);
|
||||
EbmlId KaxChapterDisplay_TheId (0x80, 1);
|
||||
EbmlId KaxChapterString_TheId (0x85, 1);
|
||||
EbmlId KaxChapterLanguage_TheId (0x437C, 2);
|
||||
EbmlId KaxChapterCountry_TheId (0x437E, 2);
|
||||
EbmlId KaxChapterProcess_TheId (0x6944, 2);
|
||||
EbmlId KaxChapterProcessTime_TheId (0x6922, 2);
|
||||
EbmlId KaxChapterProcessCommand_TheId (0x6933, 2);
|
||||
|
||||
const EbmlCallbacks KaxChapters::ClassInfos(KaxChapters::Create, KaxChapters_TheId, "Chapters", KaxChapters_Context);
|
||||
const EbmlCallbacks KaxEditionEntry::ClassInfos(KaxEditionEntry::Create, KaxEditionEntry_TheId, "EditionEntry", KaxEditionEntry_Context);
|
||||
const EbmlCallbacks KaxEditionUID::ClassInfos(KaxEditionUID::Create, KaxEditionUID_TheId, "EditionUID", KaxEditionUID_Context);
|
||||
const EbmlCallbacks KaxEditionFlagHidden::ClassInfos(KaxEditionFlagHidden::Create, KaxEditionFlagHidden_TheId, "EditionFlagHidden", KaxEditionFlagHidden_Context);
|
||||
const EbmlCallbacks KaxEditionFlagDefault::ClassInfos(KaxEditionFlagDefault::Create, KaxEditionFlagDefault_TheId, "EditionFlagDefault", KaxEditionFlagDefault_Context);
|
||||
const EbmlCallbacks KaxEditionProcessed::ClassInfos(KaxEditionProcessed::Create, KaxEditionProcessed_TheId, "EditionProcessed", KaxEditionProcessed_Context);
|
||||
const EbmlCallbacks KaxChapterProcessedPrivate::ClassInfos(KaxChapterProcessedPrivate::Create, KaxChapterProcessedPrivate_TheId, "ChapterProcessedPrivate", KaxChapterProcessedPrivate_Context);
|
||||
const EbmlCallbacks KaxChapterAtom::ClassInfos(KaxChapterAtom::Create, KaxChapterAtom_TheId, "ChapterAtom", KaxChapterAtom_Context);
|
||||
const EbmlCallbacks KaxChapterUID::ClassInfos(KaxChapterUID::Create, KaxChapterUID_TheId, "ChapterUID", KaxChapterUID_Context);
|
||||
const EbmlCallbacks KaxChapterTimeStart::ClassInfos(KaxChapterTimeStart::Create, KaxChapterTimeStart_TheId, "ChapterTimeStart", KaxChapterTimeStart_Context);
|
||||
const EbmlCallbacks KaxChapterTimeEnd::ClassInfos(KaxChapterTimeEnd::Create, KaxChapterTimeEnd_TheId, "ChapterTimeEnd", KaxChapterTimeEnd_Context);
|
||||
const EbmlCallbacks KaxChapterFlagHidden::ClassInfos(KaxChapterFlagHidden::Create, KaxChapterFlagHidden_TheId, "ChapterFlagHidden", KaxChapterFlagHidden_Context);
|
||||
const EbmlCallbacks KaxChapterFlagEnabled::ClassInfos(KaxChapterFlagEnabled::Create, KaxChapterFlagEnabled_TheId, "ChapterFlagEnabled", KaxChapterFlagEnabled_Context);
|
||||
const EbmlCallbacks KaxChapterPhysicalEquiv::ClassInfos(KaxChapterPhysicalEquiv::Create, KaxChapterPhysicalEquiv_TheId, "ChapterPhysicalEquiv", KaxChapterPhysicalEquiv_Context);
|
||||
const EbmlCallbacks KaxChapterTrack::ClassInfos(KaxChapterTrack::Create, KaxChapterTrack_TheId, "ChapterTrack", KaxChapterTrack_Context);
|
||||
const EbmlCallbacks KaxChapterTrackNumber::ClassInfos(KaxChapterTrackNumber::Create, KaxChapterTrackNumber_TheId, "ChapterTrackNumber", KaxChapterTrackNumber_Context);
|
||||
const EbmlCallbacks KaxChapterDisplay::ClassInfos(KaxChapterDisplay::Create, KaxChapterDisplay_TheId, "ChapterDisplay", KaxChapterDisplay_Context);
|
||||
const EbmlCallbacks KaxChapterString::ClassInfos(KaxChapterString::Create, KaxChapterString_TheId, "ChapterString", KaxChapterString_Context);
|
||||
const EbmlCallbacks KaxChapterLanguage::ClassInfos(KaxChapterLanguage::Create, KaxChapterLanguage_TheId, "ChapterLanguage", KaxChapterLanguage_Context);
|
||||
const EbmlCallbacks KaxChapterCountry::ClassInfos(KaxChapterCountry::Create, KaxChapterCountry_TheId, "ChapterCountry", KaxChapterCountry_Context);
|
||||
const EbmlCallbacks KaxChapterProcess::ClassInfos(KaxChapterProcess::Create, KaxChapterProcess_TheId, "ChapterProcess", KaxChapterProcess_Context);
|
||||
const EbmlCallbacks KaxChapterProcessTime::ClassInfos(KaxChapterProcessTime::Create, KaxChapterProcessTime_TheId, "ChapterProcessTime", KaxChapterProcessTime_Context);
|
||||
const EbmlCallbacks KaxChapterProcessCommand::ClassInfos(KaxChapterProcessCommand::Create, KaxChapterProcessCommand_TheId, "ChapterProcessCommand", KaxChapterProcessCommand_Context);
|
||||
|
||||
KaxChapters::KaxChapters()
|
||||
:EbmlMaster(KaxChapters_Context)
|
||||
{}
|
||||
|
||||
KaxEditionEntry::KaxEditionEntry()
|
||||
:EbmlMaster(KaxEditionEntry_Context)
|
||||
{}
|
||||
|
||||
KaxChapterAtom::KaxChapterAtom()
|
||||
:EbmlMaster(KaxChapterAtom_Context)
|
||||
{}
|
||||
|
||||
KaxChapterTrack::KaxChapterTrack()
|
||||
:EbmlMaster(KaxChapterTrack_Context)
|
||||
{}
|
||||
|
||||
KaxChapterDisplay::KaxChapterDisplay()
|
||||
:EbmlMaster(KaxChapterDisplay_Context)
|
||||
{}
|
||||
|
||||
KaxChapterProcess::KaxChapterProcess()
|
||||
:EbmlMaster(KaxChapterProcess_Context)
|
||||
{}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
234
src/add-ons/media/plugins/matroska/libmatroska/KaxCluster.cpp
Normal file
234
src/add-ons/media/plugins/matroska/libmatroska/KaxCluster.cpp
Normal file
@ -0,0 +1,234 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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 640 2004-07-09 21:05:36Z mosu $
|
||||
\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"
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
EbmlSemantic KaxCluster_ContextList[4] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxClusterTimecode::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxClusterPrevSize::ClassInfos),
|
||||
EbmlSemantic(true, false, KaxBlockGroup::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxClusterPosition::ClassInfos),
|
||||
};
|
||||
|
||||
const EbmlSemanticContext KaxCluster_Context = EbmlSemanticContext(countof(KaxCluster_ContextList), KaxCluster_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &KaxCluster::ClassInfos);
|
||||
|
||||
EbmlId KaxCluster_TheId(0x1F43B675, 4);
|
||||
const EbmlCallbacks KaxCluster::ClassInfos(KaxCluster::Create, KaxCluster_TheId, "Cluster", KaxCluster_Context);
|
||||
|
||||
KaxCluster::KaxCluster()
|
||||
:EbmlMaster(KaxCluster_Context)
|
||||
,currentNewBlock(NULL)
|
||||
,ParentSegment(NULL)
|
||||
,bFirstFrameInside(false)
|
||||
,bPreviousTimecodeIsSet(false)
|
||||
,bTimecodeScaleIsSet(false)
|
||||
{}
|
||||
|
||||
KaxCluster::KaxCluster(const KaxCluster & ElementToClone)
|
||||
:EbmlMaster(ElementToClone)
|
||||
{
|
||||
// update the parent of each children
|
||||
std::vector<EbmlElement *>::const_iterator Itr = ElementList.begin();
|
||||
while (Itr != ElementList.end())
|
||||
{
|
||||
if (EbmlId(**Itr) == KaxBlockGroup::ClassInfos.GlobalId) {
|
||||
static_cast<KaxBlockGroup *>(*Itr)->SetParent(*this);
|
||||
} else if (EbmlId(**Itr) == KaxBlock::ClassInfos.GlobalId) {
|
||||
static_cast<KaxBlock *>(*Itr)->SetParent(*this);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
} else if (EbmlId(**Itr) == KaxBlockVirtual::ClassInfos.GlobalId) {
|
||||
static_cast<KaxBlockVirtual *>(*Itr)->SetParent(*this);
|
||||
#endif // MATROSKA_VERSION
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
return AddFrameInternal(track, timecode, buffer, MyNewBlock, &PastBlock, &ForwBlock, lacing);
|
||||
}
|
||||
|
||||
/*!
|
||||
\todo only put the Blocks written in the cue entries
|
||||
*/
|
||||
uint32 KaxCluster::Render(IOCallback & output, KaxCues & CueToUpdate, bool bSaveDefault)
|
||||
{
|
||||
// update the Timecode of the Cluster before writing
|
||||
KaxClusterTimecode * Timecode = static_cast<KaxClusterTimecode *>(this->FindElt(KaxClusterTimecode::ClassInfos));
|
||||
*static_cast<EbmlUInteger *>(Timecode) = GlobalTimecode() / GlobalTimecodeScale();
|
||||
|
||||
uint32 Result = EbmlMaster::Render(output, bSaveDefault);
|
||||
// For all Blocks add their position on the CueEntry
|
||||
size_t Index;
|
||||
|
||||
for (Index = 0; Index < ElementList.size(); Index++) {
|
||||
if (EbmlId(*ElementList[Index]) == KaxBlockGroup::ClassInfos.GlobalId) {
|
||||
CueToUpdate.PositionSet(*static_cast<const KaxBlockGroup *>(ElementList[Index]));
|
||||
}
|
||||
}
|
||||
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(KaxClusterTimecode::ClassInfos));
|
||||
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()
|
||||
{
|
||||
size_t Index;
|
||||
|
||||
for (Index = 0; Index < ElementList.size(); Index++) {
|
||||
if (EbmlId(*ElementList[Index]) == KaxBlockGroup::ClassInfos.GlobalId) {
|
||||
static_cast<KaxBlockGroup*>(ElementList[Index])->ReleaseFrames();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint64 KaxCluster::GetPosition() const
|
||||
{
|
||||
assert(ParentSegment != NULL);
|
||||
return ParentSegment->GetRelativePosition(*this);
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
@ -0,0 +1,52 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxClusterData.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
EbmlId KaxClusterTimecode_TheId(0xE7, 1);
|
||||
EbmlId KaxClusterPrevSize_TheId(0xAB, 1);
|
||||
EbmlId KaxClusterPosition_TheId(0xA7, 1);
|
||||
|
||||
const EbmlSemanticContext KaxClusterTimecode_Context = EbmlSemanticContext(0, NULL, &KaxCluster_Context, *GetKaxGlobal_Context, &KaxClusterTimecode::ClassInfos);
|
||||
const EbmlSemanticContext KaxClusterPosition_Context = EbmlSemanticContext(0, NULL, &KaxCluster_Context, *GetKaxGlobal_Context, &KaxClusterPosition::ClassInfos);
|
||||
const EbmlSemanticContext KaxClusterPrevSize_Context = EbmlSemanticContext(0, NULL, &KaxCluster_Context, *GetKaxGlobal_Context, &KaxClusterPrevSize::ClassInfos);
|
||||
|
||||
const EbmlCallbacks KaxClusterTimecode::ClassInfos(KaxClusterTimecode::Create, KaxClusterTimecode_TheId, "ClusterTimecode", KaxClusterTimecode_Context);
|
||||
const EbmlCallbacks KaxClusterPrevSize::ClassInfos(KaxClusterPrevSize::Create, KaxClusterPrevSize_TheId, "ClusterPrevSize", KaxClusterPrevSize_Context);
|
||||
const EbmlCallbacks KaxClusterPosition::ClassInfos(KaxClusterPosition::Create, KaxClusterPosition_TheId, "ClusterPosition", KaxClusterPosition_Context);
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
@ -0,0 +1,254 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
const EbmlSemantic KaxContentEncodings_ContextList[1] = {
|
||||
EbmlSemantic(true, true, KaxContentEncoding::ClassInfos),
|
||||
};
|
||||
|
||||
const EbmlSemantic KaxContentEncoding_ContextList[5] = {
|
||||
EbmlSemantic(true, true, KaxContentEncodingOrder::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxContentEncodingScope::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxContentEncodingType::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxContentCompression::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxContentEncryption::ClassInfos),
|
||||
};
|
||||
|
||||
const EbmlSemantic KaxContentCompression_ContextList[2] = {
|
||||
EbmlSemantic(true, true, KaxContentCompAlgo::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxContentCompSettings::ClassInfos),
|
||||
};
|
||||
|
||||
const EbmlSemantic KaxContentEncryption_ContextList[6] = {
|
||||
EbmlSemantic(false, true, KaxContentEncAlgo::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxContentEncKeyID::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxContentSignature::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxContentSigKeyID::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxContentSigAlgo::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxContentSigHashAlgo::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlId KaxContentEncodings_TheId (0x6d80, 2);
|
||||
EbmlId KaxContentEncoding_TheId (0x6240, 2);
|
||||
EbmlId KaxContentEncodingOrder_TheId (0x5031, 2);
|
||||
EbmlId KaxContentEncodingScope_TheId (0x5032, 2);
|
||||
EbmlId KaxContentEncodingType_TheId (0x5033, 2);
|
||||
EbmlId KaxContentCompression_TheId (0x5034, 2);
|
||||
EbmlId KaxContentCompAlgo_TheId (0x4254, 2);
|
||||
EbmlId KaxContentCompSettings_TheId (0x4255, 2);
|
||||
EbmlId KaxContentEncryption_TheId (0x5035, 2);
|
||||
EbmlId KaxContentEncAlgo_TheId (0x47e1, 2);
|
||||
EbmlId KaxContentEncKeyID_TheId (0x47e2, 2);
|
||||
EbmlId KaxContentSignature_TheId (0x47e3, 2);
|
||||
EbmlId KaxContentSigKeyID_TheId (0x47e4, 2);
|
||||
EbmlId KaxContentSigAlgo_TheId (0x47e5, 2);
|
||||
EbmlId KaxContentSigHashAlgo_TheId (0x47e6, 2);
|
||||
|
||||
const EbmlSemanticContext KaxContentEncodings_Context =
|
||||
EbmlSemanticContext(countof(KaxContentEncodings_ContextList),
|
||||
KaxContentEncodings_ContextList, &KaxTrackEntry_Context,
|
||||
*GetKaxGlobal_Context,
|
||||
&KaxContentEncodings::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxContentEncoding_Context =
|
||||
EbmlSemanticContext(countof(KaxContentEncoding_ContextList),
|
||||
KaxContentEncoding_ContextList,
|
||||
&KaxContentEncodings_Context,
|
||||
*GetKaxGlobal_Context,
|
||||
&KaxContentEncoding::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxContentEncodingOrder_Context =
|
||||
EbmlSemanticContext(0, NULL, &KaxContentEncoding_Context,
|
||||
*GetKaxGlobal_Context,
|
||||
&KaxContentEncodingOrder::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxContentEncodingScope_Context =
|
||||
EbmlSemanticContext(0, NULL, &KaxContentEncoding_Context,
|
||||
*GetKaxGlobal_Context,
|
||||
&KaxContentEncodingScope::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxContentEncodingType_Context =
|
||||
EbmlSemanticContext(0, NULL, &KaxContentEncoding_Context,
|
||||
*GetKaxGlobal_Context,
|
||||
&KaxContentEncodingType::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxContentCompression_Context =
|
||||
EbmlSemanticContext(countof(KaxContentCompression_ContextList),
|
||||
KaxContentCompression_ContextList,
|
||||
&KaxContentEncoding_Context, *GetKaxGlobal_Context,
|
||||
&KaxContentCompression::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxContentCompAlgo_Context =
|
||||
EbmlSemanticContext(0, NULL, &KaxContentCompression_Context,
|
||||
*GetKaxGlobal_Context,
|
||||
&KaxContentCompAlgo::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxContentCompSettings_Context =
|
||||
EbmlSemanticContext(0, NULL, &KaxContentCompression_Context,
|
||||
*GetKaxGlobal_Context,
|
||||
&KaxContentCompSettings::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxContentEncryption_Context =
|
||||
EbmlSemanticContext(countof(KaxContentEncryption_ContextList),
|
||||
KaxContentEncryption_ContextList,
|
||||
&KaxContentEncoding_Context, *GetKaxGlobal_Context,
|
||||
&KaxContentEncryption::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxContentEncAlgo_Context =
|
||||
EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,
|
||||
*GetKaxGlobal_Context,
|
||||
&KaxContentEncAlgo::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxContentEncKeyID_Context =
|
||||
EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,
|
||||
*GetKaxGlobal_Context,
|
||||
&KaxContentEncKeyID::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxContentSignature_Context =
|
||||
EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,
|
||||
*GetKaxGlobal_Context,
|
||||
&KaxContentSignature::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxContentSigAlgo_Context =
|
||||
EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,
|
||||
*GetKaxGlobal_Context,
|
||||
&KaxContentSigKeyID::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxContentSigHashAlgo_Context =
|
||||
EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,
|
||||
*GetKaxGlobal_Context,
|
||||
&KaxContentSigKeyID::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxContentSigKeyID_Context =
|
||||
EbmlSemanticContext(0, NULL, &KaxContentEncryption_Context,
|
||||
*GetKaxGlobal_Context,
|
||||
&KaxContentSigKeyID::ClassInfos);
|
||||
|
||||
const EbmlCallbacks
|
||||
KaxContentEncodings::ClassInfos(KaxContentEncodings::Create,
|
||||
KaxContentEncodings_TheId,
|
||||
"ContentEncodings",
|
||||
KaxContentEncodings_Context);
|
||||
const EbmlCallbacks
|
||||
KaxContentEncoding::ClassInfos(KaxContentEncoding::Create,
|
||||
KaxContentEncoding_TheId,
|
||||
"ContentEncoding",
|
||||
KaxContentEncoding_Context);
|
||||
const EbmlCallbacks
|
||||
KaxContentEncodingOrder::ClassInfos(KaxContentEncodingOrder::Create,
|
||||
KaxContentEncodingOrder_TheId,
|
||||
"ContentEncodingOrder",
|
||||
KaxContentEncodingOrder_Context);
|
||||
const EbmlCallbacks
|
||||
KaxContentEncodingScope::ClassInfos(KaxContentEncodingScope::Create,
|
||||
KaxContentEncodingScope_TheId,
|
||||
"ContentEncodingScope",
|
||||
KaxContentEncodingScope_Context);
|
||||
const EbmlCallbacks
|
||||
KaxContentEncodingType::ClassInfos(KaxContentEncodingType::Create,
|
||||
KaxContentEncodingType_TheId,
|
||||
"ContentEncodingType",
|
||||
KaxContentEncodingType_Context);
|
||||
const EbmlCallbacks
|
||||
KaxContentCompression::ClassInfos(KaxContentCompression::Create,
|
||||
KaxContentCompression_TheId,
|
||||
"ContentCompression",
|
||||
KaxContentCompression_Context);
|
||||
const EbmlCallbacks
|
||||
KaxContentCompAlgo::ClassInfos(KaxContentCompAlgo::Create,
|
||||
KaxContentCompAlgo_TheId,
|
||||
"ContentCompAlgo",
|
||||
KaxContentCompAlgo_Context);
|
||||
const EbmlCallbacks
|
||||
KaxContentCompSettings::ClassInfos(KaxContentCompSettings::Create,
|
||||
KaxContentCompSettings_TheId,
|
||||
"ContentCompSettings",
|
||||
KaxContentCompSettings_Context);
|
||||
const EbmlCallbacks
|
||||
KaxContentEncryption::ClassInfos(KaxContentEncryption::Create,
|
||||
KaxContentEncryption_TheId,
|
||||
"ContentEncryption",
|
||||
KaxContentEncryption_Context);
|
||||
const EbmlCallbacks
|
||||
KaxContentEncAlgo::ClassInfos(KaxContentEncAlgo::Create,
|
||||
KaxContentEncAlgo_TheId,
|
||||
"ContentEncAlgo",
|
||||
KaxContentEncAlgo_Context);
|
||||
const EbmlCallbacks
|
||||
KaxContentEncKeyID::ClassInfos(KaxContentEncKeyID::Create,
|
||||
KaxContentEncKeyID_TheId,
|
||||
"ContentEncKeyID",
|
||||
KaxContentEncKeyID_Context);
|
||||
const EbmlCallbacks
|
||||
KaxContentSignature::ClassInfos(KaxContentSignature::Create,
|
||||
KaxContentSignature_TheId,
|
||||
"ContentSignature",
|
||||
KaxContentSignature_Context);
|
||||
const EbmlCallbacks
|
||||
KaxContentSigAlgo::ClassInfos(KaxContentSigAlgo::Create,
|
||||
KaxContentSigAlgo_TheId,
|
||||
"ContentSigAlgo",
|
||||
KaxContentSigAlgo_Context);
|
||||
const EbmlCallbacks
|
||||
KaxContentSigHashAlgo::ClassInfos(KaxContentSigHashAlgo::Create,
|
||||
KaxContentSigHashAlgo_TheId,
|
||||
"ContentSigHashAlgo",
|
||||
KaxContentSigHashAlgo_Context);
|
||||
const EbmlCallbacks
|
||||
KaxContentSigKeyID::ClassInfos(KaxContentSigKeyID::Create,
|
||||
KaxContentSigKeyID_TheId,
|
||||
"ContentSigKeyID",
|
||||
KaxContentSigKeyID_Context);
|
||||
|
||||
KaxContentEncodings::KaxContentEncodings():
|
||||
EbmlMaster(KaxContentEncodings_Context) {
|
||||
}
|
||||
|
||||
KaxContentEncoding::KaxContentEncoding():
|
||||
EbmlMaster(KaxContentEncoding_Context) {
|
||||
}
|
||||
|
||||
KaxContentCompression::KaxContentCompression():
|
||||
EbmlMaster(KaxContentCompression_Context) {
|
||||
}
|
||||
|
||||
KaxContentEncryption::KaxContentEncryption():
|
||||
EbmlMaster(KaxContentEncryption_Context) {
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
@ -0,0 +1,48 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
// for the moment
|
||||
const EbmlSemanticContext & GetKaxGlobal_Context()
|
||||
{
|
||||
return GetEbmlGlobal_Context();
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
139
src/add-ons/media/plugins/matroska/libmatroska/KaxCues.cpp
Normal file
139
src/add-ons/media/plugins/matroska/libmatroska/KaxCues.cpp
Normal file
@ -0,0 +1,139 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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: KaxCues.cpp 647 2004-07-14 13:29:48Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include <cassert>
|
||||
|
||||
#include "matroska/KaxCues.h"
|
||||
#include "matroska/KaxCuesData.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "ebml/EbmlStream.h"
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
EbmlSemantic KaxCues_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(true, false, KaxCuePoint::ClassInfos),
|
||||
};
|
||||
|
||||
const EbmlSemanticContext KaxCues_Context = EbmlSemanticContext(countof(KaxCues_ContextList), KaxCues_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &KaxCues::ClassInfos);
|
||||
|
||||
EbmlId KaxCues_TheId(0x1C53BB6B, 4);
|
||||
const EbmlCallbacks KaxCues::ClassInfos(KaxCues::Create, KaxCues_TheId, "Cues", KaxCues_Context);
|
||||
|
||||
KaxCues::KaxCues()
|
||||
:EbmlMaster(KaxCues_Context)
|
||||
{}
|
||||
|
||||
KaxCues::~KaxCues()
|
||||
{
|
||||
assert(myTempReferences.size() == 0); // otherwise that means you have added references and forgot to set the position
|
||||
}
|
||||
|
||||
bool KaxCues::AddBlockGroup(const KaxBlockGroup & BlockReference)
|
||||
{
|
||||
// Do not add the element if it's already present.
|
||||
std::vector<const KaxBlockGroup *>::iterator ListIdx;
|
||||
|
||||
for (ListIdx = myTempReferences.begin(); ListIdx != myTempReferences.end(); ListIdx++)
|
||||
if (*ListIdx == &BlockReference)
|
||||
return true;
|
||||
|
||||
myTempReferences.push_back(&BlockReference);
|
||||
return true;
|
||||
}
|
||||
|
||||
void KaxCues::PositionSet(const KaxBlockGroup & BlockReference)
|
||||
{
|
||||
// look for the element in the temporary references
|
||||
std::vector<const KaxBlockGroup *>::iterator ListIdx;
|
||||
|
||||
for (ListIdx = myTempReferences.begin(); ListIdx != myTempReferences.end(); ListIdx++) {
|
||||
if (*ListIdx == &BlockReference) {
|
||||
// found, now add the element to the entry list
|
||||
KaxCuePoint & NewPoint = AddNewChild<KaxCuePoint>(*this);
|
||||
NewPoint.PositionSet(BlockReference, GlobalTimecodeScale());
|
||||
myTempReferences.erase(ListIdx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\warning Assume that the list has been sorted (Sort())
|
||||
*/
|
||||
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);
|
||||
|
||||
for (unsigned int i=0; i<ListSize(); i++)
|
||||
{
|
||||
if (EbmlId(*(*this)[i]) == KaxCuePoint::ClassInfos.GlobalId) {
|
||||
const KaxCuePoint *tmp = static_cast<const KaxCuePoint *>((*this)[i]);
|
||||
// check the tile
|
||||
const KaxCueTime *aTime = static_cast<const KaxCueTime *>(tmp->FindFirstElt(KaxCueTime::ClassInfos));
|
||||
if (aTime != NULL)
|
||||
{
|
||||
uint64 _Time = uint64(*aTime);
|
||||
if (_Time > aPrevTime && _Time < TimecodeToLocate) {
|
||||
aPrevTime = _Time;
|
||||
aPointPrev = tmp;
|
||||
}
|
||||
if (_Time < aNextTime && _Time > TimecodeToLocate) {
|
||||
aNextTime= _Time;
|
||||
aPointNext = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return aPointPrev;
|
||||
}
|
||||
|
||||
uint64 KaxCues::GetTimecodePosition(uint64 aTimecode) const
|
||||
{
|
||||
const KaxCuePoint * aPoint = GetTimecodePoint(aTimecode);
|
||||
if (aPoint == NULL)
|
||||
return 0;
|
||||
|
||||
const KaxCueTrackPositions * aTrack = aPoint->GetSeekPosition();
|
||||
if (aTrack == NULL)
|
||||
return 0;
|
||||
|
||||
return aTrack->ClusterPosition();
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
279
src/add-ons/media/plugins/matroska/libmatroska/KaxCuesData.cpp
Normal file
279
src/add-ons/media/plugins/matroska/libmatroska/KaxCuesData.cpp
Normal file
@ -0,0 +1,279 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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 640 2004-07-09 21:05:36Z 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"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
EbmlSemantic KaxCuePoint_ContextList[2] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxCueTime::ClassInfos),
|
||||
EbmlSemantic(true, false, KaxCueTrackPositions::ClassInfos),
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION == 1
|
||||
EbmlSemantic KaxCueTrackPositions_ContextList[3] =
|
||||
#else // MATROSKA_VERSION
|
||||
EbmlSemantic KaxCueTrackPositions_ContextList[5] =
|
||||
#endif // MATROSKA_VERSION
|
||||
{
|
||||
EbmlSemantic(true, true, KaxCueTrack::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxCueClusterPosition::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxCueBlockNumber::ClassInfos),
|
||||
#if MATROSKA_VERSION >= 2
|
||||
EbmlSemantic(false, true, KaxCueCodecState::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxCueReference::ClassInfos),
|
||||
#endif // MATROSKA_VERSION
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
EbmlSemantic KaxCueReference_ContextList[4] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxCueRefTime::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxCueRefCluster::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxCueRefNumber::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxCueRefCodecState::ClassInfos),
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
EbmlId KaxCuePoint_TheId (0xBB, 1);
|
||||
EbmlId KaxCueTime_TheId (0xB3, 1);
|
||||
EbmlId KaxCueTrackPositions_TheId (0xB7, 1);
|
||||
EbmlId KaxCueTrack_TheId (0xF7, 1);
|
||||
EbmlId KaxCueClusterPosition_TheId(0xF1, 1);
|
||||
EbmlId KaxCueBlockNumber_TheId (0x5378, 2);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
EbmlId KaxCueCodecState_TheId (0xEA, 1);
|
||||
EbmlId KaxCueReference_TheId (0xDB, 1);
|
||||
EbmlId KaxCueRefTime_TheId (0x96, 1);
|
||||
EbmlId KaxCueRefCluster_TheId (0x97, 1);
|
||||
EbmlId KaxCueRefNumber_TheId (0x535F, 2);
|
||||
EbmlId KaxCueRefCodecState_TheId (0xEB, 1);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
const EbmlSemanticContext KaxCuePoint_Context = EbmlSemanticContext(countof(KaxCuePoint_ContextList), KaxCuePoint_ContextList, &KaxCues_Context, *GetKaxGlobal_Context, &KaxCuePoint::ClassInfos);
|
||||
const EbmlSemanticContext KaxCueTime_Context = EbmlSemanticContext(0, NULL, &KaxCuePoint_Context, *GetKaxGlobal_Context, &KaxCueTime::ClassInfos);
|
||||
const EbmlSemanticContext KaxCueTrackPositions_Context = EbmlSemanticContext(countof(KaxCueTrackPositions_ContextList), KaxCueTrackPositions_ContextList, &KaxCuePoint_Context, *GetKaxGlobal_Context, &KaxCueTrackPositions::ClassInfos);
|
||||
const EbmlSemanticContext KaxCueTrack_Context = EbmlSemanticContext(0, NULL, &KaxCueTrackPositions_Context, *GetKaxGlobal_Context, &KaxCueTrack::ClassInfos);
|
||||
const EbmlSemanticContext KaxCueClusterPosition_Context = EbmlSemanticContext(0, NULL, &KaxCueTrackPositions_Context, *GetKaxGlobal_Context, &KaxCueClusterPosition::ClassInfos);
|
||||
const EbmlSemanticContext KaxCueBlockNumber_Context = EbmlSemanticContext(0, NULL, &KaxCueTrackPositions_Context, *GetKaxGlobal_Context, &KaxCueBlockNumber::ClassInfos);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
const EbmlSemanticContext KaxCueCodecState_Context = EbmlSemanticContext(0, NULL, &KaxCueTrackPositions_Context, *GetKaxGlobal_Context, &KaxCueCodecState::ClassInfos);
|
||||
const EbmlSemanticContext KaxCueReference_Context = EbmlSemanticContext(countof(KaxCueReference_ContextList), KaxCueReference_ContextList, &KaxCueTrackPositions_Context, *GetKaxGlobal_Context, &KaxCueReference::ClassInfos);
|
||||
const EbmlSemanticContext KaxCueRefTime_Context = EbmlSemanticContext(0, NULL, &KaxCueReference_Context, *GetKaxGlobal_Context, &KaxCueRefTime::ClassInfos);
|
||||
const EbmlSemanticContext KaxCueRefCluster_Context = EbmlSemanticContext(0, NULL, &KaxCueRefTime_Context, *GetKaxGlobal_Context, &KaxCueRefCluster::ClassInfos);
|
||||
const EbmlSemanticContext KaxCueRefNumber_Context = EbmlSemanticContext(0, NULL, &KaxCueRefTime_Context, *GetKaxGlobal_Context, &KaxCueRefNumber::ClassInfos);
|
||||
const EbmlSemanticContext KaxCueRefCodecState_Context = EbmlSemanticContext(0, NULL, &KaxCueRefTime_Context, *GetKaxGlobal_Context, &KaxCueRefCodecState::ClassInfos);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
const EbmlCallbacks KaxCuePoint::ClassInfos(KaxCuePoint::Create, KaxCuePoint_TheId, "CuePoint", KaxCuePoint_Context);
|
||||
const EbmlCallbacks KaxCueTime::ClassInfos(KaxCueTime::Create, KaxCueTime_TheId, "CueTime", KaxCueTime_Context);
|
||||
const EbmlCallbacks KaxCueTrackPositions::ClassInfos(KaxCueTrackPositions::Create, KaxCueTrackPositions_TheId, "CueTrackPositions", KaxCueTrackPositions_Context);
|
||||
const EbmlCallbacks KaxCueTrack::ClassInfos(KaxCueTrack::Create, KaxCueTrack_TheId, "CueTrack", KaxCueTrack_Context);
|
||||
const EbmlCallbacks KaxCueClusterPosition::ClassInfos(KaxCueClusterPosition::Create, KaxCueClusterPosition_TheId, "CueClusterPosition", KaxCueClusterPosition_Context);
|
||||
const EbmlCallbacks KaxCueBlockNumber::ClassInfos(KaxCueBlockNumber::Create, KaxCueBlockNumber_TheId, "CueBlockNumber", KaxCueBlockNumber_Context);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
const EbmlCallbacks KaxCueCodecState::ClassInfos(KaxCueCodecState::Create, KaxCueCodecState_TheId, "CueCodecState", KaxCueCodecState_Context);
|
||||
const EbmlCallbacks KaxCueReference::ClassInfos(KaxCueReference::Create, KaxCueReference_TheId, "CueReference", KaxCueReference_Context);
|
||||
const EbmlCallbacks KaxCueRefTime::ClassInfos(KaxCueRefTime::Create, KaxCueRefTime_TheId, "CueRefTime", KaxCueRefTime_Context);
|
||||
const EbmlCallbacks KaxCueRefCluster::ClassInfos(KaxCueRefCluster::Create, KaxCueRefCluster_TheId, "CueRefCluster", KaxCueRefCluster_Context);
|
||||
const EbmlCallbacks KaxCueRefNumber::ClassInfos(KaxCueRefNumber::Create, KaxCueRefNumber_TheId, "CueRefNumber", KaxCueRefNumber_Context);
|
||||
const EbmlCallbacks KaxCueRefCodecState::ClassInfos(KaxCueRefCodecState::Create, KaxCueRefCodecState_TheId, "CueRefCodecState", KaxCueRefCodecState_Context);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
KaxCuePoint::KaxCuePoint()
|
||||
:EbmlMaster(KaxCuePoint_Context)
|
||||
{}
|
||||
|
||||
KaxCueTrackPositions::KaxCueTrackPositions()
|
||||
:EbmlMaster(KaxCueTrackPositions_Context)
|
||||
{}
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
KaxCueReference::KaxCueReference()
|
||||
:EbmlMaster(KaxCueReference_Context)
|
||||
{}
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
/*!
|
||||
\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);
|
||||
}
|
||||
}
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
bValueIsSet = true;
|
||||
}
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
/*!
|
||||
\todo handle codec state checking
|
||||
*/
|
||||
void KaxCueReference::AddReference(const KaxBlockGroup & BlockReference, uint64 GlobalTimecodeScale)
|
||||
{
|
||||
KaxCueRefTime & NewTime = GetChild<KaxCueRefTime>(*this);
|
||||
*static_cast<EbmlUInteger*>(&NewTime) = BlockReference.GlobalTimecode() / GlobalTimecodeScale;
|
||||
|
||||
KaxCueRefCluster & TheClustPos = GetChild<KaxCueRefCluster>(*this);
|
||||
*static_cast<EbmlUInteger*>(&TheClustPos) = BlockReference.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 // MATROSKA_VERSION
|
||||
|
||||
bool KaxCuePoint::operator<(const EbmlElement & EltB) const
|
||||
{
|
||||
assert(EbmlId(*this) == KaxCuePoint_TheId);
|
||||
assert(EbmlId(EltB) == KaxCuePoint_TheId);
|
||||
|
||||
const KaxCuePoint & theEltB = *static_cast<const KaxCuePoint *>(&EltB);
|
||||
|
||||
// compare timecode
|
||||
const KaxCueTime * TimeCodeA = static_cast<const KaxCueTime *>(FindElt(KaxCueTime::ClassInfos));
|
||||
if (TimeCodeA == NULL)
|
||||
return false;
|
||||
|
||||
const KaxCueTime * TimeCodeB = static_cast<const KaxCueTime *>(theEltB.FindElt(KaxCueTime::ClassInfos));
|
||||
if (TimeCodeB == NULL)
|
||||
return false;
|
||||
|
||||
if (*TimeCodeA < *TimeCodeB)
|
||||
return true;
|
||||
|
||||
if (*TimeCodeB < *TimeCodeA)
|
||||
return false;
|
||||
|
||||
// compare tracks (timecodes are equal)
|
||||
const KaxCueTrack * TrackA = static_cast<const KaxCueTrack *>(FindElt(KaxCueTrack::ClassInfos));
|
||||
if (TrackA == NULL)
|
||||
return false;
|
||||
|
||||
const KaxCueTrack * TrackB = static_cast<const KaxCueTrack *>(theEltB.FindElt(KaxCueTrack::ClassInfos));
|
||||
if (TrackB == NULL)
|
||||
return false;
|
||||
|
||||
if (*TrackA < *TrackB)
|
||||
return true;
|
||||
|
||||
if (*TrackB < *TrackA)
|
||||
return false;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool KaxCuePoint::Timecode(uint64 & aTimecode, uint64 GlobalTimecodeScale) const
|
||||
{
|
||||
const KaxCueTime *aTime = static_cast<const KaxCueTime *>(FindFirstElt(KaxCueTime::ClassInfos));
|
||||
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(KaxCueTrackPositions::ClassInfos));
|
||||
while (aPoss != NULL)
|
||||
{
|
||||
const KaxCueClusterPosition *aPos = static_cast<const KaxCueClusterPosition *>(aPoss->FindFirstElt(KaxCueClusterPosition::ClassInfos));
|
||||
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(KaxCueClusterPosition::ClassInfos));
|
||||
if (aPos == NULL)
|
||||
return 0;
|
||||
|
||||
return uint64(*aPos);
|
||||
}
|
||||
|
||||
uint16 KaxCueTrackPositions::TrackNumber() const
|
||||
{
|
||||
const KaxCueTrack *aTrack = static_cast<const KaxCueTrack *>(FindFirstElt(KaxCueTrack::ClassInfos));
|
||||
if (aTrack == NULL)
|
||||
return 0;
|
||||
|
||||
return uint16(*aTrack);
|
||||
}
|
||||
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
75
src/add-ons/media/plugins/matroska/libmatroska/KaxInfo.cpp
Normal file
75
src/add-ons/media/plugins/matroska/libmatroska/KaxInfo.cpp
Normal file
@ -0,0 +1,75 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxInfo.h"
|
||||
#include "matroska/KaxInfoData.h"
|
||||
|
||||
#include "matroska/KaxContexts.h"
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
const EbmlSemantic KaxInfo_ContextList[12] =
|
||||
{
|
||||
EbmlSemantic(false, true, KaxSegmentUID::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxSegmentFilename::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxPrevUID::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxPrevFilename::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxNextUID::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxNextFilename::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxTimecodeScale::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxDuration::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxDateUTC::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTitle::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxMuxingApp::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxWritingApp::ClassInfos),
|
||||
};
|
||||
|
||||
const EbmlSemanticContext KaxInfo_Context = EbmlSemanticContext(countof(KaxInfo_ContextList), KaxInfo_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &KaxInfo::ClassInfos);
|
||||
const EbmlSemanticContext KaxMuxingApp_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &KaxMuxingApp::ClassInfos);
|
||||
const EbmlSemanticContext KaxWritingApp_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &KaxWritingApp::ClassInfos);
|
||||
|
||||
EbmlId KaxInfo_TheId (0x1549A966, 4);
|
||||
EbmlId KaxMuxingApp_TheId (0x4D80, 2);
|
||||
EbmlId KaxWritingApp_TheId(0x5741, 2);
|
||||
|
||||
const EbmlCallbacks KaxInfo::ClassInfos(KaxInfo::Create, KaxInfo_TheId, "Info", KaxInfo_Context);
|
||||
const EbmlCallbacks KaxMuxingApp::ClassInfos(KaxMuxingApp::Create, KaxMuxingApp_TheId, "MuxingApp", KaxMuxingApp_Context);
|
||||
const EbmlCallbacks KaxWritingApp::ClassInfos(KaxWritingApp::Create, KaxWritingApp_TheId, "WritingApp", KaxWritingApp_Context);
|
||||
|
||||
KaxInfo::KaxInfo()
|
||||
:EbmlMaster(KaxInfo_Context)
|
||||
{}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
@ -0,0 +1,75 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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: KaxInfoData.cpp 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author John Cannon <spyder2555 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxInfoData.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
EbmlId KaxSegmentUID_TheId (0x73A4, 2);
|
||||
EbmlId KaxSegmentFilename_TheId(0x7384, 2);
|
||||
EbmlId KaxPrevUID_TheId (0x3CB923, 3);
|
||||
EbmlId KaxPrevFilename_TheId (0x3C83AB, 3);
|
||||
EbmlId KaxNextUID_TheId (0x3EB923, 3);
|
||||
EbmlId KaxNextFilename_TheId (0x3E83BB, 3);
|
||||
EbmlId KaxTimecodeScale_TheId (0x2AD7B1, 3);
|
||||
EbmlId KaxDuration_TheId (0x4489, 2);
|
||||
EbmlId KaxDateUTC_TheId (0x4461, 2);
|
||||
EbmlId KaxTitle_TheId (0x7BA9, 2);
|
||||
|
||||
const EbmlSemanticContext KaxSegmentUID_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &KaxSegmentUID::ClassInfos);
|
||||
const EbmlSemanticContext KaxSegmentFilename_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &KaxSegmentFilename::ClassInfos);
|
||||
const EbmlSemanticContext KaxPrevUID_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &KaxPrevUID::ClassInfos);
|
||||
const EbmlSemanticContext KaxPrevFilename_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &KaxPrevFilename::ClassInfos);
|
||||
const EbmlSemanticContext KaxNextUID_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &KaxNextUID::ClassInfos);
|
||||
const EbmlSemanticContext KaxNextFilename_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &KaxNextFilename::ClassInfos);
|
||||
const EbmlSemanticContext KaxTimecodeScale_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &KaxTimecodeScale::ClassInfos);
|
||||
const EbmlSemanticContext KaxDuration_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &KaxDuration::ClassInfos);
|
||||
const EbmlSemanticContext KaxDateUTC_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &KaxDateUTC::ClassInfos);
|
||||
const EbmlSemanticContext KaxTitle_Context = EbmlSemanticContext(0, NULL, &KaxInfo_Context, *GetKaxGlobal_Context, &KaxTitle::ClassInfos);
|
||||
|
||||
|
||||
const EbmlCallbacks KaxSegmentUID::ClassInfos(KaxSegmentUID::Create, KaxSegmentUID_TheId, "SegmentUID", KaxSegmentUID_Context);
|
||||
const EbmlCallbacks KaxSegmentFilename::ClassInfos(KaxSegmentFilename::Create, KaxSegmentFilename_TheId, "SegmentFilename", KaxSegmentFilename_Context);
|
||||
const EbmlCallbacks KaxPrevUID::ClassInfos(KaxPrevUID::Create, KaxPrevUID_TheId, "PrevUID", KaxPrevUID_Context);
|
||||
const EbmlCallbacks KaxPrevFilename::ClassInfos(KaxPrevFilename::Create, KaxPrevFilename_TheId, "PrevFilename", KaxPrevFilename_Context);
|
||||
const EbmlCallbacks KaxNextUID::ClassInfos(KaxNextUID::Create, KaxNextUID_TheId, "NextUID", KaxNextUID_Context);
|
||||
const EbmlCallbacks KaxNextFilename::ClassInfos(KaxNextFilename::Create, KaxNextFilename_TheId, "NextFilename", KaxNextFilename_Context);
|
||||
const EbmlCallbacks KaxTimecodeScale::ClassInfos(KaxTimecodeScale::Create, KaxTimecodeScale_TheId, "TimecodeScale", KaxTimecodeScale_Context);
|
||||
const EbmlCallbacks KaxDuration::ClassInfos(KaxDuration::Create, KaxDuration_TheId, "Duration", KaxDuration_Context);
|
||||
const EbmlCallbacks KaxDateUTC::ClassInfos(KaxDateUTC::Create, KaxDateUTC_TheId, "DateUTC", KaxDateUTC_Context);
|
||||
const EbmlCallbacks KaxTitle::ClassInfos(KaxTitle::Create, KaxTitle_TheId, "Title", KaxTitle_Context);
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
181
src/add-ons/media/plugins/matroska/libmatroska/KaxSeekHead.cpp
Normal file
181
src/add-ons/media/plugins/matroska/libmatroska/KaxSeekHead.cpp
Normal file
@ -0,0 +1,181 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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: KaxSeekHead.cpp 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxSeekHead.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
#include "matroska/KaxSegment.h"
|
||||
#include "matroska/KaxCues.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
EbmlSemantic KaxSeekHead_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(true, false, KaxSeek::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxSeek_ContextList[2] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxSeekID::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxSeekPosition::ClassInfos),
|
||||
};
|
||||
|
||||
const EbmlSemanticContext KaxSeekHead_Context = EbmlSemanticContext(countof(KaxSeekHead_ContextList), KaxSeekHead_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &KaxSeekHead::ClassInfos);
|
||||
const EbmlSemanticContext KaxSeek_Context = EbmlSemanticContext(countof(KaxSeek_ContextList), KaxSeek_ContextList, &KaxSeekHead_Context, *GetKaxGlobal_Context, &KaxSeek::ClassInfos);
|
||||
const EbmlSemanticContext KaxSeekID_Context = EbmlSemanticContext(0, NULL, &KaxSeek_Context, *GetKaxGlobal_Context, &KaxSeekID::ClassInfos);
|
||||
const EbmlSemanticContext KaxSeekPosition_Context = EbmlSemanticContext(0, NULL, &KaxSeek_Context, *GetKaxGlobal_Context, &KaxSeekPosition::ClassInfos);
|
||||
|
||||
EbmlId KaxSeekHead_TheId (0x114D9B74, 4);
|
||||
EbmlId KaxSeek_TheId (0x4DBB, 2);
|
||||
EbmlId KaxSeekID_TheId (0x53AB, 2);
|
||||
EbmlId KaxSeekPosition_TheId(0x53AC, 2);
|
||||
|
||||
const EbmlCallbacks KaxSeekHead::ClassInfos(KaxSeekHead::Create, KaxSeekHead_TheId, "SeekHeader", KaxSeekHead_Context);
|
||||
const EbmlCallbacks KaxSeek::ClassInfos(KaxSeek::Create, KaxSeek_TheId, "SeekPoint", KaxSeek_Context);
|
||||
const EbmlCallbacks KaxSeekID::ClassInfos(KaxSeekID::Create, KaxSeekID_TheId, "SeekID", KaxSeekID_Context);
|
||||
const EbmlCallbacks KaxSeekPosition::ClassInfos(KaxSeekPosition::Create, KaxSeekPosition_TheId, "SeekPosition", KaxSeekPosition_Context);
|
||||
|
||||
KaxSeekHead::KaxSeekHead()
|
||||
:EbmlMaster(KaxSeekHead_Context)
|
||||
{}
|
||||
|
||||
KaxSeek::KaxSeek()
|
||||
:EbmlMaster(KaxSeek_Context)
|
||||
{}
|
||||
|
||||
/*!
|
||||
\todo verify that the element is not already in the list
|
||||
*/
|
||||
void KaxSeekHead::IndexThis(const EbmlElement & aElt, const KaxSegment & ParentSegment)
|
||||
{
|
||||
// create a new point
|
||||
KaxSeek & aNewPoint = AddNewChild<KaxSeek>(*this);
|
||||
|
||||
// add the informations to this element
|
||||
KaxSeekPosition & aNewPos = GetChild<KaxSeekPosition>(aNewPoint);
|
||||
*static_cast<EbmlUInteger *>(&aNewPos) = ParentSegment.GetRelativePosition(aElt);
|
||||
|
||||
KaxSeekID & aNewID = GetChild<KaxSeekID>(aNewPoint);
|
||||
binary ID[4];
|
||||
for (int i=aElt.Generic().GlobalId.Length; i>0; i--) {
|
||||
ID[4-i] = (aElt.Generic().GlobalId.Value >> 8*(i-1)) & 0xFF;
|
||||
}
|
||||
aNewID.CopyBuffer(ID, aElt.Generic().GlobalId.Length);
|
||||
}
|
||||
|
||||
KaxSeek * KaxSeekHead::FindFirstOf(const EbmlCallbacks & Callbacks) const
|
||||
{
|
||||
// parse all the Entries and find the first to match the type
|
||||
KaxSeek * aElt = static_cast<KaxSeek *>(FindFirstElt(KaxSeek::ClassInfos));
|
||||
while (aElt != NULL)
|
||||
{
|
||||
KaxSeekID * aId = NULL;
|
||||
for (unsigned int i = 0; i<aElt->ListSize(); i++) {
|
||||
if (EbmlId(*(*aElt)[i]) == KaxSeekID::ClassInfos.GlobalId) {
|
||||
aId = static_cast<KaxSeekID*>((*aElt)[i]);
|
||||
EbmlId aEbmlId(aId->GetBuffer(), aId->GetSize());
|
||||
if (aEbmlId == Callbacks.GlobalId)
|
||||
{
|
||||
return aElt;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
aElt = static_cast<KaxSeek *>(FindNextElt(*aElt));
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
KaxSeek * KaxSeekHead::FindNextOf(const KaxSeek &aPrev) const
|
||||
{
|
||||
unsigned int iIndex;
|
||||
KaxSeek *tmp;
|
||||
|
||||
// look for the previous in the list
|
||||
for (iIndex = 0; iIndex<ElementList.size(); iIndex++)
|
||||
{
|
||||
if (ElementList[iIndex] == static_cast<const EbmlElement*>(&aPrev))
|
||||
break;
|
||||
}
|
||||
|
||||
if (iIndex <ElementList.size()) {
|
||||
iIndex++;
|
||||
for (; iIndex<ElementList.size(); iIndex++)
|
||||
{
|
||||
if (EbmlId(*(ElementList[iIndex])) == KaxSeek::ClassInfos.GlobalId)
|
||||
{
|
||||
tmp = static_cast<KaxSeek *>(ElementList[iIndex]);
|
||||
if (tmp->IsEbmlId(aPrev))
|
||||
return tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int64 KaxSeek::Location() const
|
||||
{
|
||||
KaxSeekPosition *aPos = static_cast<KaxSeekPosition*>(FindFirstElt(KaxSeekPosition::ClassInfos));
|
||||
if (aPos == NULL)
|
||||
return 0;
|
||||
return uint64(*aPos);
|
||||
}
|
||||
|
||||
bool KaxSeek::IsEbmlId(const EbmlId & aId) const
|
||||
{
|
||||
KaxSeekID *_Id = static_cast<KaxSeekID*>(FindFirstElt(KaxSeekID::ClassInfos));
|
||||
if (_Id == NULL)
|
||||
return false;
|
||||
EbmlId aEbmlId(_Id->GetBuffer(), _Id->GetSize());
|
||||
return (aId == aEbmlId);
|
||||
}
|
||||
|
||||
bool KaxSeek::IsEbmlId(const KaxSeek & aPoint) const
|
||||
{
|
||||
KaxSeekID *_IdA = static_cast<KaxSeekID*>(FindFirstElt(KaxSeekID::ClassInfos));
|
||||
if (_IdA == NULL)
|
||||
return false;
|
||||
KaxSeekID *_IdB = static_cast<KaxSeekID*>(aPoint.FindFirstElt(KaxSeekID::ClassInfos));
|
||||
if (_IdB == NULL)
|
||||
return false;
|
||||
EbmlId aEbmlIdA(_IdA->GetBuffer(), _IdA->GetSize());
|
||||
EbmlId aEbmlIdB(_IdB->GetBuffer(), _IdB->GetSize());
|
||||
return (aEbmlIdA == aEbmlIdB);
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
111
src/add-ons/media/plugins/matroska/libmatroska/KaxSegment.cpp
Normal file
111
src/add-ons/media/plugins/matroska/libmatroska/KaxSegment.cpp
Normal file
@ -0,0 +1,111 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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 640 2004-07-09 21:05:36Z mosu $
|
||||
\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"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
EbmlSemantic KaxMatroska_ContextList[2] =
|
||||
{
|
||||
EbmlSemantic(true, true, EbmlHead::ClassInfos),
|
||||
EbmlSemantic(true, false, KaxSegment::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxSegment_ContextList[8] =
|
||||
{
|
||||
EbmlSemantic(false, false, KaxCluster::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxSeekHead::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxCues::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTracks::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxInfo::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxChapters::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxAttachments::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTags::ClassInfos),
|
||||
};
|
||||
|
||||
const EbmlSemanticContext KaxMatroska_Context = EbmlSemanticContext(countof(KaxMatroska_ContextList), KaxMatroska_ContextList, NULL, *GetKaxGlobal_Context, NULL);
|
||||
const EbmlSemanticContext KaxSegment_Context = EbmlSemanticContext(countof(KaxSegment_ContextList), KaxSegment_ContextList, NULL, *GetKaxGlobal_Context, &KaxSegment::ClassInfos);
|
||||
|
||||
EbmlId KaxSegment_TheId(0x18538067, 4);
|
||||
const EbmlCallbacks KaxSegment::ClassInfos(KaxSegment::Create, KaxSegment_TheId, "Segment", KaxSegment_Context);
|
||||
|
||||
KaxSegment::KaxSegment()
|
||||
:EbmlMaster(KaxSegment_Context)
|
||||
{
|
||||
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
|
||||
std::vector<EbmlElement *>::const_iterator Itr = ElementList.begin();
|
||||
while (Itr != ElementList.end())
|
||||
{
|
||||
if (EbmlId(**Itr) == KaxCluster::ClassInfos.GlobalId) {
|
||||
static_cast<KaxCluster *>(*Itr)->SetParent(*this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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
|
347
src/add-ons/media/plugins/matroska/libmatroska/KaxTag.cpp
Normal file
347
src/add-ons/media/plugins/matroska/libmatroska/KaxTag.cpp
Normal file
@ -0,0 +1,347 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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 733 2004-08-27 12:25:01Z 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
EbmlSemantic KaxTag_ContextList[14] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxTagTargets::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagGeneral::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagGenres::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagAudioSpecific::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagImageSpecific::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiCommercial::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiDate::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiEntity::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiIdentifier::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiLegal::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiTitle::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiAttachment::ClassInfos),
|
||||
// EbmlSemantic(false, false, KaxTagLength::ClassInfos),
|
||||
// EbmlSemantic(false, false, KaxTagPlaylistDelay::ClassInfos),
|
||||
// EbmlSemantic(false, false, KaxTagUnsynchronisedText::ClassInfos),
|
||||
// EbmlSemantic(false, false, KaxTagUserDefinedURL::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagMultiComment::ClassInfos),
|
||||
EbmlSemantic(true, false, KaxTagSimple::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagTargets_ContextList[6] =
|
||||
{
|
||||
EbmlSemantic(false, true, KaxTagTargetTypeValue::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagTargetType::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagTrackUID::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagEditionUID::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagChapterUID::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagAttachmentUID::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagGeneral_ContextList[17] =
|
||||
{
|
||||
EbmlSemantic(false, true, KaxTagArchivalLocation::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagFile::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagKeywords::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMood::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagRecordLocation::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagSource::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagSourceForm::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagProduct::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagOriginalMediaType::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagPlayCounter::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagPopularimeter::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagSubject::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagBibliography::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagLanguage::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagRating::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagEncoder::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagEncodeSettings::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagGenres_ContextList[3] =
|
||||
{
|
||||
EbmlSemantic(false, false, KaxTagAudioGenre::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagVideoGenre::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagSubGenre::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagAudioSpecific_ContextList[10] =
|
||||
{
|
||||
EbmlSemantic(false, true, KaxTagAudioPeak::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagAudioEncryption::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagAudioGain::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagBPM::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagDiscTrack::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagSetPart::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagEqualisation::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagInitialKey::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagOfficialAudioFileURL::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagOfficialAudioSourceURL::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagImageSpecific_ContextList[6] =
|
||||
{
|
||||
EbmlSemantic(false, true, KaxTagCaptureDPI::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagCaptureLightness::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagCapturePaletteSetting::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagCaptureSharpness::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagCropped::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagOriginalDimensions::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagSimple_ContextList[6] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxTagName::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxTagLangue::ClassInfos),
|
||||
EbmlSemantic(true, true, KaxTagDefault::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagString::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagBinary::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagSimple::ClassInfos),
|
||||
};
|
||||
|
||||
const EbmlSemanticContext KaxTag_Context = EbmlSemanticContext(countof(KaxTag_ContextList), KaxTag_ContextList, &KaxTags_Context, *GetKaxTagsGlobal_Context, &KaxTag::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagTargets_Context = EbmlSemanticContext(countof(KaxTagTargets_ContextList), KaxTagTargets_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &KaxTagTargets::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagGeneral_Context = EbmlSemanticContext(countof(KaxTagGeneral_ContextList), KaxTagGeneral_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &KaxTagGeneral::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagGenres_Context = EbmlSemanticContext(countof(KaxTagGenres_ContextList), KaxTagGenres_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &KaxTagGenres::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagAudioSpecific_Context = EbmlSemanticContext(countof(KaxTagAudioSpecific_ContextList), KaxTagAudioSpecific_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &KaxTagAudioSpecific::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagImageSpecific_Context = EbmlSemanticContext(countof(KaxTagImageSpecific_ContextList), KaxTagImageSpecific_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &KaxTagImageSpecific::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagBibliography_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &KaxTagBibliography::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagEncoder_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &KaxTagEncoder::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagEncodeSettings_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &KaxTagEncodeSettings::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagLanguage_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &KaxTagLanguage::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagLength_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &KaxTagLength::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagPlaylistDelay_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &KaxTagPlaylistDelay::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagRating_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &KaxTagRating::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagSubject_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &KaxTagSubject::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagUnsynchronisedText_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &KaxTagUnsynchronisedText::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagUserDefinedURL_Context = EbmlSemanticContext(0, NULL, &KaxTag_Context, *GetKaxGlobal_Context, &KaxTagUserDefinedURL::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagTargetTypeValue_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &KaxTagTargetTypeValue::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagTargetType_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &KaxTagTargetType::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagTrackUID_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &KaxTagTrackUID::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagEditionUID_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &KaxTagEditionUID::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagChapterUID_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &KaxTagChapterUID::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagAttachmentUID_Context = EbmlSemanticContext(0, NULL, &KaxTagTargets_Context, *GetKaxGlobal_Context, &KaxTagAttachmentUID::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagArchivalLocation_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &KaxTagArchivalLocation::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagFile_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &KaxTagFile::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagKeywords_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &KaxTagKeywords::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMood_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &KaxTagMood::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagRecordLocation_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &KaxTagRecordLocation::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagSource_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &KaxTagSource::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagSourceForm_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &KaxTagSourceForm::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagProduct_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &KaxTagProduct::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagOriginalMediaType_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &KaxTagOriginalMediaType::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagPlayCounter_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &KaxTagPlayCounter::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagPopularimeter_Context = EbmlSemanticContext(0, NULL, &KaxTagGeneral_Context, *GetKaxGlobal_Context, &KaxTagPopularimeter::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagAudioGenre_Context = EbmlSemanticContext(0, NULL, &KaxTagGenres_Context, *GetKaxGlobal_Context, &KaxTagAudioGenre::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagVideoGenre_Context = EbmlSemanticContext(0, NULL, &KaxTagGenres_Context, *GetKaxGlobal_Context, &KaxTagVideoGenre::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagSubGenre_Context = EbmlSemanticContext(0, NULL, &KaxTagGenres_Context, *GetKaxGlobal_Context, &KaxTagSubGenre::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagAudioEncryption_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &KaxTagAudioEncryption::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagAudioGain_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &KaxTagAudioGain::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagAudioPeak_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &KaxTagAudioPeak::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagBPM_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &KaxTagBPM::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagDiscTrack_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &KaxTagDiscTrack::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagSetPart_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &KaxTagSetPart::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagEqualisation_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &KaxTagEqualisation::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagInitialKey_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &KaxTagInitialKey::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagOfficialAudioFileURL_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &KaxTagOfficialAudioFileURL::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagOfficialAudioSourceURL_Context = EbmlSemanticContext(0, NULL, &KaxTagAudioSpecific_Context, *GetKaxGlobal_Context, &KaxTagOfficialAudioSourceURL::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagCaptureDPI_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &KaxTagCaptureDPI::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagCaptureLightness_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &KaxTagCaptureLightness::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagCapturePaletteSetting_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &KaxTagCapturePaletteSetting::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagCaptureSharpness_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &KaxTagCaptureSharpness::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagCropped_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &KaxTagCropped::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagOriginalDimensions_Context = EbmlSemanticContext(0, NULL, &KaxTagImageSpecific_Context, *GetKaxGlobal_Context, &KaxTagOriginalDimensions::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxTagSimple_Context = EbmlSemanticContext(countof(KaxTagSimple_ContextList), KaxTagSimple_ContextList, &KaxTag_Context, *GetKaxGlobal_Context, &KaxTagSimple::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagName_Context = EbmlSemanticContext(0, NULL, &KaxTagSimple_Context, *GetKaxGlobal_Context, &KaxTagName::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagLangue_Context = EbmlSemanticContext(0, NULL, &KaxTagSimple_Context, *GetKaxGlobal_Context, &KaxTagLangue::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagDefault_Context = EbmlSemanticContext(0, NULL, &KaxTagSimple_Context, *GetKaxGlobal_Context, &KaxTagDefault::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagString_Context = EbmlSemanticContext(0, NULL, &KaxTagSimple_Context, *GetKaxGlobal_Context, &KaxTagString::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagBinary_Context = EbmlSemanticContext(0, NULL, &KaxTagSimple_Context, *GetKaxGlobal_Context, &KaxTagBinary::ClassInfos);
|
||||
|
||||
EbmlId KaxTag_TheId (0x7373, 2);
|
||||
EbmlId KaxTagTargets_TheId (0x63C0, 2);
|
||||
EbmlId KaxTagGeneral_TheId (0x67C9, 2);
|
||||
EbmlId KaxTagGenres_TheId (0x6583, 2);
|
||||
EbmlId KaxTagAudioSpecific_TheId (0x41C5, 2);
|
||||
EbmlId KaxTagImageSpecific_TheId (0x4990, 2);
|
||||
EbmlId KaxTagBibliography_TheId (0x4488, 2);
|
||||
EbmlId KaxTagEncoder_TheId (0x4431, 2);
|
||||
EbmlId KaxTagEncodeSettings_TheId (0x6526, 2);
|
||||
EbmlId KaxTagLanguage_TheId (0x22B59F, 3);
|
||||
EbmlId KaxTagLength_TheId (0x5243, 2);
|
||||
EbmlId KaxTagPlaylistDelay_TheId (0x72CC, 2);
|
||||
EbmlId KaxTagRating_TheId (0x52BC, 2);
|
||||
EbmlId KaxTagSubject_TheId (0x49C1, 2);
|
||||
EbmlId KaxTagUnsynchronisedText_TheId (0x874B, 2);
|
||||
EbmlId KaxTagUserDefinedURL_TheId (0x434A, 2);
|
||||
EbmlId KaxTagTargetTypeValue_TheId (0x68CA, 2);
|
||||
EbmlId KaxTagTargetType_TheId (0x63CA, 2);
|
||||
EbmlId KaxTagTrackUID_TheId (0x63C5, 2);
|
||||
EbmlId KaxTagEditionUID_TheId (0x63C9, 2);
|
||||
EbmlId KaxTagChapterUID_TheId (0x63C4, 2);
|
||||
EbmlId KaxTagAttachmentUID_TheId (0x63C6, 2);
|
||||
EbmlId KaxTagAudioGenre_TheId (0x65C2, 2);
|
||||
EbmlId KaxTagVideoGenre_TheId (0x65A1, 2);
|
||||
EbmlId KaxTagSubGenre_TheId (0x65AC, 2);
|
||||
EbmlId KaxTagAudioEncryption_TheId (0x41B4, 2);
|
||||
EbmlId KaxTagAudioGain_TheId (0x4199, 2);
|
||||
EbmlId KaxTagAudioPeak_TheId (0x4189, 2);
|
||||
EbmlId KaxTagBPM_TheId (0x41A1, 2);
|
||||
EbmlId KaxTagDiscTrack_TheId (0x41B6, 2);
|
||||
EbmlId KaxTagSetPart_TheId (0x416E, 2);
|
||||
EbmlId KaxTagEqualisation_TheId (0x41B1, 2);
|
||||
EbmlId KaxTagInitialKey_TheId (0x413A, 2);
|
||||
EbmlId KaxTagOfficialAudioFileURL_TheId (0x4133, 2);
|
||||
EbmlId KaxTagOfficialAudioSourceURL_TheId(0x413E, 2);
|
||||
EbmlId KaxTagArchivalLocation_TheId (0x45A4, 2);
|
||||
EbmlId KaxTagFile_TheId (0x454E, 2);
|
||||
EbmlId KaxTagKeywords_TheId (0x458C, 2);
|
||||
EbmlId KaxTagMood_TheId (0x45AE, 2);
|
||||
EbmlId KaxTagRecordLocation_TheId (0x457E, 2);
|
||||
EbmlId KaxTagSource_TheId (0x458A, 2);
|
||||
EbmlId KaxTagSourceForm_TheId (0x45B5, 2);
|
||||
EbmlId KaxTagProduct_TheId (0x45E3, 2);
|
||||
EbmlId KaxTagOriginalMediaType_TheId (0x45A7, 2);
|
||||
EbmlId KaxTagPlayCounter_TheId (0x4566, 2);
|
||||
EbmlId KaxTagPopularimeter_TheId (0x4532, 2);
|
||||
EbmlId KaxTagCaptureDPI_TheId (0x49C7, 2);
|
||||
EbmlId KaxTagCaptureLightness_TheId (0x49E1, 2);
|
||||
EbmlId KaxTagCapturePaletteSetting_TheId (0x4934, 2);
|
||||
EbmlId KaxTagCaptureSharpness_TheId (0x4922, 2);
|
||||
EbmlId KaxTagCropped_TheId (0x4987, 2);
|
||||
EbmlId KaxTagOriginalDimensions_TheId (0x4933, 2);
|
||||
|
||||
EbmlId KaxTagSimple_TheId (0x67C8, 2);
|
||||
EbmlId KaxTagName_TheId (0x45A3, 2);
|
||||
EbmlId KaxTagLangue_TheId (0x447A, 2);
|
||||
EbmlId KaxTagDefault_TheId (0x44B4, 2);
|
||||
EbmlId KaxTagString_TheId (0x4487, 2);
|
||||
EbmlId KaxTagBinary_TheId (0x4485, 2);
|
||||
|
||||
const EbmlCallbacks KaxTag::ClassInfos(KaxTag::Create, KaxTag_TheId, "Tag", KaxTag_Context);
|
||||
const EbmlCallbacks KaxTagTargets::ClassInfos(KaxTagTargets::Create, KaxTagTargets_TheId, "TagTargets", KaxTagTargets_Context);
|
||||
const EbmlCallbacks KaxTagGeneral::ClassInfos(KaxTagGeneral::Create, KaxTagGeneral_TheId, "TagGeneral", KaxTagGeneral_Context);
|
||||
const EbmlCallbacks KaxTagGenres::ClassInfos(KaxTagGenres::Create, KaxTagGenres_TheId, "TagGenres", KaxTagGenres_Context);
|
||||
const EbmlCallbacks KaxTagAudioSpecific::ClassInfos(KaxTagAudioSpecific::Create, KaxTagAudioSpecific_TheId, "TagAudioSpecific", KaxTagAudioSpecific_Context);
|
||||
const EbmlCallbacks KaxTagImageSpecific::ClassInfos(KaxTagImageSpecific::Create, KaxTagImageSpecific_TheId, "TagImageSpecific", KaxTagImageSpecific_Context);
|
||||
const EbmlCallbacks KaxTagBibliography::ClassInfos(KaxTagBibliography::Create, KaxTagBibliography_TheId, "Bibliography", KaxTagBibliography_Context);
|
||||
const EbmlCallbacks KaxTagCaptureDPI::ClassInfos(KaxTagCaptureDPI::Create, KaxTagCaptureDPI_TheId, "CaptureDPI", KaxTagCaptureDPI_Context);
|
||||
const EbmlCallbacks KaxTagCaptureLightness::ClassInfos(KaxTagCaptureLightness::Create, KaxTagCaptureLightness_TheId, "CaptureLightness", KaxTagCaptureLightness_Context);
|
||||
const EbmlCallbacks KaxTagCapturePaletteSetting::ClassInfos(KaxTagCapturePaletteSetting::Create, KaxTagCapturePaletteSetting_TheId, "CapturePaletteSetting", KaxTagCapturePaletteSetting_Context);
|
||||
const EbmlCallbacks KaxTagCaptureSharpness::ClassInfos(KaxTagCaptureSharpness::Create, KaxTagCaptureSharpness_TheId, "CaptureSharpness", KaxTagCaptureSharpness_Context);
|
||||
const EbmlCallbacks KaxTagCropped::ClassInfos(KaxTagCropped::Create, KaxTagCropped_TheId, "Cropped", KaxTagCropped_Context);
|
||||
const EbmlCallbacks KaxTagEncoder::ClassInfos(KaxTagEncoder::Create, KaxTagEncoder_TheId, "Encoder", KaxTagEncoder_Context);
|
||||
const EbmlCallbacks KaxTagEncodeSettings::ClassInfos(KaxTagEncodeSettings::Create, KaxTagEncodeSettings_TheId, "EncodeSettings", KaxTagEncodeSettings_Context);
|
||||
const EbmlCallbacks KaxTagLanguage::ClassInfos(KaxTagLanguage::Create, KaxTagLanguage_TheId, "Language", KaxTagLanguage_Context);
|
||||
const EbmlCallbacks KaxTagLength::ClassInfos(KaxTagLength::Create, KaxTagLength_TheId, "Length", KaxTagLength_Context);
|
||||
const EbmlCallbacks KaxTagOriginalDimensions::ClassInfos(KaxTagOriginalDimensions::Create, KaxTagOriginalDimensions_TheId, "OriginalDimensions", KaxTagOriginalDimensions_Context);
|
||||
const EbmlCallbacks KaxTagPlaylistDelay::ClassInfos(KaxTagPlaylistDelay::Create, KaxTagPlaylistDelay_TheId, "PlaylistDelay", KaxTagPlaylistDelay_Context);
|
||||
const EbmlCallbacks KaxTagRating::ClassInfos(KaxTagRating::Create, KaxTagRating_TheId, "Rating", KaxTagRating_Context);
|
||||
const EbmlCallbacks KaxTagSubject::ClassInfos(KaxTagSubject::Create, KaxTagSubject_TheId, "Subject", KaxTagSubject_Context);
|
||||
const EbmlCallbacks KaxTagUnsynchronisedText::ClassInfos(KaxTagUnsynchronisedText::Create, KaxTagUnsynchronisedText_TheId, "UnsynchronisedText", KaxTagUnsynchronisedText_Context);
|
||||
const EbmlCallbacks KaxTagUserDefinedURL::ClassInfos(KaxTagUserDefinedURL::Create, KaxTagUserDefinedURL_TheId, "UserDefinedURL", KaxTagUserDefinedURL_Context);
|
||||
const EbmlCallbacks KaxTagTargetTypeValue::ClassInfos(KaxTagTargetTypeValue::Create, KaxTagTargetTypeValue_TheId, "TagTargetTypeValue", KaxTagTargetTypeValue_Context);
|
||||
const EbmlCallbacks KaxTagTargetType::ClassInfos(KaxTagTargetType::Create, KaxTagTargetType_TheId, "TagTargetType", KaxTagTargetType_Context);
|
||||
const EbmlCallbacks KaxTagTrackUID::ClassInfos(KaxTagTrackUID::Create, KaxTagTrackUID_TheId, "TagTrackUID", KaxTagTrackUID_Context);
|
||||
const EbmlCallbacks KaxTagEditionUID::ClassInfos(KaxTagEditionUID::Create, KaxTagEditionUID_TheId, "TagEditionUID", KaxTagEditionUID_Context);
|
||||
const EbmlCallbacks KaxTagChapterUID::ClassInfos(KaxTagChapterUID::Create, KaxTagChapterUID_TheId, "TagChapterUID", KaxTagChapterUID_Context);
|
||||
const EbmlCallbacks KaxTagAttachmentUID::ClassInfos(KaxTagAttachmentUID::Create, KaxTagAttachmentUID_TheId, "TagAttachmentUID", KaxTagAttachmentUID_Context);
|
||||
const EbmlCallbacks KaxTagAudioGenre::ClassInfos(KaxTagAudioGenre::Create, KaxTagAudioGenre_TheId, "AudioGenre", KaxTagAudioGenre_Context);
|
||||
const EbmlCallbacks KaxTagVideoGenre::ClassInfos(KaxTagVideoGenre::Create, KaxTagVideoGenre_TheId, "VideoGenre", KaxTagVideoGenre_Context);
|
||||
const EbmlCallbacks KaxTagSubGenre::ClassInfos(KaxTagSubGenre::Create, KaxTagSubGenre_TheId, "SubGenre", KaxTagSubGenre_Context);
|
||||
const EbmlCallbacks KaxTagAudioEncryption::ClassInfos(KaxTagAudioEncryption::Create, KaxTagAudioEncryption_TheId, "AudioEncryption", KaxTagAudioEncryption_Context);
|
||||
const EbmlCallbacks KaxTagAudioGain::ClassInfos(KaxTagAudioGain::Create, KaxTagAudioGain_TheId, "AudioGain", KaxTagAudioGain_Context);
|
||||
const EbmlCallbacks KaxTagAudioPeak::ClassInfos(KaxTagAudioPeak::Create, KaxTagAudioPeak_TheId, "AudioPeak", KaxTagAudioPeak_Context);
|
||||
const EbmlCallbacks KaxTagBPM::ClassInfos(KaxTagBPM::Create, KaxTagBPM_TheId, "BPM", KaxTagBPM_Context);
|
||||
const EbmlCallbacks KaxTagDiscTrack::ClassInfos(KaxTagDiscTrack::Create, KaxTagDiscTrack_TheId, "DiscTrack", KaxTagDiscTrack_Context);
|
||||
const EbmlCallbacks KaxTagSetPart::ClassInfos(KaxTagSetPart::Create, KaxTagSetPart_TheId, "SetPart", KaxTagSetPart_Context);
|
||||
const EbmlCallbacks KaxTagEqualisation::ClassInfos(KaxTagEqualisation::Create, KaxTagEqualisation_TheId, "Equalisation", KaxTagEqualisation_Context);
|
||||
const EbmlCallbacks KaxTagInitialKey::ClassInfos(KaxTagInitialKey::Create, KaxTagInitialKey_TheId, "InitialKey", KaxTagInitialKey_Context);
|
||||
const EbmlCallbacks KaxTagOfficialAudioFileURL::ClassInfos(KaxTagOfficialAudioFileURL::Create, KaxTagOfficialAudioFileURL_TheId, "OfficialAudioFileURL", KaxTagOfficialAudioFileURL_Context);
|
||||
const EbmlCallbacks KaxTagOfficialAudioSourceURL::ClassInfos(KaxTagOfficialAudioSourceURL::Create, KaxTagOfficialAudioSourceURL_TheId, "AudioSourceURL", KaxTagOfficialAudioSourceURL_Context);
|
||||
const EbmlCallbacks KaxTagArchivalLocation::ClassInfos(KaxTagArchivalLocation::Create, KaxTagArchivalLocation_TheId, "ArchivalLocation", KaxTagArchivalLocation_Context);
|
||||
const EbmlCallbacks KaxTagFile::ClassInfos(KaxTagFile::Create, KaxTagFile_TheId, "File", KaxTagFile_Context);
|
||||
const EbmlCallbacks KaxTagKeywords::ClassInfos(KaxTagKeywords::Create, KaxTagKeywords_TheId, "Keywords", KaxTagKeywords_Context);
|
||||
const EbmlCallbacks KaxTagMood::ClassInfos(KaxTagMood::Create, KaxTagMood_TheId, "Mood", KaxTagMood_Context);
|
||||
const EbmlCallbacks KaxTagRecordLocation::ClassInfos(KaxTagRecordLocation::Create, KaxTagRecordLocation_TheId, "RecordLocation", KaxTagRecordLocation_Context);
|
||||
const EbmlCallbacks KaxTagSource::ClassInfos(KaxTagSource::Create, KaxTagSource_TheId, "Source", KaxTagSource_Context);
|
||||
const EbmlCallbacks KaxTagSourceForm::ClassInfos(KaxTagSourceForm::Create, KaxTagSourceForm_TheId, "SourceForm", KaxTagSourceForm_Context);
|
||||
const EbmlCallbacks KaxTagProduct::ClassInfos(KaxTagProduct::Create, KaxTagProduct_TheId, "Product", KaxTagProduct_Context);
|
||||
const EbmlCallbacks KaxTagOriginalMediaType::ClassInfos(KaxTagOriginalMediaType::Create, KaxTagOriginalMediaType_TheId, "OriginalMediaType", KaxTagOriginalMediaType_Context);
|
||||
const EbmlCallbacks KaxTagPlayCounter::ClassInfos(KaxTagPlayCounter::Create, KaxTagPlayCounter_TheId, "PlayCounter", KaxTagPlayCounter_Context);
|
||||
const EbmlCallbacks KaxTagPopularimeter::ClassInfos(KaxTagPopularimeter::Create, KaxTagPopularimeter_TheId, "Popularimeter", KaxTagPopularimeter_Context);
|
||||
|
||||
const EbmlCallbacks KaxTagSimple::ClassInfos(KaxTagSimple::Create, KaxTagSimple_TheId, "TagSimple", KaxTagSimple_Context);
|
||||
const EbmlCallbacks KaxTagName::ClassInfos(KaxTagName::Create, KaxTagName_TheId, "TagName", KaxTagName_Context);
|
||||
const EbmlCallbacks KaxTagLangue::ClassInfos(KaxTagLangue::Create, KaxTagLangue_TheId, "TagLanguage", KaxTagLangue_Context);
|
||||
const EbmlCallbacks KaxTagDefault::ClassInfos(KaxTagDefault::Create, KaxTagDefault_TheId, "TagDefault", KaxTagDefault_Context);
|
||||
const EbmlCallbacks KaxTagString::ClassInfos(KaxTagString::Create, KaxTagString_TheId, "TagString", KaxTagString_Context);
|
||||
const EbmlCallbacks KaxTagBinary::ClassInfos(KaxTagBinary::Create, KaxTagBinary_TheId, "TagBinary", KaxTagBinary_Context);
|
||||
|
||||
KaxTag::KaxTag()
|
||||
:EbmlMaster(KaxTag_Context)
|
||||
{}
|
||||
|
||||
KaxTagTargets::KaxTagTargets()
|
||||
:EbmlMaster(KaxTagTargets_Context)
|
||||
{}
|
||||
|
||||
KaxTagGeneral::KaxTagGeneral()
|
||||
:EbmlMaster(KaxTagGeneral_Context)
|
||||
{}
|
||||
|
||||
KaxTagGenres::KaxTagGenres()
|
||||
:EbmlMaster(KaxTagGenres_Context)
|
||||
{}
|
||||
|
||||
KaxTagAudioSpecific::KaxTagAudioSpecific()
|
||||
:EbmlMaster(KaxTagAudioSpecific_Context)
|
||||
{}
|
||||
|
||||
KaxTagImageSpecific::KaxTagImageSpecific()
|
||||
:EbmlMaster(KaxTagImageSpecific_Context)
|
||||
{}
|
||||
|
||||
KaxTagSimple::KaxTagSimple()
|
||||
:EbmlMaster(KaxTagSimple_Context)
|
||||
{}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
404
src/add-ons/media/plugins/matroska/libmatroska/KaxTagMulti.cpp
Normal file
404
src/add-ons/media/plugins/matroska/libmatroska/KaxTagMulti.cpp
Normal file
@ -0,0 +1,404 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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: KaxTagMulti.cpp 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Jory Stone <jcsston @ toughguy.net>
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxTagMulti.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
EbmlSemantic KaxTagMultiGlobal_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(false, false, KaxTagMultiComment::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagMultiComment_ContextList[3] =
|
||||
{
|
||||
EbmlSemantic(false, true, KaxTagMultiCommentName::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiCommentComments::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiCommentLanguage::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagMultiCommercial_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(true, false, KaxTagCommercial::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagCommercial_ContextList[5] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxTagMultiCommercialType::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiCommercialAddress::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagMultiCommercialURL::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagMultiCommercialEmail::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagMultiPrice::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagMultiPrice_ContextList[3] =
|
||||
{
|
||||
EbmlSemantic(false, true, KaxTagMultiPriceCurrency::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiPriceAmount::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiPricePriceDate::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagMultiDate_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(true, false, KaxTagDate::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagDate_ContextList[3] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxTagMultiDateType::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiDateDateBegin::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiDateDateEnd::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagMultiEntity_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(true, false, KaxTagEntity::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagEntity_ContextList[5] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxTagMultiEntityType::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiEntityName::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagMultiEntityURL::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagMultiEntityEmail::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiEntityAddress::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagMultiIdentifier_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(true, false, KaxTagIdentifier::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagIdentifier_ContextList[3] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxTagMultiIdentifierType::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiIdentifierBinary::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiIdentifierString::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagMultiLegal_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(true, false, KaxTagLegal::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagLegal_ContextList[4] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxTagMultiLegalType::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiLegalContent::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagMultiLegalURL::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiLegalAddress::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagMultiTitle_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(true, false, KaxTagTitle::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagTitle_ContextList[8] =
|
||||
{
|
||||
EbmlSemantic(true, true, KaxTagMultiTitleType::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiTitleName::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiTitleSubTitle::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiTitleEdition::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiTitleAddress::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagMultiTitleURL::ClassInfos),
|
||||
EbmlSemantic(false, false, KaxTagMultiTitleEmail::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTagMultiTitleLanguage::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagMultiAttachment_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(true, false, KaxTagAttachment::ClassInfos),
|
||||
};
|
||||
|
||||
EbmlSemantic KaxTagAttachment_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(false, true, KaxTagAttachmentID::ClassInfos),
|
||||
};
|
||||
|
||||
const EbmlSemanticContext KaxTagMultiGlobal_Context = EbmlSemanticContext(countof(KaxTagMultiGlobal_ContextList), KaxTagMultiGlobal_ContextList, NULL, *GetKaxGlobal_Context, NULL);
|
||||
|
||||
const EbmlSemanticContext KaxTagMultiComment_Context = EbmlSemanticContext(countof(KaxTagMultiComment_ContextList), KaxTagMultiComment_ContextList, &KaxTag_Context, *GetKaxGlobal_Context, &KaxTagMultiComment::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiCommentName_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiComment_Context, *GetKaxGlobal_Context, &KaxTagMultiCommentName::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiCommentComments_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiComment_Context, *GetKaxGlobal_Context, &KaxTagMultiCommentComments::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiCommentLanguage_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiComment_Context, *GetKaxGlobal_Context, &KaxTagMultiCommentLanguage::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxTagMultiCommercial_Context = EbmlSemanticContext(countof(KaxTagMultiCommercial_ContextList), KaxTagMultiCommercial_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &KaxTagMultiCommercial::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagCommercial_Context = EbmlSemanticContext(countof(KaxTagCommercial_ContextList), KaxTagCommercial_ContextList, &KaxTagMultiCommercial_Context, *GetKaxTagsGlobal_Context, &KaxTagCommercial::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiCommercialType_Context = EbmlSemanticContext(0, NULL, &KaxTagCommercial_Context, *GetKaxGlobal_Context, &KaxTagMultiCommercialType::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiCommercialAddress_Context = EbmlSemanticContext(0, NULL, &KaxTagCommercial_Context, *GetKaxGlobal_Context, &KaxTagMultiCommercialAddress::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiCommercialURL_Context = EbmlSemanticContext(0, NULL, &KaxTagCommercial_Context, *GetKaxGlobal_Context, &KaxTagMultiCommercialURL::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiCommercialEmail_Context = EbmlSemanticContext(0, NULL, &KaxTagCommercial_Context, *GetKaxGlobal_Context, &KaxTagMultiCommercialEmail::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxTagMultiPrice_Context = EbmlSemanticContext(countof(KaxTagMultiPrice_ContextList), KaxTagMultiPrice_ContextList, &KaxTagCommercial_Context, *GetKaxTagsGlobal_Context, &KaxTagMultiPrice::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiPriceCurrency_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiPrice_Context, *GetKaxGlobal_Context, &KaxTagMultiPriceCurrency::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiPriceAmount_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiPrice_Context, *GetKaxGlobal_Context, &KaxTagMultiPriceAmount::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiPricePriceDate_Context = EbmlSemanticContext(0, NULL, &KaxTagMultiPrice_Context, *GetKaxGlobal_Context, &KaxTagMultiPricePriceDate::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxTagMultiDate_Context = EbmlSemanticContext(countof(KaxTagMultiDate_ContextList), KaxTagMultiDate_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &KaxTagMultiDate::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagDate_Context = EbmlSemanticContext(countof(KaxTagDate_ContextList), KaxTagDate_ContextList, &KaxTagMultiDate_Context, *GetKaxTagsGlobal_Context, &KaxTagDate::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiDateType_Context = EbmlSemanticContext(0, NULL, &KaxTagDate_Context, *GetKaxGlobal_Context, &KaxTagMultiDateType::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiDateDateBegin_Context = EbmlSemanticContext(0, NULL, &KaxTagDate_Context, *GetKaxGlobal_Context, &KaxTagMultiDateDateBegin::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiDateDateEnd_Context = EbmlSemanticContext(0, NULL, &KaxTagDate_Context, *GetKaxGlobal_Context, &KaxTagMultiDateDateEnd::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxTagMultiEntity_Context = EbmlSemanticContext(countof(KaxTagMultiEntity_ContextList), KaxTagMultiEntity_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &KaxTagMultiEntity::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagEntity_Context = EbmlSemanticContext(countof(KaxTagEntity_ContextList), KaxTagEntity_ContextList, &KaxTagMultiEntity_Context, *GetKaxTagsGlobal_Context, &KaxTagEntity::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiEntityType_Context = EbmlSemanticContext(0, NULL, &KaxTagEntity_Context, *GetKaxGlobal_Context, &KaxTagMultiEntityType::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiEntityName_Context = EbmlSemanticContext(0, NULL, &KaxTagEntity_Context, *GetKaxGlobal_Context, &KaxTagMultiEntityName::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiEntityURL_Context = EbmlSemanticContext(0, NULL, &KaxTagEntity_Context, *GetKaxGlobal_Context, &KaxTagMultiEntityURL::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiEntityEmail_Context = EbmlSemanticContext(0, NULL, &KaxTagEntity_Context, *GetKaxGlobal_Context, &KaxTagMultiEntityEmail::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiEntityAddress_Context = EbmlSemanticContext(0, NULL, &KaxTagEntity_Context, *GetKaxGlobal_Context, &KaxTagMultiEntityAddress::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxTagMultiIdentifier_Context = EbmlSemanticContext(countof(KaxTagMultiIdentifier_ContextList), KaxTagMultiIdentifier_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &KaxTagMultiIdentifier::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagIdentifier_Context = EbmlSemanticContext(countof(KaxTagIdentifier_ContextList), KaxTagIdentifier_ContextList, &KaxTagMultiIdentifier_Context, *GetKaxTagsGlobal_Context, &KaxTagIdentifier::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiIdentifierType_Context = EbmlSemanticContext(0, NULL, &KaxTagIdentifier_Context, *GetKaxGlobal_Context, &KaxTagMultiIdentifierType::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiIdentifierBinary_Context = EbmlSemanticContext(0, NULL, &KaxTagIdentifier_Context, *GetKaxGlobal_Context, &KaxTagMultiIdentifierBinary::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiIdentifierString_Context = EbmlSemanticContext(0, NULL, &KaxTagIdentifier_Context, *GetKaxGlobal_Context, &KaxTagMultiIdentifierString::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxTagMultiLegal_Context = EbmlSemanticContext(countof(KaxTagMultiLegal_ContextList), KaxTagMultiLegal_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &KaxTagMultiLegal::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagLegal_Context = EbmlSemanticContext(countof(KaxTagLegal_ContextList), KaxTagLegal_ContextList, &KaxTagMultiLegal_Context, *GetKaxTagsGlobal_Context, &KaxTagLegal::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiLegalType_Context = EbmlSemanticContext(0, NULL, &KaxTagLegal_Context, *GetKaxGlobal_Context, &KaxTagMultiLegalType::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiLegalContent_Context = EbmlSemanticContext(0, NULL, &KaxTagLegal_Context, *GetKaxGlobal_Context, &KaxTagMultiLegalContent::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiLegalURL_Context = EbmlSemanticContext(0, NULL, &KaxTagLegal_Context, *GetKaxGlobal_Context, &KaxTagMultiLegalURL::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiLegalAddress_Context = EbmlSemanticContext(0, NULL, &KaxTagLegal_Context, *GetKaxGlobal_Context, &KaxTagMultiLegalAddress::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxTagMultiTitle_Context = EbmlSemanticContext(countof(KaxTagMultiTitle_ContextList), KaxTagMultiTitle_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &KaxTagMultiTitle::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagTitle_Context = EbmlSemanticContext(countof(KaxTagTitle_ContextList), KaxTagTitle_ContextList, &KaxTagMultiTitle_Context, *GetKaxTagsGlobal_Context, &KaxTagTitle::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiTitleType_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &KaxTagMultiTitleType::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiTitleName_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &KaxTagMultiTitleName::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiTitleSubTitle_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &KaxTagMultiTitleSubTitle::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiTitleEdition_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &KaxTagMultiTitleEdition::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiTitleAddress_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &KaxTagMultiTitleAddress::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiTitleURL_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &KaxTagMultiTitleURL::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiTitleEmail_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &KaxTagMultiTitleEmail::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagMultiTitleLanguage_Context = EbmlSemanticContext(0, NULL, &KaxTagTitle_Context, *GetKaxGlobal_Context, &KaxTagMultiTitleLanguage::ClassInfos);
|
||||
|
||||
const EbmlSemanticContext KaxTagMultiAttachment_Context = EbmlSemanticContext(countof(KaxTagMultiAttachment_ContextList), KaxTagMultiAttachment_ContextList, &KaxTag_Context, *GetKaxTagsGlobal_Context, &KaxTagMultiAttachment::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagAttachment_Context = EbmlSemanticContext(countof(KaxTagAttachment_ContextList), KaxTagAttachment_ContextList, &KaxTagMultiAttachment_Context, *GetKaxTagsGlobal_Context, &KaxTagAttachment::ClassInfos);
|
||||
const EbmlSemanticContext KaxTagAttachmentID_Context = EbmlSemanticContext(0, NULL, &KaxTagAttachment_Context, *GetKaxGlobal_Context, &KaxTagAttachmentID::ClassInfos);
|
||||
|
||||
//The Muti Elements
|
||||
EbmlId KaxTagMultiComment_TheId (0x5B7B, 2);
|
||||
EbmlId KaxTagMultiCommentName_TheId (0x5F7D, 2);
|
||||
EbmlId KaxTagMultiCommentComments_TheId (0x5F7C, 2);
|
||||
EbmlId KaxTagMultiCommentLanguage_TheId (0x22B59D, 3);
|
||||
|
||||
EbmlId KaxTagMultiCommercial_TheId (0x4DC7, 2);
|
||||
EbmlId KaxTagCommercial_TheId (0x4EC7, 2);
|
||||
EbmlId KaxTagMultiCommercialType_TheId (0x5BD7, 2);
|
||||
EbmlId KaxTagMultiCommercialAddress_TheId (0x5BBB, 2);
|
||||
EbmlId KaxTagMultiCommercialURL_TheId (0x5BDA, 2);
|
||||
EbmlId KaxTagMultiCommercialEmail_TheId (0x5BC0, 2);
|
||||
|
||||
EbmlId KaxTagMultiPrice_TheId (0x5BC3, 2);
|
||||
EbmlId KaxTagMultiPriceCurrency_TheId (0x5B6C, 2);
|
||||
EbmlId KaxTagMultiPriceAmount_TheId (0x5B6E, 2);
|
||||
EbmlId KaxTagMultiPricePriceDate_TheId (0x5B6F, 2);
|
||||
|
||||
EbmlId KaxTagMultiDate_TheId (0x4DC8, 2);
|
||||
EbmlId KaxTagDate_TheId (0x4EC8, 2);
|
||||
EbmlId KaxTagMultiDateType_TheId (0x5BD8, 2);
|
||||
EbmlId KaxTagMultiDateDateBegin_TheId (0x4460, 2);
|
||||
EbmlId KaxTagMultiDateDateEnd_TheId (0x4462, 2);
|
||||
|
||||
EbmlId KaxTagMultiEntity_TheId (0x4DC9, 2);
|
||||
EbmlId KaxTagEntity_TheId (0x4EC9, 2);
|
||||
EbmlId KaxTagMultiEntityType_TheId (0x5BD9, 2);
|
||||
EbmlId KaxTagMultiEntityName_TheId (0x5BED, 2);
|
||||
EbmlId KaxTagMultiEntityAddress_TheId (0x5BDC, 2);
|
||||
EbmlId KaxTagMultiEntityURL_TheId (0x5BDB, 2);
|
||||
EbmlId KaxTagMultiEntityEmail_TheId (0x5BC1, 2);
|
||||
|
||||
EbmlId KaxTagMultiIdentifier_TheId (0x4DC6, 2);
|
||||
EbmlId KaxTagIdentifier_TheId (0x4EC6, 2);
|
||||
EbmlId KaxTagMultiIdentifierType_TheId (0x5BAD, 2);
|
||||
EbmlId KaxTagMultiIdentifierBinary_TheId (0x6B67, 2);
|
||||
EbmlId KaxTagMultiIdentifierString_TheId (0x6B68, 2);
|
||||
|
||||
EbmlId KaxTagMultiLegal_TheId (0x4DC5, 2);
|
||||
EbmlId KaxTagLegal_TheId (0x4EC5, 2);
|
||||
EbmlId KaxTagMultiLegalType_TheId (0x5BBD, 2);
|
||||
EbmlId KaxTagMultiLegalContent_TheId (0x5BB2, 2);
|
||||
EbmlId KaxTagMultiLegalURL_TheId (0x5B34, 2);
|
||||
EbmlId KaxTagMultiLegalAddress_TheId (0x5B9B, 2);
|
||||
|
||||
EbmlId KaxTagMultiTitle_TheId (0x4DC4, 2);
|
||||
EbmlId KaxTagTitle_TheId (0x4EC4, 2);
|
||||
EbmlId KaxTagMultiTitleType_TheId (0x5B7D, 2);
|
||||
EbmlId KaxTagMultiTitleName_TheId (0x5BB9, 2);
|
||||
EbmlId KaxTagMultiTitleSubTitle_TheId (0x5B5B, 2);
|
||||
EbmlId KaxTagMultiTitleEdition_TheId (0x5BAE, 2);
|
||||
EbmlId KaxTagMultiTitleAddress_TheId (0x5B33, 2);
|
||||
EbmlId KaxTagMultiTitleURL_TheId (0x5BA9, 2);
|
||||
EbmlId KaxTagMultiTitleEmail_TheId (0x5BC9, 2);
|
||||
EbmlId KaxTagMultiTitleLanguage_TheId (0x22B59E, 3);
|
||||
|
||||
EbmlId KaxTagMultiAttachment_TheId (0x4DC3, 2);
|
||||
EbmlId KaxTagAttachment_TheId (0x4EC3, 2);
|
||||
EbmlId KaxTagAttachmentID_TheId (0x5BA0, 2);
|
||||
|
||||
const EbmlCallbacks KaxTagMultiComment::ClassInfos(KaxTagMultiComment::Create, KaxTagMultiComment_TheId, "MultiComment", KaxTagMultiComment_Context);
|
||||
const EbmlCallbacks KaxTagMultiCommentName::ClassInfos(KaxTagMultiCommentName::Create, KaxTagMultiCommentName_TheId, "MultiCommentName", KaxTagMultiCommentName_Context);
|
||||
const EbmlCallbacks KaxTagMultiCommentComments::ClassInfos(KaxTagMultiCommentComments::Create, KaxTagMultiCommentComments_TheId, "MultiCommentComments", KaxTagMultiCommentComments_Context);
|
||||
const EbmlCallbacks KaxTagMultiCommentLanguage::ClassInfos(KaxTagMultiCommentLanguage::Create, KaxTagMultiCommentLanguage_TheId, "MultiCommentLanguage", KaxTagMultiCommentLanguage_Context);
|
||||
|
||||
const EbmlCallbacks KaxTagMultiCommercial::ClassInfos(KaxTagMultiCommercial::Create, KaxTagMultiCommercial_TheId, "MultiCommercial", KaxTagMultiCommercial_Context);
|
||||
const EbmlCallbacks KaxTagCommercial::ClassInfos(KaxTagCommercial::Create, KaxTagCommercial_TheId, "Commercial", KaxTagCommercial_Context);
|
||||
const EbmlCallbacks KaxTagMultiCommercialType::ClassInfos(KaxTagMultiCommercialType::Create, KaxTagMultiCommercialType_TheId, "MultiCommercialType", KaxTagMultiCommercialType_Context);
|
||||
const EbmlCallbacks KaxTagMultiCommercialAddress::ClassInfos(KaxTagMultiCommercialAddress::Create, KaxTagMultiCommercialAddress_TheId, "MultiCommercialAddress", KaxTagMultiCommercialAddress_Context);
|
||||
const EbmlCallbacks KaxTagMultiCommercialURL::ClassInfos(KaxTagMultiCommercialURL::Create, KaxTagMultiCommercialURL_TheId, "MultiCommercialURL", KaxTagMultiCommercialURL_Context);
|
||||
const EbmlCallbacks KaxTagMultiCommercialEmail::ClassInfos(KaxTagMultiCommercialEmail::Create, KaxTagMultiCommercialEmail_TheId, "MultiCommercialEmail", KaxTagMultiCommercialEmail_Context);
|
||||
|
||||
const EbmlCallbacks KaxTagMultiPrice::ClassInfos(KaxTagMultiPrice::Create, KaxTagMultiPrice_TheId, "MultiPrice", KaxTagMultiPrice_Context);
|
||||
const EbmlCallbacks KaxTagMultiPriceCurrency::ClassInfos(KaxTagMultiPriceCurrency::Create, KaxTagMultiPriceCurrency_TheId, "MultiPriceCurrency", KaxTagMultiPriceCurrency_Context);
|
||||
const EbmlCallbacks KaxTagMultiPriceAmount::ClassInfos(KaxTagMultiPriceAmount::Create, KaxTagMultiPriceAmount_TheId, "MultiPriceAmount", KaxTagMultiPriceAmount_Context);
|
||||
const EbmlCallbacks KaxTagMultiPricePriceDate::ClassInfos(KaxTagMultiPricePriceDate::Create, KaxTagMultiPricePriceDate_TheId, "MultiPricePriceDate", KaxTagMultiPricePriceDate_Context);
|
||||
|
||||
const EbmlCallbacks KaxTagMultiDate::ClassInfos(KaxTagMultiDate::Create, KaxTagMultiDate_TheId, "MultiDate", KaxTagMultiDate_Context);
|
||||
const EbmlCallbacks KaxTagDate::ClassInfos(KaxTagDate::Create, KaxTagDate_TheId, "Date", KaxTagDate_Context);
|
||||
const EbmlCallbacks KaxTagMultiDateType::ClassInfos(KaxTagMultiDateType::Create, KaxTagMultiDateType_TheId, "MultiDateType", KaxTagMultiDateType_Context);
|
||||
const EbmlCallbacks KaxTagMultiDateDateBegin::ClassInfos(KaxTagMultiDateDateBegin::Create, KaxTagMultiDateDateBegin_TheId, "MultiDateDateBegin", KaxTagMultiDateDateBegin_Context);
|
||||
const EbmlCallbacks KaxTagMultiDateDateEnd::ClassInfos(KaxTagMultiDateDateEnd::Create, KaxTagMultiDateDateEnd_TheId, "MultiDateDateEnd", KaxTagMultiDateDateEnd_Context);
|
||||
|
||||
const EbmlCallbacks KaxTagMultiEntity::ClassInfos(KaxTagMultiEntity::Create, KaxTagMultiEntity_TheId, "MultiEntity", KaxTagMultiEntity_Context);
|
||||
const EbmlCallbacks KaxTagEntity::ClassInfos(KaxTagEntity::Create, KaxTagEntity_TheId, "Entity", KaxTagEntity_Context);
|
||||
const EbmlCallbacks KaxTagMultiEntityType::ClassInfos(KaxTagMultiEntityType::Create, KaxTagMultiEntityType_TheId, "MultiEntityType", KaxTagMultiEntityType_Context);
|
||||
const EbmlCallbacks KaxTagMultiEntityName::ClassInfos(KaxTagMultiEntityName::Create, KaxTagMultiEntityName_TheId, "MultiEntityName", KaxTagMultiEntityName_Context);
|
||||
const EbmlCallbacks KaxTagMultiEntityURL::ClassInfos(KaxTagMultiEntityURL::Create, KaxTagMultiEntityURL_TheId, "MultiEntityURL", KaxTagMultiEntityURL_Context);
|
||||
const EbmlCallbacks KaxTagMultiEntityEmail::ClassInfos(KaxTagMultiEntityEmail::Create, KaxTagMultiEntityEmail_TheId, "MultiEntityEmail", KaxTagMultiEntityEmail_Context);
|
||||
const EbmlCallbacks KaxTagMultiEntityAddress::ClassInfos(KaxTagMultiEntityAddress::Create, KaxTagMultiEntityAddress_TheId, "MultiEntityAddress", KaxTagMultiEntityAddress_Context);
|
||||
|
||||
const EbmlCallbacks KaxTagMultiIdentifier::ClassInfos(KaxTagMultiIdentifier::Create, KaxTagMultiIdentifier_TheId, "MultiIdentifier", KaxTagMultiIdentifier_Context);
|
||||
const EbmlCallbacks KaxTagIdentifier::ClassInfos(KaxTagIdentifier::Create, KaxTagIdentifier_TheId, "Identifier", KaxTagIdentifier_Context);
|
||||
const EbmlCallbacks KaxTagMultiIdentifierType::ClassInfos(KaxTagMultiIdentifierType::Create, KaxTagMultiIdentifierType_TheId, "TagMultiIdentifierType", KaxTagMultiIdentifierType_Context);
|
||||
const EbmlCallbacks KaxTagMultiIdentifierBinary::ClassInfos(KaxTagMultiIdentifierBinary::Create, KaxTagMultiIdentifierBinary_TheId, "MultiIdentifierBinary", KaxTagMultiIdentifierBinary_Context);
|
||||
const EbmlCallbacks KaxTagMultiIdentifierString::ClassInfos(KaxTagMultiIdentifierString::Create, KaxTagMultiIdentifierString_TheId, "MultiIdentifierString", KaxTagMultiIdentifierString_Context);
|
||||
|
||||
const EbmlCallbacks KaxTagMultiLegal::ClassInfos(KaxTagMultiLegal::Create, KaxTagMultiLegal_TheId, "MultiLegal", KaxTagMultiLegal_Context);
|
||||
const EbmlCallbacks KaxTagLegal::ClassInfos(KaxTagLegal::Create, KaxTagLegal_TheId, "Legal", KaxTagLegal_Context);
|
||||
const EbmlCallbacks KaxTagMultiLegalType::ClassInfos(KaxTagMultiLegalType::Create, KaxTagMultiLegalType_TheId, "KaxTagMultiLegalType", KaxTagMultiLegalType_Context);
|
||||
const EbmlCallbacks KaxTagMultiLegalContent::ClassInfos(KaxTagMultiLegalContent::Create, KaxTagMultiLegalContent_TheId, "TagMultiLegalContent", KaxTagMultiLegalContent_Context);
|
||||
const EbmlCallbacks KaxTagMultiLegalURL::ClassInfos(KaxTagMultiLegalURL::Create, KaxTagMultiLegalURL_TheId, "KaxTagMultiLegalURL", KaxTagMultiLegalURL_Context);
|
||||
const EbmlCallbacks KaxTagMultiLegalAddress::ClassInfos(KaxTagMultiLegalAddress::Create, KaxTagMultiLegalAddress_TheId, "KaxTagMultiLegalAddress", KaxTagMultiLegalAddress_Context);
|
||||
|
||||
const EbmlCallbacks KaxTagMultiTitle::ClassInfos(KaxTagMultiTitle::Create, KaxTagMultiTitle_TheId, "MultiEntity", KaxTagMultiTitle_Context);
|
||||
const EbmlCallbacks KaxTagTitle::ClassInfos(KaxTagTitle::Create, KaxTagTitle_TheId, "Entity", KaxTagTitle_Context);
|
||||
const EbmlCallbacks KaxTagMultiTitleType::ClassInfos(KaxTagMultiTitleType::Create, KaxTagMultiTitleType_TheId, "MultiTitleType", KaxTagMultiTitleType_Context);
|
||||
const EbmlCallbacks KaxTagMultiTitleName::ClassInfos(KaxTagMultiTitleName::Create, KaxTagMultiTitleName_TheId, "MultiTitleName", KaxTagMultiTitleName_Context);
|
||||
const EbmlCallbacks KaxTagMultiTitleSubTitle::ClassInfos(KaxTagMultiTitleSubTitle::Create, KaxTagMultiTitleSubTitle_TheId, "MultiTitleSubTitle", KaxTagMultiTitleSubTitle_Context);
|
||||
const EbmlCallbacks KaxTagMultiTitleEdition::ClassInfos(KaxTagMultiTitleEdition::Create, KaxTagMultiTitleEdition_TheId, "MultiTitleEdition", KaxTagMultiTitleEdition_Context);
|
||||
const EbmlCallbacks KaxTagMultiTitleAddress::ClassInfos(KaxTagMultiTitleAddress::Create, KaxTagMultiTitleAddress_TheId, "MultiTitleAddress", KaxTagMultiTitleAddress_Context);
|
||||
const EbmlCallbacks KaxTagMultiTitleURL::ClassInfos(KaxTagMultiTitleURL::Create, KaxTagMultiTitleURL_TheId, "MultiTitleURL", KaxTagMultiTitleURL_Context);
|
||||
const EbmlCallbacks KaxTagMultiTitleEmail::ClassInfos(KaxTagMultiTitleEmail::Create, KaxTagMultiTitleEmail_TheId, "MultiTitleEmail", KaxTagMultiTitleEmail_Context);
|
||||
const EbmlCallbacks KaxTagMultiTitleLanguage::ClassInfos(KaxTagMultiTitleLanguage::Create, KaxTagMultiTitleLanguage_TheId, "MultiTitleLanguage", KaxTagMultiTitleLanguage_Context);
|
||||
|
||||
const EbmlCallbacks KaxTagMultiAttachment::ClassInfos(KaxTagMultiAttachment::Create, KaxTagMultiAttachment_TheId, "TagMultiAttachment", KaxTagMultiAttachment_Context);
|
||||
const EbmlCallbacks KaxTagAttachment::ClassInfos(KaxTagAttachment::Create, KaxTagAttachment_TheId, "TagAttachment", KaxTagAttachment_Context);
|
||||
const EbmlCallbacks KaxTagAttachmentID::ClassInfos(KaxTagAttachmentID::Create, KaxTagAttachmentID_TheId, "TagAttachmentID", KaxTagAttachmentID_Context);
|
||||
|
||||
KaxTagMultiComment::KaxTagMultiComment()
|
||||
:EbmlMaster(KaxTagMultiComment_Context)
|
||||
{}
|
||||
|
||||
|
||||
KaxTagMultiCommercial::KaxTagMultiCommercial()
|
||||
:EbmlMaster(KaxTagMultiCommercial_Context)
|
||||
{}
|
||||
|
||||
KaxTagCommercial::KaxTagCommercial()
|
||||
:EbmlMaster(KaxTagCommercial_Context)
|
||||
{}
|
||||
|
||||
KaxTagMultiPrice::KaxTagMultiPrice()
|
||||
:EbmlMaster(KaxTagMultiPrice_Context)
|
||||
{}
|
||||
|
||||
KaxTagMultiDate::KaxTagMultiDate()
|
||||
:EbmlMaster(KaxTagMultiDate_Context)
|
||||
{}
|
||||
|
||||
KaxTagDate::KaxTagDate()
|
||||
:EbmlMaster(KaxTagDate_Context)
|
||||
{}
|
||||
|
||||
KaxTagMultiEntity::KaxTagMultiEntity()
|
||||
:EbmlMaster(KaxTagMultiEntity_Context)
|
||||
{}
|
||||
|
||||
KaxTagEntity::KaxTagEntity()
|
||||
:EbmlMaster(KaxTagEntity_Context)
|
||||
{}
|
||||
|
||||
KaxTagMultiLegal::KaxTagMultiLegal()
|
||||
:EbmlMaster(KaxTagMultiLegal_Context)
|
||||
{}
|
||||
|
||||
KaxTagLegal::KaxTagLegal()
|
||||
:EbmlMaster(KaxTagLegal_Context)
|
||||
{}
|
||||
|
||||
KaxTagMultiIdentifier::KaxTagMultiIdentifier()
|
||||
:EbmlMaster(KaxTagMultiIdentifier_Context)
|
||||
{}
|
||||
|
||||
KaxTagIdentifier::KaxTagIdentifier()
|
||||
:EbmlMaster(KaxTagIdentifier_Context)
|
||||
{}
|
||||
|
||||
KaxTagMultiTitle::KaxTagMultiTitle()
|
||||
:EbmlMaster(KaxTagMultiTitle_Context)
|
||||
{}
|
||||
|
||||
KaxTagTitle::KaxTagTitle()
|
||||
:EbmlMaster(KaxTagTitle_Context)
|
||||
{}
|
||||
|
||||
KaxTagMultiAttachment::KaxTagMultiAttachment()
|
||||
:EbmlMaster(KaxTagMultiAttachment_Context)
|
||||
{}
|
||||
|
||||
KaxTagAttachment::KaxTagAttachment()
|
||||
:EbmlMaster(KaxTagAttachment_Context)
|
||||
{}
|
||||
|
||||
const EbmlSemanticContext & GetKaxTagsGlobal_Context()
|
||||
{
|
||||
return KaxTagMultiGlobal_Context;
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
60
src/add-ons/media/plugins/matroska/libmatroska/KaxTags.cpp
Normal file
60
src/add-ons/media/plugins/matroska/libmatroska/KaxTags.cpp
Normal file
@ -0,0 +1,60 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
// sub elements
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
EbmlSemantic KaxTags_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(true, false, KaxTag::ClassInfos),
|
||||
};
|
||||
|
||||
const EbmlSemanticContext KaxTags_Context = EbmlSemanticContext(countof(KaxTags_ContextList), KaxTags_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &KaxTags::ClassInfos);
|
||||
|
||||
EbmlId KaxTags_TheId(0x1254C367, 4);
|
||||
|
||||
const EbmlCallbacks KaxTags::ClassInfos(KaxTags::Create, KaxTags_TheId, "Tags", KaxTags_Context);
|
||||
|
||||
KaxTags::KaxTags()
|
||||
:EbmlMaster(KaxTags_Context)
|
||||
{}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
@ -0,0 +1,88 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#if MATROSKA_VERSION == 1
|
||||
const EbmlSemantic KaxTrackAudio_ContextList[4] =
|
||||
#else // MATROSKA_VERSION
|
||||
const EbmlSemantic KaxTrackAudio_ContextList[5] =
|
||||
#endif // MATROSKA_VERSION
|
||||
{
|
||||
EbmlSemantic(true , true, KaxAudioSamplingFreq::ClassInfos),
|
||||
EbmlSemantic(true , true, KaxAudioChannels::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxAudioBitDepth::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxAudioOutputSamplingFreq::ClassInfos),
|
||||
#if MATROSKA_VERSION >= 2
|
||||
EbmlSemantic(false, true, KaxAudioPosition::ClassInfos),
|
||||
#endif // MATROSKA_VERSION
|
||||
};
|
||||
|
||||
const EbmlSemanticContext KaxTrackAudio_Context = EbmlSemanticContext(countof(KaxTrackAudio_ContextList), KaxTrackAudio_ContextList, &KaxTrackEntry_Context, *GetKaxGlobal_Context, &KaxTrackAudio::ClassInfos);
|
||||
const EbmlSemanticContext KaxAudioSamplingFreq_Context = EbmlSemanticContext(0, NULL, &KaxTrackAudio_Context, *GetKaxGlobal_Context, &KaxAudioSamplingFreq::ClassInfos);
|
||||
const EbmlSemanticContext KaxAudioOutputSamplingFreq_Context = EbmlSemanticContext(0, NULL, &KaxTrackAudio_Context, *GetKaxGlobal_Context, &KaxAudioOutputSamplingFreq::ClassInfos);
|
||||
const EbmlSemanticContext KaxAudioChannels_Context = EbmlSemanticContext(0, NULL, &KaxTrackAudio_Context, *GetKaxGlobal_Context, &KaxAudioChannels::ClassInfos);
|
||||
const EbmlSemanticContext KaxAudioBitDepth_Context = EbmlSemanticContext(0, NULL, &KaxTrackAudio_Context, *GetKaxGlobal_Context, &KaxAudioBitDepth::ClassInfos);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
const EbmlSemanticContext KaxAudioPosition_Context = EbmlSemanticContext(0, NULL, &KaxTrackAudio_Context, *GetKaxGlobal_Context, &KaxAudioPosition::ClassInfos);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
EbmlId KaxTrackAudio_TheId (0xE1, 1);
|
||||
EbmlId KaxAudioSamplingFreq_TheId(0xB5, 1);
|
||||
EbmlId KaxAudioOutputSamplingFreq_TheId(0x78B5, 2);
|
||||
EbmlId KaxAudioChannels_TheId (0x9F, 1);
|
||||
EbmlId KaxAudioBitDepth_TheId (0x6264, 2);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
EbmlId KaxAudioPosition_TheId (0x7D7B, 2);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
const EbmlCallbacks KaxTrackAudio::ClassInfos(KaxTrackAudio::Create, KaxTrackAudio_TheId, "TrackAudio", KaxTrackAudio_Context);
|
||||
const EbmlCallbacks KaxAudioSamplingFreq::ClassInfos(KaxAudioSamplingFreq::Create, KaxAudioSamplingFreq_TheId, "AudioSamplingFreq", KaxAudioSamplingFreq_Context);
|
||||
const EbmlCallbacks KaxAudioOutputSamplingFreq::ClassInfos(KaxAudioOutputSamplingFreq::Create, KaxAudioOutputSamplingFreq_TheId, "AudioOutputSamplingFreq", KaxAudioOutputSamplingFreq_Context);
|
||||
const EbmlCallbacks KaxAudioChannels::ClassInfos(KaxAudioChannels::Create, KaxAudioChannels_TheId, "AudioChannels", KaxAudioChannels_Context);
|
||||
const EbmlCallbacks KaxAudioBitDepth::ClassInfos(KaxAudioBitDepth::Create, KaxAudioBitDepth_TheId, "AudioBitDepth", KaxAudioBitDepth_Context);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
const EbmlCallbacks KaxAudioPosition::ClassInfos(KaxAudioPosition::Create, KaxAudioPosition_TheId, "AudioPosition", KaxAudioPosition_Context);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
KaxTrackAudio::KaxTrackAudio()
|
||||
:EbmlMaster(KaxTrackAudio_Context)
|
||||
{}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
@ -0,0 +1,110 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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 640 2004-07-09 21:05:36Z mosu $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author John Cannon <spyder2555 @ users.sf.net>
|
||||
*/
|
||||
#include "matroska/KaxTrackEntryData.h"
|
||||
#include "matroska/KaxContexts.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
EbmlId KaxTrackNumber_TheId (0xD7, 1);
|
||||
EbmlId KaxTrackUID_TheId (0x73C5, 2);
|
||||
EbmlId KaxTrackType_TheId (0x83, 1);
|
||||
EbmlId KaxTrackFlagDefault_TheId (0x88, 1);
|
||||
EbmlId KaxTrackFlagLacing_TheId (0x9C, 1);
|
||||
EbmlId KaxTrackMinCache_TheId (0x6DE7, 2);
|
||||
EbmlId KaxTrackMaxCache_TheId (0x6DF8, 2);
|
||||
EbmlId KaxTrackDefaultDuration_TheId (0x23E383, 3);
|
||||
EbmlId KaxTrackTimecodeScale_TheId (0x23314F, 3);
|
||||
EbmlId KaxTrackName_TheId (0x536E, 2);
|
||||
EbmlId KaxTrackLanguage_TheId (0x22B59C, 3);
|
||||
EbmlId KaxCodecID_TheId (0x86, 1);
|
||||
EbmlId KaxCodecPrivate_TheId (0x63A2, 2);
|
||||
EbmlId KaxCodecName_TheId (0x258688, 3);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
EbmlId KaxTrackFlagEnabled_TheId (0xB9, 1);
|
||||
EbmlId KaxCodecSettings_TheId (0x3A9697, 3);
|
||||
EbmlId KaxCodecInfoURL_TheId (0x3B4040, 3);
|
||||
EbmlId KaxCodecDownloadURL_TheId (0x26B240, 3);
|
||||
EbmlId KaxCodecDecodeAll_TheId (0xAA, 1);
|
||||
EbmlId KaxTrackOverlay_TheId (0x6FAB, 2);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
const EbmlSemanticContext KaxTrackNumber_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxTrackNumber::ClassInfos);
|
||||
const EbmlSemanticContext KaxTrackUID_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxTrackUID::ClassInfos);
|
||||
const EbmlSemanticContext KaxTrackType_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxTrackType::ClassInfos);
|
||||
const EbmlSemanticContext KaxTrackFlagDefault_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxTrackFlagDefault::ClassInfos);
|
||||
const EbmlSemanticContext KaxTrackFlagLacing_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxTrackFlagLacing::ClassInfos);
|
||||
const EbmlSemanticContext KaxTrackMinCache_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxTrackMinCache::ClassInfos);
|
||||
const EbmlSemanticContext KaxTrackMaxCache_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxTrackMaxCache::ClassInfos);
|
||||
const EbmlSemanticContext KaxTrackDefaultDuration_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxTrackDefaultDuration::ClassInfos);
|
||||
const EbmlSemanticContext KaxTrackTimecodeScale_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxTrackTimecodeScale::ClassInfos);
|
||||
const EbmlSemanticContext KaxTrackName_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxTrackName::ClassInfos);
|
||||
const EbmlSemanticContext KaxTrackLanguage_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxTrackLanguage::ClassInfos);
|
||||
const EbmlSemanticContext KaxCodecID_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxCodecID::ClassInfos);
|
||||
const EbmlSemanticContext KaxCodecPrivate_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxCodecPrivate::ClassInfos);
|
||||
const EbmlSemanticContext KaxCodecName_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxCodecName::ClassInfos);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
const EbmlSemanticContext KaxTrackFlagEnabled_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxTrackFlagEnabled::ClassInfos);
|
||||
const EbmlSemanticContext KaxCodecSettings_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxCodecSettings::ClassInfos);
|
||||
const EbmlSemanticContext KaxCodecInfoURL_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxCodecInfoURL::ClassInfos);
|
||||
const EbmlSemanticContext KaxCodecDownloadURL_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxCodecDownloadURL::ClassInfos);
|
||||
const EbmlSemanticContext KaxCodecDecodeAll_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxCodecDecodeAll::ClassInfos);
|
||||
const EbmlSemanticContext KaxTrackOverlay_Context = EbmlSemanticContext(0, NULL, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxTrackOverlay::ClassInfos);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
const EbmlCallbacks KaxTrackNumber::ClassInfos(KaxTrackNumber::Create, KaxTrackNumber_TheId, "TrackNumber", KaxTrackNumber_Context);
|
||||
const EbmlCallbacks KaxTrackUID::ClassInfos(KaxTrackUID::Create, KaxTrackUID_TheId, "TrackUID", KaxTrackUID_Context);
|
||||
const EbmlCallbacks KaxTrackType::ClassInfos(KaxTrackType::Create, KaxTrackType_TheId, "TrackType", KaxTrackType_Context);
|
||||
const EbmlCallbacks KaxTrackFlagDefault::ClassInfos(KaxTrackFlagDefault::Create, KaxTrackFlagDefault_TheId, "TrackFlagDefault", KaxTrackFlagDefault_Context);
|
||||
const EbmlCallbacks KaxTrackFlagLacing::ClassInfos(KaxTrackFlagLacing::Create, KaxTrackFlagLacing_TheId, "TrackFlagLacing", KaxTrackFlagLacing_Context);
|
||||
const EbmlCallbacks KaxTrackMinCache::ClassInfos(KaxTrackMinCache::Create, KaxTrackMinCache_TheId, "TrackMinCache", KaxTrackMinCache_Context);
|
||||
const EbmlCallbacks KaxTrackMaxCache::ClassInfos(KaxTrackMaxCache::Create, KaxTrackMaxCache_TheId, "TrackMaxCache", KaxTrackMaxCache_Context);
|
||||
const EbmlCallbacks KaxTrackDefaultDuration::ClassInfos(KaxTrackDefaultDuration::Create, KaxTrackDefaultDuration_TheId, "TrackDefaultDuration", KaxTrackDefaultDuration_Context);
|
||||
const EbmlCallbacks KaxTrackTimecodeScale::ClassInfos(KaxTrackTimecodeScale::Create, KaxTrackTimecodeScale_TheId, "TrackTimecodeScale", KaxTrackTimecodeScale_Context);
|
||||
const EbmlCallbacks KaxTrackName::ClassInfos(KaxTrackName::Create, KaxTrackName_TheId, "TrackName", KaxTrackName_Context);
|
||||
const EbmlCallbacks KaxTrackLanguage::ClassInfos(KaxTrackLanguage::Create, KaxTrackLanguage_TheId, "TrackLanguage", KaxTrackLanguage_Context);
|
||||
const EbmlCallbacks KaxCodecID::ClassInfos(KaxCodecID::Create, KaxCodecID_TheId, "CodecID", KaxCodecID_Context);
|
||||
const EbmlCallbacks KaxCodecPrivate::ClassInfos(KaxCodecPrivate::Create, KaxCodecPrivate_TheId, "CodecPrivate", KaxCodecPrivate_Context);
|
||||
const EbmlCallbacks KaxCodecName::ClassInfos(KaxCodecName::Create, KaxCodecName_TheId, "CodecName", KaxCodecName_Context);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
const EbmlCallbacks KaxTrackFlagEnabled::ClassInfos(KaxTrackFlagEnabled::Create, KaxTrackFlagEnabled_TheId, "TrackFlagEnabled", KaxTrackFlagEnabled_Context);
|
||||
const EbmlCallbacks KaxCodecSettings::ClassInfos(KaxCodecSettings::Create, KaxCodecSettings_TheId, "CodecSettings", KaxCodecSettings_Context);
|
||||
const EbmlCallbacks KaxCodecInfoURL::ClassInfos(KaxCodecInfoURL::Create, KaxCodecInfoURL_TheId, "CodecInfoURL", KaxCodecInfoURL_Context);
|
||||
const EbmlCallbacks KaxCodecDownloadURL::ClassInfos(KaxCodecDownloadURL::Create, KaxCodecDownloadURL_TheId, "CodecDownloadURL", KaxCodecDownloadURL_Context);
|
||||
const EbmlCallbacks KaxCodecDecodeAll::ClassInfos(KaxCodecDecodeAll::Create, KaxCodecDecodeAll_TheId, "CodecDecodeAll", KaxCodecDecodeAll_Context);
|
||||
const EbmlCallbacks KaxTrackOverlay::ClassInfos(KaxTrackOverlay::Create, KaxTrackOverlay_TheId, "TrackOverlay", KaxTrackOverlay_Context);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
134
src/add-ons/media/plugins/matroska/libmatroska/KaxTrackVideo.cpp
Normal file
134
src/add-ons/media/plugins/matroska/libmatroska/KaxTrackVideo.cpp
Normal file
@ -0,0 +1,134 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#if MATROSKA_VERSION == 1
|
||||
const EbmlSemantic KaxTrackVideo_ContextList[10] =
|
||||
#else // MATROSKA_VERSION
|
||||
const EbmlSemantic KaxTrackVideo_ContextList[15] =
|
||||
#endif // MATROSKA_VERSION
|
||||
{
|
||||
EbmlSemantic(true , true, KaxVideoPixelWidth::ClassInfos),
|
||||
EbmlSemantic(true , true, KaxVideoPixelHeight::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxVideoPixelCropBottom::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxVideoPixelCropTop::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxVideoPixelCropLeft::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxVideoPixelCropRight::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxVideoDisplayWidth::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxVideoDisplayHeight::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxVideoColourSpace::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxVideoFrameRate::ClassInfos),
|
||||
#if MATROSKA_VERSION >= 2
|
||||
EbmlSemantic(true , true, KaxVideoFlagInterlaced::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxVideoStereoMode::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxVideoDisplayUnit::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxVideoAspectRatio::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxVideoGamma::ClassInfos),
|
||||
#endif // MATROSKA_VERSION
|
||||
};
|
||||
|
||||
const EbmlSemanticContext KaxTrackVideo_Context = EbmlSemanticContext(countof(KaxTrackVideo_ContextList), KaxTrackVideo_ContextList, &KaxTrackEntry_Context, *GetKaxGlobal_Context, &KaxTrackVideo::ClassInfos);
|
||||
const EbmlSemanticContext KaxVideoPixelWidth_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &KaxVideoPixelWidth::ClassInfos);
|
||||
const EbmlSemanticContext KaxVideoPixelHeight_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &KaxVideoPixelHeight::ClassInfos);
|
||||
const EbmlSemanticContext KaxVideoPixelCropBottom_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &KaxVideoPixelCropBottom::ClassInfos);
|
||||
const EbmlSemanticContext KaxVideoPixelCropTop_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &KaxVideoPixelCropTop::ClassInfos);
|
||||
const EbmlSemanticContext KaxVideoPixelCropRight_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &KaxVideoPixelCropLeft::ClassInfos);
|
||||
const EbmlSemanticContext KaxVideoPixelCropLeft_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &KaxVideoPixelCropRight::ClassInfos);
|
||||
const EbmlSemanticContext KaxVideoDisplayWidth_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &KaxVideoDisplayWidth::ClassInfos);
|
||||
const EbmlSemanticContext KaxVideoDisplayHeight_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &KaxVideoDisplayHeight::ClassInfos);
|
||||
const EbmlSemanticContext KaxVideoColourSpace_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &KaxVideoColourSpace::ClassInfos);
|
||||
const EbmlSemanticContext KaxVideoFrameRate_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &KaxVideoFrameRate::ClassInfos);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
const EbmlSemanticContext KaxVideoFlagInterlaced_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &KaxVideoFlagInterlaced::ClassInfos);
|
||||
const EbmlSemanticContext KaxVideoStereoMode_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &KaxVideoStereoMode::ClassInfos);
|
||||
const EbmlSemanticContext KaxVideoDisplayUnit_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &KaxVideoDisplayUnit::ClassInfos);
|
||||
const EbmlSemanticContext KaxVideoAspectRatio_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &KaxVideoAspectRatio::ClassInfos);
|
||||
const EbmlSemanticContext KaxVideoGamma_Context = EbmlSemanticContext(0, NULL, &KaxTrackVideo_Context, *GetKaxGlobal_Context, &KaxVideoGamma::ClassInfos);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
EbmlId KaxTrackVideo_TheId (0xE0, 1);
|
||||
EbmlId KaxVideoPixelWidth_TheId (0xB0, 1);
|
||||
EbmlId KaxVideoPixelHeight_TheId (0xBA, 1);
|
||||
EbmlId KaxVideoPixelCropBottom_TheId(0x54AA, 2);
|
||||
EbmlId KaxVideoPixelCropTop_TheId (0x54BB, 2);
|
||||
EbmlId KaxVideoPixelCropLeft_TheId (0x54CC, 2);
|
||||
EbmlId KaxVideoPixelCropRight_TheId (0x54DD, 2);
|
||||
EbmlId KaxVideoDisplayWidth_TheId (0x54B0, 2);
|
||||
EbmlId KaxVideoDisplayHeight_TheId (0x54BA, 2);
|
||||
EbmlId KaxVideoColourSpace_TheId (0x2EB524, 3);
|
||||
EbmlId KaxVideoFrameRate_TheId (0x2383E3, 3);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
EbmlId KaxVideoFlagInterlaced_TheId (0x9A, 1);
|
||||
EbmlId KaxVideoStereoMode_TheId (0x53B9, 2);
|
||||
EbmlId KaxVideoDisplayUnit_TheId (0x54B2, 2);
|
||||
EbmlId KaxVideoAspectRatio_TheId (0x54B3, 1);
|
||||
EbmlId KaxVideoGamma_TheId (0x2FB523, 3);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
const EbmlCallbacks KaxTrackVideo::ClassInfos(KaxTrackVideo::Create, KaxTrackVideo_TheId, "TrackAudio", KaxTrackVideo_Context);
|
||||
const EbmlCallbacks KaxVideoPixelWidth::ClassInfos(KaxVideoPixelWidth::Create, KaxVideoPixelWidth_TheId, "VideoPixelWidth", KaxVideoPixelWidth_Context);
|
||||
const EbmlCallbacks KaxVideoPixelHeight::ClassInfos(KaxVideoPixelHeight::Create, KaxVideoPixelHeight_TheId, "VideoPixelHeight", KaxVideoPixelHeight_Context);
|
||||
const EbmlCallbacks KaxVideoPixelCropBottom::ClassInfos(KaxVideoPixelCropBottom::Create, KaxVideoPixelCropBottom_TheId, "VideoPixelCropBottom", KaxVideoPixelCropBottom_Context);
|
||||
const EbmlCallbacks KaxVideoPixelCropTop::ClassInfos(KaxVideoPixelCropTop::Create, KaxVideoPixelCropTop_TheId, "VideoPixelCropTop", KaxVideoPixelCropTop_Context);
|
||||
const EbmlCallbacks KaxVideoPixelCropLeft::ClassInfos(KaxVideoPixelCropLeft::Create, KaxVideoPixelCropLeft_TheId, "VideoPixelCropLeft", KaxVideoPixelCropLeft_Context);
|
||||
const EbmlCallbacks KaxVideoPixelCropRight::ClassInfos(KaxVideoPixelCropRight::Create, KaxVideoPixelCropRight_TheId, "VideoPixelCropRight", KaxVideoPixelCropRight_Context);
|
||||
const EbmlCallbacks KaxVideoDisplayWidth::ClassInfos(KaxVideoDisplayWidth::Create, KaxVideoDisplayWidth_TheId, "VideoDisplayWidth", KaxVideoDisplayWidth_Context);
|
||||
const EbmlCallbacks KaxVideoDisplayHeight::ClassInfos(KaxVideoDisplayHeight::Create, KaxVideoDisplayHeight_TheId, "VideoDisplayHeight", KaxVideoDisplayHeight_Context);
|
||||
const EbmlCallbacks KaxVideoColourSpace::ClassInfos(KaxVideoColourSpace::Create, KaxVideoColourSpace_TheId, "VideoColourSpace", KaxVideoColourSpace_Context);
|
||||
const EbmlCallbacks KaxVideoFrameRate::ClassInfos(KaxVideoFrameRate::Create, KaxVideoFrameRate_TheId, "VideoFrameRate", KaxVideoFrameRate_Context);
|
||||
#if MATROSKA_VERSION >= 2
|
||||
const EbmlCallbacks KaxVideoFlagInterlaced::ClassInfos(KaxVideoFlagInterlaced::Create, KaxVideoFlagInterlaced_TheId, "VideoFlagInterlaced", KaxVideoFlagInterlaced_Context);
|
||||
const EbmlCallbacks KaxVideoStereoMode::ClassInfos(KaxVideoStereoMode::Create, KaxVideoStereoMode_TheId, "VideoStereoMode", KaxVideoStereoMode_Context);
|
||||
const EbmlCallbacks KaxVideoDisplayUnit::ClassInfos(KaxVideoDisplayUnit::Create, KaxVideoDisplayUnit_TheId, "VideoDisplayUnit", KaxVideoDisplayUnit_Context);
|
||||
const EbmlCallbacks KaxVideoAspectRatio::ClassInfos(KaxVideoAspectRatio::Create, KaxVideoAspectRatio_TheId, "VideoAspectRatio", KaxVideoAspectRatio_Context);
|
||||
const EbmlCallbacks KaxVideoGamma::ClassInfos(KaxVideoGamma::Create, KaxVideoGamma_TheId, "VideoGamma", KaxVideoGamma_Context);
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
KaxTrackVideo::KaxTrackVideo()
|
||||
:EbmlMaster(KaxTrackVideo_Context)
|
||||
{}
|
||||
|
||||
uint32 KaxVideoFrameRate::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
|
||||
{
|
||||
assert(false); // no you are not allowed to use this element !
|
||||
return 0;
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
110
src/add-ons/media/plugins/matroska/libmatroska/KaxTracks.cpp
Normal file
110
src/add-ons/media/plugins/matroska/libmatroska/KaxTracks.cpp
Normal file
@ -0,0 +1,110 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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 740 2004-08-30 18:52:56Z mosu $
|
||||
\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"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
const EbmlSemantic KaxTracks_ContextList[1] =
|
||||
{
|
||||
EbmlSemantic(true, false, KaxTrackEntry::ClassInfos),
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION == 1
|
||||
const EbmlSemantic KaxTrackEntry_ContextList[17] =
|
||||
#else // MATROSKA_VERSION
|
||||
const EbmlSemantic KaxTrackEntry_ContextList[23] =
|
||||
#endif // MATROSKA_VERSION
|
||||
{
|
||||
EbmlSemantic(true , true, KaxTrackNumber::ClassInfos),
|
||||
EbmlSemantic(true , true, KaxTrackUID::ClassInfos),
|
||||
EbmlSemantic(true , true, KaxTrackType::ClassInfos),
|
||||
#if MATROSKA_VERSION >= 2
|
||||
EbmlSemantic(true , true, KaxTrackFlagEnabled::ClassInfos),
|
||||
#endif // MATROSKA_VERSION
|
||||
EbmlSemantic(true , true, KaxTrackFlagDefault::ClassInfos),
|
||||
EbmlSemantic(true , true, KaxTrackFlagLacing::ClassInfos),
|
||||
EbmlSemantic(true , true, KaxTrackMinCache::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTrackMaxCache::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTrackDefaultDuration::ClassInfos),
|
||||
EbmlSemantic(true , true, KaxTrackTimecodeScale::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTrackName::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTrackLanguage::ClassInfos),
|
||||
EbmlSemantic(true , true, KaxCodecID::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxCodecPrivate::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxCodecName::ClassInfos),
|
||||
#if MATROSKA_VERSION >= 2
|
||||
EbmlSemantic(false, true, KaxCodecSettings::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxCodecInfoURL::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxCodecDownloadURL::ClassInfos),
|
||||
EbmlSemantic(true , true, KaxCodecDecodeAll::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTrackOverlay::ClassInfos),
|
||||
#endif // MATROSKA_VERSION
|
||||
EbmlSemantic(false, true, KaxTrackAudio::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxTrackVideo::ClassInfos),
|
||||
EbmlSemantic(false, true, KaxContentEncodings::ClassInfos),
|
||||
};
|
||||
|
||||
const EbmlSemanticContext KaxTracks_Context = EbmlSemanticContext(countof(KaxTracks_ContextList), KaxTracks_ContextList, &KaxSegment_Context, *GetKaxGlobal_Context, &KaxTracks::ClassInfos);
|
||||
const EbmlSemanticContext KaxTrackEntry_Context = EbmlSemanticContext(countof(KaxTrackEntry_ContextList), KaxTrackEntry_ContextList, &KaxTracks_Context, *GetKaxGlobal_Context, &KaxTrackEntry::ClassInfos);
|
||||
|
||||
EbmlId KaxTracks_TheId (0x1654AE6B, 4);
|
||||
EbmlId KaxTrackEntry_TheId(0xAE, 1);
|
||||
|
||||
const EbmlCallbacks KaxTracks::ClassInfos(KaxTracks::Create, KaxTracks_TheId, "Tracks", KaxTracks_Context);
|
||||
const EbmlCallbacks KaxTrackEntry::ClassInfos(KaxTrackEntry::Create, KaxTrackEntry_TheId, "TrackEntry", KaxTrackEntry_Context);
|
||||
|
||||
KaxTracks::KaxTracks()
|
||||
:EbmlMaster(KaxTracks_Context)
|
||||
{}
|
||||
|
||||
KaxTrackEntry::KaxTrackEntry()
|
||||
:EbmlMaster(KaxTrackEntry_Context)
|
||||
,bGlobalTimecodeScaleIsSet(false)
|
||||
{}
|
||||
|
||||
void KaxTrackEntry::EnableLacing(bool bEnable)
|
||||
{
|
||||
KaxTrackFlagLacing & myLacing = GetChild<KaxTrackFlagLacing>(*this);
|
||||
*(static_cast<EbmlUInteger *>(&myLacing)) = bEnable ? 1 : 0;
|
||||
}
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
@ -0,0 +1,40 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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
|
504
src/add-ons/media/plugins/matroska/libmatroska/LICENSE.LGPL
Normal file
504
src/add-ons/media/plugins/matroska/libmatroska/LICENSE.LGPL
Normal file
@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
@ -0,0 +1,152 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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
|
||||
uint32 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(const 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, const 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,
|
||||
const bool aKeyFrame = true, const 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
|
||||
|
||||
#endif // FILE_KAX_HPP
|
@ -0,0 +1,130 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class MATROSKA_DLL_API KaxAttached : public EbmlMaster {
|
||||
public:
|
||||
KaxAttached();
|
||||
KaxAttached(const KaxAttached & ElementToClone) : EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxAttached);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
bool IsYourId(const EbmlId & TestId) const;
|
||||
EbmlElement * Clone() const {return new KaxAttached(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxFileDescription : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxFileDescription() {}
|
||||
KaxFileDescription(const KaxFileDescription & ElementToClone) : EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxFileDescription);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
bool IsYourId(const EbmlId & TestId) const;
|
||||
EbmlElement * Clone() const {return new KaxFileDescription(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxFileName : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxFileName() {}
|
||||
KaxFileName(const KaxFileName & ElementToClone) : EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxFileName);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
bool IsYourId(const EbmlId & TestId) const;
|
||||
EbmlElement * Clone() const {return new KaxFileName(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxMimeType : public EbmlString {
|
||||
public:
|
||||
KaxMimeType() {}
|
||||
KaxMimeType(const KaxMimeType & ElementToClone) : EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxMimeType);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
bool IsYourId(const EbmlId & TestId) const;
|
||||
EbmlElement * Clone() const {return new KaxMimeType(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxFileData : public EbmlBinary {
|
||||
public:
|
||||
KaxFileData() {}
|
||||
KaxFileData(const KaxFileData & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxFileData);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
bool ValidateSize() const {return true;} // we don't mind about what's inside
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
bool IsYourId(const EbmlId & TestId) const;
|
||||
EbmlElement * Clone() const {return new KaxFileData(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxFileUID : public EbmlUInteger {
|
||||
public:
|
||||
KaxFileUID() {}
|
||||
KaxFileUID(const KaxFileUID & ElementToClone) : EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxFileUID);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
bool IsYourId(const EbmlId & TestId) const;
|
||||
EbmlElement * Clone() const {return new KaxFileUID(*this);}
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_ATTACHED_H
|
@ -0,0 +1,58 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class MATROSKA_DLL_API KaxAttachments : public EbmlMaster {
|
||||
public:
|
||||
KaxAttachments();
|
||||
KaxAttachments(const KaxAttachments & ElementToClone) : EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxAttachments);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxAttachments(*this);}
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_ATTACHEMENTS_H
|
@ -0,0 +1,357 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class KaxCluster;
|
||||
class KaxReferenceBlock;
|
||||
|
||||
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 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();
|
||||
};
|
||||
|
||||
/*!
|
||||
\warning the binary buffer should be allocated with the new binary* operator : "new binary[your_size]"
|
||||
*/
|
||||
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)
|
||||
{}
|
||||
|
||||
DataBuffer * Clone() {return new SimpleDataBuffer(*this);}
|
||||
|
||||
protected:
|
||||
uint32 Offset;
|
||||
binary * BaseBuffer;
|
||||
|
||||
static bool myFreeBuffer(const DataBuffer & aBuffer)
|
||||
{
|
||||
delete[] static_cast<const SimpleDataBuffer*>(&aBuffer)->BaseBuffer;
|
||||
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);
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
class MATROSKA_DLL_API KaxBlockGroup : public EbmlMaster {
|
||||
public:
|
||||
KaxBlockGroup();
|
||||
KaxBlockGroup(const KaxBlockGroup & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxBlockGroup);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxBlockGroup(*this);}
|
||||
|
||||
~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);
|
||||
|
||||
void SetParent(KaxCluster & aParentCluster) {
|
||||
ParentCluster = &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();
|
||||
|
||||
protected:
|
||||
KaxCluster * ParentCluster;
|
||||
const KaxTrackEntry * ParentTrack;
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxBlock : public EbmlBinary {
|
||||
public:
|
||||
KaxBlock() :bLocalTimecodeUsed(false), bGap(false), mLacing(LACING_AUTO), ParentCluster(NULL) {}
|
||||
KaxBlock(const KaxBlock & ElementToClone);
|
||||
~KaxBlock();
|
||||
static EbmlElement & Create() {return *(new KaxBlock);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
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
|
||||
*/
|
||||
uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
|
||||
uint64 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);
|
||||
|
||||
/*!
|
||||
\brief release all the frames of all Blocks
|
||||
*/
|
||||
void ReleaseFrames();
|
||||
|
||||
void SetParent(KaxCluster & aParentCluster);
|
||||
|
||||
EbmlElement * Clone() const {return new KaxBlock(*this);}
|
||||
|
||||
/*!
|
||||
\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);
|
||||
|
||||
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;
|
||||
bool bGap;
|
||||
LacingType mLacing;
|
||||
uint64 FirstFrameLocation;
|
||||
|
||||
uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false);
|
||||
|
||||
KaxCluster * ParentCluster;
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxBlockDuration : public EbmlUInteger {
|
||||
public:
|
||||
KaxBlockDuration() {}
|
||||
KaxBlockDuration(const KaxBlockDuration & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxBlockDuration);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxBlockDuration(*this);}
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
class MATROSKA_DLL_API KaxBlockVirtual : public EbmlBinary {
|
||||
public:
|
||||
KaxBlockVirtual() :ParentCluster(NULL) {Data = DataBlock; Size = countof(DataBlock);}
|
||||
KaxBlockVirtual(const KaxBlockVirtual & ElementToClone);
|
||||
static EbmlElement & Create() {return *(new KaxBlockVirtual);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
bool ValidateSize() const {return true;}
|
||||
|
||||
/*!
|
||||
\note override this function to generate the Data/Size on the fly, unlike the usual binary elements
|
||||
*/
|
||||
uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
|
||||
|
||||
void SetParent(const KaxCluster & aParentCluster) {ParentCluster = &aParentCluster;}
|
||||
|
||||
EbmlElement * Clone() const {return new KaxBlockVirtual(*this);}
|
||||
|
||||
protected:
|
||||
uint64 Timecode; // temporary timecode of the first frame if there are more than one
|
||||
uint16 TrackNumber;
|
||||
binary DataBlock[5];
|
||||
|
||||
const KaxCluster * ParentCluster;
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxBlockAdditional : public EbmlBinary {
|
||||
public:
|
||||
KaxBlockAdditional() {}
|
||||
KaxBlockAdditional(const KaxBlockAdditional & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxBlockAdditional);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
bool ValidateSize() const {return true;}
|
||||
|
||||
EbmlElement * Clone() const {return new KaxBlockAdditional(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxBlockAdditions : public EbmlMaster {
|
||||
public:
|
||||
KaxBlockAdditions();
|
||||
KaxBlockAdditions(const KaxBlockAdditions & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxBlockAdditions);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxBlockAdditions(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxBlockMore : public EbmlMaster {
|
||||
public:
|
||||
KaxBlockMore();
|
||||
KaxBlockMore(const KaxBlockMore & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxBlockMore);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxBlockMore(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxBlockAddID : public EbmlUInteger {
|
||||
public:
|
||||
KaxBlockAddID() {}
|
||||
KaxBlockAddID(const KaxBlockAddID & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxBlockAddID);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxBlockAddID(*this);}
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_BLOCK_H
|
@ -0,0 +1,180 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class KaxReferenceBlock;
|
||||
class KaxBlockGroup;
|
||||
|
||||
class MATROSKA_DLL_API KaxReferencePriority : public EbmlUInteger {
|
||||
public:
|
||||
KaxReferencePriority() :EbmlUInteger(0) {}
|
||||
KaxReferencePriority(const KaxReferencePriority & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxReferencePriority);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxReferencePriority(*this);}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief element used for B frame-likes
|
||||
*/
|
||||
class MATROSKA_DLL_API KaxReferenceBlock : public EbmlSInteger {
|
||||
public:
|
||||
KaxReferenceBlock() :RefdBlock(NULL), ParentBlock(NULL) {bTimecodeSet = false;}
|
||||
KaxReferenceBlock(const KaxReferenceBlock & ElementToClone) :EbmlSInteger(ElementToClone), bTimecodeSet(ElementToClone.bTimecodeSet) {}
|
||||
static EbmlElement & Create() {return *(new KaxReferenceBlock);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxReferenceBlock(*this);}
|
||||
|
||||
/*!
|
||||
\brief override this method to compute the timecode value
|
||||
*/
|
||||
virtual uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
|
||||
|
||||
const KaxBlockGroup & RefBlock() const;
|
||||
void SetReferencedBlock(const KaxBlockGroup & aRefdBlock) {RefdBlock = &aRefdBlock; bValueIsSet = true;}
|
||||
void SetParentBlock(const KaxBlockGroup & aParentBlock) {ParentBlock = &aParentBlock;}
|
||||
|
||||
protected:
|
||||
const KaxBlockGroup * RefdBlock;
|
||||
const KaxBlockGroup * ParentBlock;
|
||||
void SetReferencedTimecode(int64 refTimecode) {Value = refTimecode; bTimecodeSet = true; bValueIsSet = true;};
|
||||
bool bTimecodeSet;
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
class MATROSKA_DLL_API KaxReferenceVirtual : public EbmlSInteger {
|
||||
public:
|
||||
KaxReferenceVirtual() {}
|
||||
KaxReferenceVirtual(const KaxReferenceVirtual & ElementToClone) :EbmlSInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxReferenceVirtual);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxReferenceVirtual(*this);}
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
class MATROSKA_DLL_API KaxTimeSlice : public EbmlMaster {
|
||||
public:
|
||||
KaxTimeSlice();
|
||||
KaxTimeSlice(const KaxTimeSlice & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTimeSlice);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTimeSlice(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxSlices : public EbmlMaster {
|
||||
public:
|
||||
KaxSlices();
|
||||
KaxSlices(const KaxSlices & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxSlices);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxSlices(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxSliceLaceNumber : public EbmlUInteger {
|
||||
public:
|
||||
KaxSliceLaceNumber() :EbmlUInteger(0) {}
|
||||
KaxSliceLaceNumber(const KaxSliceLaceNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxSliceLaceNumber);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxSliceLaceNumber(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxSliceFrameNumber : public EbmlUInteger {
|
||||
public:
|
||||
KaxSliceFrameNumber() :EbmlUInteger(0) {}
|
||||
KaxSliceFrameNumber(const KaxSliceFrameNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxSliceFrameNumber);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxSliceFrameNumber(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxSliceBlockAddID : public EbmlUInteger {
|
||||
public:
|
||||
KaxSliceBlockAddID() :EbmlUInteger(0) {}
|
||||
KaxSliceBlockAddID(const KaxSliceBlockAddID & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxSliceBlockAddID);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxSliceBlockAddID(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxSliceDelay : public EbmlUInteger {
|
||||
public:
|
||||
KaxSliceDelay() :EbmlUInteger(0) {}
|
||||
KaxSliceDelay(const KaxSliceDelay & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxSliceDelay);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxSliceDelay(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxSliceDuration : public EbmlUInteger {
|
||||
public:
|
||||
KaxSliceDuration() {}
|
||||
KaxSliceDuration(const KaxSliceDuration & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxSliceDuration);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxSliceDuration(*this);}
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_BLOCK_ADDITIONAL_H
|
@ -0,0 +1,306 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_CHAPTERS_H
|
||||
#define LIBMATROSKA_CHAPTERS_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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class MATROSKA_DLL_API KaxChapters : public EbmlMaster {
|
||||
public:
|
||||
KaxChapters();
|
||||
KaxChapters(const KaxChapters & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapters);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapters(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxEditionEntry : public EbmlMaster {
|
||||
public:
|
||||
KaxEditionEntry();
|
||||
KaxEditionEntry(const KaxEditionEntry & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxEditionEntry);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxEditionEntry(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxEditionUID : public EbmlUInteger {
|
||||
public:
|
||||
KaxEditionUID() {}
|
||||
KaxEditionUID(const KaxEditionUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxEditionUID);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxEditionUID(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxEditionFlagHidden : public EbmlUInteger {
|
||||
public:
|
||||
KaxEditionFlagHidden(): EbmlUInteger(0) {}
|
||||
KaxEditionFlagHidden(const KaxEditionFlagHidden & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxEditionFlagHidden);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxEditionFlagHidden(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxEditionFlagDefault : public EbmlUInteger {
|
||||
public:
|
||||
KaxEditionFlagDefault(): EbmlUInteger(0) {}
|
||||
KaxEditionFlagDefault(const KaxEditionFlagDefault & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxEditionFlagDefault);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxEditionFlagDefault(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxEditionProcessed : public EbmlUInteger {
|
||||
public:
|
||||
KaxEditionProcessed(): EbmlUInteger(0) {}
|
||||
KaxEditionProcessed(const KaxEditionProcessed & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxEditionProcessed);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxEditionProcessed(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterProcessedPrivate : public EbmlBinary {
|
||||
public:
|
||||
KaxChapterProcessedPrivate() {}
|
||||
KaxChapterProcessedPrivate(const KaxChapterProcessedPrivate & ElementToClone) :EbmlBinary(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterProcessedPrivate);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterProcessedPrivate(*this);}
|
||||
bool ValidateSize() const {return true;}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterAtom : public EbmlMaster {
|
||||
public:
|
||||
KaxChapterAtom();
|
||||
KaxChapterAtom(const KaxChapterAtom & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterAtom);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterAtom(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterUID : public EbmlUInteger {
|
||||
public:
|
||||
KaxChapterUID() {}
|
||||
KaxChapterUID(const KaxChapterUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterUID);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterUID(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterTimeStart : public EbmlUInteger {
|
||||
public:
|
||||
KaxChapterTimeStart() {}
|
||||
KaxChapterTimeStart(const KaxChapterTimeStart & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterTimeStart);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterTimeStart(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterTimeEnd : public EbmlUInteger {
|
||||
public:
|
||||
KaxChapterTimeEnd() {}
|
||||
KaxChapterTimeEnd(const KaxChapterTimeEnd & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterTimeEnd);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterTimeEnd(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterFlagHidden : public EbmlUInteger {
|
||||
public:
|
||||
KaxChapterFlagHidden(): EbmlUInteger(0) {}
|
||||
KaxChapterFlagHidden(const KaxChapterFlagHidden & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterFlagHidden);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterFlagHidden(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterFlagEnabled : public EbmlUInteger {
|
||||
public:
|
||||
KaxChapterFlagEnabled(): EbmlUInteger(1) {}
|
||||
KaxChapterFlagEnabled(const KaxChapterFlagEnabled & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterFlagEnabled);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterFlagEnabled(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterPhysicalEquiv : public EbmlUInteger {
|
||||
public:
|
||||
KaxChapterPhysicalEquiv(): EbmlUInteger() {}
|
||||
KaxChapterPhysicalEquiv(const KaxChapterPhysicalEquiv & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterPhysicalEquiv);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterPhysicalEquiv(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterTrack : public EbmlMaster {
|
||||
public:
|
||||
KaxChapterTrack();
|
||||
KaxChapterTrack(const KaxChapterTrack & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterTrack);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterTrack(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterTrackNumber : public EbmlUInteger {
|
||||
public:
|
||||
KaxChapterTrackNumber() {}
|
||||
KaxChapterTrackNumber(const KaxChapterTrackNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterTrackNumber);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterTrackNumber(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterDisplay : public EbmlMaster {
|
||||
public:
|
||||
KaxChapterDisplay();
|
||||
KaxChapterDisplay(const KaxChapterDisplay & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterDisplay);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterDisplay(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterString : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxChapterString() {}
|
||||
KaxChapterString(const KaxChapterString & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterString);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterString(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterLanguage : public EbmlString {
|
||||
public:
|
||||
KaxChapterLanguage() :EbmlString("eng") {}
|
||||
KaxChapterLanguage(const KaxChapterLanguage & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterLanguage);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterLanguage(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterCountry : public EbmlString {
|
||||
public:
|
||||
KaxChapterCountry() :EbmlString() {}
|
||||
KaxChapterCountry(const KaxChapterCountry & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterCountry);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterCountry(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterProcess : public EbmlMaster {
|
||||
public:
|
||||
KaxChapterProcess();
|
||||
KaxChapterProcess(const KaxChapterProcess & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterProcess);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterProcess(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterProcessTime : public EbmlUInteger {
|
||||
public:
|
||||
KaxChapterProcessTime() {}
|
||||
KaxChapterProcessTime(const KaxChapterProcessTime & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterProcessTime);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterProcessTime(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxChapterProcessCommand : public EbmlBinary {
|
||||
public:
|
||||
KaxChapterProcessCommand() {}
|
||||
KaxChapterProcessCommand(const KaxChapterProcessCommand & ElementToClone) :EbmlBinary(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxChapterProcessCommand);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxChapterProcessCommand(*this);}
|
||||
bool ValidateSize() const {return true;}
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CHAPTERS_H
|
@ -0,0 +1,154 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class KaxSegment;
|
||||
|
||||
class MATROSKA_DLL_API KaxCluster : public EbmlMaster {
|
||||
public:
|
||||
KaxCluster();
|
||||
KaxCluster(const KaxCluster & ElementToClone);
|
||||
static EbmlElement & Create() {return *(new KaxCluster);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCluster(*this);}
|
||||
|
||||
/*!
|
||||
\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
|
||||
*/
|
||||
uint32 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;
|
||||
}
|
||||
|
||||
protected:
|
||||
KaxBlockGroup * currentNewBlock;
|
||||
const KaxSegment * ParentSegment;
|
||||
|
||||
uint64 MinTimecode, MaxTimecode, PreviousTimecode;
|
||||
int64 TimecodeScale;
|
||||
|
||||
bool bFirstFrameInside; // used to speed research
|
||||
bool bPreviousTimecodeIsSet;
|
||||
bool bTimecodeScaleIsSet;
|
||||
|
||||
/*!
|
||||
\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
|
@ -0,0 +1,80 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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/EbmlUInteger.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class MATROSKA_DLL_API KaxClusterTimecode : public EbmlUInteger {
|
||||
public:
|
||||
KaxClusterTimecode() {}
|
||||
KaxClusterTimecode(const KaxClusterTimecode & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxClusterTimecode);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxClusterTimecode(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxClusterPosition : public EbmlUInteger {
|
||||
public:
|
||||
KaxClusterPosition() {}
|
||||
KaxClusterPosition(const KaxClusterPosition & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxClusterPosition);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxClusterPosition(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxClusterPrevSize : public EbmlUInteger {
|
||||
public:
|
||||
KaxClusterPrevSize() {}
|
||||
KaxClusterPrevSize(const KaxClusterPrevSize & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxClusterPrevSize);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxClusterPrevSize(*this);}
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CLUSTER_DATA_H
|
@ -0,0 +1,70 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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 1
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
|
||||
#endif // LIBMATROSKA_CONFIG_H
|
@ -0,0 +1,250 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class MATROSKA_DLL_API KaxContentEncodings: public EbmlMaster {
|
||||
public:
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
KaxContentEncodings();
|
||||
KaxContentEncodings(const KaxContentEncodings &ElementToClone):
|
||||
EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement &Create() { return *(new KaxContentEncodings); }
|
||||
const EbmlCallbacks &Generic() const { return ClassInfos; }
|
||||
operator const EbmlId &() const { return ClassInfos.GlobalId; }
|
||||
EbmlElement *Clone() const { return new KaxContentEncodings(*this); }
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxContentEncoding: public EbmlMaster {
|
||||
public:
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
KaxContentEncoding();
|
||||
KaxContentEncoding(const KaxContentEncoding &ElementToClone):
|
||||
EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement &Create() { return *(new KaxContentEncoding); }
|
||||
const EbmlCallbacks &Generic() const { return ClassInfos; }
|
||||
operator const EbmlId &() const { return ClassInfos.GlobalId; }
|
||||
EbmlElement *Clone() const { return new KaxContentEncoding(*this); }
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxContentEncodingOrder: public EbmlUInteger {
|
||||
public:
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
KaxContentEncodingOrder(): EbmlUInteger(0) {}
|
||||
KaxContentEncodingOrder(const KaxContentEncodingOrder &ElementToClone):
|
||||
EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement &Create() { return *(new KaxContentEncodingOrder); }
|
||||
const EbmlCallbacks &Generic() const { return ClassInfos; }
|
||||
operator const EbmlId &() const { return ClassInfos.GlobalId; }
|
||||
EbmlElement *Clone() const { return new KaxContentEncodingOrder(*this); }
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxContentEncodingScope: public EbmlUInteger {
|
||||
public:
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
KaxContentEncodingScope(): EbmlUInteger(1) {}
|
||||
KaxContentEncodingScope(const KaxContentEncodingScope &ElementToClone):
|
||||
EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement &Create() { return *(new KaxContentEncodingScope); }
|
||||
const EbmlCallbacks &Generic() const { return ClassInfos; }
|
||||
operator const EbmlId &() const { return ClassInfos.GlobalId; }
|
||||
EbmlElement *Clone() const { return new KaxContentEncodingScope(*this); }
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxContentEncodingType: public EbmlUInteger {
|
||||
public:
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
KaxContentEncodingType(): EbmlUInteger(0) {}
|
||||
KaxContentEncodingType(const KaxContentEncodingType &ElementToClone):
|
||||
EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement &Create() { return *(new KaxContentEncodingType); }
|
||||
const EbmlCallbacks &Generic() const { return ClassInfos; }
|
||||
operator const EbmlId &() const { return ClassInfos.GlobalId; }
|
||||
EbmlElement *Clone() const { return new KaxContentEncodingType(*this); }
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxContentCompression: public EbmlMaster {
|
||||
public:
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
KaxContentCompression();
|
||||
KaxContentCompression(const KaxContentCompression &ElementToClone):
|
||||
EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement &Create() { return *(new KaxContentCompression); }
|
||||
const EbmlCallbacks &Generic() const { return ClassInfos; }
|
||||
operator const EbmlId &() const { return ClassInfos.GlobalId; }
|
||||
EbmlElement *Clone() const { return new KaxContentCompression(*this); }
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxContentCompAlgo: public EbmlUInteger {
|
||||
public:
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
KaxContentCompAlgo(): EbmlUInteger(0) {}
|
||||
KaxContentCompAlgo(const KaxContentCompAlgo &ElementToClone):
|
||||
EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement &Create() { return *(new KaxContentCompAlgo); }
|
||||
const EbmlCallbacks &Generic() const { return ClassInfos; }
|
||||
operator const EbmlId &() const { return ClassInfos.GlobalId; }
|
||||
EbmlElement *Clone() const { return new KaxContentCompAlgo(*this); }
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxContentCompSettings: public EbmlBinary {
|
||||
public:
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
KaxContentCompSettings() {}
|
||||
KaxContentCompSettings(const KaxContentCompSettings &ElementToClone):
|
||||
EbmlBinary(ElementToClone) {}
|
||||
static EbmlElement &Create() { return *(new KaxContentCompSettings); }
|
||||
const EbmlCallbacks &Generic() const { return ClassInfos; }
|
||||
operator const EbmlId &() const { return ClassInfos.GlobalId; }
|
||||
EbmlElement *Clone() const {
|
||||
return new KaxContentCompSettings(*this);
|
||||
}
|
||||
bool ValidateSize(void) const { return true; }
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxContentEncryption: public EbmlMaster {
|
||||
public:
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
KaxContentEncryption();
|
||||
KaxContentEncryption(const KaxContentEncryption &ElementToClone):
|
||||
EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement &Create() { return *(new KaxContentEncryption); }
|
||||
const EbmlCallbacks &Generic() const { return ClassInfos; }
|
||||
operator const EbmlId &() const { return ClassInfos.GlobalId; }
|
||||
EbmlElement *Clone() const { return new KaxContentEncryption(*this); }
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxContentEncAlgo: public EbmlUInteger {
|
||||
public:
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
KaxContentEncAlgo(): EbmlUInteger(0) {}
|
||||
KaxContentEncAlgo(const KaxContentEncAlgo &ElementToClone):
|
||||
EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement &Create() { return *(new KaxContentEncAlgo); }
|
||||
const EbmlCallbacks &Generic() const { return ClassInfos; }
|
||||
operator const EbmlId &() const { return ClassInfos.GlobalId; }
|
||||
EbmlElement *Clone() const { return new KaxContentEncAlgo(*this); }
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxContentEncKeyID: public EbmlBinary {
|
||||
public:
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
KaxContentEncKeyID() {}
|
||||
KaxContentEncKeyID(const KaxContentEncKeyID &ElementToClone):
|
||||
EbmlBinary(ElementToClone) {}
|
||||
static EbmlElement &Create() { return *(new KaxContentEncKeyID); }
|
||||
const EbmlCallbacks &Generic() const { return ClassInfos; }
|
||||
operator const EbmlId &() const { return ClassInfos.GlobalId; }
|
||||
EbmlElement *Clone() const { return new KaxContentEncKeyID(*this); }
|
||||
bool ValidateSize(void) const { return true; }
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxContentSignature: public EbmlBinary {
|
||||
public:
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
KaxContentSignature() {}
|
||||
KaxContentSignature(const KaxContentSignature &ElementToClone):
|
||||
EbmlBinary(ElementToClone) {}
|
||||
static EbmlElement &Create() { return *(new KaxContentSignature); }
|
||||
const EbmlCallbacks &Generic() const { return ClassInfos; }
|
||||
operator const EbmlId &() const { return ClassInfos.GlobalId; }
|
||||
EbmlElement *Clone() const { return new KaxContentSignature(*this); }
|
||||
bool ValidateSize(void) const { return true; }
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxContentSigKeyID: public EbmlBinary {
|
||||
public:
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
KaxContentSigKeyID() {}
|
||||
KaxContentSigKeyID(const KaxContentSigKeyID &ElementToClone):
|
||||
EbmlBinary(ElementToClone) {}
|
||||
static EbmlElement &Create() { return *(new KaxContentSigKeyID); }
|
||||
const EbmlCallbacks &Generic() const { return ClassInfos; }
|
||||
operator const EbmlId &() const { return ClassInfos.GlobalId; }
|
||||
EbmlElement *Clone() const { return new KaxContentSigKeyID(*this); }
|
||||
bool ValidateSize(void) const { return true; }
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxContentSigAlgo: public EbmlUInteger {
|
||||
public:
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
KaxContentSigAlgo() {}
|
||||
KaxContentSigAlgo(const KaxContentSigAlgo &ElementToClone):
|
||||
EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement &Create() { return *(new KaxContentSigAlgo); }
|
||||
const EbmlCallbacks &Generic() const { return ClassInfos; }
|
||||
operator const EbmlId &() const { return ClassInfos.GlobalId; }
|
||||
EbmlElement *Clone() const { return new KaxContentSigAlgo(*this); }
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxContentSigHashAlgo: public EbmlUInteger {
|
||||
public:
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
|
||||
KaxContentSigHashAlgo() {}
|
||||
KaxContentSigHashAlgo(const KaxContentSigHashAlgo &ElementToClone):
|
||||
EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement &Create() { return *(new KaxContentSigHashAlgo); }
|
||||
const EbmlCallbacks &Generic() const { return ClassInfos; }
|
||||
operator const EbmlId &() const { return ClassInfos.GlobalId; }
|
||||
EbmlElement *Clone() const { return new KaxContentSigHashAlgo(*this); }
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CONTENT_ENCODING_H
|
@ -0,0 +1,86 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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 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;
|
||||
|
||||
extern const EbmlSemanticContext & MATROSKA_DLL_API GetKaxGlobal_Context();
|
||||
extern const EbmlSemanticContext & MATROSKA_DLL_API GetKaxTagsGlobal_Context();
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CONTEXTS_H
|
@ -0,0 +1,96 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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;
|
||||
|
||||
class MATROSKA_DLL_API KaxCues : public EbmlMaster {
|
||||
public:
|
||||
KaxCues();
|
||||
KaxCues(const KaxCues & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
~KaxCues();
|
||||
static EbmlElement & Create() {return *(new KaxCues);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCues(*this);}
|
||||
|
||||
bool AddBlockGroup(const KaxBlockGroup & BlockReference);
|
||||
|
||||
/*!
|
||||
\brief Indicate that the position for this Block is set
|
||||
*/
|
||||
void PositionSet(const KaxBlockGroup & BlockReference);
|
||||
|
||||
/*!
|
||||
\brief override to sort by timecode/track
|
||||
*/
|
||||
uint32 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 KaxBlockGroup *> myTempReferences;
|
||||
bool bGlobalTimecodeScaleIsSet;
|
||||
uint64 mGlobalTimecodeScale;
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CUES_H
|
@ -0,0 +1,194 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class KaxBlockGroup;
|
||||
class KaxCueTrackPositions;
|
||||
|
||||
class MATROSKA_DLL_API KaxCuePoint : public EbmlMaster {
|
||||
public:
|
||||
KaxCuePoint();
|
||||
KaxCuePoint(const KaxCuePoint & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCuePoint);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCuePoint(*this);}
|
||||
void PositionSet(const KaxBlockGroup & BlockReference, uint64 GlobalTimecodeScale);
|
||||
|
||||
bool operator<(const EbmlElement & EltB) const;
|
||||
|
||||
const KaxCueTrackPositions * GetSeekPosition() const;
|
||||
bool Timecode(uint64 & aTimecode, uint64 GlobalTimecodeScale) const;
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCueTime : public EbmlUInteger {
|
||||
public:
|
||||
KaxCueTime() {}
|
||||
KaxCueTime(const KaxCueTime & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCueTime);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCueTime(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCueTrackPositions : public EbmlMaster {
|
||||
public:
|
||||
KaxCueTrackPositions();
|
||||
KaxCueTrackPositions(const KaxCueTrackPositions & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCueTrackPositions);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCueTrackPositions(*this);}
|
||||
|
||||
uint64 ClusterPosition() const;
|
||||
uint16 TrackNumber() const;
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCueTrack : public EbmlUInteger {
|
||||
public:
|
||||
KaxCueTrack() {}
|
||||
KaxCueTrack(const KaxCueTrack & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCueTrack);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCueTrack(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCueClusterPosition : public EbmlUInteger {
|
||||
public:
|
||||
KaxCueClusterPosition() {}
|
||||
KaxCueClusterPosition(const KaxCueClusterPosition & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCueClusterPosition);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCueClusterPosition(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCueBlockNumber : public EbmlUInteger {
|
||||
public:
|
||||
KaxCueBlockNumber() :EbmlUInteger(1) {}
|
||||
KaxCueBlockNumber(const KaxCueBlockNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCueBlockNumber);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCueBlockNumber(*this);}
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
class MATROSKA_DLL_API KaxCueCodecState : public EbmlUInteger {
|
||||
public:
|
||||
KaxCueCodecState() :EbmlUInteger(0) {}
|
||||
KaxCueCodecState(const KaxCueCodecState & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCueCodecState);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCueCodecState(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCueReference : public EbmlMaster {
|
||||
public:
|
||||
KaxCueReference();
|
||||
KaxCueReference(const KaxCueReference & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCueReference);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCueReference(*this);}
|
||||
|
||||
void AddReference(const KaxBlockGroup & BlockReferenced, uint64 GlobalTimecodeScale);
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCueRefTime : public EbmlUInteger {
|
||||
public:
|
||||
KaxCueRefTime() {}
|
||||
KaxCueRefTime(const KaxCueRefTime & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCueRefTime);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCueRefTime(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCueRefCluster : public EbmlUInteger {
|
||||
public:
|
||||
KaxCueRefCluster() {}
|
||||
KaxCueRefCluster(const KaxCueRefCluster & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCueRefCluster);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCueRefCluster(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCueRefNumber : public EbmlUInteger {
|
||||
public:
|
||||
KaxCueRefNumber() :EbmlUInteger(1) {}
|
||||
KaxCueRefNumber(const KaxCueRefNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCueRefNumber);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCueRefNumber(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCueRefCodecState : public EbmlUInteger {
|
||||
public:
|
||||
KaxCueRefCodecState() :EbmlUInteger(0) {}
|
||||
KaxCueRefCodecState(const KaxCueRefCodecState & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCueRefCodecState);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCueRefCodecState(*this);}
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_CUES_DATA_H
|
@ -0,0 +1,81 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class MATROSKA_DLL_API KaxInfo : public EbmlMaster {
|
||||
public:
|
||||
KaxInfo();
|
||||
KaxInfo(const KaxInfo & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxInfo);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxInfo(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxMuxingApp : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxMuxingApp() {}
|
||||
KaxMuxingApp(const KaxMuxingApp & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxMuxingApp);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxMuxingApp(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxWritingApp : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxWritingApp() {}
|
||||
KaxWritingApp(const KaxWritingApp & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxWritingApp);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxWritingApp(*this);}
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_INFO_H
|
@ -0,0 +1,166 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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: KaxInfoData.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author John Cannon <spyder2555 @ users.sf.net>
|
||||
\author Moritz Bunkus <moritz @ bunkus.org>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_INFO_DATA_H
|
||||
#define LIBMATROSKA_INFO_DATA_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "ebml/EbmlFloat.h"
|
||||
#include "ebml/EbmlUnicodeString.h"
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "ebml/EbmlDate.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class MATROSKA_DLL_API KaxSegmentUID : public EbmlBinary {
|
||||
public:
|
||||
KaxSegmentUID() {}
|
||||
KaxSegmentUID(const KaxSegmentUID & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxSegmentUID);}
|
||||
bool ValidateSize() const { return (Size == 16);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxSegmentUID(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxSegmentFilename : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxSegmentFilename() {}
|
||||
KaxSegmentFilename(const KaxSegmentFilename & ElementToClone) :EbmlUnicodeString(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxSegmentFilename);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxSegmentFilename(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxPrevUID : public EbmlBinary {
|
||||
public:
|
||||
KaxPrevUID() {}
|
||||
KaxPrevUID(const KaxPrevUID & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxPrevUID);}
|
||||
bool ValidateSize() const { return (Size == 16);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxPrevUID(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxPrevFilename : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxPrevFilename() :EbmlUnicodeString() {}
|
||||
KaxPrevFilename(const KaxPrevFilename & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxPrevFilename);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxPrevFilename(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxNextUID : public EbmlBinary {
|
||||
public:
|
||||
KaxNextUID() {}
|
||||
KaxNextUID(const KaxNextUID & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxNextUID);}
|
||||
bool ValidateSize() const { return (Size == 16);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxNextUID(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxNextFilename : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxNextFilename() {}
|
||||
KaxNextFilename(const KaxNextFilename & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxNextFilename);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxNextFilename(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTimecodeScale : public EbmlUInteger {
|
||||
public:
|
||||
KaxTimecodeScale() :EbmlUInteger(1000000) {}
|
||||
KaxTimecodeScale(const KaxTimecodeScale & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTimecodeScale);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTimecodeScale(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxDuration : public EbmlFloat {
|
||||
public:
|
||||
KaxDuration(): EbmlFloat(FLOAT_64) {}
|
||||
KaxDuration(const KaxDuration & ElementToClone) :EbmlFloat(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxDuration);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxDuration(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxDateUTC : public EbmlDate {
|
||||
public:
|
||||
KaxDateUTC() {}
|
||||
KaxDateUTC(const KaxDateUTC & ElementToClone) :EbmlDate(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxDateUTC);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxDateUTC(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTitle : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTitle() {}
|
||||
KaxTitle(const KaxTitle & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTitle);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTitle(*this);}
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_INFO_DATA_H
|
@ -0,0 +1,110 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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: KaxSeekHead.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_SEEK_HEAD_H
|
||||
#define LIBMATROSKA_SEEK_HEAD_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class KaxSegment;
|
||||
class KaxSeek;
|
||||
|
||||
class MATROSKA_DLL_API KaxSeekHead : public EbmlMaster {
|
||||
public:
|
||||
KaxSeekHead();
|
||||
KaxSeekHead(const KaxSeekHead & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxSeekHead);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxSeekHead(*this);}
|
||||
|
||||
/*!
|
||||
\brief add an element to index in the Meta Seek data
|
||||
\note the element should already be written in the file
|
||||
*/
|
||||
void IndexThis(const EbmlElement & aElt, const KaxSegment & ParentSegment);
|
||||
|
||||
KaxSeek * FindFirstOf(const EbmlCallbacks & Callbacks) const;
|
||||
KaxSeek * FindNextOf(const KaxSeek &aPrev) const;
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxSeek : public EbmlMaster {
|
||||
public:
|
||||
KaxSeek();
|
||||
KaxSeek(const KaxSeek & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxSeek);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxSeek(*this);}
|
||||
|
||||
int64 Location() const;
|
||||
bool IsEbmlId(const EbmlId & aId) const;
|
||||
bool IsEbmlId(const KaxSeek & aPoint) const;
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxSeekID : public EbmlBinary {
|
||||
public:
|
||||
KaxSeekID() {}
|
||||
KaxSeekID(const KaxSeekID & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxSeekID);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
bool ValidateSize() const {return Size <= 4;}
|
||||
EbmlElement * Clone() const {return new KaxSeekID(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxSeekPosition : public EbmlUInteger {
|
||||
public:
|
||||
KaxSeekPosition() {}
|
||||
KaxSeekPosition(const KaxSeekPosition & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxSeekPosition);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxSeekPosition(*this);}
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_SEEK_HEAD_H
|
@ -0,0 +1,69 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class MATROSKA_DLL_API KaxSegment : public EbmlMaster {
|
||||
public:
|
||||
KaxSegment();
|
||||
KaxSegment(const KaxSegment & ElementToClone);
|
||||
static EbmlElement & Create() {return *(new KaxSegment);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxSegment(*this);}
|
||||
|
||||
/*!
|
||||
\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
|
699
src/add-ons/media/plugins/matroska/libmatroska/matroska/KaxTag.h
Normal file
699
src/add-ons/media/plugins/matroska/libmatroska/matroska/KaxTag.h
Normal file
@ -0,0 +1,699 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Jory Stone <jcsston @ toughguy.net>
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_TAG_H
|
||||
#define LIBMATROSKA_TAG_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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class MATROSKA_DLL_API KaxTag : public EbmlMaster {
|
||||
public:
|
||||
KaxTag();
|
||||
KaxTag(const KaxTag & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTag);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTag(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagTargets : public EbmlMaster {
|
||||
public:
|
||||
KaxTagTargets();
|
||||
KaxTagTargets(const KaxTagTargets & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagTargets);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagTargets(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagGeneral : public EbmlMaster {
|
||||
public:
|
||||
KaxTagGeneral();
|
||||
KaxTagGeneral(const KaxTagGeneral & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagGeneral);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagGeneral(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagGenres : public EbmlMaster {
|
||||
public:
|
||||
KaxTagGenres();
|
||||
KaxTagGenres(const KaxTagGenres & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagGenres);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagGenres(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagAudioSpecific : public EbmlMaster {
|
||||
public:
|
||||
KaxTagAudioSpecific();
|
||||
KaxTagAudioSpecific(const KaxTagAudioSpecific & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagAudioSpecific);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagAudioSpecific(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagImageSpecific : public EbmlMaster {
|
||||
public:
|
||||
KaxTagImageSpecific();
|
||||
KaxTagImageSpecific(const KaxTagImageSpecific & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagImageSpecific);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagImageSpecific(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagTargetTypeValue : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagTargetTypeValue() :EbmlUInteger(50) {}
|
||||
KaxTagTargetTypeValue(const KaxTagTargetTypeValue & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagTargetTypeValue);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagTargetTypeValue(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagTargetType : public EbmlString {
|
||||
public:
|
||||
KaxTagTargetType() {}
|
||||
KaxTagTargetType(const KaxTagTargetType & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagTargetType);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagTargetType(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagTrackUID : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagTrackUID() :EbmlUInteger(0) {}
|
||||
KaxTagTrackUID(const KaxTagTrackUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagTrackUID);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagTrackUID(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagEditionUID : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagEditionUID() :EbmlUInteger(0) {}
|
||||
KaxTagEditionUID(const KaxTagEditionUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagEditionUID);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagEditionUID(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagChapterUID : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagChapterUID() :EbmlUInteger(0) {}
|
||||
KaxTagChapterUID(const KaxTagChapterUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagChapterUID);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagChapterUID(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagAttachmentUID : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagAttachmentUID() :EbmlUInteger(0) {}
|
||||
KaxTagAttachmentUID(const KaxTagAttachmentUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagAttachmentUID);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagAttachmentUID(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagArchivalLocation : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagArchivalLocation() {}
|
||||
KaxTagArchivalLocation(const KaxTagArchivalLocation & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagArchivalLocation);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagArchivalLocation(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagAudioEncryption : public EbmlBinary {
|
||||
public:
|
||||
KaxTagAudioEncryption() {}
|
||||
KaxTagAudioEncryption(const KaxTagAudioEncryption & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxTagAudioEncryption);}
|
||||
bool ValidateSize() const {return true;} // we don't mind about what's inside
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagAudioEncryption(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagAudioGain : public EbmlFloat {
|
||||
public:
|
||||
KaxTagAudioGain() {}
|
||||
KaxTagAudioGain(const KaxTagAudioGain & ElementToClone) :EbmlFloat(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagAudioGain);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagAudioGain(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagAudioGenre : public EbmlString {
|
||||
public:
|
||||
KaxTagAudioGenre() {}
|
||||
KaxTagAudioGenre(const KaxTagAudioGenre & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagAudioGenre);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagAudioGenre(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagAudioPeak : public EbmlFloat {
|
||||
public:
|
||||
KaxTagAudioPeak() {}
|
||||
KaxTagAudioPeak(const KaxTagAudioPeak & ElementToClone) :EbmlFloat(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagAudioPeak);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagAudioPeak(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagBibliography : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagBibliography() {}
|
||||
KaxTagBibliography(const KaxTagBibliography & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagBibliography);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagBibliography(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagBPM : public EbmlFloat {
|
||||
public:
|
||||
KaxTagBPM() {}
|
||||
KaxTagBPM(const KaxTagBPM & ElementToClone) :EbmlFloat(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagBPM);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagBPM(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagCaptureDPI : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagCaptureDPI() {}
|
||||
KaxTagCaptureDPI(const KaxTagCaptureDPI & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagCaptureDPI);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagCaptureDPI(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagCaptureLightness : public EbmlBinary {
|
||||
public:
|
||||
KaxTagCaptureLightness() {}
|
||||
KaxTagCaptureLightness(const KaxTagCaptureLightness & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxTagCaptureLightness);}
|
||||
bool ValidateSize() const {return true;} // we don't mind about what's inside
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagCaptureLightness(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagCapturePaletteSetting : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagCapturePaletteSetting() {}
|
||||
KaxTagCapturePaletteSetting(const KaxTagCapturePaletteSetting & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagCapturePaletteSetting);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagCapturePaletteSetting(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagCaptureSharpness : public EbmlBinary {
|
||||
public:
|
||||
KaxTagCaptureSharpness() {}
|
||||
KaxTagCaptureSharpness(const KaxTagCaptureSharpness & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxTagCaptureSharpness);}
|
||||
bool ValidateSize() const {return true;} // we don't mind about what's inside
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagCaptureSharpness(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagCropped : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagCropped() {}
|
||||
KaxTagCropped(const KaxTagCropped & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagCropped);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagCropped(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagDiscTrack : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagDiscTrack() {}
|
||||
KaxTagDiscTrack(const KaxTagDiscTrack & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagDiscTrack);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagDiscTrack(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagEncoder : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagEncoder() {}
|
||||
KaxTagEncoder(const KaxTagEncoder & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagEncoder);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagEncoder(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagEncodeSettings : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagEncodeSettings() {}
|
||||
KaxTagEncodeSettings(const KaxTagEncodeSettings & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagEncodeSettings);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagEncodeSettings(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagEqualisation : public EbmlBinary {
|
||||
public:
|
||||
KaxTagEqualisation() {}
|
||||
KaxTagEqualisation(const KaxTagEqualisation & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxTagEqualisation);}
|
||||
bool ValidateSize() const {return true;} // we don't mind about what's inside
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagEqualisation(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagFile : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagFile() {}
|
||||
KaxTagFile(const KaxTagFile & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagFile);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagFile(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagInitialKey : public EbmlString {
|
||||
public:
|
||||
KaxTagInitialKey() {}
|
||||
KaxTagInitialKey(const KaxTagInitialKey & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagInitialKey);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagInitialKey(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagKeywords : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagKeywords() {}
|
||||
KaxTagKeywords(const KaxTagKeywords & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagKeywords);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagKeywords(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagLanguage : public EbmlString {
|
||||
public:
|
||||
KaxTagLanguage() {}
|
||||
KaxTagLanguage(const KaxTagLanguage & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagLanguage);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagLanguage(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagLength : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagLength() {}
|
||||
KaxTagLength(const KaxTagLength & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagLength);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagLength(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMood : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagMood() {}
|
||||
KaxTagMood(const KaxTagMood & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMood);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMood(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagOfficialAudioFileURL : public EbmlString {
|
||||
public:
|
||||
KaxTagOfficialAudioFileURL() {}
|
||||
KaxTagOfficialAudioFileURL(const KaxTagOfficialAudioFileURL & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagOfficialAudioFileURL);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagOfficialAudioFileURL(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagOfficialAudioSourceURL : public EbmlString {
|
||||
public:
|
||||
KaxTagOfficialAudioSourceURL() {}
|
||||
KaxTagOfficialAudioSourceURL(const KaxTagOfficialAudioSourceURL & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagOfficialAudioSourceURL);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagOfficialAudioSourceURL(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagOriginalDimensions : public EbmlString {
|
||||
public:
|
||||
KaxTagOriginalDimensions() {}
|
||||
KaxTagOriginalDimensions(const KaxTagOriginalDimensions & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagOriginalDimensions);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagOriginalDimensions(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagOriginalMediaType : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagOriginalMediaType() {}
|
||||
KaxTagOriginalMediaType(const KaxTagOriginalMediaType & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagOriginalMediaType);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagOriginalMediaType(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagPlayCounter : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagPlayCounter() {}
|
||||
KaxTagPlayCounter(const KaxTagPlayCounter & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagPlayCounter);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagPlayCounter(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagPlaylistDelay : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagPlaylistDelay() {}
|
||||
KaxTagPlaylistDelay(const KaxTagPlaylistDelay & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagPlaylistDelay);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagPlaylistDelay(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagPopularimeter : public EbmlSInteger {
|
||||
public:
|
||||
KaxTagPopularimeter() {}
|
||||
KaxTagPopularimeter(const KaxTagPopularimeter & ElementToClone) :EbmlSInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagPopularimeter);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagPopularimeter(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagProduct : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagProduct() {}
|
||||
KaxTagProduct(const KaxTagProduct & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagProduct);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagProduct(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagRating : public EbmlBinary {
|
||||
public:
|
||||
KaxTagRating() {}
|
||||
KaxTagRating(const KaxTagRating & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxTagRating);}
|
||||
bool ValidateSize() const {return true;} // we don't mind about what's inside
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagRating(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagRecordLocation : public EbmlString {
|
||||
public:
|
||||
KaxTagRecordLocation() {}
|
||||
KaxTagRecordLocation(const KaxTagRecordLocation & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagRecordLocation);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagRecordLocation(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagSetPart : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagSetPart() {}
|
||||
KaxTagSetPart(const KaxTagSetPart & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagSetPart);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagSetPart(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagSource : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagSource() {}
|
||||
KaxTagSource(const KaxTagSource & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagSource);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagSource(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagSourceForm : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagSourceForm() {}
|
||||
KaxTagSourceForm(const KaxTagSourceForm & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagSourceForm);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagSourceForm(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagSubGenre : public EbmlString {
|
||||
public:
|
||||
KaxTagSubGenre() {}
|
||||
KaxTagSubGenre(const KaxTagSubGenre & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagSubGenre);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagSubGenre(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagSubject : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagSubject() {}
|
||||
KaxTagSubject(const KaxTagSubject & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagSubject);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagSubject(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagUnsynchronisedText : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagUnsynchronisedText() {}
|
||||
KaxTagUnsynchronisedText(const KaxTagUnsynchronisedText & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagUnsynchronisedText);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagUnsynchronisedText(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagUserDefinedURL : public EbmlString {
|
||||
public:
|
||||
KaxTagUserDefinedURL() {}
|
||||
KaxTagUserDefinedURL(const KaxTagUserDefinedURL & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagUserDefinedURL);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagUserDefinedURL(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagVideoGenre : public EbmlBinary {
|
||||
public:
|
||||
KaxTagVideoGenre() {}
|
||||
KaxTagVideoGenre(const KaxTagVideoGenre & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxTagVideoGenre);}
|
||||
bool ValidateSize() const {return (Size >= 2);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagVideoGenre(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagSimple : public EbmlMaster {
|
||||
public:
|
||||
KaxTagSimple();
|
||||
KaxTagSimple(const KaxTagSimple & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagSimple);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagSimple(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagName : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagName() {}
|
||||
KaxTagName(const KaxTagName & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagName);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagName(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagLangue : public EbmlString {
|
||||
public:
|
||||
KaxTagLangue(): EbmlString("und") {}
|
||||
KaxTagLangue(const KaxTagLangue & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagLangue);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagLangue(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagDefault : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagDefault() :EbmlUInteger(1) {}
|
||||
KaxTagDefault(const KaxTagTrackUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagDefault);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagDefault(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagString : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagString() {}
|
||||
KaxTagString(const KaxTagString & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagString);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagString(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagBinary : public EbmlBinary {
|
||||
public:
|
||||
KaxTagBinary() {}
|
||||
KaxTagBinary(const KaxTagBinary & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxTagBinary);}
|
||||
bool ValidateSize() const {return (Size >= 0);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagBinary(*this);}
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TAG_H
|
@ -0,0 +1,745 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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: KaxTagMulti.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $
|
||||
\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"
|
||||
|
||||
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.
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiComment : public EbmlMaster {
|
||||
public:
|
||||
KaxTagMultiComment();
|
||||
KaxTagMultiComment(const KaxTagMultiComment & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiComment);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiComment(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiCommentName : public EbmlString {
|
||||
public:
|
||||
KaxTagMultiCommentName() {}
|
||||
KaxTagMultiCommentName(const KaxTagMultiCommentName & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiCommentName);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiCommentName(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiCommentComments : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagMultiCommentComments() {}
|
||||
KaxTagMultiCommentComments(const KaxTagMultiCommentComments & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiCommentComments);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiCommentComments(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiCommentLanguage : public EbmlString {
|
||||
public:
|
||||
KaxTagMultiCommentLanguage() {}
|
||||
KaxTagMultiCommentLanguage(const KaxTagMultiCommentLanguage & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiCommentLanguage);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiCommentLanguage(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiCommercial : public EbmlMaster {
|
||||
public:
|
||||
KaxTagMultiCommercial();
|
||||
KaxTagMultiCommercial(const KaxTagMultiCommercial & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiCommercial);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiCommercial(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagCommercial : public EbmlMaster {
|
||||
public:
|
||||
KaxTagCommercial();
|
||||
KaxTagCommercial(const KaxTagCommercial & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagCommercial);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagCommercial(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiCommercialType : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagMultiCommercialType() {}
|
||||
KaxTagMultiCommercialType(const KaxTagMultiCommercialType & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiCommercialType);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiCommercialType(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiCommercialAddress : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagMultiCommercialAddress() {}
|
||||
KaxTagMultiCommercialAddress(const KaxTagMultiCommercialAddress & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiCommercialAddress);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiCommercialAddress(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiCommercialURL : public EbmlString {
|
||||
public:
|
||||
KaxTagMultiCommercialURL() {}
|
||||
KaxTagMultiCommercialURL(const KaxTagMultiCommercialURL & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiCommercialURL);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiCommercialURL(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiCommercialEmail : public EbmlString {
|
||||
public:
|
||||
KaxTagMultiCommercialEmail() {}
|
||||
KaxTagMultiCommercialEmail(const KaxTagMultiCommercialEmail & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiCommercialEmail);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiCommercialEmail(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiPrice : public EbmlMaster {
|
||||
public:
|
||||
KaxTagMultiPrice();
|
||||
KaxTagMultiPrice(const KaxTagMultiPrice & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiPrice);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiPrice(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiPriceCurrency : public EbmlString {
|
||||
public:
|
||||
KaxTagMultiPriceCurrency() {}
|
||||
KaxTagMultiPriceCurrency(const KaxTagMultiPriceCurrency & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiPriceCurrency);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiPriceCurrency(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiPriceAmount : public EbmlFloat {
|
||||
public:
|
||||
KaxTagMultiPriceAmount() :EbmlFloat() {}
|
||||
KaxTagMultiPriceAmount(const KaxTagMultiPriceAmount & ElementToClone) :EbmlFloat(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiPriceAmount);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiPriceAmount(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiPricePriceDate : public EbmlDate {
|
||||
public:
|
||||
KaxTagMultiPricePriceDate() :EbmlDate() {}
|
||||
KaxTagMultiPricePriceDate(const KaxTagMultiPricePriceDate & ElementToClone) :EbmlDate(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiPricePriceDate);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiPricePriceDate(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiDate : public EbmlMaster {
|
||||
public:
|
||||
KaxTagMultiDate();
|
||||
KaxTagMultiDate(const KaxTagMultiDate & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiDate);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiDate(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagDate : public EbmlMaster {
|
||||
public:
|
||||
KaxTagDate();
|
||||
KaxTagDate(const KaxTagDate & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagDate);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagDate(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiDateType : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagMultiDateType() {}
|
||||
KaxTagMultiDateType(const KaxTagMultiDateType & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiDateType);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiDateType(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiDateDateBegin : public EbmlDate {
|
||||
public:
|
||||
KaxTagMultiDateDateBegin() :EbmlDate() {}
|
||||
KaxTagMultiDateDateBegin(const KaxTagMultiDateDateBegin & ElementToClone) :EbmlDate(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiDateDateBegin);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiDateDateBegin(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiDateDateEnd : public EbmlDate {
|
||||
public:
|
||||
KaxTagMultiDateDateEnd() :EbmlDate() {}
|
||||
KaxTagMultiDateDateEnd(const KaxTagMultiDateDateEnd & ElementToClone) :EbmlDate(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiDateDateEnd);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiDateDateEnd(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiEntity : public EbmlMaster {
|
||||
public:
|
||||
KaxTagMultiEntity();
|
||||
KaxTagMultiEntity(const KaxTagMultiEntity & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiEntity);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiEntity(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagEntity : public EbmlMaster {
|
||||
public:
|
||||
KaxTagEntity();
|
||||
KaxTagEntity(const KaxTagEntity & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagEntity);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagEntity(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiEntityType : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagMultiEntityType() {}
|
||||
KaxTagMultiEntityType(const KaxTagMultiEntityType & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiEntityType);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiEntityType(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiEntityName : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagMultiEntityName() {}
|
||||
KaxTagMultiEntityName(const KaxTagMultiEntityName & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiEntityName);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiEntityName(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiEntityAddress : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagMultiEntityAddress() {}
|
||||
KaxTagMultiEntityAddress(const KaxTagMultiEntityAddress & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiEntityAddress);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiEntityAddress(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiEntityURL : public EbmlString {
|
||||
public:
|
||||
KaxTagMultiEntityURL() {}
|
||||
KaxTagMultiEntityURL(const KaxTagMultiEntityURL & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiEntityURL);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiEntityURL(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiEntityEmail : public EbmlString {
|
||||
public:
|
||||
KaxTagMultiEntityEmail() {}
|
||||
KaxTagMultiEntityEmail(const KaxTagMultiEntityEmail & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiEntityEmail);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiEntityEmail(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiIdentifier : public EbmlMaster {
|
||||
public:
|
||||
KaxTagMultiIdentifier();
|
||||
KaxTagMultiIdentifier(const KaxTagMultiIdentifier & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiIdentifier);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiIdentifier(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagIdentifier : public EbmlMaster {
|
||||
public:
|
||||
KaxTagIdentifier();
|
||||
KaxTagIdentifier(const KaxTagIdentifier & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagIdentifier);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagIdentifier(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiIdentifierType : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagMultiIdentifierType() {}
|
||||
KaxTagMultiIdentifierType(const KaxTagMultiIdentifierType & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiIdentifierType);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiIdentifierType(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiIdentifierBinary : public EbmlBinary {
|
||||
public:
|
||||
KaxTagMultiIdentifierBinary() {}
|
||||
KaxTagMultiIdentifierBinary(const KaxTagMultiIdentifierBinary & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiIdentifierBinary);}
|
||||
bool ValidateSize() const {return true;} // we don't mind about what's inside
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiIdentifierBinary(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiIdentifierString : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagMultiIdentifierString() {}
|
||||
KaxTagMultiIdentifierString(const KaxTagMultiIdentifierString & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiIdentifierString);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiIdentifierString(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiLegal : public EbmlMaster {
|
||||
public:
|
||||
KaxTagMultiLegal();
|
||||
KaxTagMultiLegal(const KaxTagMultiLegal & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiLegal);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiLegal(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagLegal : public EbmlMaster {
|
||||
public:
|
||||
KaxTagLegal();
|
||||
KaxTagLegal(const KaxTagLegal & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagLegal);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagLegal(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiLegalType : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagMultiLegalType() {}
|
||||
KaxTagMultiLegalType(const KaxTagMultiLegalType & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiLegalType);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiLegalType(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiLegalContent : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagMultiLegalContent() {}
|
||||
KaxTagMultiLegalContent(const KaxTagMultiLegalContent & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiLegalContent);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiLegalContent(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiLegalURL : public EbmlString {
|
||||
public:
|
||||
KaxTagMultiLegalURL() {}
|
||||
KaxTagMultiLegalURL(const KaxTagMultiLegalURL & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiLegalURL);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiLegalURL(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiLegalAddress : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagMultiLegalAddress() {}
|
||||
KaxTagMultiLegalAddress(const KaxTagMultiLegalAddress & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiLegalAddress);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiLegalAddress(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiTitle : public EbmlMaster {
|
||||
public:
|
||||
KaxTagMultiTitle();
|
||||
KaxTagMultiTitle(const KaxTagMultiTitle & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiTitle);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiTitle(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagTitle : public EbmlMaster {
|
||||
public:
|
||||
KaxTagTitle();
|
||||
KaxTagTitle(const KaxTagTitle & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagTitle);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagTitle(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiTitleType : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagMultiTitleType() {}
|
||||
KaxTagMultiTitleType(const KaxTagMultiTitleType & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiTitleType);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiTitleType(*this);}
|
||||
};
|
||||
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiTitleName : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagMultiTitleName() {}
|
||||
KaxTagMultiTitleName(const KaxTagMultiTitleName & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiTitleName);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiTitleName(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiTitleSubTitle : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagMultiTitleSubTitle() {}
|
||||
KaxTagMultiTitleSubTitle(const KaxTagMultiTitleSubTitle & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiTitleSubTitle);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiTitleSubTitle(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiTitleEdition : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagMultiTitleEdition() {}
|
||||
KaxTagMultiTitleEdition(const KaxTagMultiTitleEdition & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiTitleEdition);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiTitleEdition(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiTitleAddress : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTagMultiTitleAddress() {}
|
||||
KaxTagMultiTitleAddress(const KaxTagMultiTitleAddress & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiTitleAddress);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiTitleAddress(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiTitleURL : public EbmlString {
|
||||
public:
|
||||
KaxTagMultiTitleURL() {}
|
||||
KaxTagMultiTitleURL(const KaxTagMultiTitleURL & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiTitleURL);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiTitleURL(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiTitleEmail : public EbmlString {
|
||||
public:
|
||||
KaxTagMultiTitleEmail() {}
|
||||
KaxTagMultiTitleEmail(const KaxTagMultiTitleEmail & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiTitleEmail);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiTitleEmail(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiTitleLanguage : public EbmlString {
|
||||
public:
|
||||
KaxTagMultiTitleLanguage() {}
|
||||
KaxTagMultiTitleLanguage(const KaxTagMultiTitleLanguage & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiTitleLanguage);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiTitleLanguage(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagMultiAttachment : public EbmlMaster {
|
||||
public:
|
||||
KaxTagMultiAttachment();
|
||||
KaxTagMultiAttachment(const KaxTagMultiAttachment & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagMultiAttachment);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagMultiAttachment(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagAttachment : public EbmlMaster {
|
||||
public:
|
||||
KaxTagAttachment();
|
||||
KaxTagAttachment(const KaxTagAttachment & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagAttachment);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagAttachment(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagAttachmentID : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagAttachmentID() {}
|
||||
KaxTagAttachmentID(const KaxTagAttachmentID & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTagAttachmentID);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTagAttachmentID(*this);}
|
||||
};
|
||||
|
||||
/*
|
||||
class MATROSKA_DLL_API KaxTagBPM : public EbmlFloat {
|
||||
public:
|
||||
KaxTagBPM() :EbmlFloat() {}
|
||||
static EbmlElement & Create() {return *(new KaxTagBPM);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagPopularimeter : public EbmlSInteger {
|
||||
public:
|
||||
KaxTagPopularimeter() {}
|
||||
static EbmlElement & Create() {return *(new KaxTagPopularimeter);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagRating : public EbmlBinary {
|
||||
public:
|
||||
KaxTagRating() {}
|
||||
static EbmlElement & Create() {return *(new KaxTagRating);}
|
||||
bool ValidateSize() const {return true;} // we don't mind about what's inside
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagSetPart : public EbmlUInteger {
|
||||
public:
|
||||
KaxTagSetPart() {}
|
||||
static EbmlElement & Create() {return *(new KaxTagSetPart);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagUserDefinedURL : public EbmlString {
|
||||
public:
|
||||
KaxTagUserDefinedURL() {}
|
||||
static EbmlElement & Create() {return *(new KaxTagUserDefinedURL);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTagVideoSecondaryGenre : public EbmlBinary {
|
||||
public:
|
||||
KaxTagVideoSecondaryGenre() {}
|
||||
static EbmlElement & Create() {return *(new KaxTagVideoSecondaryGenre);}
|
||||
bool ValidateSize() const {return (Size >= 4);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxWritingApp : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxWritingApp() {}
|
||||
static EbmlElement & Create() {return *(new KaxWritingApp);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
};*/
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TAGMULTI_H
|
@ -0,0 +1,58 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class MATROSKA_DLL_API KaxTags : public EbmlMaster {
|
||||
public:
|
||||
KaxTags();
|
||||
KaxTags(const KaxTags & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTags);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTags(*this);}
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TAGS_H
|
@ -0,0 +1,119 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class MATROSKA_DLL_API KaxTrackAudio : public EbmlMaster {
|
||||
public:
|
||||
KaxTrackAudio();
|
||||
KaxTrackAudio(const KaxTrackAudio & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackAudio);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackAudio(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxAudioSamplingFreq : public EbmlFloat {
|
||||
public:
|
||||
KaxAudioSamplingFreq() :EbmlFloat(8000.0) {}
|
||||
KaxAudioSamplingFreq(const KaxAudioSamplingFreq & ElementToClone) :EbmlFloat(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxAudioSamplingFreq);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxAudioSamplingFreq(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxAudioOutputSamplingFreq : public EbmlFloat {
|
||||
public:
|
||||
KaxAudioOutputSamplingFreq() :EbmlFloat() {}
|
||||
KaxAudioOutputSamplingFreq(const KaxAudioOutputSamplingFreq & ElementToClone) :EbmlFloat(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxAudioOutputSamplingFreq);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxAudioOutputSamplingFreq(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxAudioChannels : public EbmlUInteger {
|
||||
public:
|
||||
KaxAudioChannels() :EbmlUInteger(1) {}
|
||||
KaxAudioChannels(const KaxAudioChannels & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxAudioChannels);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxAudioChannels(*this);}
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
class MATROSKA_DLL_API KaxAudioPosition : public EbmlBinary {
|
||||
public:
|
||||
KaxAudioPosition() {}
|
||||
KaxAudioPosition(const KaxAudioPosition & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxAudioPosition);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
bool ValidateSize(void) const {return true;}
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxAudioPosition(*this);}
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
class MATROSKA_DLL_API KaxAudioBitDepth : public EbmlUInteger {
|
||||
public:
|
||||
KaxAudioBitDepth() {}
|
||||
KaxAudioBitDepth(const KaxAudioBitDepth & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxAudioBitDepth);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxAudioBitDepth(*this);}
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TRACK_AUDIO_H
|
@ -0,0 +1,277 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class MATROSKA_DLL_API KaxTrackNumber : public EbmlUInteger {
|
||||
public:
|
||||
KaxTrackNumber() {}
|
||||
KaxTrackNumber(const KaxTrackNumber & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackNumber);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackNumber(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTrackUID : public EbmlUInteger {
|
||||
public:
|
||||
KaxTrackUID() {}
|
||||
KaxTrackUID(const KaxTrackUID & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackUID);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackUID(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTrackType : public EbmlUInteger {
|
||||
public:
|
||||
KaxTrackType() {}
|
||||
KaxTrackType(const KaxTrackType & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackType);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackType(*this);}
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
class MATROSKA_DLL_API KaxTrackFlagEnabled : public EbmlUInteger {
|
||||
public:
|
||||
KaxTrackFlagEnabled() :EbmlUInteger(1) {}
|
||||
KaxTrackFlagEnabled(const KaxTrackFlagEnabled & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackFlagEnabled);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackFlagEnabled(*this);}
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
class MATROSKA_DLL_API KaxTrackFlagDefault : public EbmlUInteger {
|
||||
public:
|
||||
KaxTrackFlagDefault() :EbmlUInteger(1) {}
|
||||
KaxTrackFlagDefault(const KaxTrackFlagDefault & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackFlagDefault);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackFlagDefault(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTrackFlagLacing : public EbmlUInteger {
|
||||
public:
|
||||
KaxTrackFlagLacing() :EbmlUInteger(1) {}
|
||||
KaxTrackFlagLacing(const KaxTrackFlagLacing & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackFlagLacing);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackFlagLacing(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTrackMinCache : public EbmlUInteger {
|
||||
public:
|
||||
KaxTrackMinCache() :EbmlUInteger(0) {}
|
||||
KaxTrackMinCache(const KaxTrackMinCache & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackMinCache);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackMinCache(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTrackMaxCache : public EbmlUInteger {
|
||||
public:
|
||||
KaxTrackMaxCache() {}
|
||||
KaxTrackMaxCache(const KaxTrackMaxCache & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackMaxCache);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackMaxCache(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTrackDefaultDuration : public EbmlUInteger {
|
||||
public:
|
||||
KaxTrackDefaultDuration() {}
|
||||
KaxTrackDefaultDuration(const KaxTrackDefaultDuration & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackDefaultDuration);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackDefaultDuration(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTrackTimecodeScale : public EbmlFloat {
|
||||
public:
|
||||
KaxTrackTimecodeScale() :EbmlFloat(1.0) {}
|
||||
KaxTrackTimecodeScale(const KaxTrackTimecodeScale & ElementToClone) :EbmlFloat(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackTimecodeScale);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackTimecodeScale(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTrackName : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxTrackName() {}
|
||||
KaxTrackName(const KaxTrackName & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackName);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackName(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTrackLanguage : public EbmlString {
|
||||
public:
|
||||
KaxTrackLanguage() :EbmlString("eng") {}
|
||||
KaxTrackLanguage(const KaxTrackLanguage & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackLanguage);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackLanguage(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCodecID : public EbmlString {
|
||||
public:
|
||||
KaxCodecID() {}
|
||||
KaxCodecID(const KaxCodecID & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCodecID);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCodecID(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCodecPrivate : public EbmlBinary {
|
||||
public:
|
||||
KaxCodecPrivate() {}
|
||||
KaxCodecPrivate(const KaxCodecPrivate & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxCodecPrivate);}
|
||||
bool ValidateSize() const {return true;} // we don't mind about what's inside
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCodecPrivate(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCodecName : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxCodecName() {}
|
||||
KaxCodecName(const KaxCodecName & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCodecName);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCodecName(*this);}
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
class MATROSKA_DLL_API KaxCodecSettings : public EbmlUnicodeString {
|
||||
public:
|
||||
KaxCodecSettings() {}
|
||||
KaxCodecSettings(const KaxCodecSettings & ElementToClone) :EbmlUnicodeString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCodecSettings);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCodecSettings(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCodecInfoURL : public EbmlString {
|
||||
public:
|
||||
KaxCodecInfoURL() {}
|
||||
KaxCodecInfoURL(const KaxCodecInfoURL & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCodecInfoURL);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCodecInfoURL(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCodecDownloadURL : public EbmlString {
|
||||
public:
|
||||
KaxCodecDownloadURL() {}
|
||||
KaxCodecDownloadURL(const KaxCodecDownloadURL & ElementToClone) :EbmlString(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCodecDownloadURL);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCodecDownloadURL(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxCodecDecodeAll : public EbmlUInteger {
|
||||
public:
|
||||
KaxCodecDecodeAll() :EbmlUInteger(1) {}
|
||||
KaxCodecDecodeAll(const KaxCodecDecodeAll & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxCodecDecodeAll);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxCodecDecodeAll(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTrackOverlay : public EbmlUInteger {
|
||||
public:
|
||||
KaxTrackOverlay() {}
|
||||
KaxTrackOverlay(const KaxTrackOverlay & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackOverlay);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackOverlay(*this);}
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TRACK_ENTRY_DATA_H
|
@ -0,0 +1,235 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class MATROSKA_DLL_API description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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.h,v 1.9 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_TRACK_VIDEO_H
|
||||
#define LIBMATROSKA_TRACK_VIDEO_H
|
||||
|
||||
#include "matroska/KaxTypes.h"
|
||||
#include "ebml/EbmlMaster.h"
|
||||
#include "ebml/EbmlUInteger.h"
|
||||
#include "ebml/EbmlBinary.h"
|
||||
#include "ebml/EbmlFloat.h"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class MATROSKA_DLL_API KaxTrackVideo : public EbmlMaster {
|
||||
public:
|
||||
KaxTrackVideo();
|
||||
KaxTrackVideo(const KaxTrackVideo & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackVideo);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackVideo(*this);}
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
class MATROSKA_DLL_API KaxVideoFlagInterlaced : public EbmlUInteger {
|
||||
public:
|
||||
KaxVideoFlagInterlaced() :EbmlUInteger(0) {}
|
||||
KaxVideoFlagInterlaced(const KaxVideoFlagInterlaced & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxVideoFlagInterlaced);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxVideoFlagInterlaced(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxVideoStereoMode : public EbmlUInteger {
|
||||
public:
|
||||
KaxVideoStereoMode() :EbmlUInteger(0) {}
|
||||
KaxVideoStereoMode(const KaxVideoStereoMode & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxVideoStereoMode);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxVideoStereoMode(*this);}
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
class MATROSKA_DLL_API KaxVideoPixelWidth : public EbmlUInteger {
|
||||
public:
|
||||
KaxVideoPixelWidth() {}
|
||||
KaxVideoPixelWidth(const KaxVideoPixelWidth & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxVideoPixelWidth);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxVideoPixelWidth(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxVideoPixelHeight : public EbmlUInteger {
|
||||
public:
|
||||
KaxVideoPixelHeight() {}
|
||||
KaxVideoPixelHeight(const KaxVideoPixelHeight & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxVideoPixelHeight);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxVideoPixelHeight(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxVideoPixelCropBottom : public EbmlUInteger {
|
||||
public:
|
||||
KaxVideoPixelCropBottom(): EbmlUInteger(0) {}
|
||||
KaxVideoPixelCropBottom(const KaxVideoPixelCropBottom & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxVideoPixelCropBottom);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxVideoPixelCropBottom(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxVideoPixelCropTop : public EbmlUInteger {
|
||||
public:
|
||||
KaxVideoPixelCropTop(): EbmlUInteger(0) {}
|
||||
KaxVideoPixelCropTop(const KaxVideoPixelCropTop & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxVideoPixelCropTop);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxVideoPixelCropTop(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxVideoPixelCropLeft : public EbmlUInteger {
|
||||
public:
|
||||
KaxVideoPixelCropLeft(): EbmlUInteger(0) {}
|
||||
KaxVideoPixelCropLeft(const KaxVideoPixelCropLeft & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxVideoPixelCropLeft);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxVideoPixelCropLeft(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxVideoPixelCropRight : public EbmlUInteger {
|
||||
public:
|
||||
KaxVideoPixelCropRight(): EbmlUInteger(0) {}
|
||||
KaxVideoPixelCropRight(const KaxVideoPixelCropRight & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxVideoPixelCropRight);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxVideoPixelCropRight(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxVideoDisplayWidth : public EbmlUInteger {
|
||||
public:
|
||||
KaxVideoDisplayWidth() {}
|
||||
KaxVideoDisplayWidth(const KaxVideoDisplayWidth & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxVideoDisplayWidth);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxVideoDisplayWidth(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxVideoDisplayHeight : public EbmlUInteger {
|
||||
public:
|
||||
KaxVideoDisplayHeight() {}
|
||||
KaxVideoDisplayHeight(const KaxVideoDisplayHeight & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxVideoDisplayHeight);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxVideoDisplayHeight(*this);}
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
class MATROSKA_DLL_API KaxVideoDisplayUnit : public EbmlUInteger {
|
||||
public:
|
||||
KaxVideoDisplayUnit() {}
|
||||
KaxVideoDisplayUnit(const KaxVideoDisplayUnit & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxVideoDisplayUnit);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxVideoDisplayUnit(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxVideoAspectRatio : public EbmlUInteger {
|
||||
public:
|
||||
KaxVideoAspectRatio() {}
|
||||
KaxVideoAspectRatio(const KaxVideoAspectRatio & ElementToClone) :EbmlUInteger(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxVideoAspectRatio);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxVideoAspectRatio(*this);}
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
class MATROSKA_DLL_API KaxVideoColourSpace : public EbmlBinary {
|
||||
public:
|
||||
KaxVideoColourSpace() {}
|
||||
KaxVideoColourSpace(const KaxVideoColourSpace & ElementToClone) :EbmlBinary(ElementToClone){}
|
||||
static EbmlElement & Create() {return *(new KaxVideoColourSpace);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
bool ValidateSize(void) const {return (Size == 4);}
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxVideoColourSpace(*this);}
|
||||
};
|
||||
|
||||
#if MATROSKA_VERSION >= 2
|
||||
class MATROSKA_DLL_API KaxVideoGamma : public EbmlFloat {
|
||||
public:
|
||||
KaxVideoGamma() {}
|
||||
KaxVideoGamma(const KaxVideoGamma & ElementToClone) :EbmlFloat(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxVideoGamma);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxVideoGamma(*this);}
|
||||
};
|
||||
#endif // MATROSKA_VERSION
|
||||
|
||||
class MATROSKA_DLL_API KaxVideoFrameRate : public EbmlFloat {
|
||||
public:
|
||||
KaxVideoFrameRate() {}
|
||||
KaxVideoFrameRate(const KaxVideoFrameRate & ElementToClone) :EbmlFloat(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxVideoFrameRate);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault);
|
||||
EbmlElement * Clone() const {return new KaxVideoFrameRate(*this);}
|
||||
};
|
||||
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TRACK_VIDEO_H
|
@ -0,0 +1,96 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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"
|
||||
|
||||
using namespace LIBEBML_NAMESPACE;
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
class MATROSKA_DLL_API KaxTracks : public EbmlMaster {
|
||||
public:
|
||||
KaxTracks();
|
||||
KaxTracks(const KaxTracks & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTracks);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTracks(*this);}
|
||||
};
|
||||
|
||||
class MATROSKA_DLL_API KaxTrackEntry : public EbmlMaster {
|
||||
public:
|
||||
KaxTrackEntry();
|
||||
KaxTrackEntry(const KaxTrackEntry & ElementToClone) :EbmlMaster(ElementToClone) {}
|
||||
static EbmlElement & Create() {return *(new KaxTrackEntry);}
|
||||
const EbmlCallbacks & Generic() const {return ClassInfos;}
|
||||
static const EbmlCallbacks ClassInfos;
|
||||
operator const EbmlId &() const {return ClassInfos.GlobalId;}
|
||||
EbmlElement * Clone() const {return new KaxTrackEntry(*this);}
|
||||
|
||||
EbmlUInteger & TrackNumber() const { return *(static_cast<EbmlUInteger *>(FindElt(KaxTrackNumber::ClassInfos))); }
|
||||
|
||||
void EnableLacing(bool bEnable = true);
|
||||
|
||||
/*!
|
||||
\note lacing set by default
|
||||
*/
|
||||
inline bool LacingEnabled() const {
|
||||
KaxTrackFlagLacing * myLacing = static_cast<KaxTrackFlagLacing *>(FindFirstElt(KaxTrackFlagLacing::ClassInfos));
|
||||
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
|
@ -0,0 +1,53 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2003 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
|
||||
};
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_TYPES_H
|
@ -0,0 +1,54 @@
|
||||
/****************************************************************************
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2004 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.h,v 1.13 2004/04/23 16:46:07 mosu Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBMATROSKA_VERSION_H
|
||||
#define LIBMATROSKA_VERSION_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "ebml/EbmlConfig.h"
|
||||
#include "matroska/KaxConfig.h"
|
||||
|
||||
START_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#define LIBMATROSKA_VERSION 000704
|
||||
|
||||
static const std::string KaxCodeVersion = "0.7.4";
|
||||
static const std::string KaxCodeDate = __TIMESTAMP__;
|
||||
|
||||
/*!
|
||||
\todo Improve the CRC/ECC system (backward and forward possible ?) to fit streaming/live writing/simple reading
|
||||
*/
|
||||
|
||||
END_LIBMATROSKA_NAMESPACE
|
||||
|
||||
#endif // LIBMATROSKA_VERSION_H
|
@ -0,0 +1,119 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2003 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 libmatroska.h
|
||||
\version \$Id: libmatroska.h,v 1.2 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author Ingo Ralf Blum <ingoralfblum @ users.sf.net>
|
||||
|
||||
\brief C API to the libmatroska library
|
||||
\note These are the functions that should be exported (visible from outisde the library)
|
||||
\todo Put a function here for all the MUST in the Matroska spec
|
||||
\todo Put a brief description of each function, and a description of the params and return value
|
||||
\todo Change the int values to sized types
|
||||
*/
|
||||
|
||||
#ifndef _LIBMATROSKA_H_INCLUDED_
|
||||
#define _LIBMATROSKA_H_INCLUDED_
|
||||
|
||||
#include "libmatroska_t.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef OLD
|
||||
|
||||
/*!
|
||||
\fn int matroska_plug_log(matroska_error_callback)
|
||||
\brief Attach a callback to be informed when error occurs
|
||||
\param callback The callback that will be called when logging occurs \return 0 if successfull
|
||||
*/
|
||||
int matroska_plug_log(matroska_error_callback callback);
|
||||
|
||||
/*!
|
||||
\fn int matroska_unplug_log(matroska_error_callback)
|
||||
\brief Unattach an attached callback to be informed when error occurs
|
||||
\param callback The callback that was called when logging occurs \return 0 if successfull
|
||||
*/
|
||||
int matroska_unplug_log(matroska_error_callback callback);
|
||||
|
||||
/*!
|
||||
\fn matroska_id matroska_open_file(c_string,matroska_file_mode)
|
||||
\brief Open an instance of an Matroska file
|
||||
\param string The name of the file to open (including OS depedant path) \param mode The mode to open the file (read, write, etc)
|
||||
\return NULL if the opening failed or an ID that will be used to access this file from the API
|
||||
*/
|
||||
matroska_stream MATROSKA_EXPORT matroska_open_stream_file(c_string string, open_mode mode);
|
||||
|
||||
matroska_id MATROSKA_EXPORT matroska_open_stream(matroska_stream a_stream);
|
||||
|
||||
/*!
|
||||
\fn matroska_id matroska_open_url(c_string)
|
||||
\brief Open an instance of an Matroska file from a URL
|
||||
\param string The name of the URL to open \return NULL if the opening failed or an ID that will be used to access this file from the API
|
||||
\warning Open only for reading ?
|
||||
\note It requires that Curl is compiled or installed
|
||||
*/
|
||||
matroska_id matroska_open_url(c_string string);
|
||||
|
||||
/*!
|
||||
\fn int matroska_close(matroska_id)
|
||||
\brief Close the specified Matroska instance
|
||||
\param id The instance to close \return 0 if successfull
|
||||
*/
|
||||
void MATROSKA_EXPORT matroska_close(matroska_id id);
|
||||
|
||||
void MATROSKA_EXPORT matroska_end(matroska_id id, uint32 totaltime);
|
||||
|
||||
matroska_track MATROSKA_EXPORT matroska_create_track(matroska_id id, enum track_type type);
|
||||
|
||||
void MATROSKA_EXPORT matroska_read_head(matroska_id id);
|
||||
void MATROSKA_EXPORT matroska_read_tracks(matroska_id id);
|
||||
|
||||
uint8 MATROSKA_EXPORT matroska_get_number_track(matroska_id id);
|
||||
|
||||
matroska_track MATROSKA_EXPORT matroska_get_track(matroska_id id, uint8 track_index);
|
||||
|
||||
void MATROSKA_EXPORT matroska_get_track_info(matroska_id id, matroska_track track, track_info * infos);
|
||||
|
||||
/*
|
||||
int matroska_track_write_block(matroska_track, void* buffer, unsigned int size);
|
||||
int matroska_track_close(matroska_track);
|
||||
*/
|
||||
|
||||
#endif /* OLD */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LIBMATROSKA_H_INCLUDED_ */
|
@ -0,0 +1,107 @@
|
||||
/****************************************************************************
|
||||
** libmatroska : parse Matroska files, see http://www.matroska.org/
|
||||
**
|
||||
** <file/class description>
|
||||
**
|
||||
** Copyright (C) 2002-2003 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 libmatroska_t.h
|
||||
\version \$Id: libmatroska_t.h,v 1.3 2004/04/14 23:26:17 robux4 Exp $
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author Ingo Ralf Blum <ingoralfblum @ users.sf.net>
|
||||
|
||||
\brief Misc type definitions for the C API of libmatroska
|
||||
|
||||
\note These types should be compiler/language independant (just platform dependant)
|
||||
\todo recover the sized types (uint16, int32, etc) here too (or maybe here only)
|
||||
*/
|
||||
|
||||
#ifndef _LIBMATROSKA_T_H_INCLUDED_
|
||||
#define _LIBMATROSKA_T_H_INCLUDED_
|
||||
|
||||
#include "ebml/c/libebml_t.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*!
|
||||
\enum track_type
|
||||
*/
|
||||
typedef enum track_type {
|
||||
track_video = 0x01, ///< Rectangle-shaped non-transparent pictures aka video
|
||||
track_audio = 0x02, ///< Anything you can hear
|
||||
track_complex = 0x03, ///< Audio and video in same track, used by DV
|
||||
|
||||
track_logo = 0x10, ///< Overlay-pictures, displayed over video
|
||||
track_subtitle = 0x11, ///< Text-subtitles. One track contains one language and only one track can be active (player-side configuration)
|
||||
|
||||
track_control = 0x20 ///< Control-codes for menus and other stuff
|
||||
} track_type;
|
||||
|
||||
/*!
|
||||
\enum matroska_error_t
|
||||
\brief a callback that the library use to inform of errors happening
|
||||
\note this should be used by the libmatroska internals
|
||||
*/
|
||||
typedef enum {
|
||||
error_null_pointer ///< NULL pointer where something else is expected
|
||||
} matroska_error_t;
|
||||
|
||||
typedef void *matroska_stream;
|
||||
|
||||
/*!
|
||||
\var void* matroska_id
|
||||
\brief UID used to access an Matroska file instance
|
||||
*/
|
||||
typedef void* matroska_id;
|
||||
/*!
|
||||
\var void* matroska_track
|
||||
\brief UID used to access a track
|
||||
*/
|
||||
typedef void* matroska_track;
|
||||
/*!
|
||||
\var char* c_string
|
||||
\brief C-String, ie a buffer with characters terminated by \0
|
||||
*/
|
||||
typedef char* c_string;
|
||||
/*!
|
||||
\var unsigned int matroska_file_mode
|
||||
\brief A bit buffer, each bit representing a value for the file opening
|
||||
\todo replace the unsigned int by a sized type (8 or 16 bits)
|
||||
*/
|
||||
typedef char * matroska_file_mode;
|
||||
/*!
|
||||
\var void (*matroska_error_callback)(matroska_error_t error_code, char* error_message)
|
||||
\brief a callback that the library use to inform of errors happening
|
||||
*/
|
||||
typedef void (*matroska_error_callback)(matroska_error_t error_code, char* error_message);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LIBMATROSKA_T_H_INCLUDED_ */
|
Loading…
Reference in New Issue
Block a user