1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 Automatically create and connect elements
7 <!-- ##### SECTION Long_Description ##### -->
9 GstAutoplug is an abstract class that is used for constructing and
10 connecting elements. Two types of autopluggers exist: renderer ones and non
11 renderer ones. the renderer autopluggers will not have any src pads while the
16 You first need to create a suitable autoplugger with gst_autoplugfactory_make()
17 (see #GstAutoplugFactory).
18 The name of the autoplugger must be one of the registered autopluggers
19 (see #GstStaticAutoplug and #GstStaticAutoplugRender).
22 If the autoplugger supports the RENDERER API, use gst_autoplug_to_renderers() call to
23 create a bin that connectes the src caps to the specified rendrer elements. You can
24 then add the bin to a pipeline and run it.
27 GstAutoplug *autoplug;
31 /* create a static autoplugger */
32 autoplug = gst_autoplugfactory_make ("staticrender");
34 /* create an osssink */
35 sink = gst_elementfactory_make ("osssink", "our_sink");
37 /* create an element that can play audio/mp3 through osssink */
38 element = gst_autoplug_to_renderers (autoplug,
47 /* add the element to a bin and connect the sink pad */
52 If the autoplugger supports the CAPS API, use gst_autoplug_to_caps() call to
53 connect the src caps to the destination caps. The created bin will have src pads
54 compatible with the provided sink caps.
57 GstAutoplug *autoplug;
60 /* create a static autoplugger */
61 autoplug = gst_autoplugfactory_make ("static");
63 /* create an element that converts audio/mp3 to audio/raw */
64 element = gst_autoplug_to_caps (autoplug,
77 /* add the element to a bin and connect the src/sink pads */
83 Optionally you can get a notification when a new object is added to the created
84 pipeline with a g_signal_connect to the "new_object" signal.
88 Use the regular gst_object_destroy() call to destroy the autoplugger.
91 <!-- ##### SECTION See_Also ##### -->
93 #GstStaticAutoplug, #GstStaticAutoplugRender
96 <!-- ##### STRUCT GstAutoplug ##### -->
102 <!-- ##### ENUM GstAutoplugFlags ##### -->
104 The type of the autoplugger.
107 @GST_AUTOPLUG_TO_CAPS:
108 @GST_AUTOPLUG_TO_RENDERER:
109 @GST_AUTOPLUG_FLAG_LAST:
111 <!-- ##### FUNCTION gst_autoplug_signal_new_object ##### -->
120 <!-- ##### FUNCTION gst_autoplug_to_caps ##### -->
132 <!-- ##### FUNCTION gst_autoplug_to_renderers ##### -->