How to print GstMultiFileSink messages

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

How to print GstMultiFileSink messages

simo-zz
Hello,

After successffuly initializing a GstElement *multifilesink and enabling the post-messages option:

multifilesink = gst_element_factory_make("multifilesink", NULL);
g_object_set(G_OBJECT(gstData->multifilesink), "post-messages", TRUE, NULL);

I would like to print its messages.

If the “post-messages” property is TRUE, it sends an application message named "GstMultiFileSink" after writing each
buffer.

So I am tryong the following piece of code inside my messages bus handler:

case GST_MESSAGE_APPLICATION:
{
    const GstStructure *s = gst_message_get_structure (message);
    if (gst_structure_has_name(s, "GstMultiFileSink"))
    {
        g_print("File written.");
    }
    break;
}

But I cannot see any message even if the files are written.
What is the correct way to print multifilelink messages ?
Thank you.
Regards,
Simon

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

Re: How to print GstMultiFileSink messages

simo-zz
Solved ! :)
The type of message to keep track of is not GST_MESSAGE_APPLICATION but GST_MESSAGE_ELEMENT.
Regards.
Simon


El Jueves 31 de agosto de 2017 20:14, simo zz <[hidden email]> escribió:


Hello,

After successffuly initializing a GstElement *multifilesink and enabling the post-messages option:

multifilesink = gst_element_factory_make("multifilesink", NULL);
g_object_set(G_OBJECT(gstData->multifilesink), "post-messages", TRUE, NULL);

I would like to print its messages.

If the “post-messages” property is TRUE, it sends an application message named "GstMultiFileSink" after writing each
buffer.

So I am tryong the following piece of code inside my messages bus handler:

case GST_MESSAGE_APPLICATION:
{
    const GstStructure *s = gst_message_get_structure (message);
    if (gst_structure_has_name(s, "GstMultiFileSink"))
    {
        g_print("File written.");
    }
    break;
}

But I cannot see any message even if the files are written.
What is the correct way to print multifilelink messages ?
Thank you.
Regards,
Simon



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel