[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-multimedia
Subject:    Re: mpeglib into KDE/CVS ?
From:       Martin Vogt <mvogt () rhrk ! uni-kl ! de>
Date:       2000-07-01 9:28:55
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic