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 filter that breaks up an H263 video elementary stream into frames. 00019 // Author Benhard Feiten 00020 00021 #ifndef _H263PLUS_VIDEO_STREAM_FRAMER_HH 00022 #define _H263PLUS_VIDEO_STREAM_FRAMER_HH 00023 00024 #ifndef _FRAMED_FILTER_HH 00025 #include "FramedFilter.hh" 00026 #endif 00027 00028 00029 class H263plusVideoStreamFramer: public FramedFilter { 00030 public: 00031 00032 static H263plusVideoStreamFramer* createNew(UsageEnvironment& env, FramedSource* inputSource); 00033 00034 Boolean& pictureEndMarker() { return fPictureEndMarker; } // a hack for implementing the RTP 'M' bit 00035 00036 protected: 00037 // Constructor called only by createNew(), or by subclass constructors 00038 H263plusVideoStreamFramer(UsageEnvironment& env, 00039 FramedSource* inputSource, 00040 Boolean createParser = True); 00041 virtual ~H263plusVideoStreamFramer(); 00042 00043 00044 public: 00045 static void continueReadProcessing(void* clientData, 00046 unsigned char* ptr, unsigned size, 00047 struct timeval presentationTime); 00048 void continueReadProcessing(); 00049 00050 private: 00051 virtual void doGetNextFrame(); 00052 virtual Boolean isH263plusVideoStreamFramer() const; 00053 00054 protected: 00055 double fFrameRate; 00056 unsigned fPictureCount; // hack used to implement doGetNextFrame() ?? 00057 Boolean fPictureEndMarker; 00058 00059 private: 00060 class H263plusVideoStreamParser* fParser; 00061 struct timeval fPresentationTimeBase; 00062 }; 00063 00064 #endif
1.5.2