1/**************************************************************************** 2** libmatroska : parse Matroska files, see http://www.matroska.org/ 3** 4** <file/class MATROSKA_DLL_API description> 5** 6** Copyright (C) 2002-2004 Steve Lhomme. All rights reserved. 7** 8** This file is part of libmatroska. 9** 10** This library is free software; you can redistribute it and/or 11** modify it under the terms of the GNU Lesser General Public 12** License as published by the Free Software Foundation; either 13** version 2.1 of the License, or (at your option) any later version. 14** 15** This library is distributed in the hope that it will be useful, 16** but WITHOUT ANY WARRANTY; without even the implied warranty of 17** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18** Lesser General Public License for more details. 19** 20** You should have received a copy of the GNU Lesser General Public 21** License along with this library; if not, write to the Free Software 22** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23** 24** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.** 25** Contact license@matroska.org if any conditions of this licensing are 26** not clear to you. 27** 28**********************************************************************/ 29 30/*! 31 \file 32 \version \$Id: KaxTrackAudio.h,v 1.11 2004/04/14 23:26:17 robux4 Exp $ 33 \author Steve Lhomme <robux4 @ users.sf.net> 34*/ 35#ifndef LIBMATROSKA_TRACK_AUDIO_H 36#define LIBMATROSKA_TRACK_AUDIO_H 37 38#include "matroska/KaxTypes.h" 39#include "ebml/EbmlMaster.h" 40#include "ebml/EbmlFloat.h" 41#include "ebml/EbmlUInteger.h" 42#include "ebml/EbmlBinary.h" 43 44using namespace LIBEBML_NAMESPACE; 45 46START_LIBMATROSKA_NAMESPACE 47 48class MATROSKA_DLL_API KaxTrackAudio : public EbmlMaster { 49 public: 50 KaxTrackAudio(); 51 KaxTrackAudio(const KaxTrackAudio & ElementToClone) :EbmlMaster(ElementToClone) {} 52 static EbmlElement & Create() {return *(new KaxTrackAudio);} 53 const EbmlCallbacks & Generic() const {return ClassInfos;} 54 static const EbmlCallbacks ClassInfos; 55 operator const EbmlId &() const {return ClassInfos.GlobalId;} 56 EbmlElement * Clone() const {return new KaxTrackAudio(*this);} 57}; 58 59class MATROSKA_DLL_API KaxAudioSamplingFreq : public EbmlFloat { 60 public: 61 KaxAudioSamplingFreq() :EbmlFloat(8000.0) {} 62 KaxAudioSamplingFreq(const KaxAudioSamplingFreq & ElementToClone) :EbmlFloat(ElementToClone) {} 63 static EbmlElement & Create() {return *(new KaxAudioSamplingFreq);} 64 const EbmlCallbacks & Generic() const {return ClassInfos;} 65 static const EbmlCallbacks ClassInfos; 66 operator const EbmlId &() const {return ClassInfos.GlobalId;} 67 EbmlElement * Clone() const {return new KaxAudioSamplingFreq(*this);} 68}; 69 70class MATROSKA_DLL_API KaxAudioOutputSamplingFreq : public EbmlFloat { 71 public: 72 KaxAudioOutputSamplingFreq() :EbmlFloat() {} 73 KaxAudioOutputSamplingFreq(const KaxAudioOutputSamplingFreq & ElementToClone) :EbmlFloat(ElementToClone) {} 74 static EbmlElement & Create() {return *(new KaxAudioOutputSamplingFreq);} 75 const EbmlCallbacks & Generic() const {return ClassInfos;} 76 static const EbmlCallbacks ClassInfos; 77 operator const EbmlId &() const {return ClassInfos.GlobalId;} 78 EbmlElement * Clone() const {return new KaxAudioOutputSamplingFreq(*this);} 79}; 80 81class MATROSKA_DLL_API KaxAudioChannels : public EbmlUInteger { 82 public: 83 KaxAudioChannels() :EbmlUInteger(1) {} 84 KaxAudioChannels(const KaxAudioChannels & ElementToClone) :EbmlUInteger(ElementToClone) {} 85 static EbmlElement & Create() {return *(new KaxAudioChannels);} 86 const EbmlCallbacks & Generic() const {return ClassInfos;} 87 static const EbmlCallbacks ClassInfos; 88 operator const EbmlId &() const {return ClassInfos.GlobalId;} 89 EbmlElement * Clone() const {return new KaxAudioChannels(*this);} 90}; 91 92#if MATROSKA_VERSION >= 2 93class MATROSKA_DLL_API KaxAudioPosition : public EbmlBinary { 94 public: 95 KaxAudioPosition() {} 96 KaxAudioPosition(const KaxAudioPosition & ElementToClone) :EbmlBinary(ElementToClone){} 97 static EbmlElement & Create() {return *(new KaxAudioPosition);} 98 const EbmlCallbacks & Generic() const {return ClassInfos;} 99 static const EbmlCallbacks ClassInfos; 100 bool ValidateSize(void) const {return true;} 101 operator const EbmlId &() const {return ClassInfos.GlobalId;} 102 EbmlElement * Clone() const {return new KaxAudioPosition(*this);} 103}; 104#endif // MATROSKA_VERSION 105 106class MATROSKA_DLL_API KaxAudioBitDepth : public EbmlUInteger { 107 public: 108 KaxAudioBitDepth() {} 109 KaxAudioBitDepth(const KaxAudioBitDepth & ElementToClone) :EbmlUInteger(ElementToClone) {} 110 static EbmlElement & Create() {return *(new KaxAudioBitDepth);} 111 const EbmlCallbacks & Generic() const {return ClassInfos;} 112 static const EbmlCallbacks ClassInfos; 113 operator const EbmlId &() const {return ClassInfos.GlobalId;} 114 EbmlElement * Clone() const {return new KaxAudioBitDepth(*this);} 115}; 116 117END_LIBMATROSKA_NAMESPACE 118 119#endif // LIBMATROSKA_TRACK_AUDIO_H 120