not able to get callbacks from splitmuxsink

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

not able to get callbacks from splitmuxsink

shyam
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: 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
|

AW: not able to get callbacks from splitmuxsink

Thornton, Keith
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 <[hidden email]> Im Auftrag von shyam
Gesendet: Freitag, 29. November 2019 05:29
An: [hidden email]
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&amp;data=02%7C01%7C%7C90c49de32b37480c94eb08d774843316%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637105983447469157&amp;sdata=qVs98hVjgI2pbT2NmXBgfbJf6sNdwqU%2F0Xbi2dXC6yw%3D&amp;reserved=0
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fgstreamer-devel&amp;data=02%7C01%7C%7C90c49de32b37480c94eb08d774843316%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637105983447469157&amp;sdata=GaU6%2FkFz%2BPN6%2BZ%2FpxcxOyXboHcsa3mWjjWqmgc0yKMo%3D&amp;reserved=0
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AW: not able to get callbacks from splitmuxsink

shyam
Hi,

           I set the "message-forward" parameter as you suggested. Sill I
dont see it working...

Best Regards,
Shyam



--
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: AW: not able to get callbacks from splitmuxsink

shyam
Hi,

              Has anyone been able to get the "splitmuxsink-fragment-opened"
messages from splitmuxsink, please let me know you did it..

Best Regards,
Shyam



--
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
|

AW: AW: not able to get callbacks from splitmuxsink

Thornton, Keith
Hi
As I mentioned in my last mail the two bits of code I included was all I needed to get the fragment-opened and fragment-closed messages. Check what you tried again to make sure you didn't make any mistakes when implementing.
Gruesse

-----Urspr√ľngliche Nachricht-----
Von: gstreamer-devel <[hidden email]> Im Auftrag von shyam
Gesendet: Sonntag, 1. Dezember 2019 05:23
An: [hidden email]
Betreff: Re: AW: not able to get callbacks from splitmuxsink

Hi,

              Has anyone been able to get the "splitmuxsink-fragment-opened"
messages from splitmuxsink, please let me know you did it..

Best Regards,
Shyam



--
Sent from: https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgstreamer-devel.966125.n4.nabble.com%2F&amp;data=02%7C01%7C%7C1e8093ace119444f1c6908d7761686cf%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637107711433588531&amp;sdata=A6xX%2FswxpSXsR%2BmrnFNTQ%2FnRcuLyLGlruZbw2EDszsc%3D&amp;reserved=0
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fgstreamer-devel&amp;data=02%7C01%7C%7C1e8093ace119444f1c6908d7761686cf%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637107711433588531&amp;sdata=UQo7hbsWRItKfndPh9ydr8mPXU7nWvlM4yuPmevVhMI%3D&amp;reserved=0
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel