#include <dirac_cppparser.h>
Public Member Functions | |
DiracParser (bool verbose=false) | |
Constructor. | |
~DiracParser () | |
Destructor. | |
void | SetBuffer (char *start, char *end) |
Copy data into the internal stream buffer. | |
DecoderState | Parse () |
Parse the data in internal buffer. | |
const SeqParams & | GetSeqParams () const |
Return the sequence parameters of the current sequence. | |
const FrameParams & | GetNextFrameParams () const |
Return the frame parameters of the next frame to be decoded. | |
const Frame & | GetNextFrame () const |
Return the decoded frame. | |
const Frame & | GetLastFrame () const |
Return the last frame in the sequence. | |
void | SetSkip (bool skip) |
Set the skip flag. |
This class is a wrapper around the SequenceDecompressor class. The Sequence Decompressor class needs a full frame of data to be available to decompress a frame successfully. So, the DiracParser class uses the InputStreamBuffer class to store data until a chunk is available to be processed and then invokes the SequenceDecompressor functions to process data. A chunk of data can be a start of sequence, a frame or end of sequence data. The istream used to instantiate the SequenceDecompressor object is created using an InputStreamBuffer object which is manipulated the DiracParser. This ensures that data is always available for processing by the SequenceDecompressor object.
Definition at line 117 of file dirac_cppparser.h.
|
Constructor. Constructor takes
Definition at line 142 of file dirac_cppparser.cpp. |
|
Parse the data in internal buffer.
Parses the data in the input buffer. This function returns one of the following values Definition at line 170 of file dirac_cppparser.cpp. References dirac::BITSTREAM_VERSION, dirac::SequenceDecompressor::DecompressNextFrame(), dirac::FrameParams::FrameNum(), dirac::Frame::GetFparams(), dirac::InputStreamBuffer::PurgeProcessedData(), dirac::SequenceDecompressor::ReadNextFrameHeader(), and dirac::InputStreamBuffer::Seek(). Referenced by dirac_parse(). |
|
Copy data into the internal stream buffer. SetBuffer takes
Definition at line 163 of file dirac_cppparser.cpp. References dirac::InputStreamBuffer::Copy(). Referenced by dirac_buffer(). |
|
Set the skip flag. Set the skip flag to the value specified in skip. If skip is true, the parser will skip decoding the next frame until the this function is called again with skip set to false Definition at line 301 of file dirac_cppparser.cpp. References dirac::FrameParams::FSort(), and dirac::SequenceDecompressor::GetNextFrameParams(). Referenced by dirac_skip(). |