Native Player  1.0
MediaSegmentSequence::Iterator Class Reference

Constant bidirectional iterator through the sequence. More...

#include <media_segment_sequence.h>

Public Member Functions

 Iterator ()
 Constructs an empty Iterator object. More...
 
 Iterator (std::unique_ptr< SequenceIterator > &&)
 
 Iterator (const Iterator &other)
 Constructs a copy of other. More...
 
 Iterator (Iterator &&other)
 
 ~Iterator ()
 Destroys Iterator object. More...
 
Iteratoroperator= (const Iterator &other)
 Assigns other to this Iterator More...
 
Iteratoroperator= (Iterator &&other)
 
Iteratoroperator++ ()
 
Iterator operator++ (int)
 
Iteratoroperator-- ()
 
Iterator operator-- (int)
 
bool operator== (const Iterator &) const
 
bool operator!= (const Iterator &) const
 
std::unique_ptr< dash::mpd::ISegment > operator* () const
 
double SegmentDuration (const MediaSegmentSequence *) const
 
double SegmentTimestamp (const MediaSegmentSequence *) const
 

Detailed Description

Constant bidirectional iterator through the sequence.

For live streams incrementation and decrementation operations might return past-the-end iterator when a segment is either not yet available or no more segments are available.

Definition at line 64 of file media_segment_sequence.h.

Constructor & Destructor Documentation

MediaSegmentSequence::Iterator::Iterator ( )

Constructs an empty Iterator object.

MediaSegmentSequence::Iterator::Iterator ( std::unique_ptr< SequenceIterator > &&  )
explicit

Constructs an Iterator object from SequenceIterator.

MediaSegmentSequence::Iterator::Iterator ( const Iterator other)

Constructs a copy of other.

MediaSegmentSequence::Iterator::Iterator ( Iterator &&  other)

Move-constructs a Iterator object, making it point at the same object that other was pointing to.

MediaSegmentSequence::Iterator::~Iterator ( )

Destroys Iterator object.

Member Function Documentation

bool MediaSegmentSequence::Iterator::operator!= ( const Iterator ) const

Checks if compared object is different from current object.

Returns
True if objects are different.
True otherwise
std::unique_ptr<dash::mpd::ISegment> MediaSegmentSequence::Iterator::operator* ( ) const
Note
Iteration happens over ISegment*, however a call to this method creates a new ISegment* object! Returns a smart pointer to the segment which is a copy of the ISegment pointed by the iterator.
Returns
A smart pointer to an ISegment instance returned by value.
Iterator& MediaSegmentSequence::Iterator::operator++ ( )

Advances the iterator by one position.

Returns
*this.
Iterator MediaSegmentSequence::Iterator::operator++ ( int  )

Advances the iterator by one position.

Returns
The value *this had before the call.
Iterator& MediaSegmentSequence::Iterator::operator-- ( )

Decreases the iterator by one position.

Returns
*this.
Iterator MediaSegmentSequence::Iterator::operator-- ( int  )

Decreases the iterator by one position.

Returns
The value *this had before the call.
Iterator& MediaSegmentSequence::Iterator::operator= ( const Iterator other)

Assigns other to this Iterator

Iterator& MediaSegmentSequence::Iterator::operator= ( Iterator &&  other)

Move-assigns other to this Iterator object.

bool MediaSegmentSequence::Iterator::operator== ( const Iterator ) const

Checks if compared object is equal to current object.

Returns
True if objects are equal.
False otherwise
double MediaSegmentSequence::Iterator::SegmentDuration ( const MediaSegmentSequence ) const

Provides a segment duration for the given MediaSegmentSequence.

Returns
Segment duration in seconds.
Value < 0 in case of error (like invalid MediaSegmentSequence).
double MediaSegmentSequence::Iterator::SegmentTimestamp ( const MediaSegmentSequence ) const

Provides a segment timestamp for given the MediaSegmentSequence.

Returns
Segment timestamp in seconds.
Value < 0 in case of error (like invalid MediaSegmentSequence).

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