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

List:       kde-multimedia
Subject:    Re: Konrad Materka, GSOC proposal
From:       Matthias Kretz <kretz () kde ! org>
Date:       2008-03-28 13:55:19
Message-ID: 200803281455.24757.kretz () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


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@gmx.net, kretz@kde.org,
Matthias.Kretz@urz.uni-heidelberg.de

["signature.asc" (application/pgp-signature)]

_______________________________________________
kde-multimedia mailing list
kde-multimedia@kde.org
https://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