live
MPEG2TransportStreamFromPESSource.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 filter for converting a stream of MPEG PES packets to a MPEG-2 Transport Stream
19// C++ header
20
21#ifndef _MPEG2_TRANSPORT_STREAM_FROM_PES_SOURCE_HH
22#define _MPEG2_TRANSPORT_STREAM_FROM_PES_SOURCE_HH
23
24#ifndef _MPEG2_TRANSPORT_STREAM_MULTIPLEXOR_HH
26#endif
27#ifndef _MPEG_1OR2_DEMUXED_ELEMENTARY_STREAM_HH
29#endif
30
32public:
35
36protected:
39 // called only by createNew()
41
42private:
43 // Redefined virtual functions:
44 virtual void doStopGettingFrames();
45 virtual void awaitNewBuffer(unsigned char* oldBuffer);
46
47private:
48 static void afterGettingFrame(void* clientData, unsigned frameSize,
49 unsigned numTruncatedBytes,
50 struct timeval presentationTime,
51 unsigned durationInMicroseconds);
52 void afterGettingFrame1(unsigned frameSize,
53 unsigned numTruncatedBytes,
54 struct timeval presentationTime,
55 unsigned durationInMicroseconds);
56
57private:
59 unsigned char* fInputBuffer;
60};
61
62#endif
MPEG2TransportStreamFromPESSource(UsageEnvironment &env, MPEG1or2DemuxedElementaryStream *inputSource)
static MPEG2TransportStreamFromPESSource * createNew(UsageEnvironment &env, MPEG1or2DemuxedElementaryStream *inputSource)
void afterGettingFrame1(unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
static void afterGettingFrame(void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
MPEG1or2DemuxedElementaryStream * fInputSource
virtual void awaitNewBuffer(unsigned char *oldBuffer)