Dirac Video Codec

# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::DiracByteStream Class Reference

Represents a series of bytes in the Dirac bytestream specfication format. More...

`#include <dirac_byte_stream.h>`

Inheritance diagram for dirac::DiracByteStream:
[legend]
Collaboration diagram for dirac::DiracByteStream:
[legend]

List of all members.

## Public Member Functions

- DiracByteStream ()
    Constructor.
- ~DiracByteStream ()
    Destructor.
- void AddBytes (char *start, int count)
    Adds Dirac-formatted bytes to internal-byte-stream for processing.
- DiracByteStats GetLastUnitStats ()
    Gets the statistics of the most recent parse-unit to be processed.
- ParseUnitByteIO * GetNextParseUnit ()
    Gets the next parse-unit in the current byte-stream.
- DiracByteStats GetSequenceStats () const
    Gets stats for current sequence.
- void AddSequenceHeader (SequenceHeaderByteIO *p_seqheader_byteio)
    Adds a random access point to the current Dirac byte stream.
- void AddPicture (PictureByteIO *p_frame_byteio)
    Adds a picture to the current Dirac byte stream.
- void Clear ()
    Clear parse-units.
- DiracByteStats EndSequence ()
    Insert end-of-sequence data.
- const std::string GetBytes ()
    Gets a pointer to all current output bytes.
- bool IsUnitAvailable () const
    Any info pending?

## Private Types

- typedef std::queue< std::pair
  < ParseUnitType,
  ParseUnitByteIO * > > ParseUnitList
    Parse-units in Dirac stream.

## Private Member Functions

- void Reset (ParseUnitByteIO *p_curr_unit, int pos)

## Private Attributes

- ParseUnitList m_parse_unit_list
- ParseUnitByteIO * mp_prev_parse_unit
    Last unit to be processed Required for specifying the previous parse-unit.
- DiracByteStats m_sequence_stats
    Stats for current sequence.

## Detailed Description

These bytes are grouped into more managable parse units by this class.

## Member Typedef Documentation

typedef std::queue< std::pair <ParseUnitType, ParseUnitByteIO*> > dirac::DiracByteStream::ParseUnitList`[private]`

## Constructor & Destructor Documentation

dirac::DiracByteStream::DiracByteStream | ( |  | ) |

dirac::DiracByteStream::~DiracByteStream | ( |  | ) |

## Member Function Documentation

void dirac::DiracByteStream::AddBytes | ( | char * | start,
|  | int | count |
| ) |  |  |

Parameters:

  | start | Start of char list
  | count | Number of chars

DiracByteStats dirac::DiracByteStream::GetLastUnitStats | ( |  | ) |

Returns:
  Byte-statistics

ParseUnitByteIO* dirac::DiracByteStream::GetNextParseUnit | ( |  | ) |

DiracByteStats dirac::DiracByteStream::GetSequenceStats | ( |  | ) | const

void dirac::DiracByteStream::AddSequenceHeader | ( | SequenceHeaderByteIO * | p_seqheader_byteio | ) |

Parameters:

  | p_seqheader_byteio | Sequence header data.

void dirac::DiracByteStream::AddPicture | ( | PictureByteIO * | p_frame_byteio | ) |

Parameters:

  | p_frame_byteio | Picture stream. This class is now responsible for deleting.

void dirac::DiracByteStream::Clear | ( |  | ) |

DiracByteStats dirac::DiracByteStream::EndSequence | ( |  | ) |

Returns:
  Sequence stats

const std::string dirac::DiracByteStream::GetBytes | ( |  | ) | `[virtual]`

Reimplemented from dirac::ByteIO.

bool dirac::DiracByteStream::IsUnitAvailable | ( |  | ) | const

void dirac::DiracByteStream::Reset | ( | ParseUnitByteIO * | p_curr_unit,
|  | int | pos |
| ) |  |  | `[private]`

## Member Data Documentation

ParseUnitList dirac::DiracByteStream::m_parse_unit_list`[private]`

ParseUnitByteIO* dirac::DiracByteStream::mp_prev_parse_unit`[private]`

DiracByteStats dirac::DiracByteStream::m_sequence_stats`[private]`

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

- dirac_byte_stream.h

© 2004 British Broadcasting Corporation. Dirac code licensed under the Mozilla Public License (MPL) Version 1.1.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.