JPEGVideoSource.hh 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. // JPEG video sources
  17. // C++ header
  18. #ifndef _JPEG_VIDEO_SOURCE_HH
  19. #define _JPEG_VIDEO_SOURCE_HH
  20. #ifndef _FRAMED_SOURCE_HH
  21. #include "FramedSource.hh"
  22. #endif
  23. class JPEGVideoSource: public FramedSource {
  24. public:
  25. virtual u_int8_t type() = 0;
  26. virtual u_int8_t qFactor() = 0;
  27. virtual u_int8_t width() = 0; // # pixels/8 (or 0 for 2048 pixels)
  28. virtual u_int8_t height() = 0; // # pixels/8 (or 0 for 2048 pixels)
  29. virtual u_int8_t const* quantizationTables(u_int8_t& precision,
  30. u_int16_t& length);
  31. // If "qFactor()" returns a value >= 128, then this function is called
  32. // to tell us the quantization tables that are being used.
  33. // (The default implementation of this function just returns NULL.)
  34. // "precision" and "length" are as defined in RFC 2435, section 3.1.8.
  35. virtual u_int16_t restartInterval();
  36. // If restart intervals are being used (i.e., 64 <= type() <= 127), then this function must be
  37. // redefined - by a subclass - to return a non-zero value.
  38. protected:
  39. JPEGVideoSource(UsageEnvironment& env); // abstract base class
  40. virtual ~JPEGVideoSource();
  41. private:
  42. // redefined virtual functions:
  43. virtual Boolean isJPEGVideoSource() const;
  44. };
  45. #endif