AW: not able to get callbacks from splitmuxsink
Thornton, Keith
keith.thornton at zeiss.com
Fri Nov 29 06:34:24 UTC 2019
Hi,
First of all you need to set the message-forward parameter
g_object_set(G_OBJECT(m_pPrimaryMuxSink), "message-forward", TRUE, nullptr);
and then where you handle bus messages you need something like
case GST_MESSAGE_ELEMENT:
{
if (gst_message_has_name(message, "splitmuxsink-fragment-opened"))
{
isOpen = true;
}
else if (!gst_message_has_name(message, "splitmuxsink-fragment-closed"))
{
isClose = true; }
busReply = GST_BUS_PASS;
break; }
-----Ursprüngliche Nachricht-----
Von: gstreamer-devel <gstreamer-devel-bounces at lists.freedesktop.org> Im Auftrag von shyam
Gesendet: Freitag, 29. November 2019 05:29
An: gstreamer-devel at lists.freedesktop.org
Betreff: not able to get callbacks from splitmuxsink
Hello,
I want to get "splitmuxsink-fragment-opened" and "splitmuxsink-fragment-closed" messages from splitmuxsink.
I have tried adding a pad to the splitmuxsink and subscribed to the message.
GstPad *ghostpad = gst_ghost_pad_new_no_target("sink", GST_PAD_SINK);
auto si = gst_element_add_pad(splitmuxsink, ghostpad);
auto ghostpadactive = gst_pad_set_active(ghostpad, true);
auto ghostpadprobe = gst_pad_add_probe(ghostpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM, gstUpdateCb, this, nullptr);
auto ghostpadadded = gst_element_add_pad(splitmuxsink, ghostpad);
Also I tried adding a watch to the bus and implementing the synchandler.
auto bus = gst_element_get_bus(GST_ELEMENT(splitmuxsink));
gst_bus_add_signal_watch(bus);
gst_bus_enable_sync_message_emission(bus);
gst_bus_set_sync_handler(bus, (GstBusSyncHandler)my_bus_callback, this, NULL);
gst_object_unref(bus);
Both the approaches are not working.please suggest a solution.
Thanks & Regards,
Shyam
--
Sent from: https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgstreamer-devel.966125.n4.nabble.com%2F&data=02%7C01%7C%7C90c49de32b37480c94eb08d774843316%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637105983447469157&sdata=qVs98hVjgI2pbT2NmXBgfbJf6sNdwqU%2F0Xbi2dXC6yw%3D&reserved=0
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fgstreamer-devel&data=02%7C01%7C%7C90c49de32b37480c94eb08d774843316%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637105983447469157&sdata=GaU6%2FkFz%2BPN6%2BZ%2FpxcxOyXboHcsa3mWjjWqmgc0yKMo%3D&reserved=0
More information about the gstreamer-devel
mailing list