live
MatroskaDemuxedTrack.hh
Go to the documentation of this file.
1/**********
2This library is free software; you can redistribute it and/or modify it under
3the terms of the GNU Lesser General Public License as published by the
4Free Software Foundation; either version 3 of the License, or (at your
5option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
6
7This library is distributed in the hope that it will be useful, but WITHOUT
8ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10more details.
11
12You should have received a copy of the GNU Lesser General Public License
13along with this library; if not, write to the Free Software Foundation, Inc.,
1451 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15**********/
16// "liveMedia"
17// Copyright (c) 1996-2024 Live Networks, Inc. All rights reserved.
18// A media track, demultiplexed from a Matroska file
19// C++ header
20
21#ifndef _MATROSKA_DEMUXED_TRACK_HH
22#define _MATROSKA_DEMUXED_TRACK_HH
23
24#ifndef _FRAMED_SOURCE_HH
25#include "FramedSource.hh"
26#endif
27
28class MatroskaDemux; // forward
29
31public:
32 void seekToTime(double& seekNPT);
33
34private: // We are created only by a MatroskaDemux (a friend)
35 friend class MatroskaDemux;
36 MatroskaDemuxedTrack(UsageEnvironment& env, unsigned trackNumber, MatroskaDemux& sourceDemux);
38
39private:
40 // redefined virtual functions:
41 virtual void doGetNextFrame();
42 virtual void doStopGettingFrames();
43 virtual char const* MIMEtype() const;
44
45private: // We are accessed only by MatroskaDemux and by MatroskaFileParser (a friend)
46 friend class MatroskaFileParser;
47 unsigned char* to() { return fTo; }
48 unsigned maxSize() { return fMaxSize; }
49 unsigned& frameSize() { return fFrameSize; }
50 unsigned& numTruncatedBytes() { return fNumTruncatedBytes; }
51 struct timeval& presentationTime() { return fPresentationTime; }
53
54 struct timeval& prevPresentationTime() { return fPrevPresentationTime; }
56 void reset();
57
58private:
61 struct timeval fPrevPresentationTime;
63 unsigned fOpusFrameNumber; // hack for Opus audio
64};
65
66#endif
unsigned fFrameSize
Definition: FramedSource.hh:77
unsigned fNumTruncatedBytes
Definition: FramedSource.hh:78
unsigned fDurationInMicroseconds
Definition: FramedSource.hh:80
unsigned fMaxSize
Definition: FramedSource.hh:76
unsigned char * fTo
Definition: FramedSource.hh:75
struct timeval fPresentationTime
Definition: FramedSource.hh:79
void seekToTime(double &seekNPT)
virtual void doStopGettingFrames()
MatroskaDemux & fOurSourceDemux
virtual char const * MIMEtype() const
MatroskaDemuxedTrack(UsageEnvironment &env, unsigned trackNumber, MatroskaDemux &sourceDemux)
struct timeval & presentationTime()
struct timeval fPrevPresentationTime
unsigned & durationInMicroseconds()
virtual ~MatroskaDemuxedTrack()
struct timeval & prevPresentationTime()
virtual void doGetNextFrame()