From kde-multimedia Fri Mar 28 13:55:19 2008 From: Matthias Kretz Date: Fri, 28 Mar 2008 13:55:19 +0000 To: kde-multimedia Subject: Re: Konrad Materka, GSOC proposal Message-Id: <200803281455.24757.kretz () kde ! org> X-MARC-Message: https://marc.info/?l=kde-multimedia&m=120671301201967 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0710545730==" --===============0710545730== Content-Type: multipart/signed; boundary="nextPart3181926.xaJusBA97t"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart3181926.xaJusBA97t Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Konrad, I read your proposal, thought one night about it and chatted with hftom=20 (Kaffeine developer) about it. And I have a suggestion for you to consider= =20 changing your application and with that fully integrate into Phonon and mak= e=20 it more flexible. =46irst I need to say that I like your SoC application and ideas. Especiall= y the=20 widget idea also made me think to see a bigger picture. Here's what I think an application using ext. subtitles with Phonon could l= ook=20 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 =3D 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 wil= l=20 probably get started on in the near future. Those are: a) Synchronizer: Some class to combine multiple MediaObjects (sources) into= =20 one or just to start/stop multiple sources in sync. This will also be a=20 requirement for audio/video editors. b) Port: this class will be added to allow more fine grained control over w= hat=20 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=20 subtitle connection would have been made and the subtitles of the DVD would= =20 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= =20 the subtitles are rendered on to ("pixmap" and "image" would be in the same= =20 scale as an unscaled video frame and will work with any subtitle format.=20 Another format we should look into is "text" which would allow the=20 application to draw the subtitles manually in whatever obscure form it=20 wants.). SubtitleWidget in the above code example would be an implementation of your= =20 widget idea. In this case it would receive the pixmaps and draw them in its= =20 paintEvent (and use the QPixmap::mask() for transparency). For manual=20 handling of the subtitles a SubtitleOutput class could be provided. If you have further questions, you can try to find me on IRC (channel #phon= on,=20 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/ =2D-=20 ________________________________________________________ Matthias Kretz (Germany) <>< http://Vir.homelinux.org/ MatthiasKretz@gmx.net, kretz@kde.org, Matthias.Kretz@urz.uni-heidelberg.de --nextPart3181926.xaJusBA97t Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBH7PjMyg4WnCj6OIoRAtaxAKCuar/KIMleXu703sPNJRC+iJhcMgCdHMpH PMYZ7O5ZBKSVM09S6sKAe3A= =IPVl -----END PGP SIGNATURE----- --nextPart3181926.xaJusBA97t-- --===============0710545730== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kde-multimedia mailing list kde-multimedia@kde.org https://mail.kde.org/mailman/listinfo/kde-multimedia --===============0710545730==--