live
MPEG2TransportStreamFromESSource.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 one or more MPEG Elementary Streams
19// to a MPEG-2 Transport Stream
20// C++ header
21
22#ifndef _MPEG2_TRANSPORT_STREAM_FROM_ES_SOURCE_HH
23#define _MPEG2_TRANSPORT_STREAM_FROM_ES_SOURCE_HH
24
25#ifndef _MPEG2_TRANSPORT_STREAM_MULTIPLEXOR_HH
27#endif
28
30public:
32
33 void addNewVideoSource(FramedSource* inputSource, int mpegVersion, int16_t PID = -1);
34 // Note: For MPEG-4 video, set "mpegVersion" to 4; for H.264 video, set "mpegVersion" to 5;
35 // for H.265 video, set "mpegVersion" to 6
36 void addNewAudioSource(FramedSource* inputSource, int mpegVersion, int16_t PID = -1);
37 // Note: For Opus audio, set "mpegVersion" to 3
38
39 // Note: In these functions, if "PID" is not -1, then it (currently, just the low 8 bits)
40 // is used as the stream's PID. Otherwise (if "PID" is -1) the 'stream_id' is used as
41 // the PID.
42
43 static unsigned maxInputESFrameSize;
44
45protected:
47 // called only by createNew()
49
51 u_int8_t streamId, int mpegVersion, int16_t PID = -1);
52 // used to implement addNew*Source() above
53
54private:
55 // Redefined virtual functions:
56 virtual void doStopGettingFrames();
57 virtual void awaitNewBuffer(unsigned char* oldBuffer);
58
59private:
60 friend class InputESSourceRecord;
64};
65
66#endif
unsigned char Boolean
Definition: Boolean.hh:25
static MPEG2TransportStreamFromESSource * createNew(UsageEnvironment &env)
void addNewInputSource(FramedSource *inputSource, u_int8_t streamId, int mpegVersion, int16_t PID=-1)
MPEG2TransportStreamFromESSource(UsageEnvironment &env)
void addNewVideoSource(FramedSource *inputSource, int mpegVersion, int16_t PID=-1)
void addNewAudioSource(FramedSource *inputSource, int mpegVersion, int16_t PID=-1)
virtual void awaitNewBuffer(unsigned char *oldBuffer)