Initial
This commit is contained in:
289
avifile/STRMHDR.HPP
Normal file
289
avifile/STRMHDR.HPP
Normal file
@@ -0,0 +1,289 @@
|
||||
#ifndef _AVIFILE_STREAMHEADER_HPP_
|
||||
#define _AVIFILE_STREAMHEADER_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_FILE_HPP_
|
||||
#include <common/file.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_RECTANGLE_HPP_
|
||||
#include <common/rect.hpp>
|
||||
#endif
|
||||
#ifndef _AVIFILE_AVILISTCHUNK_HPP_
|
||||
#include <avifile/lstchnk.hpp>
|
||||
#endif
|
||||
#ifndef _AVIFILE_AVIDEFS_HPP_
|
||||
#include <avifile/avidefs.hpp>
|
||||
#endif
|
||||
#ifndef _AVIFILE_FORMATHEADER_HPP_
|
||||
#include <avifile/frmhdr.hpp>
|
||||
#endif
|
||||
#ifndef _AVIFILE_VEDTHEADER_HPP_
|
||||
#include <avifile/vedthdr.hpp>
|
||||
#endif
|
||||
#ifndef _AVIFILE_ADDITIONALHEADER_HPP_
|
||||
#include <avifile/addhdr.hpp>
|
||||
#endif
|
||||
#ifndef _AVIFILE_AVIINDEXHEADER_HPP_
|
||||
#include <avifile/AVIIndexHeader.hpp>
|
||||
#endif
|
||||
#ifndef _AVIFILE_FOURCC_HPP_
|
||||
#include <avifile/fourcc.hpp>
|
||||
#endif
|
||||
|
||||
/*
|
||||
additional fcchandlers 'dvsd','dvhd','dvsl' for digital video
|
||||
|
||||
*/
|
||||
|
||||
class AVIStreamHeader : public AVIFormatHeader, private AVIVFWStreamHeader
|
||||
{
|
||||
public:
|
||||
AVIStreamHeader(void);
|
||||
AVIStreamHeader(const AVIStreamHeader &someAVIStreamHeader);
|
||||
virtual ~AVIStreamHeader();
|
||||
bool read(File &inFile);
|
||||
bool write(File &outFile);
|
||||
AVIStreamHeader &operator=(const AVIStreamHeader &someAVIStreamHeader);
|
||||
WORD operator==(const AVIStreamHeader &someAVIStreamHeader)const;
|
||||
FOURCC fccType(void)const;
|
||||
void fccType(FOURCC fccType);
|
||||
FOURCC fccHandler(void)const;
|
||||
void fccHandler(FOURCC fccHandler);
|
||||
DWORD flags(void)const;
|
||||
void flags(DWORD flags);
|
||||
WORD priority(void)const;
|
||||
void priority(WORD priority);
|
||||
WORD language(void)const;
|
||||
void language(WORD language);
|
||||
DWORD initialFrames(void)const;
|
||||
void initialFrames(DWORD initialFrames);
|
||||
DWORD scale(void)const;
|
||||
void scale(DWORD scale);
|
||||
DWORD rate(void)const;
|
||||
void rate(DWORD rate);
|
||||
DWORD start(void)const;
|
||||
void start(DWORD start);
|
||||
DWORD length(void)const;
|
||||
void length(DWORD length);
|
||||
DWORD suggestedBufferSize(void)const;
|
||||
void suggestedBufferSize(DWORD suggestedBufferSize);
|
||||
DWORD quality(void)const;
|
||||
void quality(DWORD quiality);
|
||||
DWORD sampleSize(void)const;
|
||||
void sampleSize(DWORD sampleSize);
|
||||
Rect frame(void)const;
|
||||
void frame(const Rect &frame);
|
||||
String toString(void)const;
|
||||
private:
|
||||
AVIVedtHeader mAVIVedtHeader;
|
||||
AVIAdditionalHeader mAVIAdditionalHeader;
|
||||
AVIIndexHeader mAVIIndexHeader;
|
||||
};
|
||||
|
||||
inline
|
||||
AVIStreamHeader::AVIStreamHeader(void)
|
||||
{
|
||||
fccType((FOURCC)0);
|
||||
fccHandler((FOURCC)0);
|
||||
flags(0L);
|
||||
priority(0);
|
||||
language(0);
|
||||
initialFrames(0L);
|
||||
scale(0L);
|
||||
rate(0L);
|
||||
start(0L);
|
||||
length(0L);
|
||||
suggestedBufferSize(0L);
|
||||
quality(0L);
|
||||
sampleSize(0L);
|
||||
frame(Rect());
|
||||
}
|
||||
|
||||
inline
|
||||
AVIStreamHeader::AVIStreamHeader(const AVIStreamHeader &someAVIStreamHeader)
|
||||
{
|
||||
*this=someAVIStreamHeader;
|
||||
}
|
||||
|
||||
inline
|
||||
AVIStreamHeader::~AVIStreamHeader()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
FOURCC AVIStreamHeader::fccType(void)const
|
||||
{
|
||||
return AVIVFWStreamHeader::fccType;
|
||||
}
|
||||
|
||||
inline
|
||||
void AVIStreamHeader::fccType(FOURCC fccType)
|
||||
{
|
||||
AVIVFWStreamHeader::fccType=fccType;
|
||||
}
|
||||
|
||||
inline
|
||||
FOURCC AVIStreamHeader::fccHandler(void)const
|
||||
{
|
||||
return AVIVFWStreamHeader::fccHandler;
|
||||
}
|
||||
|
||||
inline
|
||||
void AVIStreamHeader::fccHandler(FOURCC fccHandler)
|
||||
{
|
||||
AVIVFWStreamHeader::fccHandler=fccHandler;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD AVIStreamHeader::flags(void)const
|
||||
{
|
||||
return AVIVFWStreamHeader::dwFlags;
|
||||
}
|
||||
|
||||
inline
|
||||
void AVIStreamHeader::flags(DWORD flags)
|
||||
{
|
||||
AVIVFWStreamHeader::dwFlags=flags;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD AVIStreamHeader::priority(void)const
|
||||
{
|
||||
return AVIVFWStreamHeader::wPriority;
|
||||
}
|
||||
|
||||
inline
|
||||
void AVIStreamHeader::priority(WORD priority)
|
||||
{
|
||||
AVIVFWStreamHeader::wPriority=priority;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD AVIStreamHeader::language(void)const
|
||||
{
|
||||
return AVIVFWStreamHeader::wLanguage;
|
||||
}
|
||||
|
||||
inline
|
||||
void AVIStreamHeader::language(WORD language)
|
||||
{
|
||||
AVIVFWStreamHeader::wLanguage=language;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD AVIStreamHeader::initialFrames(void)const
|
||||
{
|
||||
return AVIVFWStreamHeader::dwInitialFrames;
|
||||
}
|
||||
|
||||
inline
|
||||
void AVIStreamHeader::initialFrames(DWORD initialFrames)
|
||||
{
|
||||
AVIVFWStreamHeader::dwInitialFrames=initialFrames;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD AVIStreamHeader::scale(void)const
|
||||
{
|
||||
return AVIVFWStreamHeader::dwScale;
|
||||
}
|
||||
|
||||
inline
|
||||
void AVIStreamHeader::scale(DWORD scale)
|
||||
{
|
||||
AVIVFWStreamHeader::dwScale=scale;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD AVIStreamHeader::rate(void)const
|
||||
{
|
||||
return AVIVFWStreamHeader::dwRate;
|
||||
}
|
||||
|
||||
inline
|
||||
void AVIStreamHeader::rate(DWORD rate)
|
||||
{
|
||||
AVIVFWStreamHeader::dwRate=rate;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD AVIStreamHeader::start(void)const
|
||||
{
|
||||
return AVIVFWStreamHeader::dwStart;
|
||||
}
|
||||
|
||||
inline
|
||||
void AVIStreamHeader::start(DWORD start)
|
||||
{
|
||||
AVIVFWStreamHeader::dwStart=start;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD AVIStreamHeader::length(void)const
|
||||
{
|
||||
return AVIVFWStreamHeader::dwLength;
|
||||
}
|
||||
|
||||
inline
|
||||
void AVIStreamHeader::length(DWORD length)
|
||||
{
|
||||
AVIVFWStreamHeader::dwLength=length;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD AVIStreamHeader::suggestedBufferSize(void)const
|
||||
{
|
||||
return AVIVFWStreamHeader::dwSuggestedBufferSize;
|
||||
}
|
||||
|
||||
inline
|
||||
void AVIStreamHeader::suggestedBufferSize(DWORD suggestedBufferSize)
|
||||
{
|
||||
AVIVFWStreamHeader::dwSuggestedBufferSize=suggestedBufferSize;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD AVIStreamHeader::quality(void)const
|
||||
{
|
||||
return AVIVFWStreamHeader::dwQuality;
|
||||
}
|
||||
|
||||
inline
|
||||
void AVIStreamHeader::quality(DWORD quality)
|
||||
{
|
||||
AVIVFWStreamHeader::dwQuality=quality;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD AVIStreamHeader::sampleSize(void)const
|
||||
{
|
||||
return AVIVFWStreamHeader::dwSampleSize;
|
||||
}
|
||||
|
||||
inline
|
||||
void AVIStreamHeader::sampleSize(DWORD sampleSize)
|
||||
{
|
||||
AVIVFWStreamHeader::dwSampleSize=sampleSize;
|
||||
}
|
||||
|
||||
inline
|
||||
void AVIStreamHeader::frame(const Rect &frame)
|
||||
{
|
||||
AVIVFWStreamHeader::rcFrame.left=(WORD)frame.left();
|
||||
AVIVFWStreamHeader::rcFrame.top=(WORD)frame.top();
|
||||
AVIVFWStreamHeader::rcFrame.right=(WORD)frame.right();
|
||||
AVIVFWStreamHeader::rcFrame.bottom=(WORD)frame.bottom();
|
||||
}
|
||||
|
||||
inline
|
||||
Rect AVIStreamHeader::frame(void)const
|
||||
{
|
||||
return Rect(AVIVFWStreamHeader::rcFrame.left,
|
||||
AVIVFWStreamHeader::rcFrame.top,
|
||||
AVIVFWStreamHeader::rcFrame.right,
|
||||
AVIVFWStreamHeader::rcFrame.bottom);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user