00001 // -*- c++ -*- 00002 // Generated by gtkmmproc -- DO NOT MODIFY! 00003 #ifndef _GSTMM_CLOCK_H 00004 #define _GSTMM_CLOCK_H 00005 00006 00007 #include <glibmm.h> 00008 00009 #include <gstreamermm/object.h> 00010 #include <gstreamermm/enums.h> 00011 00012 00013 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00014 typedef struct _GstClock GstClock; 00015 typedef struct _GstClockClass GstClockClass; 00016 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00017 00018 00019 namespace Gst 00020 { class Clock_Class; } // namespace Gst 00021 namespace Gst 00022 { 00023 00024 class ClockID 00025 { 00026 public: 00027 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00028 typedef ClockID CppObjectType; 00029 typedef GstClockID BaseObjectType; 00030 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00031 00032 00033 // For use with Glib::RefPtr<> only. 00034 void reference() const; 00035 void unreference() const; 00036 00038 GstClockID* gobj(); 00039 00041 const GstClockID* gobj() const; 00042 00044 GstClockID* gobj_copy() const; 00045 00046 protected: 00047 // Do not derive this. Gst::ClockID can neither be constructed nor deleted. 00048 ClockID(); 00049 void operator delete(void*, size_t); 00050 00051 private: 00052 // noncopyable 00053 ClockID(const ClockID&); 00054 ClockID& operator=(const ClockID&); 00055 00056 00057 }; 00058 00059 typedef GstClockTime ClockTime; 00060 typedef GstClockTimeDiff ClockTimeDiff; 00061 const ClockTime CLOCK_TIME_NONE = GST_CLOCK_TIME_NONE; 00062 00063 //Note that ClockTime is an enum. That's why these are not member functions of a class 00064 00065 guint get_hours(ClockTime time); 00066 guint get_minutes(ClockTime time); 00067 guint get_seconds(ClockTime time); 00068 guint get_milliseconds(ClockTime time); 00069 guint get_microseconds(ClockTime time); 00070 guint get_nanoseconds(ClockTime time); 00071 guint get_fractional_seconds(ClockTime time); 00072 00073 00074 class Clock : public Object 00075 { 00076 00077 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00078 00079 public: 00080 typedef Clock CppObjectType; 00081 typedef Clock_Class CppClassType; 00082 typedef GstClock BaseObjectType; 00083 typedef GstClockClass BaseClassType; 00084 00085 private: friend class Clock_Class; 00086 static CppClassType clock_class_; 00087 00088 private: 00089 // noncopyable 00090 Clock(const Clock&); 00091 Clock& operator=(const Clock&); 00092 00093 protected: 00094 explicit Clock(const Glib::ConstructParams& construct_params); 00095 explicit Clock(GstClock* castitem); 00096 00097 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00098 00099 public: 00100 virtual ~Clock(); 00101 00102 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00103 static GType get_type() G_GNUC_CONST; 00104 static GType get_base_type() G_GNUC_CONST; 00105 #endif 00106 00108 GstClock* gobj() { return reinterpret_cast<GstClock*>(gobject_); } 00109 00111 const GstClock* gobj() const { return reinterpret_cast<GstClock*>(gobject_); } 00112 00114 GstClock* gobj_copy(); 00115 00116 private: 00117 00118 00119 protected: 00120 //TODO: What C function does this correspond to? 00121 //TODO: Add a create()? 00122 Clock(); 00123 00124 public: 00125 00126 bool add_observation(ClockTime slave_time, ClockTime master_time, gdouble* result); 00127 00128 bool set_master(const Clock& master_clock); 00129 00130 Glib::RefPtr<Clock> get_master(); 00131 00132 ClockTime set_resolution(ClockTime resolution); 00133 00134 ClockTime get_resolution() const; 00135 00136 ClockTime get_time() const; 00137 // _WRAP_METHOD(Glib::RefPtr<ClockID> new_single_shot_id(ClockTime time), gst_clock_new_single_shot_id) 00138 // _WRAP_METHOD(Glib::RefPtr<ClockID> new_periodic_id(ClockTime start_time, ClockTime intervals), gst_clock_new_periodic_id) 00139 00140 ClockTime get_internal_time() const; 00141 00142 ClockTime adjust_unlocked(ClockTime internal_time); 00143 00144 ClockTime unadjust_unlocked(ClockTime external_time); 00145 00146 00147 public: 00148 00149 public: 00150 //C++ methods used to invoke GTK+ virtual functions: 00151 #ifdef GLIBMM_VFUNCS_ENABLED 00152 #endif //GLIBMM_VFUNCS_ENABLED 00153 00154 protected: 00155 //GTK+ Virtual Functions (override these to change behaviour): 00156 #ifdef GLIBMM_VFUNCS_ENABLED 00157 #endif //GLIBMM_VFUNCS_ENABLED 00158 00159 //Default Signal Handlers:: 00160 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 00161 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 00162 00163 00164 }; 00165 00166 } //namespace Gst 00167 00168 00169 namespace Glib 00170 { 00171 00180 Glib::RefPtr<Gst::ClockID> wrap(GstClockID* object, bool take_copy = false); 00181 00182 } // namespace Glib 00183 00184 00185 namespace Glib 00186 { 00195 Glib::RefPtr<Gst::Clock> wrap(GstClock* object, bool take_copy = false); 00196 } 00197 00198 00199 #endif /* _GSTMM_CLOCK_H */ 00200