On Sat, 23 Apr 2011, Luca Barbato wrote:
> On 4/20/11 3:26 PM, Martin Storsjö wrote:
> > From: Kirill Gavrilov<gavr.m...@gmail.com>
> >
> > All file names should be in UTF-8 within libavformat.
> >
> > This is handled by mapping the open() function to an internal one
> > in os_support.h for windows.
> >
> > fopen() could be overridden in the same way, but if that would be
> > used from ffmpeg.c, it would add a dependency on an ff prefixed
> > internal lavf function.
> >
> > This doesn't work on Windows 9x, but Win 9x hasn't been supported
> > since fc5607f8620, without anyone complaining (as far as I know).
> > If Win9x compatibility is desired, these codepaths can be skipped
> > at runtime.
>
> > cmdutils.c | 65
> > ++++++++++++++++++++++++++++++++++++++++++++++
>
> > diff --git a/cmdutils.c b/cmdutils.c
> > index f1cbd55..defe0f6 100644
> > --- a/cmdutils.c
> > +++ b/cmdutils.c
> > @@ -155,6 +155,68 @@ static const OptionDef* find_option(const OptionDef
> > *po, const char *name){
> > return po;
> > }
> >
> > +/**
> > + * Prepare command line arguments for executable.
> > + * For Windows - perform wide-char to UTF-8 conversion.
> > + * Input arguments should be main() function arguments.
> > + * @param argc_ptr Arguments number (including executable)
> > + * @param argv_ptr Arguments list.
> > + */
> > +static void prepare_app_arguments(int *argc_ptr, char ***argv_ptr);
>
> I'd rather have it somewhere else. The common code should not have system
> specific implementations (that should be applied to stray asm as well as this
> case)
Where would you want this moved, then? A cmdutils_win.c, or a header? For
stray asm, it's easy to include the right header within #if ARCH_foo. If
you're ok with keeping all this code in a header, it could be doable,
otherwise, you'd need to expose the condition (WIN32 && !__MINGW32CE__) to
make, to enable including the file only there. Or always include the file,
but only compile the actual content within such #ifs within the file.
// Martin
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel