Public Member Functions | Private Member Functions | List of all members
movie_publisher::StreamTime Class Reference

Time type denoting movie stream time. More...

#include <types.h>

Inheritance diagram for movie_publisher::StreamTime:
Inheritance graph
[legend]

Public Member Functions

StreamTimefromNSec (const uint64_t t)
 
StreamTimefromSec (const double t)
 
bool isZero () const
 
bool operator!= (const StreamTime &rhs) const
 
StreamTime operator+ (const StreamDuration &rhs) const
 
StreamTimeoperator+= (const StreamDuration &rhs)
 
StreamTime operator- (const StreamDuration &rhs) const
 
StreamDuration operator- (const StreamTime &rhs) const
 
StreamTimeoperator-= (const StreamDuration &rhs)
 
bool operator< (const StreamTime &rhs) const
 
bool operator<= (const StreamTime &rhs) const
 
bool operator== (const StreamTime &rhs) const
 
bool operator> (const StreamTime &rhs) const
 
bool operator>= (const StreamTime &rhs) const
 
 StreamTime ()
 
 StreamTime (const ros::Time &t)
 
 StreamTime (const StreamDuration &duration)
 Convert the given duration to time. More...
 
 StreamTime (double t)
 
 StreamTime (int64_t streamPTS, const AVRational &timeBase)
 Convert PTS and timeBase to stream time. More...
 
 StreamTime (int64_t streamPTS, const RationalNumber &timeBase)
 Convert PTS and timeBase to stream time. More...
 
 StreamTime (uint32_t sec, uint32_t nsec)
 
StreamDuration toDuration () const
 Convert this time value to duration. More...
 
ros::Time toRosTime () const
 
double toSec () const
 
int64_t toStreamPTS (const AVRational &timeBase) const
 Convert this time to PTS. More...
 
int64_t toStreamPTS (const RationalNumber &timeBase) const
 Convert this time to PTS. More...
 
- Public Member Functions inherited from ros::TimeBase< StreamTime, StreamDuration >
T & fromNSec (uint64_t t)
 
T & fromSec (double t)
 
bool is_zero () const
 
bool isZero () const
 
const WallTime MAX
 
const Time MAX
 
const WallTime MAX
 
const SteadyTime MAX
 
const Time MAX
 
const SteadyTime MAX
 
const WallTime MIN
 
const SteadyTime MIN
 
const Time MIN
 
const WallTime MIN
 
const SteadyTime MIN
 
const Time MIN
 
bool operator!= (const T &rhs) const
 
operator+ (const D &rhs) const
 
T & operator+= (const D &rhs)
 
operator- (const D &rhs) const
 
operator- (const T &rhs) const
 
T & operator-= (const D &rhs)
 
bool operator< (const T &rhs) const
 
bool operator<= (const T &rhs) const
 
bool operator== (const T &rhs) const
 
bool operator> (const T &rhs) const
 
bool operator>= (const T &rhs) const
 
 TimeBase ()
 
 TimeBase (double t)
 
 TimeBase (uint32_t _sec, uint32_t _nsec)
 
boost::posix_time::ptime toBoost () const
 
uint64_t toNSec () const
 
double toSec () const
 
const SteadyTime UNINITIALIZED
 
const WallTime UNINITIALIZED
 
const SteadyTime UNINITIALIZED
 
const WallTime UNINITIALIZED
 
const Time UNINITIALIZED
 
const Time UNINITIALIZED
 
const WallTime ZERO
 
const SteadyTime ZERO
 
const SteadyTime ZERO
 
const Time ZERO
 
const WallTime ZERO
 
const Time ZERO
 

Private Member Functions

ros::Time t () const
 

Additional Inherited Members

- Public Attributes inherited from ros::TimeBase< StreamTime, StreamDuration >
uint32_t nsec
 
uint32_t sec
 
- Static Public Attributes inherited from ros::TimeBase< StreamTime, StreamDuration >
static const T MAX
 
static const T MIN
 
static const T UNINITIALIZED
 
static const T ZERO
 

Detailed Description

Time type denoting movie stream time.

Definition at line 115 of file types.h.

Constructor & Destructor Documentation

◆ StreamTime() [1/7]

movie_publisher::StreamTime::StreamTime ( )

◆ StreamTime() [2/7]

movie_publisher::StreamTime::StreamTime ( uint32_t  sec,
uint32_t  nsec 
)

◆ StreamTime() [3/7]

movie_publisher::StreamTime::StreamTime ( double  t)
explicit

