[Kde-silk] [Draft] Video Providers DataEngine
Sebastian Kügler
sebas at kde.org
Fri Oct 9 20:26:39 CEST 2009
Hi,
On Friday 09 October 2009 17:14:41 Alessandro Diaferia wrote:
> Hello dear silky people :)
> I've thrown some code into the MediaCenter land and now it is possible to
> create simple video providers plugin for the video dataengine.
> The video dataengine is supposed to provide an high level query "api" to
> retrieve video pieces of information from webservices like blip, vimeo,
> youtube and so on.
Cool, that sounds like nice progress :)
> The little-but-working api i've just started implementing works as follows:
>
> A Plasma::DataEngine called "video" accepts queries in the following form:
>
> [1] "videoservice:searchTerm&constaint1=value1&constraint2=value2.."
>
> where &constraints are optional (and currently not handled). Constraints
> are supposed to give filtering options when doing a query so that one can
> query the service with statements like:
> "I want a video of a Queen group's performance with the keywords "wembley"
> and "stadium", searched from YouTune". This would become
> "youtube:queen&keywords=wembley,stadium" and should work as expected :).
Hm, this would make the query specific per provider, something we don't want. Can we
abstract this maybe? I'd imagine that a keyword field is useful anyway, and for those
providers where it's not supported, we could add it to the query term. Or just leave
it (depends on testing).
> The second possible type of query is more of internal purposes and is
> simply "providers". This query returns the available plugins installed
> that provide the service to the video dataengine.
I think knowing it makes sense, for example to show "Searching youtube, vimeo, blip,
..."
> As already discussed with Marco on irc there was the need to keep the
> relation query <-> result in addition to also add new data sources to the
> dataengine. As from what we agreed the dataengine now works this way:
>
> after the query a source is created named like searchTerm from [1]. This
> source will have the list of found videos ids as value.
> In addition to this a source for each video id will be created. The name
> for each source will be the video id (as expected). The following values
> will then be provided for each video:
>
> - *QString id*: this is probably redundant.
Nevertheless good to have a unique id for purposes of handling the data inside the
applets...
> - *QString title*: the title of the video, no further explanation
> needed. - *QString description*: the description of the video as well.
> - *QString thumbnail*: an url to the thumbnail of the video. I decided
> to keep this as QString but suggestions are welcome of course.
QImage or QPixmap? Depends if we want the user to do the downloading/conversion. It
might makes more sense to do that in the dataengine, we could also cache it there.
> - *QStringList keywords*: the eventual list of keywords for this video.
> - *QString author*: the author of the video aka the one who published
> the video.
> - * uint duration*: the duration of course.
> - *QString category*: the eventual category of the video.
> - *QString embeddedHTML*: and this is probably the most interesting: the
> HTML code provided to embed the video in any web page. Since few video
> providers (probably only blip) give the chance to retrieve the real video
> file this is a sort of hack to retrieve the video and put it anywhere. Of
> course this would be accomplished using a QWebView to reproduce the video
> setting its html code to this one provided. Of course suggestions about
> this are really really appreciated.
* *FullUrl*: website to visit to view the video (the url on youtube for embedded
videos, for example)
* other formats: Blip.tv for example offers also other formats, at least the one
you've uploaded the video in (and it accepts .ogv). It would be a shame if we didn't
offer that (since obviously showing the video in a native client is more silky than
embedding a Flash plugin in a webview in a widget).
More, more or less random ideas:
* Classification? Under 18, above 21, suitable all ages, we are actively supporting
porn applet writers, no? (The Internet is for ... look that up in the engine :D)
* Popularity
* Rating
* Feed (some shows have the concept of shows, with episodes, maybe next / previous
would also make sense)
> This is what i achieved so far but suggestions for eventual additions to
> this list are also welcome.
One question came to mind: the engine searches different providers, right? So a
search for "KDE" will show video hits from all providers, not just one?
> The code is in the KDE's svn, exactly under
> trunk/playground/base/plasma/MediaCenterComponents
> the video dataengine is under dataengines/video. In this folder you'll also
> find the videoprovider/ folder which hosts the plugin abstract class. The
> YouTube plugin is instead hosted under
> MediaCenterComponents/videoproviders/youtube.
>
> Have a try and let me know :)
I'll give it a try later tonight, on a train right now :)
--
sebas
http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-silk/attachments/20091009/b36aeb28/attachment.sig
More information about the Kde-silk
mailing list