liveMedia/include/QuickTimeGenericRTPSource.hh

Go to the documentation of this file.
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-2008 Live Networks, Inc.  All rights reserved.
00018 // RTP Sources containing generic QuickTime stream data, as defined in
00019 //     <http://developer.apple.com/quicktime/icefloe/dispatch026.html>
00020 // C++ header
00021 
00022 #ifndef _QUICKTIME_GENERIC_RTP_SOURCE_HH
00023 #define _QUICKTIME_GENERIC_RTP_SOURCE_HH
00024 
00025 #ifndef _MULTI_FRAMED_RTP_SOURCE_HH
00026 #include "MultiFramedRTPSource.hh"
00027 #endif
00028 
00029 class QuickTimeGenericRTPSource: public MultiFramedRTPSource {
00030 public:
00031   static QuickTimeGenericRTPSource*
00032   createNew(UsageEnvironment& env, Groupsock* RTPgs,
00033             unsigned char rtpPayloadFormat, unsigned rtpTimestampFrequency,
00034             char const* mimeTypeString);
00035 
00036   // QuickTime-specific information, set from the QuickTime header
00037   // in each packet.  This, along with the data following the header,
00038   // is used by receivers.
00039   struct QTState {
00040     char PCK;
00041     unsigned timescale;
00042     char* sdAtom;
00043     unsigned sdAtomSize;
00044     unsigned short width, height;
00045     // later add other state as needed #####
00046   } qtState;
00047 
00048 protected:
00049   virtual ~QuickTimeGenericRTPSource();
00050 
00051 private:
00052   QuickTimeGenericRTPSource(UsageEnvironment& env, Groupsock* RTPgs,
00053                             unsigned char rtpPayloadFormat,
00054                             unsigned rtpTimestampFrequency,
00055                             char const* mimeTypeString);
00056       // called only by createNew()
00057 
00058 private:
00059   // redefined virtual functions:
00060   virtual Boolean processSpecialHeader(BufferedPacket* packet,
00061                                        unsigned& resultSpecialHeaderSize);
00062   virtual char const* MIMEtype() const;
00063 
00064 private:
00065   char const* fMIMEtypeString;
00066 };
00067 
00068 #endif

Generated on Tue Oct 7 15:38:09 2008 for live by  doxygen 1.5.2