gst_plugins_base/gst/playback/test.c
changeset 16 8e837d1bf446
parent 0 0e761a78d257
child 30 7e817e7e631c
equal deleted inserted replaced
15:4b0c6ed43234 16:8e837d1bf446
    40 
    40 
    41   gst_bin_add (GST_BIN (element), conv);
    41   gst_bin_add (GST_BIN (element), conv);
    42   gst_bin_add (GST_BIN (element), sink);
    42   gst_bin_add (GST_BIN (element), sink);
    43   gst_element_link_pads (conv, "src", sink, "sink");
    43   gst_element_link_pads (conv, "src", sink, "sink");
    44 
    44 
    45   pad = gst_element_get_pad (conv, "sink");
    45   pad = gst_element_get_static_pad (conv, "sink");
    46   gst_element_add_pad (element, gst_ghost_pad_new ("sink", pad));
    46   gst_element_add_pad (element, gst_ghost_pad_new ("sink", pad));
    47   gst_object_unref (pad);
    47   gst_object_unref (pad);
    48 
    48 
    49   return element;
    49   return element;
    50 }
    50 }
    63 
    63 
    64   gst_bin_add (GST_BIN (element), conv);
    64   gst_bin_add (GST_BIN (element), conv);
    65   gst_bin_add (GST_BIN (element), sink);
    65   gst_bin_add (GST_BIN (element), sink);
    66   gst_element_link_pads (conv, "src", sink, "sink");
    66   gst_element_link_pads (conv, "src", sink, "sink");
    67 
    67 
    68   pad = gst_element_get_pad (conv, "sink");
    68   pad = gst_element_get_static_pad (conv, "sink");
    69   gst_element_add_pad (element, gst_ghost_pad_new ("sink", pad));
    69   gst_element_add_pad (element, gst_ghost_pad_new ("sink", pad));
    70   gst_object_unref (pad);
    70   gst_object_unref (pad);
    71 
    71 
    72   return element;
    72   return element;
    73 }
    73 }
   110     ret = gst_element_set_state (sink, GST_STATE_PAUSED);
   110     ret = gst_element_set_state (sink, GST_STATE_PAUSED);
   111     if (ret == GST_STATE_CHANGE_FAILURE)
   111     if (ret == GST_STATE_CHANGE_FAILURE)
   112       goto state_error;
   112       goto state_error;
   113 
   113 
   114     /* get the ghostpad of the sink bin */
   114     /* get the ghostpad of the sink bin */
   115     sinkpad = gst_element_get_pad (sink, "sink");
   115     sinkpad = gst_element_get_static_pad (sink, "sink");
   116 
   116 
   117     /* link'n'play */
   117     /* link'n'play */
   118     lret = gst_pad_link (pad, sinkpad);
   118     lret = gst_pad_link (pad, sinkpad);
   119     if (lret != GST_PAD_LINK_OK)
   119     if (lret != GST_PAD_LINK_OK)
   120       goto link_failed;
   120       goto link_failed;