Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Stream Class Reference

#include <Stream.hpp>

Inheritance diagram for Stream:

MPGStream YUVStream List of all members.

Public Methods

int getWidth ()
int getHeight ()
unsigned int getMasterGOPCount ()
unsigned int getFrameCount ()
GOPgetMasterGOP (unsigned int patNo)
int fillBuffer (Frame *f)
int freeBuffer (Frame *f)
int fillBuffer (GOP *p)
int freeBuffer (GOP *p)
FramegetFrame (uint i)
QString getFileName ()
virtual ~Stream ()
virtual GOPaddNextGOP (uint numframes)=0
virtual long getFileSize ()=0

Protected Methods

 Stream (const QString &fName, bool preRead=true)
 Implementation of concret methods of the abstract class Stream.


Protected Attributes

QFile file
QPtrList< GOPgopList
int width
int height
unsigned int noFrames
long fileSize

Constructor & Destructor Documentation

Stream::~Stream   [virtual]
 

Definition at line 20 of file Stream.cpp.

Stream::Stream const QString &    fName,
bool    preRead = true
[protected]
 

Implementation of concret methods of the abstract class Stream.

Version:
0.1 alpha
Author:
K. Leopold

Definition at line 12 of file Stream.cpp.

References file, gopList, height, and width.


Member Function Documentation

virtual GOP* Stream::addNextGOP uint    numframes [pure virtual]
 

Implemented in MPGStream, and YUVStream.

int Stream::fillBuffer GOP   p
 

Fills the buffers of all frames in a GOP.

Parameters:
p  Pointer to the GOP whos frames buffers has to be filled

Definition at line 89 of file Stream.cpp.

References ERR_OK, fillBuffer(), GOP::getFrame(), GOP::getFrameCount(), and Frame::inMem().

int Stream::fillBuffer Frame   f
 

Fills the buffer of a frame.

Parameters:
f  Pointer to the frame whos buffer has to be filled

Definition at line 55 of file Stream.cpp.

References ERR, ERR_OK, file, Frame::getBuffer(), Frame::getByteSize(), Frame::getFileOffset(), Frame::inMem(), and Frame::resizeBuffer().

Referenced by fillBuffer(), Frame::fillBuffer(), and PatGen::init().

int Stream::freeBuffer GOP   p
 

Empties the buffers of all frames in a GOP.

Parameters:
p  Pointer to the GOP whos frames buffers has to be drained

Definition at line 106 of file Stream.cpp.

References ERR_OK, GOP::getFrame(), GOP::getFrameCount(), Frame::inMem(), and Frame::resizeBuffer().

int Stream::freeBuffer Frame   f
 

Empties the buffer of a frame.

Parameters:
f  Pointer to the frame whos buffer has to be drained

Definition at line 123 of file Stream.cpp.

References ERR, ERR_OK, Frame::inMem(), and Frame::resizeBuffer().

Referenced by Frame::freeBuffer(), and PatGen::init().

QString Stream::getFileName  
 

Returns :
File name of the stream

Definition at line 153 of file Stream.cpp.

References file.

virtual long Stream::getFileSize   [pure virtual]
 

Implemented in MPGStream, and YUVStream.

Frame * Stream::getFrame uint    i
 

Returns a frame in the stream.

Parameters:
i  Frame number
Returns :
A pointer to the frame.

Definition at line 28 of file Stream.cpp.

References GOP::getFrame(), GOP::getFrameCount(), getMasterGOP(), and getMasterGOPCount().

unsigned int Stream::getFrameCount  
 

Returns :
The number of frames in the stream.

Definition at line 148 of file Stream.cpp.

References noFrames.

int Stream::getHeight  
 

Definition at line 140 of file Stream.cpp.

References height.

Referenced by YUVFrame::computePSNRy().

GOP * Stream::getMasterGOP unsigned int    patNo
 

Returns a GOP in the stream.

Parameters:
patNo  GOP number
Returns :
Pointer to the GOP

Definition at line 23 of file Stream.cpp.

References gopList.

Referenced by getFrame(), and main().

unsigned int Stream::getMasterGOPCount  
 

Returns :
The number of GOPs in the stream.

Definition at line 144 of file Stream.cpp.

References gopList.

Referenced by getFrame(), and main().

int Stream::getWidth  
 

Definition at line 136 of file Stream.cpp.

References width.

Referenced by YUVFrame::computePSNRy().


Member Data Documentation

QFile Stream::file [protected]
 

Definition at line 86 of file Stream.hpp.

Referenced by YUVStream::addNextGOP(), MPGStream::addNextGOP(), fillBuffer(), MPGStream::fillHeaderBuffer(), getFileName(), MPGStream::getNextFrame(), MPGStream::MPGStream(), MPGStream::parseHeader(), Stream(), YUVStream::YUVStream(), and MPGStream::~MPGStream().

long Stream::fileSize [protected]
 

Definition at line 91 of file Stream.hpp.

Referenced by YUVStream::addNextGOP(), MPGStream::getAvgFrameSize(), MPGStream::getAvgGOPSize(), YUVStream::getFileSize(), MPGStream::getFileSize(), MPGStream::getNextFrame(), MPGStream::MPGStream(), and YUVStream::YUVStream().

QPtrList<GOP> Stream::gopList [protected]
 

Definition at line 87 of file Stream.hpp.

Referenced by YUVStream::addNextGOP(), MPGStream::addNextGOP(), MPGStream::getAvgGOPSize(), getMasterGOP(), getMasterGOPCount(), MPGStream::MPGStream(), Stream(), and YUVStream::YUVStream().

int Stream::height [protected]
 

Definition at line 89 of file Stream.hpp.

Referenced by getHeight(), Stream(), and YUVStream::YUVStream().

unsigned int Stream::noFrames [protected]
 

Definition at line 90 of file Stream.hpp.

Referenced by YUVStream::addNextGOP(), MPGStream::addNextGOP(), MPGStream::getAvgFrameSize(), getFrameCount(), MPGStream::getNextFrame(), MPGStream::MPGStream(), and YUVStream::YUVStream().

int Stream::width [protected]
 

Definition at line 88 of file Stream.hpp.

Referenced by getWidth(), Stream(), and YUVStream::YUVStream().


The documentation for this class was generated from the following files:
Generated on Wed Mar 19 11:57:44 2003 for qctva4lv by doxygen1.2.17