34 #ifndef PTLIB_PVIDFILE_H
35 #define PTLIB_PVIDFILE_H
62 PFile::OpenOptions opts = PFile::ModeDefault
65 virtual PBoolean IsOpen()
const {
return m_file.IsOpen(); }
66 virtual PBoolean Close() {
return m_file.Close(); }
68 virtual PBoolean WriteFrame(
const void * frame);
69 virtual PBoolean ReadFrame(
void * frame);
71 virtual off_t GetLength()
const;
76 virtual off_t GetPosition()
const;
90 const PFilePath & GetFilePath()
const {
return m_file.GetFilePath(); }
94 PINDEX GetFrameBytes()
const {
return m_frameBytes; }
96 bool SetFrameSizeFromFilename(
const PString & fn);
97 bool SetFPSFromFilename(
const PString & fn);
100 bool m_fixedFrameSize;
101 bool m_fixedFrameRate;
103 off_t m_headerOffset;
104 off_t m_frameHeaderLen;
113 class PYUVFile :
public PVideoFile
122 PFile::OpenOptions opts = PFile::ModeDefault
125 virtual PBoolean WriteFrame(
const void * frame);
126 virtual PBoolean ReadFrame(
void * frame);
143 class PJPEGFile :
public PVideoFile
153 PFile::OpenOptions opts = PFile::ModeDefault
156 virtual PBoolean WriteFrame(
const void * frame);
157 virtual PBoolean ReadFrame(
void * frame);
161 off_t GetLength()
const;
162 off_t GetPosition()
const;
171 #endif // P_JPEG_DECODER
177 #endif // PTLIB_PVIDFILE_H