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// RTP Sources containing generic QuickTime stream data, as defined in
19// <http://developer.apple.com/quicktime/icefloe/dispatch026.html>
20// C++ header
21
22#ifndef _QUICKTIME_GENERIC_RTP_SOURCE_HH
23#define _QUICKTIME_GENERIC_RTP_SOURCE_HH
24
25#ifndef _MULTI_FRAMED_RTP_SOURCE_HH
26#include "MultiFramedRTPSource.hh"
27#endif
28
29class QuickTimeGenericRTPSource: public MultiFramedRTPSource {
30public:
31 static QuickTimeGenericRTPSource*
32 createNew(UsageEnvironment& env, Groupsock* RTPgs,
33 unsigned char rtpPayloadFormat, unsigned rtpTimestampFrequency,
34 char const* mimeTypeString);
35
36 // QuickTime-specific information, set from the QuickTime header
37 // in each packet. This, along with the data following the header,
38 // is used by receivers.
39 struct QTState {
40 char PCK;
41 unsigned timescale;
42 char* sdAtom;
43 unsigned sdAtomSize;
44 unsigned short width, height;
45 // later add other state as needed #####
46 } qtState;
47
48protected:
49 virtual ~QuickTimeGenericRTPSource();
50
51private:
52 QuickTimeGenericRTPSource(UsageEnvironment& env, Groupsock* RTPgs,
53 unsigned char rtpPayloadFormat,
54 unsigned rtpTimestampFrequency,
55 char const* mimeTypeString);
56 // called only by createNew()
57
58private:
59 // redefined virtual functions:
60 virtual Boolean processSpecialHeader(BufferedPacket* packet,
61 unsigned& resultSpecialHeaderSize);
62 virtual char const* MIMEtype() const;
63
64private:
65 char const* fMIMEtypeString;
66};
67
68#endif
69