[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-multimedia
Subject: Re: PlayObject changes
From: Achim Bohnet <ach () mpe ! mpg ! de>
Date: 2000-07-17 23:48:51
[Download RAW message or body]
>>>Stefan Westerfeld wrote:
> Hi!
>
> I've made a few changes to PlayObject today. Like always, changing interfaces
> is binary incompatible. So please if there are any remaining issues, or you'd
> like to have it different, bring them up soon, as we won't be able to change
> these issues later (especially not after the KDE2.0 release).
Not a playobject issue, and if AudioSubSystem is internal (== not affected
by binary compatibility requirement ) it's not a problem at all:
The suspend/resume feature let other
program use /dev/dsp. But in the case a given audiosubsys implementation
not use /dev/dsp (e.g., NAS, /dev/dsp{0,1}, or alsa(?)) there's no need for
a open/close. So it would make sense to add
int AudioSubSystem::suspend(void) { return close(); }
int AudioSubSystem::resume(void) { return open(fullDuplex()); }
or a
bool AudioSubSystem::suspendMakesSense() { return };
to the audiosubsystem.
Achim
>
> 1. Changed posFinished to posIdle:
>
> enum poState {
> + posIdle,
> posPlaying,
> - posFinished,
> posPaused
> };
>
> A PlayObject is supposed to start up IDLE now (not PAUSED). Then, if the user
> pushes play, the PlayObject is supposed to get PLAYING, until it has played
> everything (i.e. Song done), then it is going IDLE again.
>
> You can force a PlayObject to go IDLE anytime using a new method called halt(),
> this should also seek back to the beginning, see below. If you use pause(),
> the PlayObject will be PAUSED, and if you do play() again, it will be PLAYING
> again. Well, I hope this is a logic choice of states now.
>
> 2. The halt() method:
>
> + /**
> + * stop playing the media. Normally this function would called stop,
> + * but the name is reserved for the start/stop mechanism of the
> + * aRts objects.
> + */
> + void halt();
> };
>
> Usually, this method would be called stop(), but well, aRts already uses
> start() and stop() for other things (streaming object starting/stopping),
> so this was the second best choice.
>
> Note: there was no stop before, because we said: well, you can always stop
> it by using playObject = Arts::PlayObject::null(), which will cause its
> reference count to drop and the PlayObject to go away. But for the user
> interface it seems more convenient/logic to call halt() whenever the user
> pushes the stop button, than terminating the PlayObject.
>
> 3. Making more attibutes readonly:
>
> - attribute string description;
> - attribute poTime currentTime;
> + readonly attribute string description;
> + readonly attribute poTime currentTime;
>
> While it would make sense to set currentTime (i.e. seek), we have an explicit
> seek already, which is maybe more understandable. We needed to get rid of one
> and I choose setting currentTime as less intuitive.
>
> On the other hand, the PlayObject should know it's description (i.e. ID3
> Tag), and setting this is not what you'll usually be able to do. Hmm, this
> might be discussable, but I removed it for now, unless there are any strong
> objections.
>
> * * *
>
> If you would like to have anything done different, now is the chance to say
> it ;)
>
> Also, please Martin and Charles, look into your sources and see that I didn't
> break anything essential... especially halt() is probably unused/unimplemented,
> and the mpeglib PlayObjects may come up paused (instead of idle). The wave
> PlayObject in kdelibs should be okay.
>
> Cu... Stefan
> --
> -* Stefan Westerfeld, stefan@space.twc.de (PGP!), Hamburg/Germany
> KDE Developer, project infos at http://space.twc.de/~stefan/kde *-
> _______________________________________________
> Kde-multimedia mailing list
> Kde-multimedia@master.kde.org
> http://master.kde.org/mailman/listinfo/kde-multimedia
--
To me vi is Zen. To use vi is to practice zen. Every command is
a koan. Profound to the user, unintelligible to the uninitiated.
You discover truth everytime you use it.
-- reddy@lion.austin.ibm.com
_______________________________________________
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