How to give current date and time as a file name.

James Cameron quozl at laptop.org
Thu Jul 5 04:47:42 UTC 2018


On Thu, Jul 05, 2018 at 10:07:40AM +0530, Shubham Shrivastava wrote:
> g_object_set (G_OBJECT (data.filesink), "location","/home/shubham/Videos/video%03d.mp4","async",0, NULL);
> 
> Insted of video%03d.mp4  i want to give current date and time but as i give it
> overrides the same file.

I'm not sure if you are saying you want ideas for how to give the
current date and time, or you have tried that and you get no change to
file name.

Assuming the former, then GLib.date_strftime may be useful.
https://lazka.github.io/pgi-docs/#GLib-2.0/functions.html#GLib.date_strftime

Should you mean the latter, I've no idea.

-- 
James Cameron
http://quozl.netrek.org/


More information about the gstreamer-devel mailing list