Yeah, a meeting would be great.<div><br></div><div>I&#39;m UTC+2 together with Marco i suppose.</div><div>My chances to be there are the highest between 7:00 AM and 16.00 PM - UTC :)<br><br><div class="gmail_quote">2010/4/5 Shantanu Tushar Jha <span dir="ltr">&lt;<a href="mailto:jhahoneyk@gmail.com">jhahoneyk@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">What about having a meeting this Sunday?<br>
<div><div></div><div class="h5"><br>
On Mon, Apr 5, 2010 at 5:29 AM, Alessandro Diaferia<br>
&lt;<a href="mailto:alediaferia@gmail.com">alediaferia@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; 2010/4/4 Aaron J. Seigo &lt;<a href="mailto:aseigo@kde.org">aseigo@kde.org</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; On April 4, 2010, Alessandro Diaferia wrote:<br>
&gt;&gt; &gt; &gt; e.g. add an entry to the playlist.<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; so this means we need to define some concrete APIs for playlist<br>
&gt;&gt; &gt; &gt; interaction,<br>
&gt;&gt; &gt; &gt; media browser population (both of categories and entries).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; This part is a bit convoluted.<br>
&gt;&gt;<br>
&gt;&gt; in my mind that translates to &quot;should be documented on the techbase page&quot;<br>
&gt;&gt; ;)<br>
&gt;<br>
&gt; Ok right, will do as soon as things get more clear through this thread :-)<br>
&gt;&gt;<br>
&gt;&gt; &gt; We currently have an API for MCApplets<br>
&gt;&gt; &gt; themself. The particular implementation<br>
&gt;&gt; &gt; of the MediaBrowser Applet has, itself, its own plugin system that makes<br>
&gt;&gt; &gt; it<br>
&gt;&gt; &gt; possible to write plugins to show different kind<br>
&gt;&gt; &gt; of media types providing a QAbstractItemModel.<br>
&gt;&gt;<br>
&gt;&gt; this is the ModelPackage class?<br>
&gt;&gt;<br>
&gt;&gt; can we rename that for clarity? e.g. MediaListModel? MediaBrowserModel?<br>
&gt;&gt;<br>
&gt;&gt; mc_modelpackage.desktop should also be renamed in the process; plasma-<br>
&gt;&gt; mediacenter-mediabrowsermodel.desktop for instance :)<br>
&gt;<br>
&gt; We *must* rename it! :-p That was just a quick-mind-generated name..<br>
&gt; (WARNING: I&#39;m still referencing to them as ModelPackage in this mail :)<br>
&gt;&gt;<br>
&gt;&gt; &gt; The way data is fetched is<br>
&gt;&gt; &gt; completely transparent to the Applet but it is<br>
&gt;&gt; &gt; suggested to make use of the DataEngines PMC already provides. Such<br>
&gt;&gt; &gt; DataEngines are there and they&#39;re Video DataEngine and<br>
&gt;&gt; &gt; Picture DataEngine (both written together with the Silk team).<br>
&gt;&gt;<br>
&gt;&gt; would it make sense to allow the MediaBrowser to use DataEngines directly?<br>
&gt;&gt; it<br>
&gt;&gt; would make the code a more complex since it would have to work with either<br>
&gt;&gt; a<br>
&gt;&gt; QAbstractItemModel or a Plasma::DataEngine, but it would make writing<br>
&gt;&gt; plugins<br>
&gt;&gt; which are DataEngines much simpler.<br>
&gt;<br>
&gt; This is an interesting point i didn&#39;t think about. We might want to directly<br>
&gt; talk about this as MediaBrowser internally reads QAbstractItemModels to<br>
&gt; generate the elements in the view.<br>
&gt;&gt;<br>
&gt;&gt; &gt; Both are<br>
&gt;&gt; &gt; extensible themself through plugins. They&#39;re supposed to work as data<br>
&gt;&gt; &gt; source for MediaBrowser models.<br>
&gt;&gt;<br>
&gt;&gt; going through the code, i see that the term &quot;Package&quot; is much loved.<br>
&gt;&gt; unfortunately, we already have a meaning for &quot;Package&quot; in libplasma, and<br>
&gt;&gt; it&#39;s<br>
&gt;&gt; not at all what the various Package classes and structs are. would it be<br>
&gt;&gt; possible to rename those classes to something doesn&#39;t use Package? e.g.<br>
&gt;&gt; &quot;PictureDescription&quot;<br>
&gt;<br>
&gt;<br>
&gt; This is just fine for me :-)<br>
&gt;&gt;<br>
&gt;&gt; in any case, are there any PictureProviders yet? i see the picasa and<br>
&gt;&gt; flickr<br>
&gt;&gt; DataEngines ... but they aren&#39;t PictureProviders.<br>
&gt;<br>
&gt;<br>
&gt; We currently have the flickr PictureProvider that is under<br>
&gt; pictureproviders/<br>
&gt; The picasa one is just matter of converting it from plain DataEngine to<br>
&gt; PictureProvider and I&#39;ll do this asap.<br>
&gt;&gt;<br>
&gt;&gt; going back to the UI side of this, how will all of these different sources<br>
&gt;&gt; of<br>
&gt;&gt; pictures be presented to the person using PMC? how will they enter the<br>
&gt;&gt; account, password, etc. that is needed?<br>
&gt;<br>
&gt; I spent some time thinking about this. The idea was that ModelPackage API<br>
&gt; (or whatever it is called :)<br>
&gt; would have allowed specifying something like a passwordNeeded(const KUrl<br>
&gt; &amp;url) signal when a particular navigation to a restricted area (pointed by<br>
&gt; url) is requested and setPassword(const QString &amp;password, const KUrl &amp;url)<br>
&gt; to specify the credentials for a specific area (still url). Of course this<br>
&gt; is just an example,<br>
&gt; the real approach should be studied in detail.<br>
&gt;&gt;<br>
&gt;&gt; hm.. looking further, both the flickr and picasa DataEngines are just<br>
&gt;&gt; wrappers<br>
&gt;&gt; around Interface classes that implement a query(..) method, very similar<br>
&gt;&gt; to<br>
&gt;&gt; the PictureProvider API. is the intention to turn these two DataEngines<br>
&gt;&gt; into<br>
&gt;&gt; PictureProviders?<br>
&gt;<br>
&gt; Yep! See above :-)<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; it&#39;s all a bit confusing in there at the moment due to the various bits of<br>
&gt;&gt; seeming duplication, and i don&#39;t see how this is going to be exposed in<br>
&gt;&gt; the<br>
&gt;&gt; UI.<br>
&gt;&gt;<br>
&gt;&gt; i like the idea of a single PictureProvider that provides access to data<br>
&gt;&gt; that<br>
&gt;&gt; represents &quot;pictures&quot;. the details need to be filled in though:<br>
&gt;&gt;<br>
&gt;&gt; * what will the UI to select which picasa, flickr, etc. account to use<br>
&gt;&gt; look<br>
&gt;&gt; like?<br>
&gt;<br>
&gt; I think that ModelPackage API can have something like<br>
&gt; Plasma::Applet::*configurationInterface*.<br>
&gt; Each ModelPackage knows how its data source work and so how to pass to its<br>
&gt; data source the needed bits for authentication and stuff.<br>
&gt; Taking the particular example of the Picture DataEngine and a ModelPackage<br>
&gt; that uses it we can have the following behaviors:<br>
&gt; PictureModelPackage has a configuration widget that allows setting login<br>
&gt; information for each provider of the Picture DataEngine.<br>
&gt; Of course Picture DataEngine will have some specific query that allows<br>
&gt; logging into a particular user profile for each provider and keep those<br>
&gt; authentication info for every future query.<br>
&gt; Once the login information is set up the PictureModelPackage will simply<br>
&gt; query the Picture DataEngine.<br>
&gt; I think that ModelPackage API should give the chance to specify whether the<br>
&gt; particular ModelPackage plugin will require a SearchLineEdit for the media<br>
&gt; navigation it exposes through the QAbstractItemModel. Then each query should<br>
&gt; automatically be done for every provider available through the DataEngine.<br>
&gt;&gt;<br>
&gt;&gt; * what will the query user interface look like?<br>
&gt;<br>
&gt;<br>
&gt;  A simple SearchLineEdit? Probably with some eventual advanced-search<br>
&gt; features?<br>
&gt;&gt;<br>
&gt;&gt; * should the query be a Plasma::Service? returning a list of photos?<br>
&gt;<br>
&gt;<br>
&gt; Probably. I think this depends on how we want MediaBrowser plugins to<br>
&gt; behave.<br>
&gt;&gt;<br>
&gt;&gt; * should the picture information be a separate data source, or should each<br>
&gt;&gt; album/query contain a list of pictures in them, with the key being the uid<br>
&gt;&gt; of<br>
&gt;&gt; the picture (however flickr, etc. do that) with the value being a custom<br>
&gt;&gt; data<br>
&gt;&gt; structure containing all that info (we can stuff anything we want into a<br>
&gt;&gt; QVariant, remember :)<br>
&gt;<br>
&gt; Currently we have a specific data structure for the query results so i think<br>
&gt; your second approach suggestion is what suits better :)<br>
&gt;&gt;<br>
&gt;&gt; &gt; The playlist stuff, together with the ability to make the general state<br>
&gt;&gt; &gt; able to control the playback is another matter we need to talk deeper<br>
&gt;&gt; &gt; about. We have, again, an API that defines how Playlist Applet should be<br>
&gt;&gt; &gt; implemented, and, of course, we have the PMC implementation. This<br>
&gt;&gt; &gt; implementation makes<br>
&gt;&gt; &gt; use of the Playlist dataengine that was meant to be a shared component<br>
&gt;&gt; &gt; for<br>
&gt;&gt; &gt; every multimedia-application within KDE.<br>
&gt;&gt; &gt; This way an Amarok user could fill-in his playlists and find them there<br>
&gt;&gt; &gt; when he launches his PMC. And vice-versa of course.<br>
&gt;&gt;<br>
&gt;&gt; hm; don&#39;t we already have a data interchange format for playlists? M3U or<br>
&gt;&gt; whatever? i don&#39;t think the DataEngine needs to be shared, though that<br>
&gt;&gt; could<br>
&gt;&gt; be nice. still, i wouldn&#39;t make things more complex for ourselves by<br>
&gt;&gt; making a<br>
&gt;&gt; DataEngine that will work for Amarok be a design requirement.<br>
&gt;&gt;<br>
&gt;&gt; for that matter, how does Amarok currently store its playlists? juk?<br>
&gt;<br>
&gt;<br>
&gt; I really don&#39;t know about this :/<br>
&gt;&gt;<br>
&gt;&gt; &gt; The playback is then controlled by the MediaPlayer Applet and the<br>
&gt;&gt; &gt; MediaController which, again, are the implementations of a public API<br>
&gt;&gt; &gt; too.<br>
&gt;&gt;<br>
&gt;&gt; where are these classes?<br>
&gt;<br>
&gt; Those are just them under applets/.<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; are the pluggable as well, or are they meant to be<br>
&gt;&gt; used from plugins (e.g. States)?<br>
&gt;<br>
&gt;<br>
&gt; They&#39;re the implementation of the public API and they&#39;re not pluggable.<br>
&gt; They shouldn&#39;t be used from plugins as they&#39;re the specific implementation.<br>
&gt; Plugins should instead interact with the libs/{playbackcontrol.h,player.h}<br>
&gt; API likely asking the containment for the actual pointer to the<br>
&gt; implementations loaded at the moment.<br>
&gt;&gt;<br>
&gt;&gt; &gt; I, originally, was working on a thing similar to a Phonon::MediaObject<br>
&gt;&gt; &gt; wrapper that would have allowed us to expose the playback to the whole<br>
&gt;&gt; &gt; PMC<br>
&gt;&gt; &gt; components.<br>
&gt;&gt; &gt; Later, together with Marco, we decided to abandon that in order to just<br>
&gt;&gt; &gt; put<br>
&gt;&gt; &gt; the playback control inside the API.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Do you think it is the case to resume that work and make it available to<br>
&gt;&gt; &gt; the states implementations?<br>
&gt;&gt;<br>
&gt;&gt; no, i don&#39;t think that is needed. we can write Plasma::Applets specific to<br>
&gt;&gt; each type of media we wish to show, and the States can reference those.<br>
&gt;&gt; this<br>
&gt;&gt; gives us the plugin capability for free.<br>
&gt;<br>
&gt; Agreed :-)<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Aaron J. Seigo<br>
&gt;&gt; humru othro a kohnu se<br>
&gt;&gt; GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43<br>
&gt;&gt;<br>
&gt;&gt; KDE core developer sponsored by Qt Development Frameworks<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Plasma-devel mailing list<br>
&gt;&gt; <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
&gt;&gt; <a href="https://mail.kde.org/mailman/listinfo/plasma-devel" target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Alessandro Diaferia<br>
&gt; KDE Developer<br>
&gt; KDE e.V. member<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Plasma-devel mailing list<br>
&gt; <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
&gt; <a href="https://mail.kde.org/mailman/listinfo/plasma-devel" target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
--<br>
</div></div><div class="im">Shantanu Tushar    (UTC +0530)<br>
<a href="http://www.shantanutushar.com" target="_blank">http://www.shantanutushar.com</a><br>
_______________________________________________<br>
</div><div><div></div><div class="h5">Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Alessandro Diaferia<br>KDE Developer<br>KDE e.V. member<br><br>
</div>