DVVideoRTPSink.hh 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 DV video (RFC 3189)
  17. // (Thanks to Ben Hutchings for prototyping this.)
  18. // C++ header
  19. #ifndef _DV_VIDEO_RTP_SINK_HH
  20. #define _DV_VIDEO_RTP_SINK_HH
  21. #ifndef _VIDEO_RTP_SINK_HH
  22. #include "VideoRTPSink.hh"
  23. #endif
  24. #ifndef _DV_VIDEO_STREAM_FRAMER_HH
  25. #include "DVVideoStreamFramer.hh"
  26. #endif
  27. class DVVideoRTPSink: public VideoRTPSink {
  28. public:
  29. static DVVideoRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat);
  30. char const* auxSDPLineFromFramer(DVVideoStreamFramer* framerSource);
  31. protected:
  32. DVVideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat);
  33. // called only by createNew()
  34. virtual ~DVVideoRTPSink();
  35. private: // redefined virtual functions:
  36. virtual Boolean sourceIsCompatibleWithUs(MediaSource& source);
  37. virtual void doSpecialFrameHandling(unsigned fragmentationOffset,
  38. unsigned char* frameStart,
  39. unsigned numBytesInFrame,
  40. struct timeval framePresentationTime,
  41. unsigned numRemainingBytes);
  42. virtual unsigned computeOverflowForNewFrame(unsigned newFrameSize) const;
  43. virtual char const* auxSDPLine();
  44. private:
  45. char* fFmtpSDPLine;
  46. };
  47. #endif