[MPlayer-dev-eng] [PATCH] subtitle reload, slave mode - 3rd try
Diego Biurrun
diego at biurrun.de
Thu Oct 21 12:29:41 CEST 2004
Salvatore Falco writes:
> On Thu, Oct 21, 2004 at 03:23:57AM +0200, Diego Biurrun wrote:
> > Salvatore Falco writes:
> > >
> > > +sub_load <search> [<replace>]
> > > + Subtitles contained into file <replace> are added, or substitute those loaded from <search>, if present.
> > > + When only <search> argument is given, <search> is used instead of <replace>.
> >
> > I think what you are trying to say can be expressed more clearly
> > through the following:
> >
> > sub_load <filename> [filename2]
> > Replace all currently loaded subtitle files with <filename>. If
> > [filename2] is given, replace subtitle file [filename2] with
> > subtitle file <filename>.
>
> I don't want to replace _all_ the currently loaded subs with the new
> one; if <search> has been already loaded, I want to substitute only it,
> otherwise I need to add <replace> (or, if <replace> is not present,
> <search>) to sub list _and_start_visualizing_it_.
>
> > Thinking about it, I think you implement it differently. The first
> > argument should always be the new subfile. IIUC in your approach the
> > new subfile can be the first or the second argument depending on the
> > number of arguments.
>
> I agree with you on the point about the position of the new and the old
> subtitle file.
>
> > So I suggest you implement the specification given by the
> > documentation snippet above ;-)
>
> Rejected :-)
> What I am going to implement is:
>
> sub_load <replace> [search]
> Both <replace> and <search> (if provided) are files containing subtitles.
> If <search> subs are present, they are substituted by <replace> ones,
> otherwise <replace> subs are added.
> When only <replace> is provided, its subs are reloaded or added.
Better but still not perfect.
I think there are 3 things you may want to achieve with this type of
command:
1) Add a sub file to the list.
2) Remove a sub file from the list.
3) Empty the list of sub files.
4) Replace a sub file in the list (with reloading as special case).
AFAICT 2) and 3) are not possible under your current proposal.
Probably one command is too little to accomplish all of this. What
about
sub_add <filename>
Add <filename> to the list of subtitle files.
sub_remove [filename]
Remove <filename> from the list of subtitle files. Empties the
list of subtitle files if no argument is given.
sub_replace <filename1> <filename2>
Replace <filename1> by <filename2> in the list of subtitle files.
What do you think about this proposal?
Diego
More information about the MPlayer-dev-eng
mailing list