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 
62 private import glib.Str;
63 
64 
65 
66 
67 /**
68  * These function allow to create a pipeline based on the syntax used in the
69  * gst-launch utility (see man-page for syntax documentation).
70  *
71  * Please note that these functions take several measures to create
72  * somewhat dynamic pipelines. Due to that such pipelines are not always
73  * reusable (set the state to NULL and back to PLAYING).
74  */
75 public class ParseContext
76 {
77 	
78 	/** the main Gtk struct */
79 	protected GstParseContext* gstParseContext;
80 	
81 	
82 	public GstParseContext* getParseContextStruct()
83 	{
84 		return gstParseContext;
85 	}
86 	
87 	
88 	/** the main Gtk struct as a void* */
89 	protected void* getStruct()
90 	{
91 		return cast(void*)gstParseContext;
92 	}
93 	
94 	/**
95 	 * Sets our main struct and passes it to the parent class
96 	 */
97 	public this (GstParseContext* gstParseContext)
98 	{
99 		this.gstParseContext = gstParseContext;
100 	}
101 	
102 	/**
103 	 */
104 	
105 	/**
106 	 * Allocates a parse context for use with gst_parse_launch_full() or
107 	 * gst_parse_launchv_full().
108 	 * Free-function: gst_parse_context_free
109 	 * Throws: ConstructionException GTK+ fails to create the object.
110 	 */
111 	public this ()
112 	{
113 		// GstParseContext * gst_parse_context_new (void);
114 		auto p = gst_parse_context_new();
115 		if(p is null)
116 		{
117 			throw new ConstructionException("null returned by gst_parse_context_new()");
118 		}
119 		this(cast(GstParseContext*) p);
120 	}
121 	
122 	/**
123 	 * Frees a parse context previously allocated with gst_parse_context_new().
124 	 */
125 	public void free()
126 	{
127 		// void gst_parse_context_free (GstParseContext *context);
128 		gst_parse_context_free(gstParseContext);
129 	}
130 	
131 	/**
132 	 * Retrieve missing elements from a previous run of gst_parse_launch_full()
133 	 * or gst_parse_launchv_full(). Will only return results if an error code
134 	 * of GST_PARSE_ERROR_NO_SUCH_ELEMENT was returned.
135 	 * 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*]
136 	 */
137 	public string[] getMissingElements()
138 	{
139 		// gchar ** gst_parse_context_get_missing_elements  (GstParseContext *context);
140 		return Str.toStringArray(gst_parse_context_get_missing_elements(gstParseContext));
141 	}
142 }