live
TheoraVideoRTPSink.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// RTP sink for Theora video
19// C++ header
20
21#ifndef _THEORA_VIDEO_RTP_SINK_HH
22#define _THEORA_VIDEO_RTP_SINK_HH
23
24#ifndef _VIDEO_RTP_SINK_HH
25#include "VideoRTPSink.hh"
26#endif
27
29public:
30 static TheoraVideoRTPSink*
31 createNew(UsageEnvironment& env, Groupsock* RTPgs, u_int8_t rtpPayloadFormat,
32 // The following headers provide the 'configuration' information, for the SDP description:
33 u_int8_t* identificationHeader, unsigned identificationHeaderSize,
34 u_int8_t* commentHeader, unsigned commentHeaderSize,
35 u_int8_t* setupHeader, unsigned setupHeaderSize,
36 u_int32_t identField = 0xFACADE);
37
38 static TheoraVideoRTPSink*
39 createNew(UsageEnvironment& env, Groupsock* RTPgs, u_int8_t rtpPayloadFormat,
40 char const* configStr);
41 // an optional variant of "createNew()" that takes a Base-64-encoded 'configuration' string,
42 // rather than the raw configuration headers as parameter.
43
44protected:
46 u_int8_t rtpPayloadFormat,
47 u_int8_t* identificationHeader, unsigned identificationHeaderSize,
48 u_int8_t* commentHeader, unsigned commentHeaderSize,
49 u_int8_t* setupHeader, unsigned setupHeaderSize,
50 u_int32_t identField);
51 // called only by createNew()
52
54
55private: // redefined virtual functions:
56 virtual char const* auxSDPLine(); // for the "a=fmtp:" SDP line
57
58 virtual void doSpecialFrameHandling(unsigned fragmentationOffset,
59 unsigned char* frameStart,
60 unsigned numBytesInFrame,
61 struct timeval framePresentationTime,
62 unsigned numRemainingBytes);
63 virtual Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart,
64 unsigned numBytesInFrame) const;
65 virtual unsigned specialHeaderSize() const;
66
67private:
68 u_int32_t fIdent; // "Ident" field used by this stream. (Only the low 24 bits of this are used.)
70};
71
72#endif
unsigned char Boolean
Definition: Boolean.hh:25
virtual Boolean frameCanAppearAfterPacketStart(unsigned char const *frameStart, unsigned numBytesInFrame) const
static TheoraVideoRTPSink * createNew(UsageEnvironment &env, Groupsock *RTPgs, u_int8_t rtpPayloadFormat, char const *configStr)
virtual char const * auxSDPLine()
virtual void doSpecialFrameHandling(unsigned fragmentationOffset, unsigned char *frameStart, unsigned numBytesInFrame, struct timeval framePresentationTime, unsigned numRemainingBytes)
virtual ~TheoraVideoRTPSink()
static TheoraVideoRTPSink * createNew(UsageEnvironment &env, Groupsock *RTPgs, u_int8_t rtpPayloadFormat, u_int8_t *identificationHeader, unsigned identificationHeaderSize, u_int8_t *commentHeader, unsigned commentHeaderSize, u_int8_t *setupHeader, unsigned setupHeaderSize, u_int32_t identField=0xFACADE)
virtual unsigned specialHeaderSize() const
TheoraVideoRTPSink(UsageEnvironment &env, Groupsock *RTPgs, u_int8_t rtpPayloadFormat, u_int8_t *identificationHeader, unsigned identificationHeaderSize, u_int8_t *commentHeader, unsigned commentHeaderSize, u_int8_t *setupHeader, unsigned setupHeaderSize, u_int32_t identField)