September 23, 2017, 02:59:16 pm
News:
Pages: [1] 2
Print
Author Topic: WebKit on the OSD  (Read 13492 times)
greyback
Administrator
Hero Member
*****
Posts: 1639


View Profile
« on: February 15, 2008, 11: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
Sr. Member
****
Posts: 270


View Profile
« Reply #1 on: February 15, 2008, 11: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
Full Member
***
Posts: 110


View Profile
« Reply #2 on: February 15, 2008, 05: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: 405


View Profile
« Reply #3 on: February 15, 2008, 05: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
Administrator
Hero Member
*****
Posts: 1639


View Profile
« Reply #4 on: February 15, 2008, 07: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


View Profile
« Reply #5 on: February 15, 2008, 08: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: 1376



View Profile WWW
« Reply #6 on: March 25, 2008, 06: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
Administrator
Hero Member
*****
Posts: 1639


View Profile
« Reply #7 on: March 26, 2008, 09: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


View Profile
« Reply #8 on: April 03, 2008, 04: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
pureevil
Newbie
*
Posts: 1


View Profile
« Reply #9 on: March 24, 2010, 12:06:20 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  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

Is this way more secure ? Too bad its not faster, but like you said, at least it works! Thanks for letting us know, Webkit is very useful.
« Last Edit: February 27, 2011, 11:00:13 pm by pureevil » Logged
tkos
Full Member
***
Posts: 165


View Profile
« Reply #10 on: March 26, 2010, 03:54:55 pm »

Just a thought as I don't know anything about webkit. But could it be designed to read like a mobile browser? I mean so many websites seem to have a mobile version of things for smart phones etc... And they tend to read and render much faster.
Logged
greyback
Administrator
Hero Member
*****
Posts: 1639


View Profile
« Reply #11 on: March 30, 2010, 05:27:49 am »

To update this old, old thread - we have a Google SoC student who did a lot of work on kicking-my-ass at this Smiley

He managed to do a lot of work getting webkit going on the OSD, with support for navigation via the remote, bookmarks, etc.

He never got a chance to optimise it, but I'm still of the opinion that it was slow. Startup took a good 40-60 seconds alone!

It's not hard to tweak the browser so that mobile versions of websites are obtained, but considering mobile websites are optimised for iPhones and such, the OSD is still very underpowered to cope with them. It only has a 200Mhz processor, while basic iPhones have a 600Mhz and separate GPU. No competition there.
-G
Logged
gtilles
Newbie
*
Posts: 8


View Profile
« Reply #12 on: April 07, 2010, 05:52:44 pm »

Just wondering if it would be possible to use the RS232 port for the mouse?
Logged
alexemil5
Newbie
*
Posts: 1


View Profile
« Reply #13 on: December 31, 2012, 02:30:25 am »

Just wondering if it would be possible to use the RS232 port for the mouse?

I am also curious to know... According to me, it is not possible...
Logged

heyrick
Global Moderator
Sr. Member
*****
Posts: 340



View Profile WWW
« Reply #14 on: January 08, 2013, 08:12:35 pm »

I am also curious to know... According to me, it is not possible...

Correct.
Serial mice need both RTS and DTR to be positive (this is what provides power to the mouse). Toggling DTR will soft-reset the mouse (it should reply with 0x45), and toggling RTS for at least 100ms will hard-reset the mouse. When the computer boots from cold, RTS usually defaults to negative, so this will hard-reset the mouse on power-up.

This is one of the things that bugs the hell out of me with respect to the OSDs, the RPis, the Beagles, etc. The serial port implementation is extremely minimal (RX/TX/GND); but it just so happens that a heck of a lot of serial-using hardware (for example the Psion 3a link) requires the additional pins as it signals out-of-band stuff, like, say "device connected" plus taking power from one or more of the pins. Hmm...

Gerry - if you're still around these parts, did you get any further with webkit or Qt4? Do you have any executables to download and install/run? Cheesy
Logged
Pages: [1] 2
Print
Jump to: