timestamp based video files

Anton Pryima zingfrid at gmail.com
Fri Oct 16 12:42:56 UTC 2020


Hello Raj.

gchararray
format_location_callback (GstElement  *splitmux, guint fragment_id, struct
data *my_data) {
char filename[MAX_LEN] = '0';
snprintf(filename, MAX_LEN, "file_%01d:%01d:%d%01d_%01d%:%01d:%01d.mov",
my_data->day, my_data->month, my_data->year, my_data->hour,
my_data->minute, my_data->second);
//or you can get realtime within callback.
return g_strdup(filename);
}

g_signal_connect (splitmuxsink, "format-location", G_CALLBACK
(format_location_callback), my_data);

Best regards,
Anton.

On Thu, Oct 15, 2020 at 9:18 PM transport raj <rajtransport08 at gmail.com>
wrote:

> Hi
>
> For the below command,
> g_object_set(G_OBJECT(splitmux),"location","/home/video%02d.mov" ,NULL);
>
>  we get output as below
> video01.mov   video02.mov   video03.mov   video04.mov   video05.mov
>
>
> In order to get the output as timestamp-based dd:mm:yy hh:mm:ss video
> files, I was suggested to use the format_location_callback signal. How to
> implement the same? Please can anyone share a sample code?
>
>
> gchararray <https://developer.gnome.org/gobject/unstable/gobject-Standard-Parameter-and-Value-Types.html#gchararray>
> format_location_callback (GstElement <https://gstreamer.freedesktop.org/documentation/gstreamer/gstelement.html#GstElement>  splitmux,
>                           guint <https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint> fragment_id,
>                           gpointer <https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer> udata)
>
>
> Regards
> Raj
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20201016/c493e95a/attachment.htm>


More information about the gstreamer-devel mailing list