DVVideoFileServerMediaSubsession.hh 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. // A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
  17. // on demand, from a DV video file.
  18. // C++ header
  19. #ifndef _DV_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH
  20. #define _DV_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH
  21. #ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH
  22. #include "FileServerMediaSubsession.hh"
  23. #endif
  24. class DVVideoFileServerMediaSubsession: public FileServerMediaSubsession{
  25. public:
  26. static DVVideoFileServerMediaSubsession*
  27. createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource);
  28. private:
  29. DVVideoFileServerMediaSubsession(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource);
  30. // called only by createNew();
  31. virtual ~DVVideoFileServerMediaSubsession();
  32. private: // redefined virtual functions
  33. virtual char const* getAuxSDPLine(RTPSink* rtpSink, FramedSource* inputSource);
  34. virtual void seekStreamSource(FramedSource* inputSource, double& seekNPT, double streamDuration, u_int64_t& numBytes);
  35. virtual void setStreamSourceDuration(FramedSource* inputSource, double streamDuration, u_int64_t& numBytes);
  36. virtual FramedSource* createNewStreamSource(unsigned clientSessionId, unsigned& estBitrate);
  37. virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource* inputSource);
  38. virtual float duration() const;
  39. private:
  40. float fFileDuration; // in seconds
  41. };
  42. #endif