Alex Bikfalvi
SimStream Documentation
StreamSourceMpeg.h
00001 #pragma once 00002 00003 #include "StreamSource.h" 00004 #include "Codes.h" 00005 00006 class CStreamSourceMpegFrameTemplate 00007 { 00008 public: 00009 EFrameType type; 00010 __uint32 size; 00011 char anchorP; 00012 char anchorB; 00013 00014 CStreamSourceMpegFrameTemplate() { } 00015 CStreamSourceMpegFrameTemplate( 00016 EFrameType type, 00017 __uint32 size, 00018 char anchorP, 00019 char anchorB 00020 ); 00021 ~CStreamSourceMpegFrameTemplate() { } 00022 }; 00023 00024 class CStreamSourceMpeg : public CStreamSource 00025 { 00026 protected: 00027 __byte gopDistanceItoI; 00028 __byte gopDistanceItoP; 00029 00030 CStreamSourceMpegFrameTemplate* gopTemplate; 00031 00032 __byte segmentSize; 00033 00034 public: 00035 CStreamSourceMpeg( 00036 CChannel* channel, 00037 __byte gopDistanceItoI, 00038 __byte gopDistanceItoP, 00039 __byte segmentSize = 1 00040 ); 00041 virtual ~CStreamSourceMpeg(); 00042 00043 virtual CStreamFrame Fetch(__uint32 index); 00044 virtual inline EFrameType FrameType(__uint32 index) { return this->gopTemplate[index % this->gopDistanceItoI].type; } 00045 };
Last updated: February 8, 2011