[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-multimedia
Subject: Re: mpeglib into KDE/CVS ?
From: Charles <charles () altair ! dhs ! org>
Date: 2000-07-02 21:13:13
[Download RAW message or body]
I solved this problem:
As it turns out, the returned time is correct, it's just not formatted
"properly"
Rather than currentTime() report 10 seconds, it's report 20 seconds and
-10000ms
On Sat, 01 Jul 2000, you wrote:
> On Fri, Jun 30, 2000 at 10:44:24AM -0700, Charles wrote:
> >
> > Looking good!
> >
> > Hit the play button. And use the seek-bar to seek somewhere.
> >
> > See the problem?
> >
> Do you mean the wrong positions/jumping slider?
> The time should be right.
> You can modify in decoderBaseObject_impl the currentTime method
> a bit.
> I dont know your source, but you should not do everytime
> you move the slider a "seek" only if the slider is released
> you should do a seek.
> Every seek call is _very_ expensive.
> As I understand arts the calls may not be synchron.
> Maybe you get "delayed" time information?
>
> What happens during seek?
> we reset the start counter in ArtsOutputStream:
>
> void ArtsOutputStream::audioClose() {
> audioTime->setTime(0.0);
>
> and in decoderBaseObject_impl: in the seek method:
>
> // now set a new startTime
> startTime=sec;
>
> on a currentTime call we calculate the new current time
> out of the starttime and the played bytes.
>
> AudioTime* audioTime=outputStream->getAudioTime();
> float currentTime=audioTime->getTime()+(float)startTime;
> time.seconds=(long)(currentTime+startTime);
> time.ms=(long) (1000.0*(currentTime-(float)time.seconds));
> return time;
>
> You can modify mpeglibartsplay to test seeking.
>
>
> > I was looking in the source and had no luck in finding the problem. But I
> > think it's possible that it is returining the wrong current position, rather
> > than setting the wrong position.
> >
>
> see decoderBaseObject_impl. there are two currentTime methods.
> Maybe you call the wrong?
>
> regards,
>
> Martin
>
> _______________________________________________
> Kde-multimedia mailing list
> Kde-multimedia@master.kde.org
> http://master.kde.org/mailman/listinfo/kde-multimedia
--
Charles - charles@kde.org
"Hva er det lys ting på himmelen?"
_______________________________________________
Kde-multimedia mailing list
Kde-multimedia@master.kde.org
http://master.kde.org/mailman/listinfo/kde-multimedia
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic