1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 /*
25  * Conversion parameters:
26  * inFile  = GstSystemClock.html
27  * outPack = gstreamer
28  * outFile = SystemClock
29  * strct   = GstSystemClock
30  * realStrct=
31  * ctorStrct=
32  * clss    = SystemClock
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gst_system_clock_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- gstreamer.Clock
47  * structWrap:
48  * 	- GstClock* -> Clock
49  * module aliases:
50  * local aliases:
51  * overrides:
52  */
53 
54 module gstreamer.SystemClock;
55 
56 public  import gstreamerc.gstreamertypes;
57 
58 private import gstreamerc.gstreamer;
59 private import glib.ConstructionException;
60 private import gobject.ObjectG;
61 
62 private import gstreamer.Clock;
63 
64 
65 private import gstreamer.Clock;
66 
67 /**
68  * The GStreamer core provides a GstSystemClock based on the system time.
69  * Asynchronous callbacks are scheduled from an internal thread.
70  *
71  * Clock implementors are encouraged to subclass this systemclock as it
72  * implements the async notification.
73  *
74  * Subclasses can however override all of the important methods for sync and
75  * async notifications to implement their own callback methods or blocking
76  * wait operations.
77  *
78  * Last reviewed on 2006-03-08 (0.10.4)
79  */
80 public class SystemClock : Clock
81 {
82 	
83 	/** the main Gtk struct */
84 	protected GstSystemClock* gstSystemClock;
85 	
86 	
87 	/** Get the main Gtk struct */
88 	public GstSystemClock* getSystemClockStruct()
89 	{
90 		return gstSystemClock;
91 	}
92 	
93 	
94 	/** the main Gtk struct as a void* */
95 	protected override void* getStruct()
96 	{
97 		return cast(void*)gstSystemClock;
98 	}
99 	
100 	/**
101 	 * Sets our main struct and passes it to the parent class
102 	 */
103 	public this (GstSystemClock* gstSystemClock)
104 	{
105 		super(cast(GstClock*)gstSystemClock);
106 		this.gstSystemClock = gstSystemClock;
107 	}
108 	
109 	protected override void setStruct(GObject* obj)
110 	{
111 		super.setStruct(obj);
112 		gstSystemClock = cast(GstSystemClock*)obj;
113 	}
114 	
115 	/**
116 	 */
117 	
118 	/**
119 	 * Get a handle to the default system clock. The refcount of the
120 	 * clock will be increased so you need to unref the clock after
121 	 * usage.
122 	 * Returns: the default clock. MT safe. [transfer full]
123 	 */
124 	public static Clock obtain()
125 	{
126 		// GstClock * gst_system_clock_obtain (void);
127 		auto p = gst_system_clock_obtain();
128 		
129 		if(p is null)
130 		{
131 			return null;
132 		}
133 		
134 		return ObjectG.getDObject!(Clock)(cast(GstClock*) p);
135 	}
136 }