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  * Conversion parameters:
26  * inFile  = 
27  * outPack = gstreamer
28  * outFile = ParseContext
29  * strct   = GstParseContext
30  * realStrct=
31  * ctorStrct=
32  * clss    = ParseContext
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gst_parse_context_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- glib.Str
47  * structWrap:
48  * module aliases:
49  * local aliases:
50  * overrides:
51  */
52 
53 module gstreamer.ParseContext;
54 
55 public  import gstreamerc.gstreamertypes;
56 
57 private import gstreamerc.gstreamer;
58 private import glib.ConstructionException;
59 private import gobject.ObjectG;
60 
61 private import glib.Str;
62 
63 
64 
65 /**
66  * These function allow to create a pipeline based on the syntax used in the
67  * gst-launch utility (see man-page for syntax documentation).
68  *
69  * Please note that these functions take several measures to create
70  * somewhat dynamic pipelines. Due to that such pipelines are not always
71  * reusable (set the state to NULL and back to PLAYING).
72  */
73 public class ParseContext
74 {
75 	
76 	/** the main Gtk struct */
77 	protected GstParseContext* gstParseContext;
78 	
79 	
80 	/** Get the main Gtk struct */
81 	public GstParseContext* getParseContextStruct()
82 	{
83 		return gstParseContext;
84 	}
85 	
86 	
87 	/** the main Gtk struct as a void* */
88 	protected void* getStruct()
89 	{
90 		return cast(void*)gstParseContext;
91 	}
92 	
93 	/**
94 	 * Sets our main struct and passes it to the parent class
95 	 */
96 	public this (GstParseContext* gstParseContext)
97 	{
98 		this.gstParseContext = gstParseContext;
99 	}
100 	
101 	/**
102 	 */
103 	
104 	/**
105 	 * Allocates a parse context for use with gst_parse_launch_full() or
106 	 * gst_parse_launchv_full().
107 	 * Free-function: gst_parse_context_free
108 	 * Throws: ConstructionException GTK+ fails to create the object.
109 	 */
110 	public this ()
111 	{
112 		// GstParseContext * gst_parse_context_new (void);
113 		auto p = gst_parse_context_new();
114 		if(p is null)
115 		{
116 			throw new ConstructionException("null returned by gst_parse_context_new()");
117 		}
118 		this(cast(GstParseContext*) p);
119 	}
120 	
121 	/**
122 	 * Frees a parse context previously allocated with gst_parse_context_new().
123 	 */
124 	public void free()
125 	{
126 		// void gst_parse_context_free (GstParseContext *context);
127 		gst_parse_context_free(gstParseContext);
128 	}
129 	
130 	/**
131 	 * Retrieve missing elements from a previous run of gst_parse_launch_full()
132 	 * or gst_parse_launchv_full(). Will only return results if an error code
133 	 * of GST_PARSE_ERROR_NO_SUCH_ELEMENT was returned.
134 	 * Returns: a NULL-terminated array of element factory name strings of missing elements. Free with g_strfreev() when no longer needed. [transfer full][array zero-terminated=1][element-type gchar*]
135 	 */
136 	public string[] getMissingElements()
137 	{
138 		// gchar ** gst_parse_context_get_missing_elements  (GstParseContext *context);
139 		return Str.toStringArray(gst_parse_context_get_missing_elements(gstParseContext));
140 	}
141 }