QtGStreamer 0.10.1
|
00001 /* 00002 Copyright (C) 2011 Collabora Ltd. <info@collabora.co.uk> 00003 @author George Kiagiadakis <george.kiagiadakis@collabora.co.uk> 00004 00005 This library is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU Lesser General Public License as published 00007 by the Free Software Foundation; either version 2.1 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public License 00016 along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 #ifndef QGST_CLOCKTIME_H 00019 #define QGST_CLOCKTIME_H 00020 00021 #include "global.h" 00022 class QTime; 00023 00024 namespace QGst { 00025 00029 typedef qint64 ClockTimeDiff; 00030 00031 00037 class QTGSTREAMER_EXPORT ClockTime 00038 { 00039 public: 00041 static const quint64 None = -1; 00042 00043 inline ClockTime(quint64 t = None) : m_clocktime(t) {} 00044 inline operator quint64() const { return m_clocktime; } 00045 00047 inline bool isValid() const { return m_clocktime != None; } 00048 00053 QTime toTime() const; 00054 00056 static ClockTime fromTime(const QTime & time); 00057 00058 private: 00059 quint64 m_clocktime; 00060 }; 00061 00062 } //namspace QGst 00063 00064 QGST_REGISTER_TYPE(QGst::ClockTime) 00065 00066 #endif // QGST_CLOCKTIME_H