MPEG1or2VideoStreamFramer.hh 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 filter that breaks up an MPEG 1 or 2 video elementary stream into
  17. // frames for: Video_Sequence_Header, GOP_Header, Picture_Header
  18. // C++ header
  19. #ifndef _MPEG_1OR2_VIDEO_STREAM_FRAMER_HH
  20. #define _MPEG_1OR2_VIDEO_STREAM_FRAMER_HH
  21. #ifndef _MPEG_VIDEO_STREAM_FRAMER_HH
  22. #include "MPEGVideoStreamFramer.hh"
  23. #endif
  24. class MPEG1or2VideoStreamFramer: public MPEGVideoStreamFramer {
  25. public:
  26. static MPEG1or2VideoStreamFramer*
  27. createNew(UsageEnvironment& env, FramedSource* inputSource,
  28. Boolean iFramesOnly = False,
  29. double vshPeriod = 5.0
  30. /* how often (in seconds) to inject a Video_Sequence_Header,
  31. if one doesn't already appear in the stream */);
  32. protected:
  33. MPEG1or2VideoStreamFramer(UsageEnvironment& env,
  34. FramedSource* inputSource,
  35. Boolean iFramesOnly, double vshPeriod,
  36. Boolean createParser = True);
  37. // called only by createNew(), or by subclass constructors
  38. virtual ~MPEG1or2VideoStreamFramer();
  39. private:
  40. // redefined virtual functions:
  41. virtual Boolean isMPEG1or2VideoStreamFramer() const;
  42. private:
  43. double getCurrentPTS() const;
  44. friend class MPEG1or2VideoStreamParser; // hack
  45. };
  46. #endif