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

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-20-2012, 06:32 PM   #1
baf
Addict
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 332
Karma: 1346560
Join Date: May 2012
Device: kt
GNU Gnash – Flash player for Kindle Touch

I ported GNU Gnash for Kindle Touch. There is Flash player and browser plugin in the package.
The browser plugin currently works only with custom browsers, as my port of SkipStone. When I first tried it, it worked also in native Kindle browser, but later on I introduced many changes and somehow I lost support for built-in browser. I hope I will manage to get back to this functionality. However compilation of this package takes a lot of time and there are plenty of different configuration options… And I am lost now Maybe someone will find out anything.
Browser plugin is enabled or disabled from GUI Launcher. A script just creates or deletes a soft link from plugin in extensions folder to /tmp/root/.mozilla/plugins folder.
According to Gnash developers it supports most SWF v7 features and some SWF v8 and v9. SWF v10 is not supported. There are also some limitations of the port. Kindle's system resources are very limited. There are often problems with sound. Shortly speaking it is very experimental support.
Anyway have fun!

Package for GUI Launcher is available on my webpage.

Edit: Using gnash browser plugin is recommened only for developers or experienced users. Flash intensive sites may hang or restart your Kindle, as reported by cscat.
Attached Thumbnails
Click image for larger version

Name:	screenshot1.gif
Views:	206
Size:	9.7 KB
ID:	94557   Click image for larger version

Name:	screenshot2.gif
Views:	193
Size:	5.0 KB
ID:	94558  
Attached Files
File Type: zip gnash-0.2.zip (8.16 MB, 123 views)

Last edited by twobob; 08-22-2013 at 08:27 AM.
baf is offline   Reply With Quote
Old 10-21-2012, 07:55 AM   #2
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Hi mate. tested it immediately.

Can't say I got it working yet. (It launches but doesn't load anything, either natively or in the browser..) but I'll carry on having a play.

Thanks for all your hard work anyway. much appreciated.

EDIT: AH!

EXTENSIONDIR=/mnt/us/extensions/gnash
PLUGINSDIR=/home/root/.mozilla/plugins

(or $HOME/.mozilla/plugins ?)

not

EXTENSIONDIR=/mnt/us/extensions/gnash
PLUGINSDIR=/tmp/home/.mozilla/plugins

for me mate

Thanks

EDIT:

Okay, so I think there are two issues at play

a) if the avail mem drops below a critical level the system restarts (I read that in either rc.lua or an upstart script)

I'll have a look around for that setting again at some point.

b) the cpu is topping out on really tough tasks (like youtube say) - I am thinking that perhaps the watchdog is not getting serviced. that's a guess, which also would cause a reboot.

However the type of reboot occurs makes me suspect it is issue a) but again that is a guess.

Great work on this. can't say I found it to work "natively" yet.

but skipstone does a decent job on some sites. Definitely at the edge of it's (the touches) abilities great stuff!

EDIT:

Running the player natively simply fails to open files. I'll strace it, probably a path issue or something. : )

Last edited by twobob; 10-21-2012 at 09:38 AM. Reason: /.mozilla/plugins location
twobob is offline   Reply With Quote
Old 10-21-2012, 12:47 PM   #3
baf
Addict
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 332
Karma: 1346560
Join Date: May 2012
Device: kt
Quote:
Originally Posted by twobob View Post
Running the player natively simply fails to open files. I'll strace it, probably a path issue or something. : )
I admit I didn't test the app thoroughly, but I didn't expect that:

gnash-0.8.10/gui/gtk/gtk.cpp
Code:
openFile(GtkWidget *widget, gpointer /* user_data */)
{
#if 0
    // We'll need this when implementing file opening.
    GtkGui* gui = static_cast<GtkGui*>(user_data);
#endif

#if GTK_CHECK_VERSION(2,4,0)
    char* filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
#else
    GtkWidget* file_selector = gtk_widget_get_ancestor(widget,
                                 g_type_from_name("GtkFileSelection"));

    GtkFileSelection* filesel = GTK_FILE_SELECTION (file_selector);
    const char* filename = gtk_file_selection_get_filename (filesel);
#endif

    // FIXME: we want to do something like calling gtk_main_quit here, so
    // run() will return. If run() is then changed to return a pointer to the
    // next file to be played, then the Player class can play the next file,
    // unless run() returns NULL.
    log_error(_("Attempting to open file %s.\n"
               "NOTE: the file open functionality is not yet implemented!"),
               filename);

#if GTK_CHECK_VERSION(2,4,0)
    g_free(filename);
#endif
}


