Update of /cvsroot/openvrml/openvrml/src/openvrml-gtkplug
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23362/src/openvrml-gtkplug
Modified Files:
main.cpp
Log Message:
While the Mozilla plug-in needs to be able to send an initial stream to openvrml-gtkplug, it seems likely that most clients will want to start openvrml-gtkplug without having it expect an initial stream. Added --initial-stream argument to openvrml-gtkplug to enable the old default behavior.
Index: main.cpp
===================================================================
RCS file: /cvsroot/openvrml/openvrml/src/openvrml-gtkplug/main.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** main.cpp 28 Nov 2006 06:12:44 -0000 1.4
--- main.cpp 30 Nov 2006 06:47:43 -0000 1.5
***************
*** 168,172 ****
namespace {
! gboolean version;
gchar ** args;
--- 168,172 ----
namespace {
! gboolean version, initial_stream;
gchar ** args;
***************
*** 182,185 ****
--- 182,194 ----
},
{
+ "initial-stream",
+ 'i',
+ 0,
+ G_OPTION_ARG_NONE,
+ &initial_stream,
+ "Expect an initial stream",
+ 0
+ },
+ {
G_OPTION_REMAINING,
'\0',
***************
*** 370,382 ****
command_channel_loop(*command_main);
threads.create_thread(command_channel_loop_func);
!
! shared_ptr<plugin_streambuf> initial_stream(
! new plugin_streambuf(initial_stream_uri));
! uninitialized_plugin_streambuf_map_.insert(initial_stream_uri,
! initial_stream);
! function0<void> initial_stream_reader_func =
! initial_stream_reader(initial_stream,
! *GTK_VRML_BROWSER(vrml_browser));
! threads.create_thread(initial_stream_reader_func);
function0<void> read_commands = command_istream_reader(command_in);
--- 379,393 ----
command_channel_loop(*command_main);
threads.create_thread(command_channel_loop_func);
!
! if (::initial_stream) {
! const shared_ptr<plugin_streambuf> initial_stream(
! new plugin_streambuf(::initial_stream_uri));
! uninitialized_plugin_streambuf_map_.insert(::initial_stream_uri,
! initial_stream);
! const function0<void> initial_stream_reader_func =
! initial_stream_reader(initial_stream,
! *GTK_VRML_BROWSER(vrml_browser));
! threads.create_thread(initial_stream_reader_func);
! }
function0<void> read_commands = command_istream_reader(command_in);
|