live
MPEG2TransportStreamFromPESSource.hh
Go to the documentation of this file.
1 /**********
2 This library is free software; you can redistribute it and/or modify it under
3 the terms of the GNU Lesser General Public License as published by the
4 Free Software Foundation; either version 3 of the License, or (at your
5 option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
6 
7 This library is distributed in the hope that it will be useful, but WITHOUT
8 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 more details.
11 
12 You should have received a copy of the GNU Lesser General Public License
13 along with this library; if not, write to the Free Software Foundation, Inc.,
14 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 **********/
16 // "liveMedia"
17 // Copyright (c) 1996-2021 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 
32 public:
35 
36 protected:
38  MPEG1or2DemuxedElementaryStream* inputSource);
39  // called only by createNew()
41 
42 private:
43  // Redefined virtual functions:
44  virtual void doStopGettingFrames();
45  virtual void awaitNewBuffer(unsigned char* oldBuffer);
46 
47 private:
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 
57 private:
59  unsigned char* fInputBuffer;
60 };
61 
62 #endif
MPEG2TransportStreamFromPESSource(UsageEnvironment &env, MPEG1or2DemuxedElementaryStream *inputSource)
void afterGettingFrame1(unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
static MPEG2TransportStreamFromPESSource * createNew(UsageEnvironment &env, MPEG1or2DemuxedElementaryStream *inputSource)
static void afterGettingFrame(void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
MPEG1or2DemuxedElementaryStream * fInputSource
virtual void awaitNewBuffer(unsigned char *oldBuffer)