[Mplayerplug-in-cvs] mplayerplug-in/Source plugin-setup.h,1.24,1.25 plugin-support.cpp,1.21,1.22 plu
Brought to you by:
kdekorte
From: Kevin D. <kde...@us...> - 2004-03-18 23:13:06
|
Update of /cvsroot/mplayerplug-in/mplayerplug-in/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32575/Source Modified Files: plugin-setup.h plugin-support.cpp plugin-threads.cpp plugin.cpp plugin.h Log Message: Index: plugin-support.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-support.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** plugin-support.cpp 18 Mar 2004 20:17:53 -0000 1.21 --- plugin-support.cpp 18 Mar 2004 23:03:24 -0000 1.22 *************** *** 2,5 **** --- 2,6 ---- #include <strings.h> #include <errno.h> + #include <sys/wait.h> extern int errno; *************** *** 287,291 **** // the player thread is not running, it is safe to call without locking ! void sendCommand(nsPluginInstance * instance, char *command) { int retval; --- 288,292 ---- // the player thread is not running, it is safe to call without locking ! int sendCommand(nsPluginInstance * instance, char *command) { int retval; *************** *** 304,310 **** if (retval < (int) strlen(buffer)) { printf("*****sendCommand Truncated*****\n"); } - } } --- 305,312 ---- if (retval < (int) strlen(buffer)) { printf("*****sendCommand Truncated*****\n"); + return 0; } } + return -1; } *************** *** 321,324 **** --- 323,327 ---- instance->js_state = JS_STATE_UNDEFINED; //FIXME + status = 0; instance->threadsetup = 0; printf("Done\n"); *************** *** 373,376 **** --- 376,381 ---- instance->player = NULL; } + + wait(&status); } Index: plugin.h =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** plugin.h 17 Mar 2004 16:40:54 -0000 1.27 --- plugin.h 18 Mar 2004 23:03:24 -0000 1.28 *************** *** 115,118 **** --- 115,119 ---- int hrefrequested; int threadsetup; + int threadlaunched; int threadsignaled; int player_thread_cancelled; Index: plugin-threads.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-threads.cpp,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** plugin-threads.cpp 18 Mar 2004 20:17:53 -0000 1.65 --- plugin-threads.cpp 18 Mar 2004 23:03:24 -0000 1.66 *************** *** 78,86 **** void launchPlayerThread(nsPluginInstance * instance) { ! if (DEBUG) printf("In launchPlayerThread, state = %d\n", instance->state); ! if (instance->js_state == JS_STATE_UNDEFINED) { --- 78,88 ---- void launchPlayerThread(nsPluginInstance * instance) { ! void *thread_return; ! if (DEBUG) printf("In launchPlayerThread, state = %d\n", instance->state); ! if (instance->threadlaunched == 1) ! pthread_join(instance->player_thread, &thread_return); if (instance->js_state == JS_STATE_UNDEFINED) { *************** *** 90,93 **** --- 92,96 ---- (void *) (instance->td)); instance->js_state = JS_STATE_INITIALIZING; + instance->threadlaunched = 1; instance->threadsignaled = 0; } else { Index: plugin-setup.h =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-setup.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** plugin-setup.h 18 Mar 2004 20:17:53 -0000 1.24 --- plugin-setup.h 18 Mar 2004 23:03:24 -0000 1.25 *************** *** 127,131 **** char *getURLFilename(char *url); int isMms(char *url); ! void sendCommand(nsPluginInstance * instance, char *command); int URLcmp(const char *url1, const char *url2); extern void remove_quotes(char *url); --- 127,131 ---- char *getURLFilename(char *url); int isMms(char *url); ! int sendCommand(nsPluginInstance * instance, char *command); int URLcmp(const char *url1, const char *url2); extern void remove_quotes(char *url); Index: plugin.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin.cpp,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** plugin.cpp 18 Mar 2004 13:28:01 -0000 1.67 --- plugin.cpp 18 Mar 2004 23:03:24 -0000 1.68 *************** *** 152,155 **** --- 152,156 ---- hrefrequested = 0; threadsetup = 0; + threadlaunched = 0; threadsignaled = 0; player_thread_cancelled = FALSE; |