April 15, 2008, 03:49:29 am
News:
  Pages: [1]
Author Topic: WebKit on the OSD  (Read 1091 times)
greyback
Moderator
Hero Member

Posts: 748


« on: February 15, 2008, 10:26:01 am »

Hey all,
one thing that gets requested a lot is for a web browser on the OSD. With the adoption of the Qt libraries, all of a sudden this isn't quite so impossible as before.

Mind you, it'll still be bloody hard!

For the last few weeks I've been trying to get WebKit running on the OSD. The main libraries compile fine, but the Qt bindings cause problems, since Neuros have disabled many things from the Qt installation, like mouse & keyboard support, context menus, drag & drop, http access and more. So the bindings need some serious cutting.

But would it work at all? Would it be unbearably slow loading a page? That was what I decided to try to find out.

Just to sketch the details, I recompiled the Qt libs with all the missing stuff restored, and compiled Webkit with Qt support enabled (and loads of unnecessary stuff disabled). After some tweaking it compiled successfully, and I built a really simple program that would load the Google homepage.

Result, it worked!

It wasn't fast, but I was happy to see it working. I'll do some more testing to see if this is worth the effort. But just to let people know!
-G
Logged
bagster
Full Member

Posts: 164


« Reply #1 on: February 15, 2008, 10:40:32 am »

Wow, great!

If it's not usable as a full browser, maybe it can be used to display info (like widgets)?

Someone asked for a "chumby like" app.  That can sure do the job?
Logged
yanvrno
Jr. Member

Posts: 94


« Reply #2 on: February 15, 2008, 04:33:27 pm »

Great job Gerry

How about some sort of RSS FeedReader? I assume that would be faster due to the limited graphics.
Logged
Ex-Navy
Sr. Member

Posts: 377


« Reply #3 on: February 15, 2008, 04:50:56 pm »

Great job Gerry!!!

It's a start to more things to come.

Did you use Qt designer??

Qt is very cool to use, is there a list of what libraries are not supported in the Arizona upgrade.

No sense in trying to find out the hard way if one can find out now
Logged

Ex-Navy
greyback
Moderator
Hero Member

Posts: 748


« Reply #4 on: February 15, 2008, 06:25:08 pm »

Yeah, there's a lot to do. I'm currently going through the Qt specific code to remove features the OSD doesn't support/need.

There's a few things disabled alright. Off the top of my head, obvious stuff like cursors, drag & drop, copy & paste are disabled. But handy things like QHttp/QFtp are missing (curl does the same thing and is there). I would love a list of missing stuff! Must ask on ML.

That program I made that shows Google was simply this:
Code:
#include <qwebpage.h>
#include <qwebview.h>
#include <qwebframe.h>
#include <qwebsettings.h>

#include <QtGui>
#include <QDebug>

int main(int argc, char *argv[]) {
  QApplication app(argc, argv);

  QWebView *view = new QWebView(0);
  view->load(QUrl("http://www.google.com/"));
  view->show();

  QObject::connect( view, SIGNAL(loadFinished()), qApp, SLOT(quit()) );
 
  return app.exec();
}
Once it finishes loading Google, it's supposed to quit, giving me a rough idea what performance is like.

I must admit, I don't really use RSS. Isn't it just XML? A parser for that can be written pretty easily with QtXML. I've made some headway into the RSS plugin for XMMS2, which does exactly that.
-G
Logged
rblanco
Jr. Member

Posts: 54


« Reply #5 on: February 15, 2008, 07:12:14 pm »

I must admit, I don't really use RSS. Isn't it just XML? A parser for that can be written pretty easily with QtXML. I've made some headway into the RSS plugin for XMMS2, which does exactly that.

Check out ESPERANZA. "Esperanza" is the QT client software interface for XMMS2. It would be great to have RSS capabilities, I really want to watch video and audio podcasts via RSS.

Keep up the great work!

Thanks.


Logged
JoeBorn
Neuros Audio Team
Administrator
Hero Member

Posts: 1016



« Reply #6 on: March 25, 2008, 05:59:52 pm »

Thanks so much for doing this.  More and more it's seeming like a webkit or at least a web browser could be something really useful.  It would be great to be able to tell folks that they can use web tools to create "applications" for the OSD, either on or off the device.

I often viewed the web browser as it's used on the PC, but for the OSD, it could provide a very easy way to provide access for a host of developers or content providers that wouldn't be candidates for QT development.
Logged

jborn (at) neurostechnology.com
#neuros on freenode.net
greyback
Moderator
Hero Member

Posts: 748


« Reply #7 on: March 26, 2008, 08:31:28 am »

Hey Joe,
I agree, a simple web browser would be a useful addition to the OSD. Qt's WebKit integration (easiest to use in the upcoming 4.4 release) would make it much easier to use from a programmers point of view.

I've done quite a bit of exploration with getting a current WebKit build working on a current Arizona build. I'd to change a lot to remove mouse based navigation. Qt4.4 should have most of that done already, probably far more elegantly than I.

Some issues I found that needed to be considered are
- performance. I've still to test but I'd imagine that a 200Mhz ARM will be slow for rendering pages. JavaScript then on top of that. You can disable JavaScript from WebKit, it might be worth it.
- resolution. 640x480 is small (might need to be 570x430 to compensate for overscan on CRT tvs), most websites will not fit and demand vertical scroll bars. The up/down/left/right keys should scroll pages.
- how to navigate the web. Ideas:
   1. I was planning a tab-key like navigation, the page up/down keys would make control jump to the previous/next link on a page.
   2. A cursor controlled by the remote is another possibility, but slower and harder to use.
   3. Pressing OK will cause all hyperlinks to be numbered, type in the number you want to follow that link
- Disable downloading & uploading of files. Too awkward & not a set top box feature IMO.
- data input. Text input needs to be changed so that the onscreen/cellphone method works.
- cacheing. Where can cached files be placed? Cookies? Bookmarks?
- FLVs & other media files. These should be playable by selecting them. WebKit has an inspector thingy that keeps track of all files downloaded/requested. It might be possible to get the URL of an FLV requested by a flash plugin using it.
- Can be automatically killed when a recording starts.

I'm still considering trying for the Google SoC, I believe I am eligible, but in my final year of my PhD...
-G
Logged
dontknowme
Jr. Member

Posts: 55


« Reply #8 on: April 03, 2008, 03:14:03 am »

Once again I am amazed. I had a thought in my 3am tiredness. Is it possible to use this to create your own dashboards. It seems you could overlay the current frontend to add in things like the channel command via the gui using the web functionality. I could be off base as I'm more of a networking and hardware guy but it seems possible.
Logged
  Pages: [1]
Jump to: