live
MPEG4GenericRTPSink.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// MPEG4-GENERIC ("audio", "video", or "application") RTP stream sinks
19// C++ header
20
21#ifndef _MPEG4_GENERIC_RTP_SINK_HH
22#define _MPEG4_GENERIC_RTP_SINK_HH
23
24#ifndef _MULTI_FRAMED_RTP_SINK_HH
25#include "MultiFramedRTPSink.hh"
26#endif
27
29public:
32 u_int8_t rtpPayloadFormat, u_int32_t rtpTimestampFrequency,
33 char const* sdpMediaTypeString, char const* mpeg4Mode,
34 char const* configString,
35 unsigned numChannels = 1);
36
37protected:
39 u_int8_t rtpPayloadFormat,
40 u_int32_t rtpTimestampFrequency,
41 char const* sdpMediaTypeString,
42 char const* mpeg4Mode, char const* configString,
43 unsigned numChannels);
44 // called only by createNew()
45
47
48private: // redefined virtual functions:
49 virtual
50 Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart,
51 unsigned numBytesInFrame) const;
52 virtual void doSpecialFrameHandling(unsigned fragmentationOffset,
53 unsigned char* frameStart,
54 unsigned numBytesInFrame,
55 struct timeval framePresentationTime,
56 unsigned numRemainingBytes);
57 virtual unsigned specialHeaderSize() const;
58
59 virtual char const* sdpMediaType() const;
60
61 virtual char const* auxSDPLine(); // for the "a=fmtp:" SDP line
62
63private:
65 char const* fMPEG4Mode;
66 char const* fConfigString;
68};
69
70#endif
unsigned char Boolean
Definition: Boolean.hh:25
virtual ~MPEG4GenericRTPSink()
char const * fSDPMediaTypeString
virtual Boolean frameCanAppearAfterPacketStart(unsigned char const *frameStart, unsigned numBytesInFrame) const
virtual unsigned specialHeaderSize() const
virtual void doSpecialFrameHandling(unsigned fragmentationOffset, unsigned char *frameStart, unsigned numBytesInFrame, struct timeval framePresentationTime, unsigned numRemainingBytes)
static MPEG4GenericRTPSink * createNew(UsageEnvironment &env, Groupsock *RTPgs, u_int8_t rtpPayloadFormat, u_int32_t rtpTimestampFrequency, char const *sdpMediaTypeString, char const *mpeg4Mode, char const *configString, unsigned numChannels=1)
virtual char const * sdpMediaType() const
virtual char const * auxSDPLine()
MPEG4GenericRTPSink(UsageEnvironment &env, Groupsock *RTPgs, u_int8_t rtpPayloadFormat, u_int32_t rtpTimestampFrequency, char const *sdpMediaTypeString, char const *mpeg4Mode, char const *configString, unsigned numChannels)
unsigned rtpTimestampFrequency() const
Definition: RTPSink.hh:46
unsigned numChannels() const
Definition: RTPSink.hh:52