Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-15-2008, 05:49 AM   #46
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
Ah, the above description is wrong.
Flickering occrued when shifting from one image to next image, not when scrolling viewport within the same image.

Added:
Disable double buffer for GtkViewport will affect the problem. The first refresh will display partial completed image, and the second refresh will display complete image. I think the problem should be caused by the thread for preloading has not completed when shifting to next image.
It has nothing to do with GTK+ or xepdmgr.

Last edited by ericshliao; 11-15-2008 at 06:00 AM.
ericshliao is offline   Reply With Quote
Old 11-15-2008, 10:19 AM   #47
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 think the problem should be caused by the thread for preloading has not completed when shifting to next image.
It has nothing to do with GTK+ or xepdmgr.
I think you can avoid the artifact deactivating the autorefresh while updating the image (that is, using the functions declared in xepdmgrclient.h):
Code:
#include "xepdmgrclinet.h"

sEpd *Epd=NULL;

int
main(int argc, char *argv);
{
   if((Epd=EpdInit(NULL))==NULL)
      return(1); /*ERROR */
   /* ... here goes your program ... */
   EpdFini(Epd);
}

int
your_preload_thread()
{
   EpdRefreshAuto(Epd,0);
   /* Do the preload */
   /* ... */
   EpdRefreshAuto(Epd,1);
}
If I have not understood wrongly the problem, that should do it.

But it would be better having the display only updated when the preload has completed, of course .

Last edited by Antartica; 09-13-2009 at 04:07 PM. Reason: Fix "if((Epd=EpdInit(NULL))=NULL)"; it should read "if((Epd=EpdInit(NULL))==NULL)".
Antartica is offline   Reply With Quote
Old 11-15-2008, 08:34 PM   #48
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 Antartica View Post
But it would be better having the display only updated when the preload has completed, of course .
To be honest, I even doubt what I said about preloading not completed when shifting to next image. Because I called join to wait for thread to complete before shifting to next image. According to my log in program, every join is successful.
So, all preloaded image must be completed when using them.

Last edited by ericshliao; 11-29-2008 at 01:54 PM.
ericshliao is offline   Reply With Quote
Old 11-29-2008, 01:59 PM   #49
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
The flickering problem is solved. It's all my mistake in program logic. The thread changed some global variable that shouldn't be changed. It's quite a common error caused by my laziness to use local variable.

As to use xepdmgrclient to control refresh, GDK provides gdk_window_freeze_updates() and gdk_window_thaw_updates() for the same purpose. It's a more generic way. This info might be useful for developers who also use xepdmgr.
ericshliao is offline   Reply With Quote
Old 12-06-2008, 06:48 AM   #50
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 Antartica View Post
No, it's not doable with a shell command. You will have to set-up a intermediate script that does the dumping to a file and call that script with xepdmgr:

$ cat /dev/tty > myapp.sh
#!/bin/sh
exec ./myapp 2>&1 >out.msg
^D
$ chmod 755 myapp.sh
$ xepdmgr :0 ./myapp.sh
I followed the above instructions but xepdmgr said :"error launching child process".

The attached file contains scripts that I executed on iLiad.
Attached Files
File Type: zip sh.zip (475 Bytes, 454 views)
ericshliao is offline   Reply With Quote
Old 12-06-2008, 05:26 PM   #51
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 Antartica View Post
exec ./myapp 2>&1 >out.msg
It seems that the above line should be like this:
Code:
exec ./myapp >out.msg 2>&1
I've tested it in Linux desktop without xepdmgr.

But even after this error got corrected, xepdmgr still complained "error launching child process".
ericshliao is offline   Reply With Quote
Old 12-08-2008, 09:52 AM   #52
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
It seems that the above line should be like this:
Code:
exec ./myapp >out.msg 2>&1
I've tested it in Linux desktop without xepdmgr.

But even after this error got corrected, xepdmgr still complained "error launching child process".
As you only want to "quiet" xepdmgr, try the xepdmgr 1.9 binary that I attach to the next post, as it doesn't output that anymore (unless you specify the --debug command line flag).

Be warned that it's a work in progress and I've not tested it even once!
Antartica is offline   Reply With Quote
Old 12-08-2008, 09:59 AM   #53
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
xepdmgr 1.9 experimental version

Hi!

Attached is version 1.9 (a snapshotof the current work towards 2.0).

2.0 will be the first to be able to impersonate displayMgr (that is, you can substitute displayMgr with xepdmgr). It also implements partial refreshes.

I've not tested the current code yet, so beware This is here mostly for ericshliao problem with the verbose output of xepdmgr...

But you can browse the code and if you are brave enough and don't mind reflashing your iliad, test it (not recommended, though ).

Have fun!

Updated to 1.9a: Reuploaded the program, there was a silly bug.
Updated to 1.9b: Corrected a few bugs with displayMgr protocol
Attached Files
File Type: gz xepdmgr-1.9b-iliad.tar.gz (81.6 KB, 474 views)

Last edited by Antartica; 12-12-2008 at 01:04 AM. Reason: s/bot/not/g
Antartica is offline   Reply With Quote
Old 12-08-2008, 01:06 PM   #54
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 Antartica View Post
But you can browse the code and if you are brave enough and don't mind reflashing your iliad, test it (not recommended, though ).
Have fun!
I am scared.
ericshliao is offline   Reply With Quote
Old 12-08-2008, 02:40 PM   #55
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 am scared.
The scary part only applies if you use xepdmgr as a replacement to displaymgr in the iliad startup script.

Its harmless if you use it as a wrapper for your program.
Antartica is offline   Reply With Quote
Old 12-08-2008, 06:42 PM   #56
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 replaced xepdmgr v0.13 with v0.19 in my current working app and got "Segmentation fault".
ericshliao is offline   Reply With Quote
Old 12-09-2008, 01:14 AM   #57
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 replaced xepdmgr v0.13 with v0.19 in my current working app and got "Segmentation fault".
Ups! There was a silly bug (using a member of a struct prior to its initialization). I've reuploaded the program to the previous post. Download again and this time it should work .
Antartica is offline   Reply With Quote
Old 12-09-2008, 02:55 AM   #58
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
v0.19 works fine now.
ericshliao is offline   Reply With Quote
Old 12-09-2008, 10:02 PM   #59
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
A question just occurred to me. What will happen if I start two apps with their own xepdmgr controlling screen refresh?

For now, I only tried to start a app with xepdmgr in mrxvt, and that app will show behind mrxvt (I can see the title window of that app).
ericshliao is offline   Reply With Quote
Old 12-10-2008, 07:59 AM   #60
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
A question just occurred to me. What will happen if I start two apps with their own xepdmgr controlling screen refresh?
There will be frequent double-refreshes. This is why I'm aiming as a more permanent solution to substtitute displaymgr with the server mode xepdmgr. The only thing left to do for that is detecting when in wrapper mode that there is a server xepdmgr running.

Quote:
Originally Posted by ericshliao View Post
For now, I only tried to start a app with xepdmgr in mrxvt, and that app will show behind mrxvt (I can see the title window of that app).
That's an artifact of mrxvt beign a dialog, not an artifact of xepdmgr
Antartica is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:36 AM.


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