Hello, I am currently making muxer plugin.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Hello, I am currently making muxer plugin.

OhsureBoy
However, I have a question.
I want to connect sink pad of my plugin to video, audio src pad, but I can't
find how to do it.

Can I get help?



static GstStaticPadTemplate video_sink =
GST_STATIC_PAD_TEMPLATE (
  "video_%u",
  GST_PAD_SINK,
  GST_PAD_SOMETIMES,
  GST_STATIC_CAPS ("ANY")
);

static GstStaticPadTemplate audio_sink =
GST_STATIC_PAD_TEMPLATE (
  "audio_%u",
  GST_PAD_SINK,
  GST_PAD_SOMETIMES,
  GST_STATIC_CAPS ("ANY")
);

static GstStaticPadTemplate src =
GST_STATIC_PAD_TEMPLATE (
  "src",
  GST_PAD_SRC,
  GST_PAD_ALWAYS,
  GST_STATIC_CAPS ("ANY")
);


static void
gst_myfilter_class_init (GstmyfilterClass * klass)
{

gst_pad_new_from_static_template (&src,"src");
  gst_pad_new_from_static_template (&video_sink,"video_%u");
  gst_pad_new_from_static_template (&audio_sink,"audio_%u");

}



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Hello, I am currently making muxer plugin.

gotsring
Just guessing here; I think this is because you're pad sink types are
"sometimes" pads instead of "always" pads. This makes sense for a demuxer,
but you can't connect to them as regular static pads because they don't
always exist. To connect sometimes pads, you typically respond to a
pad-added signal. See docs for more info, or try experimenting with existing
muxers (i.e. matroskamux) before testing your element.

https://gstreamer.freedesktop.org/documentation/application-development/basics/pads.html?gi-language=c#dynamic-or-sometimes-pads



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel