liveMedia/include/SimpleRTPSource.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-2012 Live Networks, Inc.  All rights reserved.
00018 // A RTP source for a simple RTP payload format that
00019 //     - doesn't have any special headers following the RTP header
00020 //       (if necessary, the "offset" parameter can be used to specify a
00021 //        special header that we just skip over)
00022 //     - doesn't have any special framing apart from the packet data itself
00023 // C++ header
00024 
00025 #ifndef _SIMPLE_RTP_SOURCE_HH
00026 #define _SIMPLE_RTP_SOURCE_HH
00027 
00028 #ifndef _MULTI_FRAMED_RTP_SOURCE_HH
00029 #include "MultiFramedRTPSource.hh"
00030 #endif
00031 
00032 class SimpleRTPSource: public MultiFramedRTPSource {
00033 public:
00034   static SimpleRTPSource* createNew(UsageEnvironment& env, Groupsock* RTPgs,
00035                                     unsigned char rtpPayloadFormat,
00036                                     unsigned rtpTimestampFrequency,
00037                                     char const* mimeTypeString,
00038                                     unsigned offset = 0,
00039                                     Boolean doNormalMBitRule = True);
00040   // "doNormalMBitRule" means: If the medium is video, use the RTP "M"
00041   // bit on each incoming packet to indicate the last (or only) fragment
00042   // of a frame.  (Otherwise, ignore the "M" bit.)
00043 
00044 protected:
00045   virtual ~SimpleRTPSource();
00046 
00047 protected:
00048   SimpleRTPSource(UsageEnvironment& env, Groupsock* RTPgs,
00049                   unsigned char rtpPayloadFormat,
00050                   unsigned rtpTimestampFrequency,
00051                   char const* mimeTypeString, unsigned offset,
00052                   Boolean doNormalMBitRule);
00053       // called only by createNew()
00054 
00055 private:
00056   // redefined virtual functions:
00057   virtual Boolean processSpecialHeader(BufferedPacket* packet,
00058                                        unsigned& resultSpecialHeaderSize);
00059   virtual char const* MIMEtype() const;
00060 
00061 private:
00062   char const* fMIMEtypeString;
00063   unsigned fOffset;
00064   Boolean fUseMBitForFrameEnd;
00065 };
00066 
00067 #endif

Generated on Thu May 17 07:11:46 2012 for live by  doxygen 1.5.2