00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _MPEG4_VIDEO_STREAM_DISCRETE_FRAMER_HH
00025 #define _MPEG4_VIDEO_STREAM_DISCRETE_FRAMER_HH
00026
00027 #ifndef _MPEG4_VIDEO_STREAM_FRAMER_HH
00028 #include "MPEG4VideoStreamFramer.hh"
00029 #endif
00030
00031 class MPEG4VideoStreamDiscreteFramer: public MPEG4VideoStreamFramer {
00032 public:
00033 static MPEG4VideoStreamDiscreteFramer*
00034 createNew(UsageEnvironment& env, FramedSource* inputSource);
00035
00036 protected:
00037 MPEG4VideoStreamDiscreteFramer(UsageEnvironment& env,
00038 FramedSource* inputSource);
00039
00040 virtual ~MPEG4VideoStreamDiscreteFramer();
00041
00042 protected:
00043
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 Boolean getNextFrameBit(u_int8_t& result);
00057 Boolean getNextFrameBits(unsigned numBits, u_int32_t& result);
00058
00059 void analyzeVOLHeader();
00060
00061 protected:
00062 u_int32_t vop_time_increment_resolution;
00063 unsigned fNumVTIRBits;
00064
00065 struct timeval fLastNonBFramePresentationTime;
00066 unsigned fLastNonBFrameVop_time_increment;
00067
00068 private:
00069 unsigned fNumBitsSeenSoFar;
00070 };
00071
00072 #endif