00001 /********** 00002 This library is free software; you can redistribute it and/or modify it under 00003 the terms of the GNU Lesser General Public License as published by the 00004 Free Software Foundation; either version 2.1 of the License, or (at your 00005 option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.) 00006 00007 This library is distributed in the hope that it will be useful, but WITHOUT 00008 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00009 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 00010 more details. 00011 00012 You should have received a copy of the GNU Lesser General Public License 00013 along with this library; if not, write to the Free Software Foundation, Inc., 00014 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00015 **********/ 00016 // "liveMedia" 00017 // Copyright (c) 1996-2013 Live Networks, Inc. All rights reserved. 00018 // JPEG video sources 00019 // C++ header 00020 00021 #ifndef _JPEG_VIDEO_SOURCE_HH 00022 #define _JPEG_VIDEO_SOURCE_HH 00023 00024 #ifndef _FRAMED_SOURCE_HH 00025 #include "FramedSource.hh" 00026 #endif 00027 00028 class JPEGVideoSource: public FramedSource { 00029 public: 00030 virtual u_int8_t type() = 0; 00031 virtual u_int8_t qFactor() = 0; 00032 virtual u_int8_t width() = 0; // # pixels/8 (or 0 for 2048 pixels) 00033 virtual u_int8_t height() = 0; // # pixels/8 (or 0 for 2048 pixels) 00034 00035 virtual u_int8_t const* quantizationTables(u_int8_t& precision, 00036 u_int16_t& length); 00037 // If "qFactor()" returns a value >= 128, then this function is called 00038 // to tell us the quantization tables that are being used. 00039 // (The default implementation of this function just returns NULL.) 00040 // "precision" and "length" are as defined in RFC 2435, section 3.1.8. 00041 00042 virtual u_int16_t restartInterval(); 00043 // If restart intervals are being used (i.e., 64 <= type() <= 127), then this function must be 00044 // redefined - by a subclass - to return a non-zero value. 00045 00046 protected: 00047 JPEGVideoSource(UsageEnvironment& env); // abstract base class 00048 virtual ~JPEGVideoSource(); 00049 00050 private: 00051 // redefined virtual functions: 00052 virtual Boolean isJPEGVideoSource() const; 00053 }; 00054 00055 #endif
1.5.2