GST_MESSAGE_ELEMENT

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

GST_MESSAGE_ELEMENT

Shubham Shrivastava
case GST_MESSAGE_ELEMENT:
{
        const gchar *filename;
        gint index;
        GstClockTime timestamp, stream_time, running_time, duration;
        guint64 offset, offset_end;

        GstStructure *s = gst_message_get_structure (msg);
        filename = gst_structure_get_string (s, "filename");
        gst_structure_get_string (s, "index", &index);
        gst_structure_get_clock_time (s,"timestamp",&timestamp);
        gst_structure_get_clock_time (s,"stream-time",&stream_time);
        gst_structure_get_clock_time (s,"running-time",&running_time);
        gst_structure_get_uint64(s, "offset", &offset)
        gst_structure_get_uint64(s, "offset-end", &offset_end);
}

How to print there value as some of them return boolean value


       gst_structure_get_clock_time (s,"timestamp",&timestamp);
        gst_structure_get_clock_time (s,"stream-time",&stream_time);
        gst_structure_get_clock_time (s,"running-time",&running_time);
        gst_structure_get_uint64(s, "offset", &offset)
        gst_structure_get_uint64(s, "offset-end", &offset_end);

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

Re: GST_MESSAGE_ELEMENT

ShilVin
All gst_structure_get_* function returns boolean. TRUE means third variable
passed in the function has correct values FALSE means failed to read the
value from message.

Print values like
g_print("timestamp: %llu \n", timestamp);



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