- Main Page
- Namespaces
- Classes
- Files
- Directories

- Class List
- Class Hierarchy
- Class Members

# dirac::DiracParser Class Reference

Dirac Stream Parser Class. More...

`#include <dirac_cppparser.h>`

List of all members.

## 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.

## Detailed Description

Dirac Stream Parser Class.

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 & Destructor Documentation

DiracParser::DiracParser | ( | bool | verbose = `false` | ) |

  | Constructor. Constructor takes Parameters:
  | verbose | boolean flag. Set to true for verbose output
Definition at line 142 of file dirac_cppparser.cpp.

## Member Function Documentation

DecoderState DiracParser::Parse | ( |  | ) |

| Parse the data in internal buffer. Parses the data in the input buffer. This function returns one of the following values STATE_BUFFER : Not enough data in internal buffer to process STATE_SEQUENCE : Start of sequence detected STATE_PICTURE_START : Start of picture detected STATE_PICTURE_AVAIL : Decoded picture available STATE_SEQUENCE_END : End of sequence detected STATE_INVALID : Invalid stream. Stop further processing 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().

void DiracParser::SetBuffer | ( | char * | start,
|  | char * | end
| ) |

  | Copy data into the internal stream buffer. SetBuffer takes Parameters:
  | start | Start of input buffer
  | end | End of input buffer
Definition at line 163 of file dirac_cppparser.cpp. References dirac::InputStreamBuffer::Copy(). Referenced by dirac_buffer().

void DiracParser::SetSkip | ( | bool | skip | ) |

| 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().

The documentation for this class was generated from the following files:

- C:/guliverkli/src/filters/parser/diracsplitter/libdirac/libdirac_decoder/dirac_cppparser.h
- C:/guliverkli/src/filters/parser/diracsplitter/libdirac/libdirac_decoder/dirac_cppparser.cpp