[MPlayer-dev-eng] Re: Endpos for Mplayer.
Konstantinos Karydas
kkar at intracom.gr
Tue Oct 21 11:30:53 CEST 2003
>
> Hi Konstantinos Karydas,
>
> on Tue, 21 Oct 2003 09:11:07 +0300 you wrote:
>
> >
> > +
> > +// --> kkar added this function from mencoder!
> > +static int parse_end_at(m_option_t *conf, const char* param)
> > +{
> > +
> These callback based options shouldn't be used anymore. You should
> rather add a new option type in m_option.[ch] if needed. Also mplayer
> shouldn't accept end_pos in size unit as it make no sense.
>
You can check and see that I have already removed the size part of the
parse_end_at function that refers to the endpos in size units. The callback
based options that you refer to are used this way into the endpos function
in mencoder.c. And this is why I tried to implement it into the mplayer.c,
because whatever the endpos is doing for the mencoder that's very close what
I need for the mplayer.
What I don't understand is that there is this end_at variable into the
mencoder which is used to get the endpos timing but it is not used anywere
afterwards (but only for a check which breaks if the timing is not correct).
I don't understand where this endpos is finally passed into the mencoder to
indicate that this is what we desire to be the end of the movie. If I could
figure this out then maybe I could also implement it correctly as needed to
make it work also for mplayer. Any tips?
> > +// --> kkar part added from mencoder
> Who added/removed what is avaible from cvs log. No needed to start
> cluttering the code with useless comments like that.
>
I am commenting to make the changed code more easy to read and understand
for the others. I think this is a recommended programming practice, isn't
it? Even if everything is mentioned into the cvs it's not bad to have some
comments. Besides when everything works as intended, then we just remove the
useless comments and clean it up to deliver nice and beautiful code. These
are minor details anyway and I think we should better concentrate to make
things work first! No? :-)
> > +
> > + /*if (stop_to_sec) {
> > + int a,b; float d;
> > +
> > + if (sscanf(stop_to_sec, "%d:%d:%f", &a,&b,&d)==3)
> > + rel_stop_secs += 3600*a +60*b +d ;
> > + else if (sscanf(stop_to_sec, "%d:%f", &a, &d)==2)
> > + rel_stop_secs += 60*a +d;
> > + else if (sscanf(stop_to_sec, "%f", &d)==1)
> > + rel_stop_secs += d;
> > +
> > + stop_to_sec = NULL;
> > + } */
> > +
> What is that for ? And where is rel_stop_secs declared ?
> Albeu
> --
As you can see these lines are commented out, i.e. not used. I had an idea
some time before that didn't work so I commented this out.
>
> Everything is controlled by a small evil group
> to which, unfortunately, no one we know belongs.
>
>
More information about the MPlayer-dev-eng
mailing list