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

List:       kde-multimedia
Subject:    Seeking in arts
From:       ralf.schmelter () t-online ! de (Ralf Schmelter)
Date:       2002-06-01 19:00:03
[Download RAW message or body]

Hello!

I'm currently struggling to use the seek() function in a KPayObject. The code 
I use is the following:

    KPlayObjectFactory factory(getServer());
    factory.setAllowStreaming(false);

    KPlayObject * player = factory.createPlayObject("file.mp3", false);

    player->object()._node()->start();

    for (int i = 0; i < 1000; ++i)
    {
        player->play();
        player->seek(Arts::poTime(10, 0, 0, ""));
        player->pause();
        player->seek(Arts::poTime(10, 0, 0, ""));
    }

After that a can start playing by calling play() and suspend by calling 
pause(), which seems correct to me. The only problem is, that the seek 
function fails many times (the error message is:
    COMMAND:ignore command seek in _STREAM_STATE_FIRST_INIT
If I call capability(), it returns 2 (which means no seeking, just pausing), 
but as you can see, if you try often enough it will work.

So my question is, what I'm I doing wrong? Do I have to wait some time, before 
I can call see()? The documentation unfortunately wasn't of much help to me.

Ralf
_______________________________________________
kde-multimedia mailing list
kde-multimedia@mail.kde.org
http://mail.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