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 simplified version of "H264VideoStreamFramer" that takes only complete, 00019 // discrete frames (rather than an arbitrary byte stream) as input. 00020 // This avoids the parsing and data copying overhead of the full 00021 // "H264VideoStreamFramer". 00022 // C++ header 00023 00024 #ifndef _H264_VIDEO_STREAM_DISCRETE_FRAMER_HH 00025 #define _H264_VIDEO_STREAM_DISCRETE_FRAMER_HH 00026 00027 #ifndef _H264_VIDEO_STREAM_FRAMER_HH 00028 #include "H264VideoStreamFramer.hh" 00029 #endif 00030 00031 class H264VideoStreamDiscreteFramer: public H264VideoStreamFramer { 00032 public: 00033 static H264VideoStreamDiscreteFramer* 00034 createNew(UsageEnvironment& env, FramedSource* inputSource); 00035 00036 protected: 00037 H264VideoStreamDiscreteFramer(UsageEnvironment& env, 00038 FramedSource* inputSource); 00039 // called only by createNew() 00040 virtual ~H264VideoStreamDiscreteFramer(); 00041 00042 protected: 00043 // redefined virtual functions: 00044 virtual void doGetNextFrame(); 00045 00046 protected: 00047 static void afterGettingFrame(void* clientData, unsigned frameSize, 00048 unsigned numTruncatedBytes, 00049 struct timeval presentationTime, 00050 unsigned durationInMicroseconds); 00051 void afterGettingFrame1(unsigned frameSize, 00052 unsigned numTruncatedBytes, 00053 struct timeval presentationTime, 00054 unsigned durationInMicroseconds); 00055 }; 00056 00057 #endif
1.5.2