[PATCH] KPlayObject fixes for asynchronous generation + patch for kaboodle

Nikolas Zimmermann wildfox at kde.org
Sat Aug 31 19:16:09 BST 2002


On Saturday 31 August 2002 15:42, Matthias Welwarsky wrote:
> Hi,
>
> this patch implements asynchronous generation of KPlayObjects, as mentioned
>  in my earlier mail.

Sounds very nice! :)

I've just looked over the code and it seems quite good.

Nice work.

Bye
 Bye 
  Niko


>
> Works as follows:
>
> KPlayObjectFactory figures if a URL to be played is a local file. If yes,
> it generates a KPlayObject for the URL the usual way.
>
> If the URL is not a local file, it generates an empty proxy-KPlayObject.
> This KPlayObject is not a Null-Playobject in the usual sense, and it will
> not crash if you call its methods, however, unless you call "play()", it
> will only return default values for all queries.
>
> Once you call "play()", it invokes  a KPlayObjectCreator to create an
>  Arts::PlayObject for the remote URL. As soon as the Creator figured out
> the mimetype of the URL, it will emit a ready-to-play Arts::PlayObject.
> KPlayObject will catch this Object and start playing immediately. From then
> on, all calls to the KPlayObject will be relayed to the Arts::PlayObject as
> usual.
>
> The KPlayObjectCreator is a local class, its headerfile is not being
> installed.
>
> Even if the implementation is source and binary compatible, some caveats:
>
> Don't call KPlayObject.object().isNull() if you want to test for a Null
>  Playobject. Kaboodle uses this to find out if loading of the media file
> worked. Call KPlayObject.isNull() instead. It will return "true" if the
>  object is a proxy. In general, it should not be necessary to test for
>  a Null playobject anyway.
>
> Don't rely on capabilities(), as the proxy object will return "0"
>  capabilities if the real object is yet to be created.
>
> The proxy object will return Arts::posIdle as state(), even if you just
>  called "play". For Streams, it can take an indefinite amount of time for
> the connection to be opened and the playing to start.
>
> have fun,
> 	matze
>
> --
> Matthias Welwarsky
> Fachschaft Informatik FH Darmstadt
> Email: matze at stud.fbi.fh-darmstadt.de
>
> "all software sucks equally, but some software is more equal"

-- 
Nikolas Zimmermann
wildfox at kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20020831/71c52a48/attachment.sig>


More information about the kde-multimedia mailing list