[MPlayer-dev-eng] [PATCH] Use unrar for open vobsubs if available
Ulion
ulion2002 at gmail.com
Thu Dec 6 12:20:54 CET 2007
2007/12/4, Ulion <ulion2002 at gmail.com>:
> 2007/12/3, Ulion <ulion2002 at gmail.com>:
> > 2007/12/1, Ulion <ulion2002 at gmail.com>:
> > > 2007/12/1, Diego Biurrun <diego at biurrun.de>:
> > > > On Sat, Dec 01, 2007 at 01:49:31AM +0800, Ulion wrote:
> > > > > 2007/11/27, Diego Biurrun <diego at biurrun.de>:
> > > > > >
> > > > > > What I am trying to say is that external unrar should replace the
> > > > > > internal unrarlib, not coexist with it.
> > > > >
> > > > > Oh, unrarlib can be removed, if you want, but may after add unrar_exec
> > > > > support, make it be an 'add' and a 'remove' should be better than a
> > > > > 'replace' if finally decide to remove it.
> > > >
> > > > Our internal copy of unrarlib should go, I think there is consensus
> > > > about this.
> > > >
> > > > > Here's slight update patch, make sure the cmdline buffer is large
> > > > > enough. Is this commitable? If no objects, I will apply this in 5
> > > > > days.
> > > >
> > > > Build system part is OK, some nits below, I did not look at the rest in
> > > > detail. Removing trailing whitespace would be a plus.
> > >
> > > Removed.
> > >
> > > >
> > > > > --- unrar_exec.c (revision 0)
> > > > > +++ unrar_exec.c (revision 0)
> > > > > @@ -0,0 +1,293 @@
> > > > > +
> > > > > + // ./executable_name is not recognised by cmd.exe without quote.
> > > >
> > > > quotes
> > > >
> > > > > + * If not use popen, the only other way is to use CreateProcess, that also
> > > > > + * need a cmdline as parameter, so we use popen on win32 and escape cmdline.
> > > > > + * On win32, popen equals 'cmd.exe /C cmdline'.
> > > > > + * Check the output of 'cmd.exe /?' for how quotes in cmdline is processed.
> > > >
> > > > * If not using popen, the only other way is to use CreateProcess.
> > > > * This needs a command line as parameter, so we use popen on Win32
> > > > * and escape the command line.
> > > > * On win32, popen equals 'cmd.exe /C cmdline'.
> > > > * Check the output of 'cmd.exe /?' to see how quotes on the command
> > > > * line are processed.
> > > >
> > > > > + mp_msg(MSGT_GLOBAL, MSGL_V, "UnRAR: call unrar with cmdline: %s\n",cmdline);
> > > >
> > > > command line, same below
> > >
> > > Done. updated patch is here.
> >
> > If there are no objections, I will commit this patch in 3 days.
>
> Update to work with lastest svn change. there's still 2 days left to commit.
With Rich's suggestion, patch updated:
1. Remove access check code change to use access() call.
2. Simply redundant code such as exit status checking code.
3. Use MINGW macro instead of WIN32 one to prevent from breaking cygwin build.
If there's no object, I will commit it in 1 day.
--
Ulion
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: unrar_exec8.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071206/5fe47802/attachment.txt>
More information about the MPlayer-dev-eng
mailing list