I've no idea here...
[gtkD.git] / gtkD / srcgstreamer / gstreamer / SystemClock.d
blob71f8613f5529463ebd3acae595db176def02949f
1 /*
2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = GstSystemClock.html
26 * outPack = gstreamer
27 * outFile = SystemClock
28 * strct = GstSystemClock
29 * realStrct=
30 * ctorStrct=
31 * clss = SystemClock
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gst_system_clock_
40 * omit structs:
41 * omit prefixes:
42 * omit code:
43 * imports:
44 * - glib.Str
45 * - gstreamer.Clock
46 * structWrap:
47 * - GstClock* -> Clock
48 * - GstSystemClock* -> SystemClock
49 * module aliases:
50 * local aliases:
53 module gstreamer.SystemClock;
55 version(noAssert)
57 version(Tango)
59 import tango.io.Stdout; // use the tango loging?
63 private import gstreamerc.gstreamertypes;
65 private import gstreamerc.gstreamer;
68 private import glib.Str;
69 private import gstreamer.Clock;
74 /**
75 * Description
76 * The GStreamer core provides a GstSystemClock based on the system time.
77 * Asynchronous callbacks are scheduled from an internal thread.
78 * Clock implementors are encouraged to subclass this systemclock as it
79 * implements the async notification.
80 * Subclasses can however override all of the important methods for sync and
81 * async notifications to implement their own callback methods or blocking
82 * wait operations.
83 * Last reviewed on 2006-03-08 (0.10.4)
85 private import gstreamer.Clock;
86 public class SystemClock : Clock
89 /** the main Gtk struct */
90 protected GstSystemClock* gstSystemClock;
93 public GstSystemClock* getSystemClockStruct()
95 return gstSystemClock;
99 /** the main Gtk struct as a void* */
100 protected void* getStruct()
102 return cast(void*)gstSystemClock;
106 * Sets our main struct and passes it to the parent class
108 public this (GstSystemClock* gstSystemClock)
110 version(noAssert)
112 if ( gstSystemClock is null )
114 int zero = 0;
115 version(Tango)
117 Stdout("struct gstSystemClock is null on constructor").newline;
119 else
121 printf("struct gstSystemClock is null on constructor");
123 zero = zero / zero;
126 else
128 assert(gstSystemClock !is null, "struct gstSystemClock is null on constructor");
130 super(cast(GstClock*)gstSystemClock);
131 this.gstSystemClock = gstSystemClock;
139 * Get a handle to the default system clock. The refcount of the
140 * clock will be increased so you need to unref the clock after
141 * usage.
142 * Returns:
143 * the default clock.
144 * MT safe.
145 * See Also
146 * GstClock
148 public static Clock obtain()
150 // GstClock* gst_system_clock_obtain (void);
151 return new Clock( gst_system_clock_obtain() );