#ifndef YUVFORMAT_HEADER #define YUVFORMAT_HEADER 1 //////////////////////////////////////////////////////////// //! author="Charles Galambos" //! docentry="Image.Image IO" //! date="29/10/98" //! rcsid="$Id: yuvFormat.hh,v 1.4 1999/12/02 11:33:54 ees1cg Exp $" //! file="amma/Image/VidIO/yuvFormat.hh" //! example=exImgSeq.cc //! lib=VidIO #include "amma/DP/FileFormat.hh" #include "amma/Image.hh" #include "amma/YUVValue.hh" //! userlevel=Develop //: YUV File format information. class FileFormatYUVBodyC : public FileFormatBodyC { public: FileFormatYUVBodyC(const StringC &vName,const Index2dC &vSize); //: Constructor. virtual const type_info &ProbeLoad(IStreamC &in,const type_info &obj_type) const; //: Is stream in std stream format ? virtual const type_info &ProbeLoad(const FilenameC &filename,IStreamC &in,const type_info &obj_type) const; //: Probe for load. virtual const type_info &ProbeSave(const FilenameC &filename,const type_info &obj_type,BooleanT forceFormat) const; //: Probe for Save. virtual DPIPortBaseC CreateInput(IStreamC &in,const type_info &obj_type) const; //: Create a input port for loading. // This creates a plain YUV stream. // Will create an Invalid port if not supported. virtual DPOPortBaseC CreateOutput(OStreamC &out,const type_info &obj_type) const; //: Create a output port for saving. // This creates a plain YUV stream. // Will create an Invalid port if not supported. virtual DPIPortBaseC CreateInput(const FilenameC &filename,const type_info &obj_type) const; //: Create a input port for loading from file 'filename'. // Will create an Invalid port if not supported.
virtual DPOPortBaseC CreateOutput(const FilenameC &filename,const type_info &obj_type) const; //: Create a output port for saving to file 'filename'.. // Will create an Invalid port if not supported.
virtual const type_info &DefaultType() const;
//: Get prefered IO type.
virtual IntT Priority() const { return 1; }
//: Find the priority of the format. the higher the better.
// Default is zero, this is better than the default (streams.)
virtual BooleanT IsStream() const { return FALSE; }
//: Test if format is a fully streamable.
// i.e. check if you can read/write more than object object.
// This could easly be, but the abakas doesn't use it like that.
// (I think.)
protected:
StringC vName; // Variant name.
Index2dC vSize; // Variant image size.
};
/////////////////////////////
//! userlevel=Advanced
//: Create an instance of a YUV File Format.
class FileFormatYUVC : public FileFormatC