live
MPEG4LATMAudioRTPSink.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 // RTP sink for MPEG-4 audio, using LATM multiplexing (RFC 3016)
19 // (Note that the initial 'size' field is assumed to be present at the start of
20 // each frame.)
21 // C++ header
22 
23 #ifndef _MPEG4_LATM_AUDIO_RTP_SINK_HH
24 #define _MPEG4_LATM_AUDIO_RTP_SINK_HH
25 
26 #ifndef _AUDIO_RTP_SINK_HH
27 #include "AudioRTPSink.hh"
28 #endif
29 
31 public:
33  Groupsock* RTPgs,
34  unsigned char rtpPayloadFormat,
35  u_int32_t rtpTimestampFrequency,
36  char const* streamMuxConfigString,
37  unsigned numChannels,
38  Boolean allowMultipleFramesPerPacket = False);
39 
40 protected:
42  unsigned char rtpPayloadFormat,
43  u_int32_t rtpTimestampFrequency,
44  char const* streamMuxConfigString,
45  unsigned numChannels,
46  Boolean allowMultipleFramesPerPacket);
47  // called only by createNew()
48 
50 
51 private: // redefined virtual functions:
52  virtual void doSpecialFrameHandling(unsigned fragmentationOffset,
53  unsigned char* frameStart,
54  unsigned numBytesInFrame,
55  struct timeval framePresentationTime,
56  unsigned numRemainingBytes);
57  virtual Boolean
58  frameCanAppearAfterPacketStart(unsigned char const* frameStart,
59  unsigned numBytesInFrame) const;
60 
61  virtual char const* auxSDPLine(); // for the "a=fmtp:" SDP line
62 
63 private:
65  char* fFmtpSDPLine;
67 };
68 
69 #endif
const Boolean False
Definition: Boolean.hh:28
unsigned char Boolean
Definition: Boolean.hh:25
virtual void doSpecialFrameHandling(unsigned fragmentationOffset, unsigned char *frameStart, unsigned numBytesInFrame, struct timeval framePresentationTime, unsigned numRemainingBytes)
static MPEG4LATMAudioRTPSink * createNew(UsageEnvironment &env, Groupsock *RTPgs, unsigned char rtpPayloadFormat, u_int32_t rtpTimestampFrequency, char const *streamMuxConfigString, unsigned numChannels, Boolean allowMultipleFramesPerPacket=False)
virtual Boolean frameCanAppearAfterPacketStart(unsigned char const *frameStart, unsigned numBytesInFrame) const
virtual char const * auxSDPLine()
virtual ~MPEG4LATMAudioRTPSink()
MPEG4LATMAudioRTPSink(UsageEnvironment &env, Groupsock *RTPgs, unsigned char rtpPayloadFormat, u_int32_t rtpTimestampFrequency, char const *streamMuxConfigString, unsigned numChannels, Boolean allowMultipleFramesPerPacket)
unsigned rtpTimestampFrequency() const
Definition: RTPSink.hh:43
unsigned numChannels() const
Definition: RTPSink.hh:49