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-2020 Live Networks, Inc. All rights reserved.
18// RTP sink for H.265 video
19// C++ header
20
21#ifndef _H265_VIDEO_RTP_SINK_HH
22#define _H265_VIDEO_RTP_SINK_HH
23
24#ifndef _H264_OR_5_VIDEO_RTP_SINK_HH
25#include "H264or5VideoRTPSink.hh"
26#endif
27
28class H265VideoRTPSink: public H264or5VideoRTPSink {
29public:
30 static H265VideoRTPSink*
31 createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat);
32 static H265VideoRTPSink*
33 createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat,
34 u_int8_t const* vps, unsigned vpsSize,
35 u_int8_t const* sps, unsigned spsSize,
36 u_int8_t const* pps, unsigned ppsSize);
37 // an optional variant of "createNew()", useful if we know, in advance,
38 // the stream's VPS, SPS and PPS NAL units.
39 // This avoids us having to 'pre-read' from the input source in order to get these values.
40 static H265VideoRTPSink*
41 createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat,
42 char const* sPropVPSStr, char const* sPropSPSStr, char const* sPropPPSStr);
43 // an optional variant of "createNew()", useful if we know, in advance,
44 // the stream's VPS, SPS and PPS NAL units.
45 // This avoids us having to 'pre-read' from the input source in order to get these values.
46
47protected:
48 H265VideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat,
49 u_int8_t const* vps = NULL, unsigned vpsSize = 0,
50 u_int8_t const* sps = NULL, unsigned spsSize = 0,
51 u_int8_t const* pps = NULL, unsigned ppsSize = 0);
52 // called only by createNew()
53 virtual ~H265VideoRTPSink();
54
55protected: // redefined virtual functions:
56 virtual char const* auxSDPLine();
57
58private: // redefined virtual functions:
59 virtual Boolean sourceIsCompatibleWithUs(MediaSource& source);
60};
61
62#endif
63