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 
63 private import gstreamer.Clock;
64 
65 
66 
67 private import gstreamer.Clock;
68 
69 /**
70  * The GStreamer core provides a GstSystemClock based on the system time.
71  * Asynchronous callbacks are scheduled from an internal thread.
72  *
73  * Clock implementors are encouraged to subclass this systemclock as it
74  * implements the async notification.
75  *
76  * Subclasses can however override all of the important methods for sync and
77  * async notifications to implement their own callback methods or blocking
78  * wait operations.
79  *
80  * Last reviewed on 2006-03-08 (0.10.4)
81  */
82 public class SystemClock : Clock
83 {
84 	
85 	/** the main Gtk struct */
86 	protected GstSystemClock* gstSystemClock;
87 	
88 	
89 	public GstSystemClock* getSystemClockStruct()
90 	{
91 		return gstSystemClock;
92 	}
93 	
94 	
95 	/** the main Gtk struct as a void* */
96 	protected override void* getStruct()
97 	{
98 		return cast(void*)gstSystemClock;
99 	}
100 	
101 	/**
102 	 * Sets our main struct and passes it to the parent class
103 	 */
104 	public this (GstSystemClock* gstSystemClock)
105 	{
106 		super(cast(GstClock*)gstSystemClock);
107 		this.gstSystemClock = gstSystemClock;
108 	}
109 	
110 	protected override void setStruct(GObject* obj)
111 	{
112 		super.setStruct(obj);
113 		gstSystemClock = cast(GstSystemClock*)obj;
114 	}
115 	
116 	/**
117 	 */
118 	
119 	/**
120 	 * Get a handle to the default system clock. The refcount of the
121 	 * clock will be increased so you need to unref the clock after
122 	 * usage.
123 	 * Returns: the default clock. MT safe. [transfer full]
124 	 */
125 	public static Clock obtain()
126 	{
127 		// GstClock * gst_system_clock_obtain (void);
128 		auto p = gst_system_clock_obtain();
129 		
130 		if(p is null)
131 		{
132 			return null;
133 		}
134 		
135 		return ObjectG.getDObject!(Clock)(cast(GstClock*) p);
136 	}
137 }