00001
00002
00003
00004
00005 #ifndef _YUV_STREAM_H_
00006 #define _YUV_STREAM_H_
00007
00008 #include "yuv4mpeg.h"
00009
00010 #include "VideoFile.h"
00011
00012
00013 class yuvStreamV;
00014 class yuvStreamVtr;
00015
00016
00017 class yuvStream:public VideoFile {
00018 friend class yuvStreamV;
00019 friend class yuvStreamVtr;
00020 public:
00021 yuvStream( IO_Mode mode = write );
00022 ~yuvStream();
00023
00024
00025
00026
00027 V_Track *initVideoCodec( double Rate,
00028 int x, int y,
00029 const char *Codec = NULL );
00030
00031 protected:
00032 V_Track *openVideoTrack( int track );
00033
00034 bool modus_schreiben;
00035 int fileno;
00036 };
00037
00038
00039
00040
00041
00042
00043
00044 class yuvStreamVtr:public V_Track {
00045 friend class yuvStreamV;
00046 public:
00047 yuvStreamVtr( yuvStream *File,
00048 float rate,
00049 int x, int y );
00050 yuvStreamVtr( yuvStream *File );
00051
00052 ~yuvStreamVtr();
00053
00054 private:
00055 yuvStream *file;
00056 unsigned char *puffer;
00057
00058 protected:
00059
00060 virtual int readRaw( unsigned char *&data, long &bytes );
00061 virtual int writeRaw( unsigned char *data, long bytes, int keyframe=0 );
00062 };
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 class yuvStreamV:public V_Codec {
00073 public:
00074 yuvStreamV( yuvStreamVtr *Track );
00075
00076 ~yuvStreamV();
00077
00078
00079 bool ColorModel( int cmodel );
00080
00081 protected:
00082
00083 int encode( unsigned char *bild );
00084
00085 int decode( unsigned char *bild );
00086 };
00087
00088 #endif