Add Doxygen skel info for video_provider_yuv4mpeg.h which was having errors in the first round.

Originally committed to SVN as r3328.
This commit is contained in:
Amar Takhar 2009-07-30 04:25:52 +00:00
parent d82d02010b
commit 583cf55afb
1 changed files with 123 additions and 5 deletions

View File

@ -44,69 +44,163 @@
#include <stdio.h> #include <stdio.h>
#include <vector> #include <vector>
// ffmpeg uses 80, so I'm p sure this isn't too small
/// DOCME
#define YUV4MPEG_HEADER_MAXLEN 128 #define YUV4MPEG_HEADER_MAXLEN 128
/// @class YUV4MPEGVideoProvider
/// @brief DOCME
///
/// DOCME
class YUV4MPEGVideoProvider : public VideoProvider { class YUV4MPEGVideoProvider : public VideoProvider {
private: private:
/// DOCME
enum Y4M_PixelFormat { enum Y4M_PixelFormat {
/// DOCME
Y4M_PIXFMT_NONE = -1, Y4M_PIXFMT_NONE = -1,
/// DOCME
Y4M_PIXFMT_420JPEG, // afaict the only difference between Y4M_PIXFMT_420JPEG, // afaict the only difference between
/// DOCME
Y4M_PIXFMT_420MPEG2, // these three is the chroma sample location, Y4M_PIXFMT_420MPEG2, // these three is the chroma sample location,
/// DOCME
Y4M_PIXFMT_420PALDV, // and nobody cares about that. Y4M_PIXFMT_420PALDV, // and nobody cares about that.
/// DOCME
Y4M_PIXFMT_411, Y4M_PIXFMT_411,
/// DOCME
Y4M_PIXFMT_422, Y4M_PIXFMT_422,
/// DOCME
Y4M_PIXFMT_444, Y4M_PIXFMT_444,
/// DOCME
Y4M_PIXFMT_444ALPHA, Y4M_PIXFMT_444ALPHA,
/// DOCME
Y4M_PIXFMT_MONO, Y4M_PIXFMT_MONO,
}; };
/// DOCME
enum Y4M_InterlacingMode { enum Y4M_InterlacingMode {
/// DOCME
Y4M_ILACE_NOTSET = -1, // not to be confused with Y4M_ILACE_UNKNOWN Y4M_ILACE_NOTSET = -1, // not to be confused with Y4M_ILACE_UNKNOWN
/// DOCME
Y4M_ILACE_PROGRESSIVE, Y4M_ILACE_PROGRESSIVE,
/// DOCME
Y4M_ILACE_TFF, Y4M_ILACE_TFF,
/// DOCME
Y4M_ILACE_BFF, Y4M_ILACE_BFF,
/// DOCME
Y4M_ILACE_MIXED, Y4M_ILACE_MIXED,
/// DOCME
Y4M_ILACE_UNKNOWN, Y4M_ILACE_UNKNOWN,
}; };
// this is currently unused :(
/// DOCME
enum Y4M_FrameFlags { enum Y4M_FrameFlags {
/// DOCME
Y4M_FFLAG_NOTSET = -1, Y4M_FFLAG_NOTSET = -1,
/// DOCME
Y4M_FFLAG_NONE = 0x0000, Y4M_FFLAG_NONE = 0x0000,
// repeat field/frame flags
/// DOCME
Y4M_FFLAG_R_TFF = 0x0001, // TFF Y4M_FFLAG_R_TFF = 0x0001, // TFF
/// DOCME
Y4M_FFLAG_R_TFF_R = 0x0002, // TFF and repeat Y4M_FFLAG_R_TFF_R = 0x0002, // TFF and repeat
/// DOCME
Y4M_FFLAG_R_BFF = 0x0004, // BFF Y4M_FFLAG_R_BFF = 0x0004, // BFF
/// DOCME
Y4M_FFLAG_R_BFF_R = 0x0008, // BFF and repeat Y4M_FFLAG_R_BFF_R = 0x0008, // BFF and repeat
/// DOCME
Y4M_FFLAG_R_P = 0x0010, // progressive Y4M_FFLAG_R_P = 0x0010, // progressive
/// DOCME
Y4M_FFLAG_R_P_R = 0x0020, // progressive and repeat once Y4M_FFLAG_R_P_R = 0x0020, // progressive and repeat once
/// DOCME
Y4M_FFLAG_R_P_RR = 0x0040, // progressive and repeat twice Y4M_FFLAG_R_P_RR = 0x0040, // progressive and repeat twice
// temporal sampling flags
/// DOCME
Y4M_FFLAG_T_P = 0x0080, // progressive (fields sampled at the same time) Y4M_FFLAG_T_P = 0x0080, // progressive (fields sampled at the same time)
/// DOCME
Y4M_FFLAG_T_I = 0x0100, // interlaced (fields sampled at different times) Y4M_FFLAG_T_I = 0x0100, // interlaced (fields sampled at different times)
// spatial sampling flags
/// DOCME
Y4M_FFLAG_C_P = 0x0200, // progressive (whole frame subsampled) Y4M_FFLAG_C_P = 0x0200, // progressive (whole frame subsampled)
/// DOCME
Y4M_FFLAG_C_I = 0x0400, // interlaced (fields subsampled independently) Y4M_FFLAG_C_I = 0x0400, // interlaced (fields subsampled independently)
/// DOCME
Y4M_FFLAG_C_UNKNOWN = 0x0800, // unknown (only allowed for non-4:2:0 sampling) Y4M_FFLAG_C_UNKNOWN = 0x0800, // unknown (only allowed for non-4:2:0 sampling)
}; };
/// DOCME
FILE *sf; // source file FILE *sf; // source file
/// DOCME
bool inited; bool inited;
/// DOCME
/// DOCME
int w, h; // width/height int w, h; // width/height
/// DOCME
int num_frames; // length of file in frames int num_frames; // length of file in frames
/// DOCME
int frame_sz; // size of each frame in bytes int frame_sz; // size of each frame in bytes
/// DOCME
Y4M_PixelFormat pixfmt; // colorspace/pixel format Y4M_PixelFormat pixfmt; // colorspace/pixel format
/// DOCME
Y4M_InterlacingMode imode; // interlacing mode Y4M_InterlacingMode imode; // interlacing mode
struct { struct {
/// DOCME
int num; int num;
/// DOCME
int den; int den;
/// DOCME
} fps_rat; // framerate } fps_rat; // framerate
/// DOCME
std::vector<int64_t> seek_table; // the position in the file of each frame, in bytes std::vector<int64_t> seek_table; // the position in the file of each frame, in bytes
/// DOCME
int cur_fn; // current frame number int cur_fn; // current frame number
/// DOCME
wxString errmsg; wxString errmsg;
void LoadVideo(const wxString filename); void LoadVideo(const wxString filename);
@ -129,12 +223,36 @@ public:
int GetWidth(); int GetWidth();
int GetHeight(); int GetHeight();
double GetFPS(); double GetFPS();
/// @brief DOCME
/// @return
///
bool AreKeyFramesLoaded() { return false; } bool AreKeyFramesLoaded() { return false; }
/// @brief DOCME
/// @return
///
wxArrayInt GetKeyFrames() { return wxArrayInt(); } wxArrayInt GetKeyFrames() { return wxArrayInt(); }
/// @brief DOCME
/// @return
///
bool IsVFR() { return false; }; bool IsVFR() { return false; };
/// @brief DOCME
/// @return
///
FrameRate GetTrueFrameRate() { return FrameRate(); } FrameRate GetTrueFrameRate() { return FrameRate(); }
/// @brief DOCME
/// @return
///
wxString GetDecoderName() { return L"YUV4MPEG"; } wxString GetDecoderName() { return L"YUV4MPEG"; }
/// @brief DOCME
///
int GetDesiredCacheSize() { return 8; } int GetDesiredCacheSize() { return 8; }
}; };