Can I have two sinks using the same chain function?

iron_guitarist1987 jtrinidadperez at gmail.com
Wed May 16 10:48:30 PDT 2012


Can I have two sinks using the same chain function? The init function would
look something like this:

static void
gst_n_to_one_init (GstN_to_one * filter,
    GstN_to_oneClass * gclass)
{
  filter->sinkpad1 = gst_pad_new_from_static_template (&sink_factory,
"sink");
  gst_pad_set_setcaps_function (filter->sinkpad1,
                                GST_DEBUG_FUNCPTR(gst_n_to_one_set_caps));
  gst_pad_set_getcaps_function (filter->sinkpad1,
                                GST_DEBUG_FUNCPTR(gst_pad_proxy_getcaps));
  gst_pad_set_chain_function (filter->sinkpad1,
                              GST_DEBUG_FUNCPTR(gst_n_to_one_chain));
  
  
  filter->sinkpad2 = gst_pad_new_from_static_template (&sink_factory,
"sink");
  gst_pad_set_setcaps_function (filter->sinkpad2,
                                GST_DEBUG_FUNCPTR(gst_n_to_one_set_caps));
  gst_pad_set_getcaps_function (filter->sinkpad2,
                                GST_DEBUG_FUNCPTR(gst_pad_proxy_getcaps));
  gst_pad_set_chain_function (filter->sinkpad2,
                              GST_DEBUG_FUNCPTR(gst_n_to_one_chain));
  
  
  filter->srcpad = gst_pad_new_from_static_template (&src_factory, "src");
  gst_pad_set_getcaps_function (filter->srcpad,
                                GST_DEBUG_FUNCPTR(gst_pad_proxy_getcaps));

  gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad1);
  gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad2);
  gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
  filter->silent = FALSE;
  
}

Otherwise, How can I combine two chain functions to use just one srcpad?

--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Can-I-have-two-sinks-using-the-same-chain-function-tp4641761.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list