MAS in KDE

Roger Larsson roger.larsson at skelleftea.mail.telia.com
Wed Mar 5 19:12:32 GMT 2003


On Wednesday 05 March 2003 09:34, Stefan Westerfeld wrote:
>    Hi!
> 
> On Wed, Mar 05, 2003 at 09:11:59AM +0100, Roger Larsson wrote:
> > On Wednesday 05 March 2003 09:00, Roger Larsson wrote:
> > > On Wednesday 05 March 2003 08:49, Stefan Westerfeld wrote:
> > > I have been thinking about a really simple system where the client sends
> > > either:
> > > a) The filename (url?), preferred for local files - cacheable
> > > b) The file contents in any format but raw, formats contains decoding 
info
> > > using a pipe/socket to the server.
> > > c) Program generated audio with a header, followed by data, pauses OK.
> > > using a socket/pipe/...  to the server.
> > > [The server needs to decode the header, load the decoder pluggin, and 
go]
> > > 
> > 
> > Forgot the point of it (arts is close/there today...)
> >  - the server could be replaced, keeping the interface
> >  - really little code needed on the client for the simplest case
> >    (playing a local file)
> >  - all media file types can be supported (video, mp3, ogg, MIDI...)
> >  [for video the destination window have to be transfered to the server]
> 
> Well, first of all, you need not implement a new protocol to be able to do
> this. We already have MCOP for this. Thus, you can simply implement an MCOP
> service.
> 
> Then: we do already have such an MCOP service. You might want to read all
> the IDL files in arts/soundserver, to see what we currently do.

But even a simple need like playing with a modified volume is non trivial.

Hide this inside KPlayObject... (not compiled and tested but you get the idea)

player = new KProcess();
player << QString("play --volume=%1").arg(volume / 100.0, 0, 'f'); // from sox
player << QFile::encodeName( soundFile );
player->start(KProcess::DontCare);
- - -
player->suspend();
- - -
player->resume();

It does not support volume during run but it can almost do anything a normal 
program needs...

* handles streaming!
	$ cat ohr.ogg | play --type=.ogg -

* cache the media files (handled by kernel :-)
	Not cached decoded. But it might be more effective.

/RogerL

-- 
Roger Larsson
SkellefteƄ
Sweden



More information about the kde-multimedia mailing list