So, for now only opening files from command line works.

Last edited by baf; 10-21-2012 at 12:51 PM.
baf is offline   Reply With Quote
Old 10-21-2012, 01:47 PM   #4
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by baf View Post
I admit I didn't test the app thoroughly, but I didn't expect that:

gnash-0.8.10/gui/gtk/gtk.cpp

Blah



So, for now only opening files from command line works.

Hey no worries. That's what you have testers for. happy to help.

Once I figure out the command line I'll post it

cd /mnt/us/extensions/gnash/
[root@kindle gnash]# bin/gtk-gnash /mnt/us/clock1.swf

Last edited by twobob; 10-21-2012 at 01:49 PM. Reason: blah [root@kindle gnash]# bin/gtk-gnash /mnt/us/clock1.swf
twobob is offline   Reply With Quote
Old 10-21-2012, 01:51 PM   #5
baf
Addict
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 332
Karma: 1346560
Join Date: May 2012
Device: kt
Quote:
Originally Posted by twobob View Post
bin/gtk-gnash /mnt/us/clock1.swf
Yes, full usage:
Spoiler:
[root@kindle bin]# ./gtk-gnash-bin
Error: no input file was specified. Exiting.
Usage: gnash [options] movie_file.swf
Plays a SWF (Shockwave Flash) movie
Options:
-h [ --help ] Print this help and exit
-V [ --version ] Print version information and exit
-s [ --scale ] arg Scale the movie by the specified factor
-d [ --delay ] arg Number of milliseconds to delay in main loop
-A [ --audio-dump ] arg Audio dump file (wave format)
--hwaccel arg (=none) Hardware Video Accelerator to use
none|vaapi
-x [ --xid ] arg X11 Window ID for display
-j [ --width ] arg Set window width
-k [ --height ] arg Set window height
-X [ --x-pos ] arg Set window x position
-Y [ --y-pos ] arg Set window y position
-1 [ --once ] Exit when/if movie reaches the last frame
-r [ --render-mode ] arg (=3) 0 disable rendering and sound
1 enable rendering, disable sound
2 enable sound, disable rendering
3 enable rendering and sound
-M [ --media ] arg (=ffmpeg) The media handler to use
ffmpeg
-R [ --renderer ] arg (=cairo) The renderer to use
cairo
-t [ --timeout ] arg Exit after the specified number of seconds
-u [ --real-url ] arg Set "real" URL of the movie
-U [ --base-url ] arg Set "base" URL for resolving relative URLs
-P [ --param ] arg Set parameter (e.g. "FlashVars=A=1&b=2")
-F [ --fd ] arg Filedescriptor to use for external
communications <fd>:<fd>
--max-advances arg Exit after specified number of frame advances
--fullscreen Start in fullscreen mode
--hide-menubar Start without displaying the menu bar
--screenshot arg List of frames to save as screenshots
--screenshot-file arg Filename pattern for screenshot images
--screenshot-quality arg Quality for screenshot output (not all
formats)
--input-file arg Input files

Debugging options:
-v [ --verbose ] Produce verbose output
-w [ --writelog ] Produce the disk based debug log
-a [ --verbose-actions ] Be (very) verbose about action execution
-p [ --verbose-parsing ] Be (very) verbose about parsing

Keys:
CTRL-Q, CTRL-W Quit
CTRL-F Toggle fullscreen
CTRL-P Toggle pause
CTRL-R Restart the movie
CTRL-O Take a screenshot
CTRL-L Force immediate redraw
baf is offline   Reply With Quote
Old 10-21-2012, 03:49 PM   #6
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Excellent mate. Really. having fun with this.

FOR SURE need to weld in the Geekmaster ordered dithering code into this somewhere.

I tested a stupidly complicated movie through it and the ONLY thing that let it down was the underlying graphics issues (much like proboom) and the occasional ALSA underrun (meh, could look at that one day)

: ) brilliant mate lots of fun.
twobob is offline   Reply With Quote
Old 10-21-2012, 05:11 PM   #7
baf
Addict
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 332
Karma: 1346560
Join Date: May 2012
Device: kt
Gnash 0.2

I fixed not working "File->Open" dialog in player.
New version on my webpage.
baf is offline   Reply With Quote
Old 10-21-2012, 05:24 PM   #8
baf
Addict
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 332
Karma: 1346560
Join Date: May 2012
Device: kt
Quote:
Originally Posted by twobob View Post
Excellent mate. Really. having fun with this.

