Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-08-2009, 10:43 PM   #106
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
With a brief browse in the source code of Irex's modified gtk libs for DR1000, I found that they added some function (void irex_display_update) to send update request through socket. The question is: what's the destination? Which program is to receive the update message and perform the real update action? Right now, I haven't found it. Maybe it's not open source.

Last edited by ericshliao; 07-08-2009 at 11:01 PM.
ericshliao is offline   Reply With Quote
Old 07-09-2009, 04:15 AM   #107
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Quote:
Originally Posted by ericshliao View Post
..., I haven't found it. Maybe it's not open source.
xepdmgr?
hansel is offline   Reply With Quote
Old 07-09-2009, 04:35 AM   #108
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by hansel View Post
xepdmgr?

Of course not xepdmgr. Sorry for not stating my question clearly.

As indicated by Antartica, for DR1000, iRex adopted another approach to control screen-refreshment.
The modified GTK+ for DR1000 can be downloaded here:http://developer.irexnet.com/pub/iOn...-2.12.7.tar.gz.

In that package, among the files, I saw some lines of code in gdkwindow.c:
Code:
// IREX
// create connection to displayMgr
void irex_display_init(char addr[], int port) {
    if (irex_display_socket==-1) {
        irex_display_socket = socket(PF_INET, SOCK_DGRAM, 0);
        irex_display_addr.sin_family = AF_INET; 
        irex_display_addr.sin_port = htons(port);
        irex_display_addr.sin_addr.s_addr = inet_addr(addr);
        irex_pid = getpid();
        memset(irex_display_addr.sin_zero, '\0', sizeof irex_display_addr.sin_zero);
    }
}

// IREX
// send a display update message
void irex_display_update(int x, int y, int width, int height) {
    char msg[256];
    irex_display_init("127.0.0.1",50555);
    sprintf(msg,"!I,%d,%d,%d,%d,%d,%d,%d,%d,%s,%d", 
            irex_pid,
            x, y, width, height, 
            irex_dump_ignore,
            irex_dump_is_window, 
            irex_dump_window_type, 
            irex_dump_widget_type,
            irex_dump_focus);
    //printf("Sent update message: %s\n", msg);
    sendto(irex_display_socket, msg, strlen(msg), 0, 
            (struct sockaddr*)&irex_display_addr, sizeof(irex_display_addr));
    irex_dump_focus = 0;
}
From the above code, I guest that iRex modified GTK+ libs to make GTK+ send update message to some unknown DisplayMgr through socket. Then I tried to find that DisplayMgr, but I can't find it. That's what I meant in the previous post.

Last edited by ericshliao; 07-09-2009 at 04:44 AM.
ericshliao is offline   Reply With Quote
Old 07-09-2009, 12:06 PM   #109
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Quote:
Originally Posted by ericshliao View Post
Of course not xepdmgr. Sorry for not stating my question clearly.
Sorry for not explaining my hint clearly

What I meant is: find a spot in the QT libs that is called for all screen updates, and send a message to xepdmgr from there. (or insert a call to dmDisplay() as you mentioned earlier)

Good luck! Hans.
hansel is offline   Reply With Quote
Old 07-09-2009, 06:20 PM   #110
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
I had a faint feeling there is something correlated between xepdmgr and the approach adopted by iRex in DR1000, but I just don't know what it is and how to express it. I got your idea now. Thanx.

Maybe I should first try this approach on GTK+.

Last edited by ericshliao; 07-09-2009 at 06:24 PM.
ericshliao is offline   Reply With Quote
Old 07-10-2009, 11:32 PM   #111
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Just want to make sure one thing before I start. Instead of using xepdmgr, from the modded GTK+, I should call functions provided by xepdmgrclient (such as EpdRefreshFull(sEpd *Epd)). Right?
ericshliao is offline   Reply With Quote
Old 07-11-2009, 09:37 AM   #112
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by ericshliao View Post
Just want to make sure one thing before I start. Instead of using xepdmgr, from the modded GTK+, I should call functions provided by xepdmgrclient (such as EpdRefreshFull(sEpd *Epd)). Right?
No. The functions of xepdmgrclient are to talk with xepdmgr.

To talk with displayMgr directly there is an open UDP port... look at the sources of xepdmgr or the ones of displayMgr.
Antartica is offline   Reply With Quote
Old 07-12-2009, 09:31 AM   #113
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Thanx so much. Fortunately I asked before trying.

My current progress: The modified GTK+ for DR1000 can be compiled with iLiad SDK without any problem.
ericshliao is offline   Reply With Quote
Old 07-15-2009, 06:47 AM   #114
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
I can build dillo2 on my desktop now. It still failed to dispaly Chinese and Japanese text. I also tried a hello world program, only English letters can be dispalyed. So, I guess the problem must be dealt within FLTK2.
ericshliao is offline   Reply With Quote
Old 07-15-2009, 11:56 AM   #115
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by ericshliao View Post
I can build dillo2 on my desktop now. It still failed to dispaly Chinese and Japanese text. I also tried a hello world program, only English letters can be dispalyed. So, I guess the problem must be dealt within FLTK2.
I reply in the dillo thread (in Iliad software releases) .
Antartica is offline   Reply With Quote
Old 07-16-2009, 10:44 PM   #116
pwarren
Connoisseur
pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.
 
