QtGStreamer  1.2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | Related Functions | List of all members
QGst::ClockTime Class Reference

#include <QGst/ClockTime>

Public Member Functions

 ClockTime (quint64 t=None)
 
 operator quint64 () const
 
bool isValid () const
 
QTime toTime () const
 

Static Public Member Functions

static ClockTime fromTime (const QTime &time)
 
static ClockTime fromSeconds (quint64 seconds)
 
static ClockTime fromMSecs (quint64 msec)
 
static ClockTime fromUSecs (quint64 usec)
 

Static Public Attributes

static const quint64 None = -1
 

Related Functions

(Note that these are not member functions.)

typedef qint64 ClockTimeDiff
 

Detailed Description

A datatype to hold a time, measured in nanoseconds.

This is a thin wrapper around a GstClockTime, which is actually a quint64.

Examples:
examples/player/main.cpp.

Definition at line 37 of file clocktime.h.

Member Function Documentation

bool QGst::ClockTime::isValid ( ) const
inline

Returns true if this ClockTime is valid, i.e. it is not equal to ClockTime::None

Definition at line 47 of file clocktime.h.

QTime QGst::ClockTime::toTime ( ) const

This method allows you to convert this ClockTime to a QTime. Be careful, as the conversion will lose some precision. ClockTime holds nanoseconds, while QTime is only able to hold milliseconds.

Definition at line 25 of file clocktime.cpp.

ClockTime QGst::ClockTime::fromTime ( const QTime &  time)
static

Creates a ClockTime from a QTime

Examples:
examples/player/main.cpp.

Definition at line 35 of file clocktime.cpp.

ClockTime QGst::ClockTime::fromSeconds ( quint64  seconds)
inlinestatic

Creates a ClockTime from seconds

Definition at line 71 of file clocktime.h.

ClockTime QGst::ClockTime::fromMSecs ( quint64  msec)
inlinestatic

Creates a ClockTime from milli seconds

Definition at line 76 of file clocktime.h.

ClockTime QGst::ClockTime::fromUSecs ( quint64  usec)
inlinestatic

Creates a ClockTime from micro seconds

Definition at line 81 of file clocktime.h.

Friends And Related Function Documentation

typedef qint64 ClockTimeDiff
related

A datatype to hold a time difference, measured in nanoseconds

Definition at line 29 of file clocktime.h.

Member Data Documentation

const quint64 QGst::ClockTime::None = -1
static

Represents an invalid time.

See also
isValid()
Examples:
examples/player/main.cpp.

Definition at line 41 of file clocktime.h.


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