live
SimpleRTPSource.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 RTP source for a simple RTP payload format that
19// - doesn't have any special headers following the RTP header
20// (if necessary, the "offset" parameter can be used to specify a
21// special header that we just skip over)
22// - doesn't have any special framing apart from the packet data itself
23// C++ header
24
25#ifndef _SIMPLE_RTP_SOURCE_HH
26#define _SIMPLE_RTP_SOURCE_HH
27
28#ifndef _MULTI_FRAMED_RTP_SOURCE_HH
30#endif
31
33public:
35 unsigned char rtpPayloadFormat,
36 unsigned rtpTimestampFrequency,
37 char const* mimeTypeString,
38 unsigned offset = 0,
39 Boolean doNormalMBitRule = True);
40 // "doNormalMBitRule" means: If the medium is not audio, use the RTP "M"
41 // bit on each incoming packet to indicate the last (or only) fragment
42 // of a frame. Otherwise (i.e., if "doNormalMBitRule" is False, or the medium is "audio"), the "M" bit is ignored.
43
44protected:
46 unsigned char rtpPayloadFormat,
47 unsigned rtpTimestampFrequency,
48 char const* mimeTypeString, unsigned offset,
49 Boolean doNormalMBitRule);
50 // called only by createNew(), or by subclass constructors
52
53protected:
54 // redefined virtual functions:
56 unsigned& resultSpecialHeaderSize);
57 virtual char const* MIMEtype() const;
58
59private:
60 char const* fMIMEtypeString;
61 unsigned fOffset;
63};
64
65#endif
const Boolean True
Definition: Boolean.hh:31
unsigned char Boolean
Definition: Boolean.hh:25
Groupsock * RTPgs() const
Definition: RTPSource.hh:47
unsigned char rtpPayloadFormat() const
Definition: RTPSource.hh:43
static SimpleRTPSource * createNew(UsageEnvironment &env, Groupsock *RTPgs, unsigned char rtpPayloadFormat, unsigned rtpTimestampFrequency, char const *mimeTypeString, unsigned offset=0, Boolean doNormalMBitRule=True)
SimpleRTPSource(UsageEnvironment &env, Groupsock *RTPgs, unsigned char rtpPayloadFormat, unsigned rtpTimestampFrequency, char const *mimeTypeString, unsigned offset, Boolean doNormalMBitRule)
virtual char const * MIMEtype() const
Boolean fUseMBitForFrameEnd
virtual ~SimpleRTPSource()
virtual Boolean processSpecialHeader(BufferedPacket *packet, unsigned &resultSpecialHeaderSize)
char const * fMIMEtypeString
void * packet