MgzJInputStream is a wrapper class to read frames from .mgzj files. More...
#include <Media/MgzJInputStream.H>
Public Member Functions | |
MgzJInputStream (OptionManager &mgr, const std::string &descrName="MgzJ Input Stream", const std::string &tagName="MgzJInputStream") | |
Construct an mgzJstream object for mgzJ input. | |
virtual | ~MgzJInputStream () |
Virtual destructor. | |
virtual void | setConfigInfo (const std::string &filename) |
Override from FrameIstream; just calls setFileName(). | |
virtual GenericFrameSpec | peekFrameSpec () |
get frame specifications, peeking at the first frame if necessary | |
void | setFileName (std::string fname) |
Configure the MGZJ Stream for decoding. | |
virtual GenericFrame | readFrame () |
Read the next frame from the mgz stream. | |
virtual bool | supportsSeek () |
Let everyone know that we support random access seeks. | |
virtual bool | setFrameNumber (int n) |
Change the current frame number. | |
virtual bool | readAndDiscardFrame () |
Just increment the frame number. | |
virtual FrameRange | getFrameRange () |
Get the frame range information. |
MgzJInputStream is a wrapper class to read frames from .mgzj files.
mgzJ is a custom format that basically contains the raw frames, each individually in gzipped format. One mgz file can contain many frames of various sizes and types. Additionally, there is a journal stored at the end of the file which contains the file byte positions and types of each frame in the file so that seeking can be done in O(1)
Definition at line 56 of file MgzJInputStream.H.
MgzJInputStream::MgzJInputStream | ( | OptionManager & | mgr, | |
const std::string & | descrName = "MgzJ Input Stream" , |
|||
const std::string & | tagName = "MgzJInputStream" | |||
) |
Construct an mgzJstream object for mgzJ input.
Definition at line 53 of file MgzJInputStream.C.
MgzJInputStream::~MgzJInputStream | ( | ) | [virtual] |
Virtual destructor.
Definition at line 61 of file MgzJInputStream.C.
FrameRange MgzJInputStream::getFrameRange | ( | ) | [virtual] |
Get the frame range information.
Reimplemented from FrameIstream.
Definition at line 141 of file MgzJInputStream.C.
References MgzJDecoder::getNumFrames().
GenericFrameSpec MgzJInputStream::peekFrameSpec | ( | ) | [virtual] |
get frame specifications, peeking at the first frame if necessary
Implements FrameIstream.
Definition at line 77 of file MgzJInputStream.C.
References GenericFrame::frameSpec(), GenericFrame::initialized(), and readFrame().
bool MgzJInputStream::readAndDiscardFrame | ( | ) | [virtual] |
Just increment the frame number.
Reimplemented from FrameIstream.
Definition at line 135 of file MgzJInputStream.C.
References setFrameNumber().
GenericFrame MgzJInputStream::readFrame | ( | ) | [virtual] |
Read the next frame from the mgz stream.
The native representation of the GenericFrame will be the same as what it was when the frame was stored into the stream.
Implements FrameIstream.
Definition at line 106 of file MgzJInputStream.C.
References GenericFrame::initialized(), MgzJDecoder::readFrame(), and setFrameNumber().
Referenced by peekFrameSpec().
void MgzJInputStream::setConfigInfo | ( | const std::string & | filename | ) | [virtual] |
Override from FrameIstream; just calls setFileName().
Reimplemented from FrameIstream.
Definition at line 67 of file MgzJInputStream.C.
References setFileName().
void MgzJInputStream::setFileName | ( | std::string | fname | ) |
Configure the MGZJ Stream for decoding.
fname | name of file from which frames are to be read from |
Definition at line 94 of file MgzJInputStream.C.
Referenced by setConfigInfo().
bool MgzJInputStream::setFrameNumber | ( | int | n | ) | [virtual] |
Change the current frame number.
Reimplemented from FrameIstream.
Definition at line 123 of file MgzJInputStream.C.
References MgzJDecoder::setFrameNumber().
Referenced by readAndDiscardFrame(), and readFrame().
virtual bool MgzJInputStream::supportsSeek | ( | ) | [inline, virtual] |
Let everyone know that we support random access seeks.
Reimplemented from FrameIstream.
Definition at line 83 of file MgzJInputStream.H.