Output filename prefix for PNG output
Dear MPlayer developers, I was wondering if Mplayer couldn't add a prefix to the filename of the PNG created using PNG 'video' output. I searched the mailing list and I could find just one post regarding this (http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2007-October/054281.html), but it was about writing everything to just one file (instead of several files). Thus, I created a small patch that allows the usage of a prefix for the PNG output filename. The new option is "outfile", which is used to define the 'png_outfile_prefix' variable. The default behaviour is the same as Mplayer currently has (default value for 'png_outfile_prefix' is an empty string), so backwards compatibility is kept. I also changed the BUFLENGTH value, so I could use the same value for the buffers at vo_png.c (they are all used for the same purpose, setting the name of the output path or filename). I also defined a saner value (255 as max path+file name) instead of the mixed 100 (as defined in 'draw_image' function) and 500 (as of 'config' function). Besides this, I also did minor indentation fixes. The patch was created against MPlayer svn #32678. Regards, Marco Aurelio
Hi! Marco Aurélio Graciotto Silva <magsilva <at> gmail.com> writes:
Besides this, I also did minor indentation fixes.
You will only get a review if you remove these changes (see DOCS/tech/patches.txt). If the changes to BUFLENGTH etc. are unneeded (and do not make your patch smaller), please also remove them. Carl Eugen PS: Please consider sending the other changes (including the cosmetics) as separate patches, such work is (also) very welcome!
On Sun, Dec 12, 2010 at 2:14 PM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
You will only get a review if you remove these changes (see DOCS/tech/patches.txt). If the changes to BUFLENGTH etc. are unneeded (and do not make your patch smaller), please also remove them.
Ok. I splitted the patch: one for the new option, another for the buflength. I already sent them to the mailing list. The buflength patch is not required for my patch, but it fixes the odd situation where the output directory name can be much bigger (512 max) than the output png filename (100 max). Actually, it should be strlen(outdir) + strlen(prefix) + sizeof(%08d), but setting it to 512 make it consistent with the way this is implemented at vo_jpeg and vo_pnm.
PS: Please consider sending the other changes (including the cosmetics) as separate patches, such work is (also) very welcome!
I will. Regards, Marco
participants (2)
-
Carl Eugen Hoyos -
Marco Aurélio Graciotto Silva