I need a AVI File Import.
It will be created as a Dll, containing a class like
class C_AVIImport : public C_Video
{
public:
C_AVIImport(wxString fichier);
void Close();
public:
C_Image GetFrame(int frame);
private:
};
using DirectX and wxWidgets.
If you have any questions, ask me.
for information :
class C_Video
{
public:
C_Video(unsigned int w, unsigned int h, unsigned
int nof) {
Width = w; Height =h; NumberOfFrames = nof; }
public:
virtual C_Image GetFrame(int frame);
unsigned int GetNumberOfFrames() { return
NumberOfFrames; }
unsigned int GetWidth() { return Width; }
unsigned int GetHeight() { return Height; }
void SetNumberOfFrames(unsigned int nof) {
NumberOfFrames = nof; }
private:
unsigned int NumberOfFrames;
unsigned int Width, Height;
};
class C_Image
{
public:
C_Image(int width, int height) {
Width = width; Height = height;
Data = (C_Pixel*) malloc(Width * Height *
sizeof(C_Pixel)); }
~C_Image() { free(Data); }
public:
C_Pixel* GetData() { return Data; }
void SetData(const C_Pixel* data) { free(Data);
Data = (C_Pixel*)data; }
C_Pixel GetPixel(unsigned int x, unsigned int y) {
if ( x >= 0 && x < Width && y >= 0 && y < Height)
return Data[x + y*Width]; }
void SetPixel(unsigned int x, unsigned int y,
C_Pixel pix) {
if ( x >= 0 && x < Width && y >= 0 && y < Height)
Data[x + y*Width] = pix; }
unsigned int GetWidth() { return Width; }
unsigned int GetHeight() { return Height; }
private:
unsigned int Width, Height;
C_Pixel *Data;
};
class C_Pixel
{
public:
C_Pixel(unsigned char r, unsigned char g, unsigned
char b, unsigned char a=255) {
Red = r; Green = g; Blue = b; Alpha = a; }
unsigned char Red, Green, Blue, Alpha;
};
Logged In: YES
user_id=1268250
Hey Jerome ,
Im using Video for windows (The Win32 Video API ) Is that
Ok ?? Or do you want a DirectShow filter ?? And also do you
want any front end to Test and play the AVI ??
Shravan