Tawara  0.1.0
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
tawara::CueTrackPosition Class Reference

The position in the segment of the data for a single track. More...

#include <tawara/cues.h>

Inheritance diagram for tawara::CueTrackPosition:
Inheritance graph
[legend]
Collaboration diagram for tawara::CueTrackPosition:
Collaboration graph
[legend]

Public Member Functions

 CueTrackPosition ()
 Constructor. More...
 
 CueTrackPosition (uint64_t track, uint64_t cluster_pos)
 Constructor. More...
 
uint64_t track () const
 The track number this element contains positions for. More...
 
void track (uint64_t track)
 Set the track number. More...
 
uint64_t cluster_pos () const
 Get the cluster position. More...
 
void cluster_pos (uint64_t cluster_pos)
 Set the cluster position. More...
 
uint64_t block_num () const
 Get the number of the relevant block. More...
 
void block_num (uint64_t block_num)
 Set the block number of the relevant block. More...
 
uint64_t codec_state () const
 Get the index of the relevant codec state. More...
 
void codec_state (uint64_t codec_state)
 Set the index of the codec state. More...
 
std::vector< uint64_t > & reference_times ()
 Get the vector of reference block timecodes. More...
 
- Public Member Functions inherited from tawara::MasterElement
 MasterElement (uint32_t id, bool crc=false)
 Create a new MasterElement. More...
 
virtual ~MasterElement ()
 Destructor. More...
 
- Public Member Functions inherited from tawara::Element
 Element (tawara::ids::ID id)
 Create a new Element. More...
 
virtual ~Element ()
 Destructor. More...
 
uint32_t id () const
 Get the element's ID. More...
 
std::streampos offset () const
 Get the element's offset in the byte stream. More...
 
virtual std::streamsize size () const
 Get the total size of the element. More...
 
virtual std::streamsize write (std::ostream &output)
 Element writing. More...
 
virtual std::streamsize read (std::istream &input)
 Element reading. More...
 

Protected Member Functions

virtual std::streamsize body_size () const
 Get the size of the body of this element. More...
 
virtual std::streamsize write_body (std::ostream &output)
 Element body writing. More...
 
virtual std::streamsize read_body (std::istream &input, std::streamsize size)
 Element body loading. More...
 
std::streamsize read_cue_reference (std::istream &input, std::streamsize size)
 Read an occurance of the CueReference element. More...
 
void reset ()
 Reset the values to their defaults. More...
 
- Protected Member Functions inherited from tawara::Element
std::streamsize write_id (std::ostream &output)
 Element ID writing. More...
 
virtual std::streamsize write_size (std::ostream &output)
 Element size writing. More...
 

Protected Attributes

UIntElement track_
 
UIntElement cluster_pos_
 
UIntElement block_num_
 
UIntElement codec_state_
 
std::vector< uint64_t > ref_blocks_
 
- Protected Attributes inherited from tawara::Element
tawara::ids::ID id_
 
std::streampos offset_
 

Friends

bool operator== (CueTrackPosition const &lhs, CueTrackPosition const &rhs)
 Equality operator. More...
 

Detailed Description

The position in the segment of the data for a single track.

The CueTackPositions element stores the position in the segment's data for the data for a single track. It is used by a CuePoint to hold the track positions for a timecode.

Definition at line 60 of file cues.h.

Constructor & Destructor Documentation

tawara::CueTrackPosition::CueTrackPosition ( )

Constructor.

tawara::CueTrackPosition::CueTrackPosition ( uint64_t  track,
uint64_t  cluster_pos 
)

Constructor.

Parameters
[in]trackTrack number.
[in]cluster_posCluster position.

Member Function Documentation

uint64_t tawara::CueTrackPosition::block_num ( ) const
inline

Get the number of the relevant block.

This gives the one-based index of the block corresponding to the timecode in its cluster. Must not be zero.

Definition at line 94 of file cues.h.

void tawara::CueTrackPosition::block_num ( uint64_t  block_num)

Set the block number of the relevant block.

virtual std::streamsize tawara::CueTrackPosition::body_size ( ) const
protectedvirtual

Get the size of the body of this element.

Implements tawara::Element.

uint64_t tawara::CueTrackPosition::cluster_pos ( ) const
inline

Get the cluster position.

The cluster position is the offset in bytes of the cluster in the segment.

Definition at line 84 of file cues.h.

void tawara::CueTrackPosition::cluster_pos ( uint64_t  cluster_pos)
inline

Set the cluster position.

Definition at line 86 of file cues.h.

uint64_t tawara::CueTrackPosition::codec_state ( ) const
inline

Get the index of the relevant codec state.

This index gives the relevant codec state to use when jumping to the timecode.

Definition at line 103 of file cues.h.

void tawara::CueTrackPosition::codec_state ( uint64_t  codec_state)
inline

Set the index of the codec state.

Definition at line 105 of file cues.h.

virtual std::streamsize tawara::CueTrackPosition::read_body ( std::istream &  input,
std::streamsize  size 
)
protectedvirtual

Element body loading.

Implements tawara::Element.

std::streamsize tawara::CueTrackPosition::read_cue_reference ( std::istream &  input,
std::streamsize  size 
)
protected

Read an occurance of the CueReference element.

std::vector<uint64_t>& tawara::CueTrackPosition::reference_times ( )
inline

Get the vector of reference block timecodes.

If the block this element points to depends on reference blocks for decoding, this vector contains the timecodes of those blocks.

Definition at line 114 of file cues.h.

void tawara::CueTrackPosition::reset ( )
protected

Reset the values to their defaults.

uint64_t tawara::CueTrackPosition::track ( ) const
inline

The track number this element contains positions for.

Definition at line 75 of file cues.h.

void tawara::CueTrackPosition::track ( uint64_t  track)

Set the track number.

virtual std::streamsize tawara::CueTrackPosition::write_body ( std::ostream &  output)
protectedvirtual

Element body writing.

Implements tawara::Element.

Friends And Related Function Documentation

bool operator== ( CueTrackPosition const &  lhs,
CueTrackPosition const &  rhs 
)
friend

Equality operator.

Member Data Documentation

UIntElement tawara::CueTrackPosition::block_num_
protected

Definition at line 124 of file cues.h.

UIntElement tawara::CueTrackPosition::cluster_pos_
protected

Definition at line 123 of file cues.h.

UIntElement tawara::CueTrackPosition::codec_state_
protected

Definition at line 125 of file cues.h.

std::vector<uint64_t> tawara::CueTrackPosition::ref_blocks_
protected

Definition at line 126 of file cues.h.

UIntElement tawara::CueTrackPosition::track_
protected

Definition at line 122 of file cues.h.


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