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 module gst.base.PushSrc;
26 
27 private import gst.base.BaseSrc;
28 private import gst.base.c.functions;
29 public  import gst.base.c.types;
30 
31 
32 /**
33  * This class is mostly useful for elements that cannot do
34  * random access, or at least very slowly. The source usually
35  * prefers to push out a fixed size buffer.
36  * 
37  * Subclasses usually operate in a format that is different from the
38  * default GST_FORMAT_BYTES format of #GstBaseSrc.
39  * 
40  * Classes extending this base class will usually be scheduled
41  * in a push based mode. If the peer accepts to operate without
42  * offsets and within the limits of the allowed block size, this
43  * class can operate in getrange based mode automatically. To make
44  * this possible, the subclass should implement and override the
45  * SCHEDULING query.
46  * 
47  * The subclass should extend the methods from the baseclass in
48  * addition to the ::create method.
49  * 
50  * Seeking, flushing, scheduling and sync is all handled by this
51  * base class.
52  */
53 public class PushSrc : BaseSrc
54 {
55 	/** the main Gtk struct */
56 	protected GstPushSrc* gstPushSrc;
57 
58 	/** Get the main Gtk struct */
59 	public GstPushSrc* getPushSrcStruct(bool transferOwnership = false)
60 	{
61 		if (transferOwnership)
62 			ownedRef = false;
63 		return gstPushSrc;
64 	}
65 
66 	/** the main Gtk struct as a void* */
67 	protected override void* getStruct()
68 	{
69 		return cast(void*)gstPushSrc;
70 	}
71 
72 	protected override void setStruct(GObject* obj)
73 	{
74 		gstPushSrc = cast(GstPushSrc*)obj;
75 		super.setStruct(obj);
76 	}
77 
78 	/**
79 	 * Sets our main struct and passes it to the parent class.
80 	 */
81 	public this (GstPushSrc* gstPushSrc, bool ownedRef = false)
82 	{
83 		this.gstPushSrc = gstPushSrc;
84 		super(cast(GstBaseSrc*)gstPushSrc, ownedRef);
85 	}
86 
87 
88 	/** */
89 	public static GType getType()
90 	{
91 		return gst_push_src_get_type();
92 	}
93 }