Konrad Materka, GSOC proposal

Matthias Kretz kretz at kde.org
Fri Mar 28 13:55:19 GMT 2008


Hi Konrad,

I read your proposal, thought one night about it and chatted with hftom 
(Kaffeine developer) about it. And I have a suggestion for you to consider 
changing your application and with that fully integrate into Phonon and make 
it more flexible.

First I need to say that I like your SoC application and ideas. Especially the 
widget idea also made me think to see a bigger picture.

Here's what I think an application using ext. subtitles with Phonon could look 
like:

using Phonon::MediaObject;
using Phonon::AudioOutput;
using Phonon::VideoWidget;
using Phonon::SubtitleWidget;
using Phonon::Port;

MediaObject m;
m.setCurrentSource(Phonon::Dvd);
MediaObject sm;
sm.setCurrentSource(urlToSubtitles);
Synchronizer sync;
sync.addMediaObject(&m);
sync.addMediaObject(&sm);
AudioOutput ao(Phonon::VideoCategory);
VideoWidget vw;
vw.show();
Phonon::createPath(&m, &ao);
Phonon::createPath(&m, Port(Phonon::Video), &vw);
Port port = sm.openPort(Phonon::Subtitles, "pixmap");
SubtitleWidget swidget;
Phonon::createPath(&sm, port, &swidget);

This code uses several ideas that are not yet implemented in Phonon but will 
probably get started on in the near future. Those are:
a) Synchronizer: Some class to combine multiple MediaObjects (sources) into 
one or just to start/stop multiple sources in sync. This will also be a 
requirement for audio/video editors.
b) Port: this class will be added to allow more fine grained control over what 
actually gets connected. E.g. the line
Phonon::createPath(&m, Port(Phonon::Video), &vw);
will only create a video connection between m and vw. Per default also a 
subtitle connection would have been made and the subtitles of the DVD would 
be shown on the VideoWidget. Now no subtitles will be shown at all.
The openPort call tells the MediaObject to create a stream of pixmaps where 
the subtitles are rendered on to ("pixmap" and "image" would be in the same 
scale as an unscaled video frame and will work with any subtitle format. 
Another format we should look into is "text" which would allow the 
application to draw the subtitles manually in whatever obscure form it 
wants.).

SubtitleWidget in the above code example would be an implementation of your 
widget idea. In this case it would receive the pixmaps and draw them in its 
paintEvent (and use the QPixmap::mask() for transparency). For manual 
handling of the subtitles a SubtitleOutput class could be provided.

If you have further questions, you can try to find me on IRC (channel #phonon, 
nick Vir). I'm normally online on the afternoon/evening (CET) of workdays.

On Tuesday 25 March 2008, Konrad Materka wrote:
> Hi,
> I sent my proposal on google page, should I send it on techbase too?
> My proposal can be found on this temporary site:
> http://toya.net.pl/~wodka/GSOC/



-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20080328/dcff16c6/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia


More information about the kde-multimedia mailing list