05-12-2012, 02:17 PM | #46 |
Junior Member
Posts: 8
Karma: 10
Join Date: May 2012
Device: kindle DXG
|
Am I understanding this correctly...
this requires no hacks or mods to the eReader... and no cords? Simply install and run Python and wxPython on a Wifi-operating computer... allow Python through any firewall... and enter the url on the eReader's browser? Seems so easy and simple - no obscure hacking or wisdom needed! The result is that the eReader will mirror the computer display? (includes the mouse movement?) Last edited by wandermaybe; 05-12-2012 at 03:58 PM. |
05-13-2012, 06:08 PM | #47 |
Zealot
Posts: 130
Karma: 10000
Join Date: Mar 2012
Device: Kindle 3G, Kindle Touch 3G, iRiver Story HD, Sony Reader
|
Hi,
No modification to the Kindle. The python script runs on the PC and saves the screen image into a file and serves it as a webpage. Simply go to the PC URL and it shows the image (of the screen). There are no mouse or keyboard - the ebook screen only show a picture of the PC screen. Thanks, James |
05-13-2012, 06:49 PM | #48 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I have a new dither routine that does not use dither tables. You can see it in the gmplay program used in the "geekmaster kindle video" thread:
https://www.mobileread.com/forums/sho...d.php?t=177455 Click the "Magic Revealed" button to see the source code. You might want to try that to see if it runs faster (or slower ). |
05-29-2012, 11:03 AM | #49 |
Junior Member
Posts: 4
Karma: 20
Join Date: May 2012
Device: Amazon Kindle
|
Hmm... no matter what I do I can't get a refresh faster than every 6 seconds.
I compressed the jpg in the original code to 0 I've tried all your codes @jmseight Nothing will get below (or above) 6 seconds... am I being thick? Oh and does anyone know how to get it to pick up the mouse pointer in the screen capture... doesn't seem to do that at all... |
06-09-2012, 10:56 AM | #50 | |
Junior Member
Posts: 9
Karma: 42
Join Date: May 2010
Device: Kindle Paperwhite (2013), Onyx Boox M92, Kindle 2
|
Quote:
Code:
def address_string(self): host, port = self.client_address[:2] #return socket.getfqdn(host) return host |
|
06-15-2012, 09:30 AM | #51 |
Junior Member
Posts: 4
Karma: 20
Join Date: May 2012
Device: Amazon Kindle
|
Fantastic - down to about 1 second updates now. I have eye strain from looking at my monitor, but suddenly, I can use my kindle to work ) how cool is that!
Thank you all Last thing I need is a way to capture the mouse pointer at the same time... any ideas anyone? |
06-15-2012, 10:46 AM | #52 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
Some device drivers MAY put the mouse cursor in the framebuffer. Also, some video modes may do it too. Try changing your video accelleration settings (to the lowest settings). That might do it, but it will make other stuff run slower... |
|
06-15-2012, 10:51 AM | #53 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
http://www.nico.schottelius.org/software/gpm/ If not already on the Kindle, pull it out of a Debian armel package and give it a try. That HowTo is indexed. Note: Not sure it will work, it may have to ported or extended for the Kindle hardware. |
|
06-15-2012, 11:30 AM | #54 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
|
|
06-15-2012, 01:02 PM | #55 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Same solution, different arch. Run it inside of the VM if the VM isn't doing the mouse capture already.
|
06-16-2012, 01:51 PM | #56 |
Junior Member
Posts: 4
Karma: 20
Join Date: May 2012
Device: Amazon Kindle
|
Eek, I wouldn't know how to run it in the VM.
Nah, turning off the hardware accel didn't do much, but thanks for the suggestion. And yep, it's a windows box (xp). I'm brand new to python so still finding my way. One thing I thought was perhaps I could just draw a new pointer on top of the image after it's been captured. Haven't had much luck so far - can't even get the bloody thing to tell me where the mouse actually is... Code:
mouse=wx.MouseEvent() mouse_pos=mouse.GetLogicalPosition(context) print "Mouse ="+str(mouse_pos.x)+","+str(mouse_pos.y) Last edited by Armegalo; 06-16-2012 at 02:01 PM. |
06-16-2012, 02:09 PM | #57 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
Although that project uses C#, you should be able to adapt it to C by using the same Win32api calls that it makes. Or find a different project. To download source from codeproject, you may need a free login account. Code Project downloads typically use a COPL license (which is much like MIT or BSD, allowing commercial use). EDIT: Okay, this shows a variety of ways to capture the screen in C (some with mouse pointer): http://www.codeproject.com/Articles/...ing-the-screen This one is LGPL, so for commercial use you would have to wrap it in a DLL. Last edited by geekmaster; 06-16-2012 at 02:20 PM. |
|
06-18-2012, 01:44 PM | #58 |
Junior Member
Posts: 9
Karma: 42
Join Date: May 2010
Device: Kindle Paperwhite (2013), Onyx Boox M92, Kindle 2
|
Here is quick and dirty fragment of code that adds mouse cursor:
Code:
... memory.Blit(0, 0, w, h, context, l, t) # start of inserted code pos=wx.GetMousePosition() (cw,ch)=memory.GetTextExtent('x') memory.DrawText('x',pos.x-cw/2, pos.y-ch/2) # end of inserted code memory.SelectObject(wx.NullBitmap) ... However, because of the delay (around 1 second) it's inconvenient to use it for pointing and clicking items if you only look at the reader screen. I'm thinking about adding a mouse cursor in the HTML page and quicker updates of its position, independent of screen image updates (new positions could be retrieved with AJAX requests). |
06-18-2012, 08:24 PM | #59 |
Junior Member
Posts: 4
Karma: 20
Join Date: May 2012
Device: Amazon Kindle
|
:D
Thanks for the thought Geekmaster, but I'm equally new to C, so I'll stick to python for now.
Fantastic W126 - didn't realise getting the mouse pos was that easy! I like the idea of speeding up the mouse refresh rate, that makes a lot of sense. Originally, I was planning to pan the screen around with the mouse. I know this will be incompatible with your idea, but for those wanting a bigger desktop, here's the code to insert... Code:
memory.SelectObject(bitmap) # beginning of inserted code offsetx=0 offsety=0 pos=wx.GetMousePosition() if pos.x>w/2: offsetx+=pos.x-w/2 if pos.x>screenw-w/2: offsetx=screenw-w if pos.y>h/2: offsety+=pos.y-h/2 if pos.y>screenh-h/2: offsety=screenh-h memory.Blit(0, 0, w, h, context, offsetx, offsety) (cw,ch)=memory.GetTextExtent('>X<') memory.DrawText('>X<',(pos.x-cw/2)-offsetx, (pos.y-ch/2)-offsety) # end of inserted code memory.SelectObject(wx.NullBitmap) Code:
w,h=(706,600) # beginning of inserted code # your actual monitor resolution screenw,screenh=(1280,720) # end of inserted code #width and height of capture region Nice! |
07-20-2012, 04:27 PM | #60 |
Amateur Radio Extra Class
Posts: 4
Karma: 494132
Join Date: Jul 2012
Location: Missouri, US
Device: Kindle Keyboard Wi-Fi
|
Could somebody please edit the code to make it show the image in color?
|