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.PadProbeInfo;
26 
27 private import gobject.ObjectG;
28 private import gstreamer.Buffer;
29 private import gstreamer.BufferList;
30 private import gstreamer.Event;
31 private import gstreamer.Query;
32 private import gstreamer.c.functions;
33 public  import gstreamer.c.types;
34 
35 
36 /**
37  * Info passed in the #GstPadProbeCallback.
38  */
39 public class PadProbeInfo
40 {
41 	/** the main Gtk struct */
42 	protected GstPadProbeInfo* gstPadProbeInfo;
43 	protected bool ownedRef;
44 
45 	/** Get the main Gtk struct */
46 	public GstPadProbeInfo* getPadProbeInfoStruct(bool transferOwnership = false)
47 	{
48 		if (transferOwnership)
49 			ownedRef = false;
50 		return gstPadProbeInfo;
51 	}
52 
53 	/** the main Gtk struct as a void* */
54 	protected void* getStruct()
55 	{
56 		return cast(void*)gstPadProbeInfo;
57 	}
58 
59 	/**
60 	 * Sets our main struct and passes it to the parent class.
61 	 */
62 	public this (GstPadProbeInfo* gstPadProbeInfo, bool ownedRef = false)
63 	{
64 		this.gstPadProbeInfo = gstPadProbeInfo;
65 		this.ownedRef = ownedRef;
66 	}
67 
68 
69 	/**
70 	 * Returns: The #GstBuffer from the probe
71 	 */
72 	public Buffer getBuffer()
73 	{
74 		auto __p = gst_pad_probe_info_get_buffer(gstPadProbeInfo);
75 
76 		if(__p is null)
77 		{
78 			return null;
79 		}
80 
81 		return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p);
82 	}
83 
84 	/**
85 	 * Returns: The #GstBufferList from the probe
86 	 */
87 	public BufferList getBufferList()
88 	{
89 		auto __p = gst_pad_probe_info_get_buffer_list(gstPadProbeInfo);
90 
91 		if(__p is null)
92 		{
93 			return null;
94 		}
95 
96 		return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) __p);
97 	}
98 
99 	/**
100 	 * Returns: The #GstEvent from the probe
101 	 */
102 	public Event getEvent()
103 	{
104 		auto __p = gst_pad_probe_info_get_event(gstPadProbeInfo);
105 
106 		if(__p is null)
107 		{
108 			return null;
109 		}
110 
111 		return ObjectG.getDObject!(Event)(cast(GstEvent*) __p);
112 	}
113 
114 	/**
115 	 * Returns: The #GstQuery from the probe
116 	 */
117 	public Query getQuery()
118 	{
119 		auto __p = gst_pad_probe_info_get_query(gstPadProbeInfo);
120 
121 		if(__p is null)
122 		{
123 			return null;
124 		}
125 
126 		return ObjectG.getDObject!(Query)(cast(GstQuery*) __p);
127 	}
128 }