equal
deleted
inserted
replaced
14 * You should have received a copy of the GNU Library General Public |
14 * You should have received a copy of the GNU Library General Public |
15 * License along with this library; if not, write to the |
15 * License along with this library; if not, write to the |
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
17 * Boston, MA 02111-1307, USA. |
17 * Boston, MA 02111-1307, USA. |
18 */ |
18 */ |
19 #ifdef HAVE_CONFIG_H |
|
20 #include "config.h" |
|
21 #endif |
|
22 #ifdef HAVE_UNISTD_H |
|
23 #include <unistd.h> |
19 #include <unistd.h> |
24 #endif |
|
25 #ifdef HAVE_STDLIB_H |
|
26 #include <stdlib.h> /* exit */ |
20 #include <stdlib.h> /* exit */ |
27 #endif |
|
28 #include <gst/gst.h> |
21 #include <gst/gst.h> |
29 |
22 |
30 static void |
23 static void |
31 new_decoded_pad_cb (GstElement * decodebin, GstPad * new_pad, gboolean last, |
24 new_decoded_pad_cb (GstElement * decodebin, GstPad * new_pad, gboolean last, |
32 GstElement * pipeline) |
25 GstElement * pipeline) |
35 GstPad *sinkpad; |
28 GstPad *sinkpad; |
36 |
29 |
37 fakesink = gst_element_factory_make ("fakesink", NULL); |
30 fakesink = gst_element_factory_make ("fakesink", NULL); |
38 gst_bin_add (GST_BIN (pipeline), fakesink); |
31 gst_bin_add (GST_BIN (pipeline), fakesink); |
39 |
32 |
40 sinkpad = gst_element_get_static_pad (fakesink, "sink"); |
33 sinkpad = gst_element_get_pad (fakesink, "sink"); |
41 if (GST_PAD_LINK_FAILED (gst_pad_link (new_pad, sinkpad))) { |
34 if (GST_PAD_LINK_FAILED (gst_pad_link (new_pad, sinkpad))) { |
42 g_warning ("Failed to link %s:%s to %s:%s", GST_DEBUG_PAD_NAME (new_pad), |
35 g_warning ("Failed to link %s:%s to %s:%s", GST_DEBUG_PAD_NAME (new_pad), |
43 GST_DEBUG_PAD_NAME (sinkpad)); |
36 GST_DEBUG_PAD_NAME (sinkpad)); |
44 gst_bin_remove (GST_BIN (pipeline), fakesink); |
37 gst_bin_remove (GST_BIN (pipeline), fakesink); |
45 } else { |
38 } else { |