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