00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "clock.h"
00019
00020 #include <QtCore/QTime>
00021 #include <gst/gstclock.h>
00022 #include <gst/gstsystemclock.h>
00023
00024 namespace QGst {
00025
00026 ClockPtr Clock::systemClock()
00027 {
00028 return ClockPtr::wrap(gst_system_clock_obtain(), false);
00029 }
00030
00031 ClockTime Clock::clockTime() const
00032 {
00033 GstClockTime t = gst_clock_get_time(object<GstClock>());
00034 return t;
00035 }
00036
00037 ClockTime Clock::resolution() const
00038 {
00039 GstClockTime t = gst_clock_get_resolution(object<GstClock>());
00040 return t;
00041 }
00042
00043 QTime Clock::time() const
00044 {
00045 return clockTime().toTime();
00046 }
00047
00048 }