00001
00002
00003
00004
00005 #ifndef _MPEG_H_
00006 #define _MPEG_H_
00007
00008
00009 #include "VideoFile.h"
00010
00011 extern "C" {
00012 #include <rte.h>
00013 }
00014
00015 class MpegA;
00016 class MpegV;
00017 class MpegVtr;
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 class MpegIO:public VideoFile {
00030 friend class MpegV;
00031 friend class MpegVtr;
00032 friend class MpegA;
00033 friend class MpegAtr;
00034 public:
00035 MpegIO( const char *Dateiname, bool schreiben=true );
00036 ~MpegIO();
00037
00038
00039
00040
00041 V_Track *initVideoCodec( float Rate,
00042 int x, int y,
00043 const char *Codec = NULL );
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 A_Track *initAudioCodec( int Rate,
00054 int Bits,
00055 int Channels,
00056 const char *Codec = NULL );
00057
00058
00059
00060
00061
00062
00063 protected:
00064
00065 rte_context *context;
00066 bool modus_schreiben;
00067 };
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080 class MpegVtr:public V_Track {
00081 friend class MpegV;
00082 public:
00083 MpegVtr( MpegIO *File, int track );
00084
00085 MpegVtr( MpegIO *File,
00086 float Rate,
00087 int x, int y,
00088 const char *Codec = NULL );
00089
00090 ~MpegVtr();
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100 private:
00101 MpegIO *file;
00102 rte_context *context;
00103
00104 protected:
00105
00106
00107 };
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121 class MpegV:public V_Codec {
00122 public:
00123 MpegV( MpegVtr *Track );
00124
00125 ~MpegV();
00126
00127
00128 bool ColorModel( int cmodel );
00129
00130
00131
00132
00133 private:
00134 rte_context *context;
00135 bool schreiben;
00136 unsigned char * buf;
00137
00138 protected:
00139
00140 int encode( unsigned char *bild );
00141
00142
00143
00144 };
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157 class MpegAtr:public A_Track {
00158 friend class MpegA;
00159 public:
00160 MpegAtr( MpegIO *File, int track );
00161 MpegAtr( MpegIO *File,
00162 int Rate,
00163 int Bits,
00164 int Channels,
00165 const char *Codec_name = NULL );
00166
00167 ~QuicktimeAtr();
00168
00169 private:
00170 MpegIO *file;
00171 rte_context *context;
00172 };
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183 class MpegA:public A_Codec {
00184 public:
00185 MpegA( QuicktimeAtr *Track );
00186 ~MpegA();
00187
00188
00189 void encodeAudio( int16_t **daten, int sampels );
00190
00191
00192
00193
00194 private:
00195 rte_context *context;
00196 unsigned char *buf;
00197 };
00198
00199
00200
00201 #endif