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 |
19 #include <unistd.h> |
23 #include <unistd.h> |
|
24 #endif |
|
25 #ifdef HAVE_STDLIB_H |
20 #include <stdlib.h> /* exit */ |
26 #include <stdlib.h> /* exit */ |
|
27 #endif |
21 #include <gst/gst.h> |
28 #include <gst/gst.h> |
22 |
29 |
23 static void |
30 static void |
24 new_decoded_pad_cb (GstElement * decodebin, GstPad * new_pad, gboolean last, |
31 new_decoded_pad_cb (GstElement * decodebin, GstPad * new_pad, gboolean last, |
25 GstElement * pipeline) |
32 GstElement * pipeline) |
28 GstPad *sinkpad; |
35 GstPad *sinkpad; |
29 |
36 |
30 fakesink = gst_element_factory_make ("fakesink", NULL); |
37 fakesink = gst_element_factory_make ("fakesink", NULL); |
31 gst_bin_add (GST_BIN (pipeline), fakesink); |
38 gst_bin_add (GST_BIN (pipeline), fakesink); |
32 |
39 |
33 sinkpad = gst_element_get_pad (fakesink, "sink"); |
40 sinkpad = gst_element_get_static_pad (fakesink, "sink"); |
34 if (GST_PAD_LINK_FAILED (gst_pad_link (new_pad, sinkpad))) { |
41 if (GST_PAD_LINK_FAILED (gst_pad_link (new_pad, sinkpad))) { |
35 g_warning ("Failed to link %s:%s to %s:%s", GST_DEBUG_PAD_NAME (new_pad), |
42 g_warning ("Failed to link %s:%s to %s:%s", GST_DEBUG_PAD_NAME (new_pad), |
36 GST_DEBUG_PAD_NAME (sinkpad)); |
43 GST_DEBUG_PAD_NAME (sinkpad)); |
37 gst_bin_remove (GST_BIN (pipeline), fakesink); |
44 gst_bin_remove (GST_BIN (pipeline), fakesink); |
38 } else { |
45 } else { |