1/**********
2This library is free software; you can redistribute it and/or modify it under
3the terms of the GNU Lesser General Public License as published by the
4Free Software Foundation; either version 3 of the License, or (at your
5option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
6
7This library is distributed in the hope that it will be useful, but WITHOUT
8ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10more details.
11
12You should have received a copy of the GNU Lesser General Public License
13along with this library; if not, write to the Free Software Foundation, Inc.,
1451 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15**********/
16// "liveMedia"
17// Copyright (c) 1996-2020 Live Networks, Inc. All rights reserved.
18// JPEG video sources
19// C++ header
20
21#ifndef _JPEG_VIDEO_SOURCE_HH
22#define _JPEG_VIDEO_SOURCE_HH
23
24#ifndef _FRAMED_SOURCE_HH
25#include "FramedSource.hh"
26#endif
27
28class JPEGVideoSource: public FramedSource {
29public:
30 virtual u_int8_t type() = 0;
31 virtual u_int8_t qFactor() = 0;
32 virtual u_int8_t width() = 0; // # pixels/8 (or 0 for 2048 pixels)
33 virtual u_int8_t height() = 0; // # pixels/8 (or 0 for 2048 pixels)
34
35 virtual u_int8_t const* quantizationTables(u_int8_t& precision,
36 u_int16_t& length);
37 // If "qFactor()" returns a value >= 128, then this function is called
38 // to tell us the quantization tables that are being used.
39 // (The default implementation of this function just returns NULL.)
40 // "precision" and "length" are as defined in RFC 2435, section 3.1.8.
41
42 virtual u_int16_t restartInterval();
43 // If restart intervals are being used (i.e., 64 <= type() <= 127), then this function must be
44 // redefined - by a subclass - to return a non-zero value.
45
46protected:
47 JPEGVideoSource(UsageEnvironment& env); // abstract base class
48 virtual ~JPEGVideoSource();
49
50private:
51 // redefined virtual functions:
52 virtual Boolean isJPEGVideoSource() const;
53};
54
55#endif
56