Tawara
0.1.0
|
A CuePoint is an index from a timecode to one or more cluster/block positions. More...
#include <tawara/cues.h>
Public Types | |
typedef storage_type_::value_type | value_type |
The value type of this container. More... | |
typedef storage_type_::size_type | size_type |
The size type of this container. More... | |
typedef storage_type_::reference | reference |
The reference type. More... | |
typedef storage_type_::const_reference | const_reference |
The constant reference type. More... | |
typedef storage_type_::iterator | iterator |
The random access iterator type. More... | |
typedef storage_type_::const_iterator | const_iterator |
The constant random access iterator type. More... | |
typedef storage_type_::reverse_iterator | reverse_iterator |
The reversed random access iterator type. More... | |
typedef storage_type_::const_reverse_iterator | const_reverse_iterator |
The constant reversed random access iterator type. More... | |
typedef boost::shared_ptr < CuePoint > | Ptr |
The pointer to this type. More... | |
Public Member Functions | |
CuePoint () | |
Constructor. More... | |
CuePoint (uint64_t timecode) | |
Constructor. More... | |
uint64_t | timecode () const |
Get the timecode of this cue point. More... | |
void | timecode (uint64_t timecode) |
Set the timecode. More... | |
virtual value_type & | at (size_type pos) |
Get the CueTracksPosition at the given position, with bounds checking. More... | |
virtual value_type const & | at (size_type pos) const |
Get the CueTracksPosition at the given position, with bounds checking. More... | |
virtual value_type & | operator[] (size_type pos) |
Get a reference to a CueTracksPosition. More... | |
virtual value_type const & | operator[] (size_type pos) const |
Get a reference to a CueTracksPosition. More... | |
virtual iterator | begin () |
Get an iterator to the first cue. More... | |
virtual const_iterator | begin () const |
Get an iterator to the first cue. More... | |
virtual iterator | end () |
Get an iterator to the position past the last cue. More... | |
virtual const_iterator | end () const |
Get an iterator to the position past the last cue. More... | |
virtual reverse_iterator | rbegin () |
Get a reverse iterator to the last cue. More... | |
virtual const_reverse_iterator | rbegin () const |
Get a reverse iterator to the last cue. More... | |
virtual reverse_iterator | rend () |
Get a reverse iterator to the position before the first cue. More... | |
virtual const_reverse_iterator | rend () const |
Get a reverse iterator to the position before the first cue. More... | |
virtual bool | empty () const |
Check if there are no cue positions. More... | |
virtual size_type | count () const |
Get the number of cue positions. More... | |
virtual size_type | max_count () const |
Get the maximum number of cue positions. More... | |
virtual void | clear () |
Remove all cue positions. More... | |
virtual void | erase (iterator position) |
Erase the CueTrackPosition at the specified iterator. More... | |
virtual void | erase (iterator first, iterator last) |
Erase a range of CueTrackPosition. More... | |
virtual void | push_back (value_type const &value) |
Add a CueTrackPosition. More... | |
virtual void | resize (size_type count) |
Resizes the vector. More... | |
virtual void | swap (CuePoint &other) |
Swaps the contents of this CuePoint element with another. More... | |
![]() | |
MasterElement (uint32_t id, bool crc=false) | |
Create a new MasterElement. More... | |
virtual | ~MasterElement () |
Destructor. More... | |
![]() | |
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 Types | |
typedef std::vector < CueTrackPosition > | storage_type_ |
The storage type. 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 | write_id (std::ostream &output) |
Element ID writing. More... | |
virtual std::streamsize | write_size (std::ostream &output) |
Element size writing. More... | |
Protected Attributes | |
UIntElement | timecode_ |
storage_type_ | positions_ |
![]() | |
tawara::ids::ID | id_ |
std::streampos | offset_ |
Friends | |
bool | operator== (CuePoint const &lhs, CuePoint const &rhs) |
Equality operator. More... | |
A CuePoint is an index from a timecode to one or more cluster/block positions.
The CuePoint element stores the index for a single timecode, providing the location in the segment of the relevant cluster (and, often, block) that corresponds to that timecode for each track active at that timecode. The track positions are accessible through a map interface.
A CuePoint must contain at least one track position before it can be written to a segment.
typedef storage_type_::const_iterator tawara::CuePoint::const_iterator |
typedef storage_type_::const_reference tawara::CuePoint::const_reference |
typedef storage_type_::const_reverse_iterator tawara::CuePoint::const_reverse_iterator |
typedef storage_type_::iterator tawara::CuePoint::iterator |
typedef boost::shared_ptr<CuePoint> tawara::CuePoint::Ptr |
typedef storage_type_::reference tawara::CuePoint::reference |
typedef storage_type_::reverse_iterator tawara::CuePoint::reverse_iterator |
typedef storage_type_::size_type tawara::CuePoint::size_type |
|
protected |
typedef storage_type_::value_type tawara::CuePoint::value_type |
tawara::CuePoint::CuePoint | ( | ) |
Constructor.
tawara::CuePoint::CuePoint | ( | uint64_t | timecode | ) |
Constructor.
[in] | timecode | The timecode of the cue point. |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
protectedvirtual |
Get the size of the body of this element.
Implements tawara::Element.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Erase the CueTrackPosition at the specified iterator.
[in] | position | The position to erase at. |
Erase a range of CueTrackPosition.
[in] | first | The start of the range. |
[in] | last | The end of the range. |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Add a CueTrackPosition.
|
inlinevirtual |
|
inlinevirtual |
|
protectedvirtual |
Element body loading.
DuplicateTimecode | if a CuePoint is read for a timecode that already exists in the map. |
Implements tawara::Element.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inline |
|
protectedvirtual |
Element body writing.
Implements tawara::Element.
|
protected |
|
protected |