◆ StreamTime() [4/7]

movie_publisher::StreamTime::StreamTime ( const ros::Time t)
explicit

◆ StreamTime() [5/7]

movie_publisher::StreamTime::StreamTime ( const StreamDuration duration)
explicit

Convert the given duration to time.

Parameters
[in]durationThe duration to convert.
Note
This is normally a wrong operation, but with stream times, it makes sense.

◆ StreamTime() [6/7]

movie_publisher::StreamTime::StreamTime ( int64_t  streamPTS,
const RationalNumber timeBase 
)

Convert PTS and timeBase to stream time.

Parameters
streamPTSNumber of timeBase time units.
timeBaseThe time base of the stream.

◆ StreamTime() [7/7]

movie_publisher::StreamTime::StreamTime ( int64_t  streamPTS,
const AVRational &  timeBase 
)

Convert PTS and timeBase to stream time.

Parameters
streamPTSNumber of timeBase time units.
timeBaseThe time base of the stream.

Member Function Documentation

◆ fromNSec()

StreamTime& movie_publisher::StreamTime::fromNSec ( const uint64_t  t)
inline

Definition at line 184 of file types.h.

◆ fromSec()

StreamTime& movie_publisher::StreamTime::fromSec ( const double  t)
inline

Definition at line 183 of file types.h.

◆ isZero()

bool movie_publisher::StreamTime::isZero ( ) const
inline

Definition at line 181 of file types.h.

◆ operator!=()

bool movie_publisher::StreamTime::operator!= ( const StreamTime rhs) const
inline

Definition at line 176 of file types.h.

◆ operator+()

StreamTime movie_publisher::StreamTime::operator+ ( const StreamDuration rhs) const
inline

Definition at line 168 of file types.h.

◆ operator+=()

StreamTime& movie_publisher::StreamTime::operator+= ( const StreamDuration rhs)
inline

Definition at line 170 of file types.h.

◆ operator-() [1/2]

StreamTime movie_publisher::StreamTime::operator- ( const StreamDuration rhs) const
inline

Definition at line 169 of file types.h.

◆ operator-() [2/2]

StreamDuration movie_publisher::StreamTime::operator- ( const StreamTime rhs) const
inline

Definition at line 167 of file types.h.

◆ operator-=()

StreamTime& movie_publisher::StreamTime::operator-= ( const StreamDuration rhs)
inline

Definition at line 174 of file types.h.

◆ operator<()

bool movie_publisher::StreamTime::operator< ( const StreamTime rhs) const
inline

Definition at line 178 of file types.h.

◆ operator<=()

bool movie_publisher::StreamTime::operator<= ( const StreamTime rhs) const
inline

Definition at line 180 of file types.h.

◆ operator==()

bool movie_publisher::StreamTime::operator== ( const StreamTime rhs) const
inline

Definition at line 175 of file types.h.

◆ operator>()

bool movie_publisher::StreamTime::operator> ( const StreamTime rhs) const
inline

Definition at line 177 of file types.h.

◆ operator>=()

bool movie_publisher::StreamTime::operator>= ( const StreamTime rhs) const
inline

Definition at line 179 of file types.h.

◆ t()

ros::Time movie_publisher::StreamTime::t ( ) const
inlineprivate

Definition at line 186 of file types.h.

◆ toDuration()

StreamDuration movie_publisher::StreamTime::toDuration ( ) const

Convert this time value to duration.

Returns
The corresponding duration.
Note
This is normally a wrong operation, but with stream times, it makes sense.

◆ toRosTime()

ros::Time movie_publisher::StreamTime::toRosTime ( ) const
Returns
The corresponding ROS time (the same number of secs and nsecs, but different semantics).

◆ toSec()

double movie_publisher::StreamTime::toSec ( ) const
inline

Definition at line 182 of file types.h.

◆ toStreamPTS() [1/2]

int64_t movie_publisher::StreamTime::toStreamPTS ( const AVRational &  timeBase) const

Convert this time to PTS.

Parameters
timeBaseTime base of the test.
Returns
This time converted to PTS of a stream with the given time base.

◆ toStreamPTS() [2/2]

int64_t movie_publisher::StreamTime::toStreamPTS ( const RationalNumber timeBase) const

Convert this time to PTS.

Parameters
timeBaseTime base of the test.
Returns
This time converted to PTS of a stream with the given time base.

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


movie_publisher
Author(s): Martin Pecka
autogenerated on Wed May 28 2025 02:07:22