HEVC Test Model (HM)  HM-16.18
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members

#include <AnnexBread.h>

Collaboration diagram for InputByteStream:
Collaboration graph
[legend]

Public Member Functions

 InputByteStream (std::istream &istream)
 
Void reset ()
 
Bool eofBeforeNBytes (UInt n)
 
uint32_t peekBytes (UInt n)
 
uint8_t readByte ()
 
uint32_t readBytes (UInt n)
 

Private Attributes

UInt m_NumFutureBytes
 
uint32_t m_FutureBytes
 
std::istream & m_Input
 

Detailed Description

Definition at line 53 of file AnnexBread.h.

Constructor & Destructor Documentation

InputByteStream::InputByteStream ( std::istream &  istream)
inline

Create a bytestream reader that will extract bytes from istream.

NB, it isn't safe to access istream while in use by a InputByteStream.

Side-effects: the exception mask of istream is set to eofbit

Definition at line 65 of file AnnexBread.h.

Member Function Documentation

Bool InputByteStream::eofBeforeNBytes ( UInt  n)
inline

returns true if an EOF will be encountered within the next n bytes.

Definition at line 87 of file AnnexBread.h.

uint32_t InputByteStream::peekBytes ( UInt  n)
inline

return the next n bytes in the stream without advancing the stream pointer.

Returns: an unsigned integer representing an n byte bigendian word.

If an attempt is made to read past EOF, an n-byte word is returned, but the portion that required input bytes beyond EOF is undefined.

Definition at line 123 of file AnnexBread.h.

uint8_t InputByteStream::readByte ( )
inline

consume and return one byte from the input.

If bytestream is already at EOF prior to a call to readByte(), an exception std::ios_base::failure is thrown.

Definition at line 135 of file AnnexBread.h.

uint32_t InputByteStream::readBytes ( UInt  n)
inline

consume and return n bytes from the input. n bytes from bytestream are interpreted as bigendian when assembling the return value.

Definition at line 153 of file AnnexBread.h.

Void InputByteStream::reset ( )
inline

Reset the internal state. Must be called if input stream is modified externally to this class

Definition at line 77 of file AnnexBread.h.

Member Data Documentation

uint32_t InputByteStream::m_FutureBytes
private

Definition at line 169 of file AnnexBread.h.

std::istream& InputByteStream::m_Input
private

Definition at line 170 of file AnnexBread.h.

UInt InputByteStream::m_NumFutureBytes
private

Definition at line 168 of file AnnexBread.h.


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