H265VideoRTPSink.hh 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. This library is distributed in the hope that it will be useful, but WITHOUT
  7. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  8. FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
  9. more details.
  10. You should have received a copy of the GNU Lesser General Public License
  11. along with this library; if not, write to the Free Software Foundation, Inc.,
  12. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  13. **********/
  14. // "liveMedia"
  15. // Copyright (c) 1996-2019 Live Networks, Inc. All rights reserved.
  16. // RTP sink for H.265 video
  17. // C++ header
  18. #ifndef _H265_VIDEO_RTP_SINK_HH
  19. #define _H265_VIDEO_RTP_SINK_HH
  20. #ifndef _H264_OR_5_VIDEO_RTP_SINK_HH
  21. #include "H264or5VideoRTPSink.hh"
  22. #endif
  23. class H265VideoRTPSink: public H264or5VideoRTPSink {
  24. public:
  25. static H265VideoRTPSink*
  26. createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat);
  27. static H265VideoRTPSink*
  28. createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat,
  29. u_int8_t const* vps, unsigned vpsSize,
  30. u_int8_t const* sps, unsigned spsSize,
  31. u_int8_t const* pps, unsigned ppsSize);
  32. // an optional variant of "createNew()", useful if we know, in advance,
  33. // the stream's VPS, SPS and PPS NAL units.
  34. // This avoids us having to 'pre-read' from the input source in order to get these values.
  35. static H265VideoRTPSink*
  36. createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat,
  37. char const* sPropVPSStr, char const* sPropSPSStr, char const* sPropPPSStr);
  38. // an optional variant of "createNew()", useful if we know, in advance,
  39. // the stream's VPS, SPS and PPS NAL units.
  40. // This avoids us having to 'pre-read' from the input source in order to get these values.
  41. protected:
  42. H265VideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat,
  43. u_int8_t const* vps = NULL, unsigned vpsSize = 0,
  44. u_int8_t const* sps = NULL, unsigned spsSize = 0,
  45. u_int8_t const* pps = NULL, unsigned ppsSize = 0);
  46. // called only by createNew()
  47. virtual ~H265VideoRTPSink();
  48. protected: // redefined virtual functions:
  49. virtual char const* auxSDPLine();
  50. private: // redefined virtual functions:
  51. virtual Boolean sourceIsCompatibleWithUs(MediaSource& source);
  52. };
  53. #endif