| 1 | /**************************************************************************** |
|---|
| 2 | ** libmatroska : parse Matroska files, see http://www.matroska.org/ |
|---|
| 3 | ** |
|---|
| 4 | ** <file/class description> |
|---|
| 5 | ** |
|---|
| 6 | ** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved. |
|---|
| 7 | ** |
|---|
| 8 | ** This library is free software; you can redistribute it and/or |
|---|
| 9 | ** modify it under the terms of the GNU Lesser General Public |
|---|
| 10 | ** License as published by the Free Software Foundation; either |
|---|
| 11 | ** version 2.1 of the License, or (at your option) any later version. |
|---|
| 12 | ** |
|---|
| 13 | ** This library is distributed in the hope that it will be useful, |
|---|
| 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 16 | ** Lesser General Public License for more details. |
|---|
| 17 | ** |
|---|
| 18 | ** You should have received a copy of the GNU Lesser General Public |
|---|
| 19 | ** License along with this library; if not, write to the Free Software |
|---|
| 20 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 21 | ** |
|---|
| 22 | ** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.** |
|---|
| 23 | ** Contact license@matroska.org if any conditions of this licensing are |
|---|
| 24 | ** not clear to you. |
|---|
| 25 | ** |
|---|
| 26 | **********************************************************************/ |
|---|
| 27 | |
|---|
| 28 | /*! |
|---|
| 29 | \file |
|---|
| 30 | \version \$Id: KaxBlockData.h,v 1.10 2004/04/14 23:26:17 robux4 Exp $ |
|---|
| 31 | \author Steve Lhomme <robux4 @ users.sf.net> |
|---|
| 32 | */ |
|---|
| 33 | #ifndef LIBMATROSKA_BLOCK_ADDITIONAL_H |
|---|
| 34 | #define LIBMATROSKA_BLOCK_ADDITIONAL_H |
|---|
| 35 | |
|---|
| 36 | #include "matroska/KaxTypes.h" |
|---|
| 37 | #include "ebml/EbmlMaster.h" |
|---|
| 38 | #include "ebml/EbmlUInteger.h" |
|---|
| 39 | #include "ebml/EbmlSInteger.h" |
|---|
| 40 | #include "matroska/KaxDefines.h" |
|---|
| 41 | #include "matroska/KaxBlock.h" |
|---|
| 42 | |
|---|
| 43 | using namespace LIBEBML_NAMESPACE; |
|---|
| 44 | |
|---|
| 45 | START_LIBMATROSKA_NAMESPACE |
|---|
| 46 | |
|---|
| 47 | /*! |
|---|
| 48 | \brief element used for B frame-likes |
|---|
| 49 | */ |
|---|
| 50 | DECLARE_MKX_SINTEGER_CONS(KaxReferenceBlock) |
|---|
| 51 | public: |
|---|
| 52 | ~KaxReferenceBlock(); |
|---|
| 53 | /*! |
|---|
| 54 | \brief override this method to compute the timecode value |
|---|
| 55 | */ |
|---|
| 56 | virtual filepos_t UpdateSize(bool bSaveDefault = false, bool bForceRender = false); |
|---|
| 57 | |
|---|
| 58 | const KaxBlockBlob & RefBlock() const; |
|---|
| 59 | void SetReferencedBlock(const KaxBlockBlob * aRefdBlock); |
|---|
| 60 | void SetReferencedBlock(const KaxBlockGroup & aRefdBlock); |
|---|
| 61 | void SetParentBlock(const KaxBlockGroup & aParentBlock) {ParentBlock = &aParentBlock;} |
|---|
| 62 | |
|---|
| 63 | protected: |
|---|
| 64 | const KaxBlockBlob * RefdBlock; |
|---|
| 65 | const KaxBlockGroup * ParentBlock; |
|---|
| 66 | void SetReferencedTimecode(int64 refTimecode) {*static_cast<EbmlSInteger*>(this) = refTimecode; bTimecodeSet = true;}; |
|---|
| 67 | bool bTimecodeSet; |
|---|
| 68 | bool bOurBlob; |
|---|
| 69 | void FreeBlob(); |
|---|
| 70 | }; |
|---|
| 71 | |
|---|
| 72 | END_LIBMATROSKA_NAMESPACE |
|---|
| 73 | |
|---|
| 74 | #endif // LIBMATROSKA_BLOCK_ADDITIONAL_H |
|---|