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 gstreamer.ProxyPad;
26 
27 private import gobject.ObjectG;
28 private import gstreamer.Buffer;
29 private import gstreamer.BufferList;
30 private import gstreamer.Iterator;
31 private import gstreamer.ObjectGst;
32 private import gstreamer.Pad;
33 private import gstreamerc.gstreamer;
34 public  import gstreamerc.gstreamertypes;
35 
36 
37 /** */
38 public class ProxyPad : Pad
39 {
40 	/** the main Gtk struct */
41 	protected GstProxyPad* gstProxyPad;
42 
43 	/** Get the main Gtk struct */
44 	public GstProxyPad* getProxyPadStruct()
45 	{
46 		return gstProxyPad;
47 	}
48 
49 	/** the main Gtk struct as a void* */
50 	protected override void* getStruct()
51 	{
52 		return cast(void*)gstProxyPad;
53 	}
54 
55 	protected override void setStruct(GObject* obj)
56 	{
57 		gstProxyPad = cast(GstProxyPad*)obj;
58 		super.setStruct(obj);
59 	}
60 
61 	/**
62 	 * Sets our main struct and passes it to the parent class.
63 	 */
64 	public this (GstProxyPad* gstProxyPad, bool ownedRef = false)
65 	{
66 		this.gstProxyPad = gstProxyPad;
67 		super(cast(GstPad*)gstProxyPad, ownedRef);
68 	}
69 
70 
71 	/** */
72 	public static GType getType()
73 	{
74 		return gst_proxy_pad_get_type();
75 	}
76 
77 	/**
78 	 * Invoke the default chain function of the proxy pad.
79 	 *
80 	 * Params:
81 	 *     pad = a sink #GstPad, returns GST_FLOW_ERROR if not.
82 	 *     parent = the parent of @pad or %NULL
83 	 *     buffer = the #GstBuffer to send, return GST_FLOW_ERROR
84 	 *         if not.
85 	 *
86 	 * Returns: a #GstFlowReturn from the pad.
87 	 */
88 	public static GstFlowReturn chainDefault(Pad pad, ObjectGst parent, Buffer buffer)
89 	{
90 		return gst_proxy_pad_chain_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct(), (buffer is null) ? null : buffer.getBufferStruct());
91 	}
92 
93 	/**
94 	 * Invoke the default chain list function of the proxy pad.
95 	 *
96 	 * Params:
97 	 *     pad = a sink #GstPad, returns GST_FLOW_ERROR if not.
98 	 *     parent = the parent of @pad or %NULL
99 	 *     list = the #GstBufferList to send, return GST_FLOW_ERROR
100 	 *         if not.
101 	 *
102 	 * Returns: a #GstFlowReturn from the pad.
103 	 */
104 	public static GstFlowReturn chainListDefault(Pad pad, ObjectGst parent, BufferList list)
105 	{
106 		return gst_proxy_pad_chain_list_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct(), (list is null) ? null : list.getBufferListStruct());
107 	}
108 
109 	/**
110 	 * Invoke the default getrange function of the proxy pad.
111 	 *
112 	 * Params:
113 	 *     pad = a src #GstPad, returns #GST_FLOW_ERROR if not.
114 	 *     parent = the parent of @pad
115 	 *     offset = The start offset of the buffer
116 	 *     size = The length of the buffer
117 	 *     buffer = a pointer to hold the #GstBuffer,
118 	 *         returns #GST_FLOW_ERROR if %NULL.
119 	 *
120 	 * Returns: a #GstFlowReturn from the pad.
121 	 */
122 	public static GstFlowReturn getrangeDefault(Pad pad, ObjectGst parent, ulong offset, uint size, out Buffer buffer)
123 	{
124 		GstBuffer* outbuffer = null;
125 		
126 		auto p = gst_proxy_pad_getrange_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct(), offset, size, &outbuffer);
127 		
128 		buffer = ObjectG.getDObject!(Buffer)(outbuffer);
129 		
130 		return p;
131 	}
132 
133 	/**
134 	 * Invoke the default iterate internal links function of the proxy pad.
135 	 *
136 	 * Params:
137 	 *     pad = the #GstPad to get the internal links of.
138 	 *     parent = the parent of @pad or %NULL
139 	 *
140 	 * Returns: a #GstIterator of #GstPad, or %NULL if @pad
141 	 *     has no parent. Unref each returned pad with gst_object_unref().
142 	 */
143 	public static Iterator iterateInternalLinksDefault(Pad pad, ObjectGst parent)
144 	{
145 		auto p = gst_proxy_pad_iterate_internal_links_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct());
146 		
147 		if(p is null)
148 		{
149 			return null;
150 		}
151 		
152 		return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true);
153 	}
154 
155 	/**
156 	 * Get the internal pad of @pad. Unref target pad after usage.
157 	 *
158 	 * The internal pad of a #GstGhostPad is the internally used
159 	 * pad of opposite direction, which is used to link to the target.
160 	 *
161 	 * Returns: the target #GstProxyPad, can
162 	 *     be %NULL.  Unref target pad after usage.
163 	 */
164 	public ProxyPad getInternal()
165 	{
166 		auto p = gst_proxy_pad_get_internal(gstProxyPad);
167 		
168 		if(p is null)
169 		{
170 			return null;
171 		}
172 		
173 		return ObjectG.getDObject!(ProxyPad)(cast(GstProxyPad*) p, true);
174 	}
175 }