Extract file information from Application message named GstMultiFileSink

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

Extract file information from Application message named GstMultiFileSink

Shubham Shrivastava
How to get filename ,index ,timestamps ,duration of current file or last file while writing the next buffer.

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

Fwd: Extract file information from Application message named GstMultiFileSink

Shubham Shrivastava

---------- Forwarded message ----------
From: Shubham Shrivastava <[hidden email]>
Date: Mon, Jul 2, 2018 at 12:38 PM
Subject: Extract file information from Application message named GstMultiFileSink
To: [hidden email]


How to get filename ,index ,timestamps ,duration of current file or last file while writing the next buffer.


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

Re: Fwd: Extract file information from Application message named GstMultiFileSink

Gst-Geek
If the “post-messages” property of multifilesink is TRUE, it sends an
application message named
"GstMultiFileSink" after writing each file and message to be parsed in the
pipeline or bin bus. like below

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);
}
break;

Refer
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-multifilesink.html
for more.

for bus call back registration refer Gstreamer example code.




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