live
MPEG1or2DemuxedElementaryStream.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 MPEG 1 or 2 Elementary Stream, demultiplexed from a Program Stream
19// C++ header
20
21#ifndef _MPEG_1OR2_DEMUXED_ELEMENTARY_STREAM_HH
22#define _MPEG_1OR2_DEMUXED_ELEMENTARY_STREAM_HH
23
24#ifndef _MPEG_1OR2_DEMUX_HH
25#include "MPEG1or2Demux.hh"
26#endif
27
29public:
31
32 unsigned char mpegVersion() const { return fMPEGversion; }
33
35
36private: // We are created only by a MPEG1or2Demux (a friend)
38 u_int8_t streamIdTag,
41
42private:
43 // redefined virtual functions:
44 virtual void doGetNextFrame();
45 virtual void doStopGettingFrames();
46 virtual char const* MIMEtype() const;
47 virtual unsigned maxFrameSize() const;
48
49private:
50 static void afterGettingFrame(void* clientData,
51 unsigned frameSize, unsigned numTruncatedBytes,
52 struct timeval presentationTime,
53 unsigned durationInMicroseconds);
54
55 void afterGettingFrame1(unsigned frameSize, unsigned numTruncatedBytes,
56 struct timeval presentationTime,
57 unsigned durationInMicroseconds);
58
59private:
62 char const* fMIMEtype;
64 unsigned char fMPEGversion;
65
66 friend class MPEG1or2Demux;
67};
68
69#endif
static void afterGettingFrame(void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
virtual unsigned maxFrameSize() const
virtual char const * MIMEtype() const
MPEG1or2DemuxedElementaryStream(UsageEnvironment &env, u_int8_t streamIdTag, MPEG1or2Demux &sourceDemux)
void afterGettingFrame1(unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)