FOR SURE need to weld in the Geekmaster ordered dithering code into this somewhere.
If you have time try to build it yourself. There are lots of possibilities.
I definitely didn't try all of them.
I tested three renderer types: cairo, opengl and agg. Cairo seems to work better then opengl. And agg doesn't work at all with kindle pixelformat. Opengl still may be build in several manners, so there is still space for new discoveries.

For media handling I tried gstreamer and ffmpeg. Efficiency seems comparable with ffmpeg supporting wider range of formats.

Sound is handled by sdl.

You can also build it with framebuffer or sdl gui.

Last edited by baf; 10-22-2012 at 04:55 AM.
baf is offline   Reply With Quote
Old 10-22-2012, 01:39 PM   #9
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by baf View Post
If you have time try to build it yourself. There are lots of possibilities.
I definitely didn't try all of them.
I tested three renderer types: cairo, opengl and agg. Cairo seems to work better then opengl. And agg doesn't work at all with kindle pixelformat. Opengl still may be build in several manners, so there is still space for new discoveries.

For media handling I tried gstreamer and ffmpeg. Efficiency seems comparable with ffmpeg supporting wider range of formats.

Sound is handled by sdl.

You can also build it with framebuffer or sdl gui.
Right. I see.

Thanks for this info I DEFINITELY want to push this into buildroot. for certain. so any config files and source code diffs are of course always a huge advantage (as I have to patch the makes sometimes)

Thanks for the excellent info.
twobob is offline   Reply With Quote
Old 10-22-2012, 05:31 PM   #10
baf
Addict
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 332
Karma: 1346560
Join Date: May 2012
Device: kt
Quote:
Originally Posted by twobob View Post
Right. I see.

Thanks for this info I DEFINITELY want to push this into buildroot. for certain. so any config files and source code diffs are of course always a huge advantage (as I have to patch the makes sometimes)

Thanks for the excellent info.
I didn't make any important changes to gnash. Browser plugin will work without any patches. I only made small changes to gtk-gui. I will publish patches on my site of course.
baf is offline   Reply With Quote
Old 10-22-2012, 07:59 PM   #11
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by baf View Post
I didn't make any important changes to gnash. Browser plugin will work without any patches. I only made small changes to gtk-gui. I will publish patches on my site of course.
thanks. I noted the layout was a nice fit for the settings. I assuming that was your doing.

Yes I will play with a few targets.
Convinced that the ordered dither solution (or at least 2 bit color of some type) is the solution for the movies (and the games) - perhaps one day I will get it done.
FYI the audio dropouts via SDL are not limited to gnash - it's an SDL thing.

Thanks for sharing. it's appreciated.
twobob is offline   Reply With Quote
Old 10-22-2012, 10:15 PM   #12
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
you pushing your fixes up to
http://savannah.gnu.org/projects/gnash/
baf?

nice work by the way. many thanks
twobob is offline   Reply With Quote
Old 10-23-2012, 04:34 AM   #13
baf
Addict
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 332
Karma: 1346560
Join Date: May 2012
Device: kt
Quote:
Originally Posted by twobob View Post
you pushing your fixes up to
http://savannah.gnu.org/projects/gnash/
No, these are Kindle-specific hacks.
baf is offline   Reply With Quote
Old 10-23-2012, 05:12 AM   #14
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by baf View Post
No, these are Kindle-specific hacks.
got you. I'll dig around in the source diffs as and when then mate. cheers
twobob is offline   Reply With Quote
Old 10-23-2012, 01:32 PM   #15
icantbebothered
Penguin
icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.
 
icantbebothered's Avatar
 
Posts: 1,017
Karma: 4742434
Join Date: Jul 2012
Device: Kindle Touch 5.3.2.1
OMG I think baf is god
icantbebothered is offline   Reply With Quote
Reply

Tags
browser, flash, gui launcher, kindle touch, launcher add-ons

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash Player kedar Android Developer's Corner 0 10-02-2012 03:21 PM
flash my Kindle Touch using windows, how? ldai Kindle Developer's Corner 1 03-23-2012 05:08 PM
There is an updated Flash Player available kennyc Android Devices 12 04-29-2011 05:17 AM
iLiad Project: Flash Player!!! King Mook Mook iRex Developer's Corner 1 01-02-2008 07:56 AM


All times are GMT -4. The time now is 04:07 AM.


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