Posts: 95
Karma: 186186
Join Date: May 2009
Location: Canberra, Australia
Device: Irex Iliad (Dead), EcoReader (Smashed screen), Kobo Touch
Hi all,

I've been thinking about my FBReader port, and getting it to turn pages faster. With xepdmgr only, it takes ~5 seconds for my test pages to display the new page, after using the flipbar, which is a little too long for comfort.

I've managed to port FBReader page display to the erdm way of doing things, and this brings it down to ~2 seconds, which is much more manageable.

The only trouble, is that with this version is that the widgets that you get from pressing the menu buttons don't work terribly well. The File Selection dialogues, and the configuration dialog are particularly useful.

So I thought that instead of trying to find every instance of things that needed porting there, I'd try and use a mixed approach, use xepdmgr for the menu button dialogues, and the erdm style for page flipping.

To my questions then

Is that pretty much what the EPDCancel() function is for?
and
How do I use that in FBReader? (or other code for that matter)

Cheers.
pwarren is offline   Reply With Quote
Old 07-17-2009, 02:35 AM   #117
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
5-secs to 2-secs? That's really awesome.

I want to clarify something. Based on my understanding, there should not be a 3-secs difference between using xepdmgr and erdm. The real difference between using xepdmgr and erdm should be only 1 sec. 3-secs is too much.
Take ipdf for example, we can get a page refresh in 2 seconds because ipdf preload the next page and write the data to framebuffer while we are reading the current page. Then, when we flip the pagebar, erdm will draw e-ink screen based on the data stored in framebuffer. That's the fast response we can expect for iLiad. Because contentlister does not have such preloading and prefetching mechanism, we get page refreshment in 5-secs. In my homebrew text viewer with xepdmgr, I managed to get next page dispalyed in 3 secs (with preloading but no write to framebuffer). If no preloading, the next page will be dispalyed in 5 secs. And I believe if I implement preloading next page and prefetching data to framebuffer in background in my text viewer, I can get a 2-secs refreshment just like ipdf.

So, based on my current understanding and conjecture, you can get FBReader display next page in 2-secs only if you implement both preloading next page and fetching data to framebuffer. That's quite a complicate job.

Last edited by ericshliao; 07-17-2009 at 02:42 AM.
ericshliao is offline   Reply With Quote
Old 07-17-2009, 12:38 PM   #118
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by pwarren View Post
So I thought that instead of trying to find every instance of things that needed porting there, I'd try and use a mixed approach, use xepdmgr for the menu button dialogues, and the erdm style for page flipping.

To my questions then

Is that pretty much what the EPDCancel() function is for?
and
How do I use that in FBReader? (or other code for that matter)
Well, really it's EpdRefreshAuto() the one that enables/disables the autorefresh.

See post 98 in this thread:

https://www.mobileread.com/forums/sho...5&postcount=98

That code sample is what you are looking for, if I'm not mistaken: when you want to refresh the main viewing area of FBReader, disable xepdmgr (with "EpdRefreshAuto(Epd,0)"), then do the update and refresh manually (using either "EpdRefreshFull(Epd)" or the functions in erdm -- I think that here there should be no difference in elapsed time between these functions) and then re-enable the auto-refresh (with "EpdCancel(Epd),EpdRefreshAuto(Epd,1)".
Antartica is offline   Reply With Quote
Old 07-17-2009, 08:21 PM   #119
pwarren
Connoisseur
pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.pwarren can program the VCR without an owner's manual.
 
Posts: 95
Karma: 186186
Join Date: May 2009
Location: Canberra, Australia
Device: Irex Iliad (Dead), EcoReader (Smashed screen), Kobo Touch
Ah Ok, that makes sense, thanks Antarctica!

What I meant by using it in the code is, do I have to #include and link in something?


And, I've actually done proper timing tests for various books on both versions of FBReader, with xepdmgr, and using erdm.

average of 10 page forward, page backward turns, on the same epub file.
erdm: 4.78s
xepd: 6.22s

So, the improvements aren't as dramatic as I'd thought, but based on a bit of use, nearly 5 seconds seems to be much more manageable than just over 6 seconds.

and wow, 2 seconds is blindingly fast, I hadn't used ipdf much, most of my ebooks have been epub or mobipocket format, but that is just amazing.
pwarren is offline   Reply With Quote
Old 07-19-2009, 02:08 PM   #120
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by pwarren View Post
What I meant by using it in the code is, do I have to #include and link in something?
Yes, you have to include the xepdmgrclient.h file and link with the xepdmgrclient.c compiled to .o .

The quick and dirty version is to include the xepdmgrclient.c in you program and you dont have to link anything.
Antartica is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Psychological Approach shalini_singh Lounge 5 09-09-2009 04:33 AM
New to Sony Reader - Best Approach kougei Sony Reader 11 12-23-2008 10:42 PM
iLiad xepdmgr algorithms dicussion thread Antartica iRex Developer's Corner 14 11-17-2008 10:36 AM
emelFM2 0.41 with xepdmgr ericshliao iRex 0 10-06-2008 10:25 AM
iLiad libX11.so.6, auto refresh hansel iRex Developer's Corner 7 09-20-2008 08:40 AM


All times are GMT -4. The time now is 02:17 PM.


MobileRead.com is a privately owned, operated and funded community.