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

List:       kde-multimedia
Subject:    Re: Media Player Interface
From:       Neil Stevens <neil () qualityassistant ! com>
Date:       2002-04-03 14:17:01
[Download RAW message or body]

On Wednesday April 03, 2002 07:12, Joseph Wenninger wrote:
> I wouldn't make the interface itself a part, but something like the
> ktexteditor interface, with abstract classes like : Player, Volume
> Control, Pitch Control, a WidgetInterface ..... which can be inherited
> by a part to provide the needed functionality.

OK.  Some of this I can do, some won't work.  Overall it looks great, 
though.

> The Player interface would contain functions like :
> enum PlayState ={Playing,Stopped,Paused,Unknown};
> enum PlayState playState();
> bool loop();
> void playStateChanged(enum PlayState);		// could be implemented as a
> signal in the derived class
>
> void positionChanged(int); //could be implemented as a signal in the
> derived class
>
> // the following methodes could be overloaded as slots

How would that work?  As I understand things, even if Kaboodle implements 
them as signals and slots, the users of the Interface still won't be able 
to use them as signals unless the Interface itself is a QObject.

> bool openURL(KURL);
> void play();
> void start();
> void pause();
> void skipTo(int);
> int position()
> void setLoop(bool);

I'll add a few little things like bool seekable(), otherwise this looks 
good.

> Volume Control:
> void increase();
> void decrease();
> int value();
> void setValue(int);

If you want this, I recommend an KMedia/AdvancedPlayer interface, derived 
from the KMedia/MediaPlayer interface, that adds things like pitch and 
volume control.  Those things impose an unnecessary CPU overhead when 
they're not used.

And Kaboodle's not getting volume control in a million years. :-)

> WidgetInterface:
> showWidget(QWidget parent);
> void allowPause(bool);
> void allowStart(bool);
> void allowStop(bool);
> void allowLoop(bool);
> void allowSkip(bool);

OK.

Thanks!

-- 
Neil Stevens - neil@qualityassistant.com
"I always cheer up immensely if an attack is particularly wounding
because I think, well, if they attack one personally, it means they
have not a single political argument left." - Margaret Thatcher

_______________________________________________
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