gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] plugin debugging


From: Russ Nelson
Subject: Re: [Gnash-dev] plugin debugging
Date: Sat, 18 Oct 2008 22:00:22 -0400

Russ Nelson writes:
 > Hmmm....  I'm wondering if we ought to have the plugin write a shell
 > script to /tmp/gnash-plugin.sh which runs gnash -vv and the rest of
 > the parameters in a standalone environment.

Like this.  The shell script is a little primitive in that it doesn't
capture the output, but that's solvable.  It also works poorly on a
page that contains multiple .swf files.  That could be resolved by
writing round-robin to a set of .swf files.  I'm also missing
something passed in to gnash by youtube, because it doesn't work for
youtube.  (or else YouTube has multiple .swfs).

=== modified file 'plugin/plugin.cpp'
--- plugin/plugin.cpp   2008-10-10 14:21:55 +0000
+++ plugin/plugin.cpp   2008-10-19 01:49:29 +0000
@@ -1057,11 +1057,17 @@
        const size_t maxargc = 18 + paramvalues.size() * 2;
        const char **argv = new const char *[maxargc];
 
+       ofstream fout;
+       fout.open("/tmp/gnash.debug.sh", ios::out | ios::trunc);
+       fout << "#/bin/sh" << endl;
+
        size_t argc = 0;
        argv[argc++] = procname.c_str();
+       fout << procname << " ";
        
        // Don't force verbosity, use configuration for that
        //argv[argc++] = "-v";
+       fout << "-vv ";
        
        // X window ID (necessary for gnash to function as a plugin)
        argv[argc++] = "-x";
@@ -1072,6 +1078,7 @@
        argv[argc++] = width;
        argv[argc++] = "-k";
        argv[argc++] = height;
+       fout << "-j " << width << " -k " << height << " ";
        
        // Url of the root movie
        argv[argc++] = "-u";
@@ -1100,9 +1107,12 @@
 
        argv[argc++] = "-";
        argv[argc++] = 0;
+       fout << _swf_url << " ";
 
        assert(argc <= maxargc);
 
+       fout << endl;
+       fout.close();
        /*
          Argument List prepared, now fork(), close file descriptors and execv()
         */

-- 
--my blog is at    http://blog.russnelson.com   | Unregulation is a slippery
Crynwr sells support for free software  | PGPok | slope to prosperity and
521 Pleasant Valley Rd. | +1 315-323-1241       | freedom.
Potsdam, NY 13676-3213  |     Sheepdog          | 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]