Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

QTSource Class Reference

A class which implements the ImageSource interface as a source of QT movie Images. More...

#include <QTSource.h>

Inheritance diagram for QTSource::

ImageSource List of all members.

Public Methods

 QTSource (char *path)
 Initialise an QT movie source. More...

 ~QTSource ()
 Close QT file and free up the memory.

virtual ImageSourceoperator>> (ImageRGB &)
 Extract a frame of the QT movie to the colour Images data buffer. More...

virtual ImageSourceoperator>> (ImageGrey &)
 Extract a frame of the QT movie to the greyscale Images brightness buffer. More...

virtual ImageSourceoperator>> (Image &)
 Extract a frame of the QT movie. More...

void get_size (unsigned int &, unsigned int &)
 Return the width and height of the QT. More...

int set_frame (long frame_no)
 Seek to point in file. More...

long get_no_frames ()
 Get movie length.

void get_framerate (float &fr)
 Get movie framerate.

void set_framerate (float fr)
 Set movie framerate.

bool eof ()
 End of file.


Protected Attributes

quicktime_t* file
 QT file handle.

char* comp_type
 Compression Type.

unsigned char** buff
 Buffer for decoded data.

unsigned int width
 QT width.

unsigned int height
 QT height.

long frames
 Number of frames in movie.

long c_frame_no
 Current frame no.

bool qt_eof
 End of file flag.


Detailed Description

A class which implements the ImageSource interface as a source of QT movie Images.

Each image that is extracted from the QTSource class is a frame of the QT movie.

Note:
Assumes only one stream

Definition at line 31 of file QTSource.h.


Constructor & Destructor Documentation

QTSource::QTSource ( char * path )
 

Initialise an QT movie source.

Parameters:
path   The path and filename of the QT file to use.

Definition at line 27 of file QTSource.cpp.


Member Function Documentation

void QTSource::get_size ( unsigned int & w,
unsigned int & h ) [virtual]
 

Return the width and height of the QT.

Parameters:
w   The width of the QT frame.
h   The height of the QT frame.

Reimplemented from ImageSource.

Definition at line 151 of file QTSource.cpp.

ImageSource & QTSource::operator>> ( Image & img ) [virtual]
 

Extract a frame of the QT movie.

The Image could be colour or greyscale depending on the default palette type for this class.

Parameters:
img   The Image to be extracted to.

Reimplemented from ImageSource.

Definition at line 135 of file QTSource.cpp.

ImageSource & QTSource::operator>> ( ImageGrey & img ) [virtual]
 

Extract a frame of the QT movie to the greyscale Images brightness buffer.

Parameters:
img   The greyscale Image to be extracted to.

Reimplemented from ImageSource.

Definition at line 108 of file QTSource.cpp.

ImageSource & QTSource::operator>> ( ImageRGB & img ) [virtual]
 

Extract a frame of the QT movie to the colour Images data buffer.

Parameters:
img   The colour Image to be extracted to.

Reimplemented from ImageSource.

Definition at line 89 of file QTSource.cpp.

int QTSource::set_frame ( long frame_no )
 

Seek to point in file.

Returns 0 if OK and -1 otherwise.

Parameters:
frame_no   frame number to set file pointer to

Definition at line 163 of file QTSource.cpp.


The documentation for this class was generated from the following files:
Generated at Fri Aug 13 17:29:22 2004 for libRTImage by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001