Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
You can subscribe to this list here.
2003 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(19) |
Feb
(86) |
Mar
(186) |
Apr
(60) |
May
(12) |
Jun
(30) |
Jul
(16) |
Aug
(19) |
Sep
(33) |
Oct
(17) |
Nov
(26) |
Dec
(32) |
2005 |
Jan
(39) |
Feb
(15) |
Mar
(9) |
Apr
(11) |
May
(14) |
Jun
(24) |
Jul
(79) |
Aug
(69) |
Sep
(22) |
Oct
(76) |
Nov
(40) |
Dec
(15) |
2006 |
Jan
(73) |
Feb
(61) |
Mar
(29) |
Apr
(26) |
May
(19) |
Jun
(30) |
Jul
(16) |
Aug
(38) |
Sep
(32) |
Oct
(29) |
Nov
(23) |
Dec
(20) |
2007 |
Jan
(19) |
Feb
(13) |
Mar
(10) |
Apr
(2) |
May
(9) |
Jun
(7) |
Jul
(4) |
Aug
(18) |
Sep
(5) |
Oct
(6) |
Nov
(10) |
Dec
(21) |
2008 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(10) |
Jun
(7) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2009 |
Jan
|
Feb
(3) |
Mar
|
Apr
(3) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1
|
2
|
3
|
4
|
5
(3) |
6
|
7
(2) |
8
|
9
(2) |
10
(1) |
11
|
12
(6) |
13
(7) |
14
(6) |
15
|
16
(2) |
17
(2) |
18
(2) |
19
(4) |
20
(8) |
21
(4) |
22
|
23
(2) |
24
(7) |
25
(13) |
26
(1) |
27
(8) |
28
|
29
(6) |
|
|
|
|
|
|
Update of /cvsroot/mplayerplug-in/mplayerplug-in/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3476/Source Modified Files: nsScriptablePeer.h plugin-list.cpp plugin-setup.cpp plugin-setup.h plugin-threads.cpp plugin-ui.cpp plugin.cpp plugin.h Log Message: New button creation method Index: nsScriptablePeer.h =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/nsScriptablePeer.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** nsScriptablePeer.h 25 Feb 2004 04:14:40 -0000 1.7 --- nsScriptablePeer.h 29 Feb 2004 22:03:15 -0000 1.8 *************** *** 60,65 **** *aFlags = nsIClassInfo::PLUGIN_OBJECT | nsIClassInfo::DOM_OBJECT; return NS_OK; ! } NS_IMETHOD GetImplementationLanguage(PRUint32 * ! aImplementationLanguage) { *aImplementationLanguage = nsIProgrammingLanguage::CPLUSPLUS; return NS_OK; --- 60,66 ---- *aFlags = nsIClassInfo::PLUGIN_OBJECT | nsIClassInfo::DOM_OBJECT; return NS_OK; ! } ! NS_IMETHOD GetImplementationLanguage(PRUint32 * ! aImplementationLanguage) { *aImplementationLanguage = nsIProgrammingLanguage::CPLUSPLUS; return NS_OK; Index: plugin-list.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-list.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** plugin-list.cpp 27 Feb 2004 16:40:58 -0000 1.12 --- plugin-list.cpp 29 Feb 2004 22:03:15 -0000 1.13 *************** *** 64,68 **** { if (src != NULL && dest != NULL) { ! if (dest->url != NULL && src->url != NULL) strlcpy(dest->url, src->url, sizeof(dest->url)); if (dest->fname != NULL && src->fname != NULL) --- 64,68 ---- { if (src != NULL && dest != NULL) { ! if (dest->url != NULL && src->url != NULL) strlcpy(dest->url, src->url, sizeof(dest->url)); if (dest->fname != NULL && src->fname != NULL) *************** *** 82,149 **** void insert_area(Node * parent, char *tagtarget, char *tagurl, int tagtime) { ! area *runner; ! area *n = (area *) NPN_MemAlloc(sizeof(area)); ! ! strcpy(n->url, tagurl); ! strcpy(n->target, tagtarget); ! n->begin = tagtime; ! n->next = NULL; ! while( parent->next != NULL ) ! parent=parent->next; ! ! if( parent->area == NULL ){ ! parent->area = n; ! return; ! } ! runner = parent->area; ! ! while( runner->next != NULL ) ! runner = runner->next; ! ! runner->next = n; } ! void find_area_tags( const char *smilbuffer, Node *parent ) { ! char *startarea; ! char *endvideo; ! char *start; ! int tagtime=0; ! char tagtarget[128]; ! char tagurl[1024]; ! endvideo = strstr( smilbuffer, "</video"); ! startarea = strstr( smilbuffer, "<area" ); ! ! while ( startarea && startarea < endvideo ){ ! start = strstr( startarea + 5, "begin=" ); ! if( start ){ ! start += 6; ! if (*start=='"') ! ++start; ! tagtime = atoi(start); ! } ! start = strstr( startarea + 5, "target=" ); ! if( start ){ ! start += 7; ! if (*start=='"') ! ++start; ! sscanf( start, "%127[^\" \t]", tagtarget ); ! } ! start = strstr( startarea + 5, "href=" ); ! if( start ){ ! start += 5; ! if (*start=='"') ! ++start; ! sscanf( start, "%1023[^\" \t]", tagurl ); ! } ! ! insert_area(parent, tagtarget, tagurl, tagtime); ! startarea = strstr( startarea + 5, "<area" ); } ! } --- 82,149 ---- void insert_area(Node * parent, char *tagtarget, char *tagurl, int tagtime) { ! area *runner; ! area *n = (area *) NPN_MemAlloc(sizeof(area)); ! strcpy(n->url, tagurl); ! strcpy(n->target, tagtarget); ! n->begin = tagtime; ! n->next = NULL; ! while (parent->next != NULL) ! parent = parent->next; ! ! if (parent->area == NULL) { ! parent->area = n; ! return; ! } ! ! runner = parent->area; ! ! while (runner->next != NULL) ! runner = runner->next; ! ! runner->next = n; } ! void find_area_tags(const char *smilbuffer, Node * parent) { ! char *startarea; ! char *endvideo; ! char *start; ! int tagtime = 0; ! char tagtarget[128]; ! char tagurl[1024]; ! endvideo = strstr(smilbuffer, "</video"); ! startarea = strstr(smilbuffer, "<area"); ! ! while (startarea && startarea < endvideo) { ! start = strstr(startarea + 5, "begin="); ! if (start) { ! start += 6; ! if (*start == '"') ! ++start; ! tagtime = atoi(start); } ! start = strstr(startarea + 5, "target="); ! if (start) { ! start += 7; ! if (*start == '"') ! ++start; ! sscanf(start, "%127[^\" \t]", tagtarget); ! } ! start = strstr(startarea + 5, "href="); ! if (start) { ! start += 5; ! if (*start == '"') ! ++start; ! sscanf(start, "%1023[^\" \t]", tagurl); ! } ! ! insert_area(parent, tagtarget, tagurl, tagtime); ! startarea = strstr(startarea + 5, "<area"); ! } ! } *************** *** 295,299 **** n->mmsstream = 1; } ! } --- 295,299 ---- n->mmsstream = 1; } ! } *************** *** 424,428 **** } // smil format detection ! snprintf((char *) buffer_lower, sizeof(buffer_lower), "%s", buffer); lowercase((char *) buffer_lower); p = buffer_lower; --- 424,429 ---- } // smil format detection ! snprintf((char *) buffer_lower, sizeof(buffer_lower), "%s", ! buffer); lowercase((char *) buffer_lower); p = buffer_lower; *************** *** 484,489 **** found = 1; } ! find_area_tags( videosrc, instance->td->list ); ! videotag = (char *) memmem(videosrc, remainder, "<video", --- 485,490 ---- found = 1; } ! find_area_tags(videosrc, instance->td->list); ! videotag = (char *) memmem(videosrc, remainder, "<video", Index: plugin-setup.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-setup.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** plugin-setup.cpp 25 Feb 2004 20:13:42 -0000 1.10 --- plugin-setup.cpp 29 Feb 2004 22:03:15 -0000 1.11 *************** *** 227,231 **** strlcat(MimeTypes, "video/vnd.vivo:viv,vivo:VivoActive;", sizeof(MimeTypes)); ! // SMIL strlcat(MimeTypes, "application/smil:smil:SMIL;", --- 227,231 ---- strlcat(MimeTypes, "video/vnd.vivo:viv,vivo:VivoActive;", sizeof(MimeTypes)); ! // SMIL strlcat(MimeTypes, "application/smil:smil:SMIL;", *************** *** 249,253 **** config = NULL; DEBUG = 1; ! if (config == NULL) { snprintf(buffer, 1000, "%s", getenv("HOME")); --- 249,253 ---- config = NULL; DEBUG = 1; ! if (config == NULL) { snprintf(buffer, 1000, "%s", getenv("HOME")); *************** *** 342,346 **** err = NPERR_GENERIC_ERROR; } ! DEBUG = 0; return err; --- 342,346 ---- err = NPERR_GENERIC_ERROR; } ! DEBUG = 0; return err; Index: plugin-setup.h =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-setup.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** plugin-setup.h 29 Feb 2004 21:17:55 -0000 1.11 --- plugin-setup.h 29 Feb 2004 22:03:15 -0000 1.12 *************** *** 60,67 **** #define STRUCTURES typedef struct area { ! char url[1024]; /* url in smil <area> tag */ ! char target[128]; /* target in <area> */ ! int begin; /* begin (seconds) */ ! struct area *next; /* this is linked list */ } area; --- 60,67 ---- #define STRUCTURES typedef struct area { ! char url[1024]; /* url in smil <area> tag */ ! char target[128]; /* target in <area> */ ! int begin; /* begin (seconds) */ ! struct area *next; /* this is linked list */ } area; *************** *** 146,151 **** XtPointer call_data); #ifdef GTK_ENABLED ! gboolean gtkwin_expose(GtkWidget * widget, GdkEventExpose * event, ! nsPluginInstance * instance); gboolean gtkgui_message(void *data); gboolean gtkgui_progress(void *data); --- 146,150 ---- XtPointer call_data); #ifdef GTK_ENABLED ! gboolean gtkgui_draw(void *data); gboolean gtkgui_message(void *data); gboolean gtkgui_progress(void *data); Index: plugin-threads.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-threads.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** plugin-threads.cpp 29 Feb 2004 21:30:51 -0000 1.25 --- plugin-threads.cpp 29 Feb 2004 22:03:15 -0000 1.26 *************** *** 65,73 **** #endif if (instance->td->list == NULL) { ! pthread_mutex_lock(&(instance->playlist_mutex)); ! instance->td->list = newNode(); ! pthread_mutex_unlock(&(instance->playlist_mutex)); } ! if (instance->href) { snprintf(instance->td->list->url, 1024, "%s", instance->href); --- 65,73 ---- #endif if (instance->td->list == NULL) { ! pthread_mutex_lock(&(instance->playlist_mutex)); ! instance->td->list = newNode(); ! pthread_mutex_unlock(&(instance->playlist_mutex)); } ! if (instance->href) { snprintf(instance->td->list->url, 1024, "%s", instance->href); *************** *** 143,152 **** #endif #ifdef GTK_ENABLED ! instance->drawing_area = gtk_drawing_area_new(); ! gtk_fixed_put(GTK_FIXED(instance->fixed_container), instance->drawing_area, ! 0, 0); ! gtk_widget_show(instance->drawing_area); ! instance->player_window = GDK_WINDOW_XWINDOW(instance->drawing_area->window); ! #endif snprintf(instance->td->argv[i++], 1024, "0x%x", (int) instance->player_window); --- 143,153 ---- #endif #ifdef GTK_ENABLED ! instance->drawing_area = gtk_drawing_area_new(); ! gtk_fixed_put(GTK_FIXED(instance->fixed_container), ! instance->drawing_area, 0, 0); ! gtk_widget_show(instance->drawing_area); ! instance->player_window = ! GDK_WINDOW_XWINDOW(instance->drawing_area->window); ! #endif snprintf(instance->td->argv[i++], 1024, "0x%x", (int) instance->player_window); *************** *** 254,300 **** } ! void refresh_frame( char *buffer, _ThreadData *td, Node *node ) { ! int seconds; ! static int oldseconds = -1; ! char *start; ! char *endptr; ! area *runner; #ifdef SMILDEBUG ! static FILE *error = NULL; ! char errortmp[64]; ! if (!error) ! error = fopen("/tmp/mplayerplugin-smil.log", "a"); #endif ! /* just to be sure */ ! if( node == NULL || node->area == NULL ) ! return; ! start = buffer; ! while( (start = strstr(start, "A:")) != NULL && strlen(start)>7 ){ ! start += 2; ! seconds = (int)strtol( start, &endptr, 0 ); ! if (seconds == oldseconds || start == endptr) ! continue; #ifdef SMILDEBUG ! strncpy(errortmp, start, 63); ! errortmp[64] = 0; ! fprintf(error, "->seconds: %d, oldseconds: %d, buffer: '%s'\n", ! seconds, oldseconds, errortmp ); ! fflush(error); #endif ! runner = node->area; ! while( runner ){ ! if(runner->begin == seconds){ ! NPN_GetURL( td->instance->mInstance, ! runner->url, ! runner->target ); ! break; ! } ! runner = runner->next; ! } ! oldseconds = seconds; } } --- 255,300 ---- } ! void refresh_frame(char *buffer, _ThreadData * td, Node * node) { ! int seconds; ! static int oldseconds = -1; ! char *start; ! char *endptr; ! area *runner; #ifdef SMILDEBUG ! static FILE *error = NULL; ! char errortmp[64]; ! if (!error) ! error = fopen("/tmp/mplayerplugin-smil.log", "a"); #endif ! /* just to be sure */ ! if (node == NULL || node->area == NULL) ! return; ! start = buffer; ! while ((start = strstr(start, "A:")) != NULL && strlen(start) > 7) { ! start += 2; ! seconds = (int) strtol(start, &endptr, 0); ! if (seconds == oldseconds || start == endptr) ! continue; #ifdef SMILDEBUG ! strncpy(errortmp, start, 63); ! errortmp[64] = 0; ! fprintf(error, "->seconds: %d, oldseconds: %d, buffer: '%s'\n", ! seconds, oldseconds, errortmp); ! fflush(error); #endif ! runner = node->area; ! while (runner) { ! if (runner->begin == seconds) { ! NPN_GetURL(td->instance->mInstance, ! runner->url, runner->target); ! break; ! } ! runner = runner->next; } + oldseconds = seconds; + } } *************** *** 336,341 **** pthread_cond_wait(&(local_td->instance->playlist_complete_cond), &(local_td->instance->playlist_mutex)); ! if (local_td == NULL) return NULL; ! if (local_td->instance == NULL) return NULL; local_td->instance->state = STATE_STARTED_PLAYER; } --- 336,343 ---- pthread_cond_wait(&(local_td->instance->playlist_complete_cond), &(local_td->instance->playlist_mutex)); ! if (local_td == NULL) ! return NULL; ! if (local_td->instance == NULL) ! return NULL; local_td->instance->state = STATE_STARTED_PLAYER; } *************** *** 350,355 **** #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage,1024,"Loading Media..."); ! g_idle_add(gtkgui_message,local_td->instance); #endif --- 352,357 ---- #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage, 1024, "Loading Media..."); ! g_idle_add(gtkgui_message, local_td->instance); #endif *************** *** 358,362 **** if (DEBUG) printf("building command string\n"); ! pthread_mutex_lock(&(local_td->instance->playlist_mutex)); while (strcmp(local_td->argv[i], "") != 0) { --- 360,364 ---- if (DEBUG) printf("building command string\n"); ! pthread_mutex_lock(&(local_td->instance->playlist_mutex)); while (strcmp(local_td->argv[i], "") != 0) { *************** *** 382,386 **** if (DEBUG) { while (local_list != NULL) { ! if (local_list->url == NULL) break; if (DEBUG) printf("PL URL: %s\n", local_list->url); --- 384,389 ---- if (DEBUG) { while (local_list != NULL) { ! if (local_list->url == NULL) ! break; if (DEBUG) printf("PL URL: %s\n", local_list->url); *************** *** 395,399 **** pthread_mutex_unlock(&(local_td->instance->playlist_mutex)); while (copy != NULL) { ! tryagain = 0; argc = base_argc; if (DEBUG) --- 398,402 ---- pthread_mutex_unlock(&(local_td->instance->playlist_mutex)); while (copy != NULL) { ! tryagain = 0; argc = base_argc; if (DEBUG) *************** *** 405,410 **** #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage,1024,message); ! g_idle_add(gtkgui_message,local_td->instance); #endif --- 408,413 ---- #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage, 1024, message); ! g_idle_add(gtkgui_message, local_td->instance); #endif *************** *** 418,424 **** if (copy->playlist == 1) argv[argc++] = strdup("-playlist"); ! if (local_td->instance != NULL) ! local_td->instance->mmsstream = copy->mmsstream; if (copy->mmsstream) { argv[argc++] = copy->url; --- 421,427 ---- if (copy->playlist == 1) argv[argc++] = strdup("-playlist"); ! if (local_td->instance != NULL) ! local_td->instance->mmsstream = copy->mmsstream; if (copy->mmsstream) { argv[argc++] = copy->url; *************** *** 453,457 **** pthread_mutex_unlock(&(local_td->instance->playlist_mutex)); while (argc < 257) ! argv[argc++] = NULL; local_td->instance->player = mypopen(argv, &local_td->instance->pid, --- 456,460 ---- pthread_mutex_unlock(&(local_td->instance->playlist_mutex)); while (argc < 257) ! argv[argc++] = NULL; local_td->instance->player = mypopen(argv, &local_td->instance->pid, *************** *** 461,495 **** if (local_td->instance->player != NULL) { local_td->instance->js_state = JS_STATE_PLAYING; ! while ( !feof(local_td->instance->player)) { ! if (DESTROYED) break; if (local_td != NULL) { ! if (local_td->instance != NULL) { ! if (local_td->instance->control == NULL) { ! local_list->cancelled = 1; ! break; } ! if (local_td->instance->player == NULL) { ! local_list->cancelled = 1; ! break; } ! } else { break; ! } } else { ! break; } ! ! if (DESTROYED) break; ! if (fgets(buffer, sizeof(buffer),local_td->instance->player) == NULL) { continue; } ! ! if (DESTROYED) break; if (DEBUG) { printf("READ: %s \n", buffer); } ! ! refresh_frame( buffer, local_td, local_list ); ! if (strstr(buffer, "Cache fill:") != NULL) { strlcpy(message, strstr(buffer, "Cache fill"), --- 464,503 ---- if (local_td->instance->player != NULL) { local_td->instance->js_state = JS_STATE_PLAYING; ! while (!feof(local_td->instance->player)) { ! if (DESTROYED) ! break; if (local_td != NULL) { ! if (local_td->instance != NULL) { ! if (local_td->instance->control == NULL) { ! local_list->cancelled = 1; ! break; } ! if (local_td->instance->player == NULL) { ! local_list->cancelled = 1; ! break; } ! } else { break; ! } } else { ! break; } ! ! if (DESTROYED) ! break; ! if (fgets ! (buffer, sizeof(buffer), ! local_td->instance->player) == NULL) { continue; } ! ! if (DESTROYED) ! break; if (DEBUG) { printf("READ: %s \n", buffer); } ! ! refresh_frame(buffer, local_td, local_list); ! if (strstr(buffer, "Cache fill:") != NULL) { strlcpy(message, strstr(buffer, "Cache fill"), *************** *** 512,521 **** } } ! // Only update the display if there is something worth displaying if (strstr(eos, "Cache fill:") != NULL) { cf = strstr(eos, "Cache fill:"); sscanf(cf, "Cache fill: %i", &cfpercent); ! strlcpy(message, "Buffering ", sizeof(message)); strlcat(message, copy->url, sizeof(message)); --- 520,530 ---- } } ! // Only update the display if there is something worth displaying if (strstr(eos, "Cache fill:") != NULL) { cf = strstr(eos, "Cache fill:"); sscanf(cf, "Cache fill: %i", &cfpercent); ! strlcpy(message, "Buffering ", ! sizeof(message)); strlcat(message, copy->url, sizeof(message)); *************** *** 525,532 **** #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage,1024,message); ! g_idle_add(gtkgui_message,local_td->instance); ! local_td->instance->percent = (cfpercent / 100.0); ! g_idle_add(gtkgui_progress,local_td->instance); #endif } --- 534,544 ---- #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage, 1024, ! message); ! g_idle_add(gtkgui_message, local_td->instance); ! local_td->instance->percent = ! (cfpercent / 100.0); ! g_idle_add(gtkgui_progress, ! local_td->instance); #endif } *************** *** 534,538 **** if (strstr(buffer, "Starting") != NULL) { ! if (DESTROYED) break; strlcpy(message, "Playing ", sizeof(message)); strlcat(message, copy->url, sizeof(message)); --- 546,551 ---- if (strstr(buffer, "Starting") != NULL) { ! if (DESTROYED) ! break; strlcpy(message, "Playing ", sizeof(message)); strlcat(message, copy->url, sizeof(message)); *************** *** 542,547 **** #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage,1024,message); ! g_idle_add(gtkgui_message,local_td->instance); #endif } --- 555,561 ---- #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage, 1024, ! message); ! g_idle_add(gtkgui_message, local_td->instance); #endif } *************** *** 557,583 **** &(local_list->play_y)); if (local_td->instance->mode == NP_EMBED) { ! local_td->instance->panel_height = ! local_td->instance->embed_height - ! local_list->play_y; if (local_td->instance->player_window != 0) { ! #ifdef X_ENABLED XResizeWindow(local_td->instance->display, ! local_td->instance-> ! player_window, ! local_list->play_x, ! local_td->instance-> ! embed_height - ! local_td->instance-> ! panel_height); #endif #ifdef GTK_ENABLED ! local_td->instance->movie_height = local_list->play_y; ! local_td->instance->movie_width = local_list->play_x; ! g_idle_add(gtkgui_resize,local_td->instance); #endif ! } if (DEBUG) --- 571,603 ---- &(local_list->play_y)); if (local_td->instance->mode == NP_EMBED) { ! if (local_td->instance->panel_height == 0) ! local_td->instance->panel_height = ! local_td->instance->embed_height - ! local_list->play_y; if (local_td->instance->player_window != 0) { ! #ifdef X_ENABLED XResizeWindow(local_td->instance->display, ! local_td->instance-> ! player_window, ! local_list->play_x, ! local_td->instance-> ! embed_height - ! local_td->instance-> ! panel_height); #endif #ifdef GTK_ENABLED ! local_td->instance->movie_height = ! local_list->play_y; ! local_td->instance->movie_width = ! local_list->play_x; ! g_idle_add(gtkgui_resize, ! local_td->instance); ! g_idle_add(gtkgui_draw, ! local_td->instance); #endif ! } if (DEBUG) *************** *** 589,600 **** if (strstr(buffer, "Video: no video") != NULL) { ! local_td->instance->panel_height = 32; ! local_td->instance->movie_height = local_list->play_y - 32; ! local_td->instance->movie_width = local_list->play_x; ! g_idle_add(gtkgui_resize,local_td->instance); } if (strstr(buffer, "Connect") != NULL) { ! snprintf(message,1024,"%s",buffer); #ifdef X_ENABLED DrawUI(local_td->instance->widget, --- 609,624 ---- if (strstr(buffer, "Video: no video") != NULL) { ! if (local_td->instance->panel_height == 0) ! local_td->instance->panel_height = 32; ! local_td->instance->movie_height = ! local_list->play_y - 32; ! local_td->instance->movie_width = ! local_list->play_x; ! g_idle_add(gtkgui_resize, local_td->instance); ! g_idle_add(gtkgui_draw, local_td->instance); } if (strstr(buffer, "Connect") != NULL) { ! snprintf(message, 1024, "%s", buffer); #ifdef X_ENABLED DrawUI(local_td->instance->widget, *************** *** 602,610 **** #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage,1024,message); ! g_idle_add(gtkgui_message,local_td->instance); #endif } ! if (strstr(buffer, "Error while decoding") != NULL) { if (DEBUG) --- 626,635 ---- #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage, 1024, ! message); ! g_idle_add(gtkgui_message, local_td->instance); #endif } ! if (strstr(buffer, "Error while decoding") != NULL) { if (DEBUG) *************** *** 620,634 **** break; } - // detect Quicktime file with old codec ! if (strstr(buffer,"MOV: missing header (moov/cmov) chunk!") != NULL) { ! tryagain = 1; while (!DESTROYED) { ! usleep(500); ! if (!DESTROYED) ! if (local_list->retrieved == 1) break; ! } } ! if (strstr(buffer, "Exiting") != NULL) { if (DEBUG) --- 645,662 ---- break; } // detect Quicktime file with old codec ! if (strstr ! (buffer, ! "MOV: missing header (moov/cmov) chunk!") != ! NULL) { ! tryagain = 1; while (!DESTROYED) { ! usleep(500); ! if (!DESTROYED) ! if (local_list->retrieved == 1) ! break; ! } } ! if (strstr(buffer, "Exiting") != NULL) { if (DEBUG) *************** *** 663,692 **** } if (local_list != NULL) { ! local_list->cancelled = 1; ! if (local_td->instance != NULL) { ! if (local_td->instance->control != NULL) { ! fclose(local_td->instance->control); ! local_td->instance->control = NULL; ! } ! if (local_td->instance->player != NULL) { ! fclose(local_td->instance->player); ! local_td->instance->player = NULL; ! } ! } ! if (DEBUG) ! printf("close done\n"); ! local_td->instance->state = STATE_PLAYLIST_NEXT; } } } if (tryagain == 0) { - if (DESTROYED) { - local_td->instance->js_state = JS_STATE_UNDEFINED; - pthread_exit(0); - return NULL; - } - if (local_td != NULL) { - if (local_td->instance != NULL) { if (DESTROYED) { local_td->instance->js_state = JS_STATE_UNDEFINED; --- 691,713 ---- } if (local_list != NULL) { ! local_list->cancelled = 1; ! if (local_td->instance != NULL) { ! if (local_td->instance->control != NULL) { ! fclose(local_td->instance->control); ! local_td->instance->control = NULL; ! } ! if (local_td->instance->player != NULL) { ! fclose(local_td->instance->player); ! local_td->instance->player = NULL; ! } ! } ! if (DEBUG) ! printf("close done\n"); ! local_td->instance->state = STATE_PLAYLIST_NEXT; } } } if (tryagain == 0) { if (DESTROYED) { local_td->instance->js_state = JS_STATE_UNDEFINED; *************** *** 694,706 **** return NULL; } ! local_td->instance->js_state = JS_STATE_TRANSITIONING; ! local_td->instance->noredraw = 0; ! if (local_td->instance->state != STATE_PLAY_CANCELLED) { ! if (DESTROYED) { ! local_td->instance->js_state = JS_STATE_UNDEFINED; ! pthread_exit(0); ! return NULL; ! } ! if (local_list != NULL) { if (DESTROYED) { local_td->instance->js_state = JS_STATE_UNDEFINED; --- 715,720 ---- return NULL; } ! if (local_td != NULL) { ! if (local_td->instance != NULL) { if (DESTROYED) { local_td->instance->js_state = JS_STATE_UNDEFINED; *************** *** 708,731 **** return NULL; } ! local_list = local_list->next; ! if (local_list == NULL) { ! deleteNode(copy); ! copy = NULL; ! local_td->instance->js_state = JS_STATE_STOPPED; } else { ! copyNode(copy, local_list); } } - } else { - break; - copy = NULL; } } - } - } } if (local_td != NULL) { ! if (local_td->instance != NULL) ! local_td->instance->js_state = JS_STATE_UNDEFINED; } pthread_exit(0); --- 722,762 ---- return NULL; } ! local_td->instance->js_state = JS_STATE_TRANSITIONING; ! local_td->instance->noredraw = 0; ! if (local_td->instance->state != STATE_PLAY_CANCELLED) { ! if (DESTROYED) { ! local_td->instance->js_state = ! JS_STATE_UNDEFINED; ! pthread_exit(0); ! return NULL; ! } ! if (local_list != NULL) { ! if (DESTROYED) { ! local_td->instance->js_state = ! JS_STATE_UNDEFINED; ! pthread_exit(0); ! return NULL; ! } ! local_list = local_list->next; ! if (local_list == NULL) { ! deleteNode(copy); ! copy = NULL; ! local_td->instance->js_state = ! JS_STATE_STOPPED; ! } else { ! copyNode(copy, local_list); ! } ! } } else { ! break; ! copy = NULL; } } } } } if (local_td != NULL) { ! if (local_td->instance != NULL) ! local_td->instance->js_state = JS_STATE_UNDEFINED; } pthread_exit(0); Index: plugin-ui.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-ui.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** plugin-ui.cpp 29 Feb 2004 21:17:55 -0000 1.23 --- plugin-ui.cpp 29 Feb 2004 22:03:15 -0000 1.24 *************** *** 99,103 **** { #ifdef GTK2_ENABLED ! instance->logo = gdk_pixbuf_new_from_xpm_data((const char **) logo_xpm); --- 99,103 ---- { #ifdef GTK2_ENABLED ! instance->logo = gdk_pixbuf_new_from_xpm_data((const char **) logo_xpm); *************** *** 147,151 **** #ifdef GTK1_ENABLED ! instance->logo = gdk_pixmap_colormap_create_from_xpm_d(instance->gtkwidget->window, --- 147,151 ---- #ifdef GTK1_ENABLED ! instance->logo = gdk_pixmap_colormap_create_from_xpm_d(instance->gtkwidget->window, *************** *** 507,511 **** FreeUI((Display *) instance->display); XtRemoveEventHandler(instance->widget, ExposureMask, FALSE, ! (XtEventHandler) RedrawCB, instance); #endif XtRemoveCallback(instance->widget, XtNdestroyCallback, --- 507,511 ---- FreeUI((Display *) instance->display); XtRemoveEventHandler(instance->widget, ExposureMask, FALSE, ! (XtEventHandler) RedrawCB, instance); #endif XtRemoveCallback(instance->widget, XtNdestroyCallback, *************** *** 564,568 **** } ! } #ifdef GTK2_ENABLED --- 564,568 ---- } ! } #ifdef GTK2_ENABLED *************** *** 587,619 **** #ifdef X_ENABLED if (instance->player_window != 0) { ! XDestroyWindow(instance->display,instance->player_window); instance->player_window = 0; } #endif - /* - deleteList(instance->td->list); - instance->td->list = NULL; - instance->td->instance = NULL; - - if (instance->td != NULL) { - NPN_MemFree(instance->td); - instance->td = NULL; - } - if (instance->baseurl != NULL) { - NPN_MemFree(instance->baseurl); - instance->baseurl = NULL; - } - if (instance->hostname != NULL) { - NPN_MemFree(instance->hostname); - instance->hostname = NULL; - } - */ - /* instance->td = (ThreadData *) NPN_MemAlloc(sizeof(ThreadData)); - instance->td->list = newNode(); - instance->td->instance = NULL; - instance->lastmessage = (char *) NPN_MemAlloc(sizeof(char) * 1024); - memset(instance->lastmessage, '\0', 1); - */ pthread_mutex_unlock(&(instance->playlist_mutex)); } else { --- 587,595 ---- #ifdef X_ENABLED if (instance->player_window != 0) { ! XDestroyWindow(instance->display, instance->player_window); instance->player_window = 0; } #endif pthread_mutex_unlock(&(instance->playlist_mutex)); } else { *************** *** 633,641 **** printf("redrawing window\n"); - #ifdef GTK1_ENABLED - if (instance->panel_height > 0) - gtkwin_expose(instance->gtkwidget, NULL, instance); - #endif - if (DESTROYED || instance->noredraw) return; --- 609,612 ---- *************** *** 734,738 **** instance->image_stop); ! if (instance->panel_height >= BUTTON_HEIGHT) { #ifdef GTK2_ENABLED instance->image_play = --- 705,709 ---- instance->image_stop); ! if (instance->panel_height >= BUTTON_HEIGHT) { #ifdef GTK2_ENABLED instance->image_play = *************** *** 858,862 **** gtk_container_remove(GTK_CONTAINER(instance->ff_event_box), instance->image_ff); ! if (instance->panel_height >= BUTTON_HEIGHT) { #ifdef GTK2_ENABLED instance->image_ff = --- 829,833 ---- gtk_container_remove(GTK_CONTAINER(instance->ff_event_box), instance->image_ff); ! if (instance->panel_height >= BUTTON_HEIGHT) { #ifdef GTK2_ENABLED instance->image_ff = *************** *** 971,977 **** } ! gboolean gtkwin_expose(GtkWidget * widget, GdkEventExpose * event, ! nsPluginInstance * instance) { int width, height; --- 942,950 ---- } ! gboolean gtkgui_draw(void *data) { + nsPluginInstance *instance; + + instance = (nsPluginInstance *) data; int width, height; *************** *** 979,985 **** if (0) - printf("gtkwidget_expose called\n instance = %p\n", instance); - - if (0) printf("panel_height = %i\nDrawn = %i", instance->panel_height, instance->panel_drawn); --- 952,955 ---- *************** *** 992,996 **** instance->embed_height, instance->panel_height); if (instance->panel_height > 0 && instance->showcontrols == 1) { ! if (instance->panel_height >= BUTTON_HEIGHT ) { #ifdef GTK2_ENABLED if (instance->autostart) { --- 962,966 ---- instance->embed_height, instance->panel_height); if (instance->panel_height > 0 && instance->showcontrols == 1) { ! if (instance->panel_height >= BUTTON_HEIGHT) { #ifdef GTK2_ENABLED if (instance->autostart) { *************** *** 1198,1231 **** ! gboolean gtkgui_message(void *data) { ! nsPluginInstance * instance; ! ! instance = (nsPluginInstance *) data; ! gtk_label_set_text(instance->status,instance->lastmessage); ! return FALSE; } ! gboolean gtkgui_progress(void *data) { ! nsPluginInstance * instance; ! ! instance = (nsPluginInstance *) data; ! gtk_progress_bar_update(instance->progress_bar, instance->percent); ! return FALSE; } ! gboolean gtkgui_resize(void *data) { ! nsPluginInstance * instance; ! ! instance = (nsPluginInstance *) data; - if (DEBUG) printf("in resize method\n"); - gtk_widget_set_usize(instance->drawing_area, - instance->movie_width, - instance->movie_height); - - return FALSE; - } --- 1168,1201 ---- ! gboolean gtkgui_message(void *data) { ! nsPluginInstance *instance; ! ! instance = (nsPluginInstance *) data; ! gtk_label_set_text(instance->status, instance->lastmessage); ! return FALSE; } ! gboolean gtkgui_progress(void *data) { ! nsPluginInstance *instance; ! ! instance = (nsPluginInstance *) data; ! gtk_progress_bar_update(instance->progress_bar, instance->percent); ! return FALSE; } ! gboolean gtkgui_resize(void *data) { ! nsPluginInstance *instance; ! ! instance = (nsPluginInstance *) data; ! ! if (DEBUG) ! printf("in resize method\n"); ! gtk_widget_set_usize(instance->drawing_area, ! instance->movie_width, instance->movie_height); ! ! return FALSE; } Index: plugin.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** plugin.cpp 29 Feb 2004 15:00:19 -0000 1.22 --- plugin.cpp 29 Feb 2004 22:03:15 -0000 1.23 *************** *** 133,137 **** mScriptablePeer = getScriptablePeer(); ! // init the instance variables here. mimetype = NULL; --- 133,137 ---- mScriptablePeer = getScriptablePeer(); ! // init the instance variables here. mimetype = NULL; *************** *** 158,162 **** list = newNode(); td = (ThreadData *) NPN_MemAlloc(sizeof(ThreadData)); ! td->list = NULL; // newNode(); td->instance = NULL; control = NULL; --- 158,162 ---- list = newNode(); td = (ThreadData *) NPN_MemAlloc(sizeof(ThreadData)); ! td->list = NULL; // newNode(); td->instance = NULL; control = NULL; *************** *** 236,240 **** if (aWindow == NULL) return FALSE; ! mInitialized = TRUE; return TRUE; --- 236,240 ---- if (aWindow == NULL) return FALSE; ! mInitialized = TRUE; return TRUE; *************** *** 298,304 **** control = NULL; } ! if (player) { ! fclose(player); player = NULL; } --- 298,304 ---- control = NULL; } ! if (player) { ! fclose(player); player = NULL; } *************** *** 369,373 **** qtNext[i] = NULL; } ! if (download_dir != NULL) { free(download_dir); --- 369,373 ---- qtNext[i] = NULL; } ! if (download_dir != NULL) { free(download_dir); *************** *** 376,383 **** if (td->list != NULL) { ! deleteList(td->list); td->list = NULL; } ! if (td != NULL) { NPN_MemFree(td); --- 376,383 ---- if (td->list != NULL) { ! deleteList(td->list); td->list = NULL; } ! if (td != NULL) { NPN_MemFree(td); *************** *** 392,396 **** if (DEBUG) printf("memory free\n"); ! pthread_mutex_unlock(&playlist_mutex); DESTROYED = 0; --- 392,396 ---- if (DEBUG) printf("memory free\n"); ! pthread_mutex_unlock(&playlist_mutex); DESTROYED = 0; *************** *** 406,410 **** pthread_cond_destroy(&playlist_complete_cond); ! } --- 406,410 ---- pthread_cond_destroy(&playlist_complete_cond); ! } *************** *** 455,459 **** XtAddEventHandler(widget, ExposureMask, FALSE, (XtEventHandler) RedrawCB, this); ! #endif display = ws->display; window = (Window) aWindow->window; --- 455,459 ---- XtAddEventHandler(widget, ExposureMask, FALSE, (XtEventHandler) RedrawCB, this); ! #endif display = ws->display; window = (Window) aWindow->window; *************** *** 463,477 **** #ifdef GTK_ENABLED ! gdk_threads_enter(); color.red = 65535; color.blue = 65535; color.green = 65535; ! gtkwidget = gtk_window_new(GTK_WINDOW_POPUP); ! #ifdef GTK2_ENABLED - g_signal_connect(G_OBJECT(gtkwidget), "expose_event", - G_CALLBACK(gtkwin_expose), this); gtk_widget_set_size_request(gtkwidget, aWindow->width, aWindow->height); --- 463,475 ---- #ifdef GTK_ENABLED ! gdk_threads_enter(); color.red = 65535; color.blue = 65535; color.green = 65535; ! gtkwidget = gtk_window_new(GTK_WINDOW_POPUP); ! #ifdef GTK2_ENABLED gtk_widget_set_size_request(gtkwidget, aWindow->width, aWindow->height); *************** *** 480,485 **** #ifdef GTK1_ENABLED ! // gtk_signal_connect(GTK_OBJECT(gtkwidget), "expose_event", ! // GTK_SIGNAL_FUNC(gtkwin_expose), this); gtk_widget_set_usize(gtkwidget, aWindow->width, aWindow->height); #endif --- 478,482 ---- #ifdef GTK1_ENABLED ! gtk_widget_set_usize(gtkwidget, aWindow->width, aWindow->height); #endif *************** *** 492,497 **** #ifdef GTK2_ENABLED - g_signal_connect(G_OBJECT(fixed_container), "expose_event", - G_CALLBACK(gtkwin_expose), this); image = gtk_image_new_from_pixbuf(logo); gtk_fixed_put(GTK_FIXED(fixed_container), image, 10, 10); --- 489,492 ---- *************** *** 499,508 **** aWindow->width - 20, 15); gtk_widget_set_size_request(GTK_WIDGET(status), ! aWindow->width - 20, ! aWindow->height - 125); #endif #ifdef GTK1_ENABLED - gtk_signal_connect(GTK_OBJECT(fixed_container), "expose_event", - GTK_SIGNAL_FUNC(gtkwin_expose), this); gtk_widget_show(gtkwidget); image = gtk_pixmap_new(logo, NULL); --- 494,501 ---- aWindow->width - 20, 15); gtk_widget_set_size_request(GTK_WIDGET(status), ! aWindow->width - 20, ! aWindow->height - 125); #endif #ifdef GTK1_ENABLED gtk_widget_show(gtkwidget); image = gtk_pixmap_new(logo, NULL); *************** *** 512,516 **** aWindow->width - 20, 15); gtk_widget_set_usize(GTK_WIDGET(status), ! aWindow->width - 20, aWindow->height - 125); #endif gtk_fixed_put(GTK_FIXED(fixed_container), --- 505,510 ---- aWindow->width - 20, 15); gtk_widget_set_usize(GTK_WIDGET(status), ! aWindow->width - 20, ! aWindow->height - 125); #endif gtk_fixed_put(GTK_FIXED(fixed_container), *************** *** 532,537 **** aWindow->width - 20, 15); gtk_widget_set_size_request(GTK_WIDGET(status), ! aWindow->width - 20, ! aWindow->height - 25); #endif #ifdef GTK1_ENABLED --- 526,531 ---- aWindow->width - 20, 15); gtk_widget_set_size_request(GTK_WIDGET(status), ! aWindow->width - 20, ! aWindow->height - 25); #endif #ifdef GTK1_ENABLED *************** *** 539,544 **** aWindow->width - 20, 15); gtk_widget_set_usize(GTK_WIDGET(status), ! aWindow->width - 20, aWindow->height - 25); ! #endif } --- 533,539 ---- aWindow->width - 20, 15); gtk_widget_set_usize(GTK_WIDGET(status), ! aWindow->width - 20, ! aWindow->height - 25); ! #endif } *************** *** 555,559 **** XMapWindow(GDK_WINDOW_XDISPLAY(gtkwidget->window), GDK_WINDOW_XWINDOW(gtkwidget->window)); ! gdk_threads_leave(); --- 550,554 ---- XMapWindow(GDK_WINDOW_XDISPLAY(gtkwidget->window), GDK_WINDOW_XWINDOW(gtkwidget->window)); ! gdk_threads_leave(); *************** *** 576,582 **** state = STATE_GETTING_PLAYLIST; if (td->list == NULL) ! pthread_mutex_lock(&playlist_mutex); ! td->list = newNode(); ! pthread_mutex_unlock(&playlist_mutex); if (href != NULL) { if (isMms(href)) { --- 571,577 ---- state = STATE_GETTING_PLAYLIST; if (td->list == NULL) ! pthread_mutex_lock(&playlist_mutex); ! td->list = newNode(); ! pthread_mutex_unlock(&playlist_mutex); if (href != NULL) { if (isMms(href)) { *************** *** 611,616 **** { if (DEBUG) ! printf("NewStream %s\n", stream->url); ! if (baseurl == NULL) baseurl = getURLBase((char *) stream->url); --- 606,611 ---- { if (DEBUG) ! printf("NewStream %s\n", stream->url); ! if (baseurl == NULL) baseurl = getURLBase((char *) stream->url); *************** *** 904,908 **** if (n->cancelled == 1 || state == STATE_PLAY_CANCELLED) { if (n->localcache != NULL) { ! fclose(n->localcache); n->localcache = NULL; } --- 899,903 ---- if (n->cancelled == 1 || state == STATE_PLAY_CANCELLED) { if (n->localcache != NULL) { ! fclose(n->localcache); n->localcache = NULL; } *************** *** 926,930 **** ret = fwrite(buffer, 1, len, fp); n->bytes = n->bytes + ret; ! snprintf(message, 1024, "Buffering %i%% - %li KB ",(int)((currdownload * 100) / maxdownload), (n->bytes / 1024)); if (mode == NP_EMBED) { if (state < STATE_PLAYING) { --- 921,927 ---- ret = fwrite(buffer, 1, len, fp); n->bytes = n->bytes + ret; ! snprintf(message, 1024, "Buffering %i%% - %li KB ", ! (int) ((currdownload * 100) / maxdownload), ! (n->bytes / 1024)); if (mode == NP_EMBED) { if (state < STATE_PLAYING) { *************** *** 975,979 **** #endif } ! if (href != NULL) { if (hrefrequested == 0) { --- 972,976 ---- #endif } ! if (href != NULL) { if (hrefrequested == 0) { Index: plugin.h =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** plugin.h 29 Feb 2004 21:17:55 -0000 1.14 --- plugin.h 29 Feb 2004 22:03:15 -0000 1.15 *************** *** 137,141 **** GtkLabel *status; GtkWidget *drawing_area; ! GtkWidget *play_event_box; GtkWidget *pause_event_box; --- 137,141 ---- GtkLabel *status; GtkWidget *drawing_area; ! GtkWidget *play_event_box; GtkWidget *pause_event_box; |
From: <kdekorte@us...> - 2004-02-29 21:49:13
|
Update of /cvsroot/mplayerplug-in/mplayerplug-in/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30178/Source Modified Files: plugin-threads.cpp Log Message: Index: plugin-threads.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-threads.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** plugin-threads.cpp 29 Feb 2004 21:17:55 -0000 1.24 --- plugin-threads.cpp 29 Feb 2004 21:30:51 -0000 1.25 *************** *** 479,487 **** break; } if (DESTROYED) break; if (fgets(buffer, sizeof(buffer),local_td->instance->player) == NULL) { - //usleep(500); continue; } if (DESTROYED) break; if (DEBUG) { --- 479,488 ---- break; } + if (DESTROYED) break; if (fgets(buffer, sizeof(buffer),local_td->instance->player) == NULL) { continue; } + if (DESTROYED) break; if (DEBUG) { *************** *** 511,519 **** } } // Only update the display if there is something worth displaying if (strstr(eos, "Cache fill:") != NULL) { cf = strstr(eos, "Cache fill:"); sscanf(cf, "Cache fill: %i", &cfpercent); ! strlcpy(message, "Caching ", sizeof(message)); strlcat(message, copy->url, sizeof(message)); --- 512,521 ---- } } + // Only update the display if there is something worth displaying if (strstr(eos, "Cache fill:") != NULL) { cf = strstr(eos, "Cache fill:"); sscanf(cf, "Cache fill: %i", &cfpercent); ! strlcpy(message, "Buffering ", sizeof(message)); strlcat(message, copy->url, sizeof(message)); *************** *** 523,530 **** #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage,1024,message); ! g_idle_add(gtkgui_message,local_td->instance); ! local_td->instance->percent = (cfpercent / 100.0); ! g_idle_add(gtkgui_progress,local_td->instance); #endif } --- 525,532 ---- #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage,1024,message); ! g_idle_add(gtkgui_message,local_td->instance); ! local_td->instance->percent = (cfpercent / 100.0); ! g_idle_add(gtkgui_progress,local_td->instance); #endif } *************** *** 588,591 **** --- 590,596 ---- if (strstr(buffer, "Video: no video") != NULL) { local_td->instance->panel_height = 32; + local_td->instance->movie_height = local_list->play_y - 32; + local_td->instance->movie_width = local_list->play_x; + g_idle_add(gtkgui_resize,local_td->instance); } |
From: <kdekorte@us...> - 2004-02-29 21:36:18
|
Update of /cvsroot/mplayerplug-in/mplayerplug-in/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27820/Source Modified Files: plugin-setup.h plugin-threads.cpp plugin-ui.cpp plugin.h Log Message: GTK2 async calls Index: plugin-setup.h =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-setup.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** plugin-setup.h 25 Feb 2004 20:13:42 -0000 1.10 --- plugin-setup.h 29 Feb 2004 21:17:55 -0000 1.11 *************** *** 148,151 **** --- 148,154 ---- gboolean gtkwin_expose(GtkWidget * widget, GdkEventExpose * event, nsPluginInstance * instance); + gboolean gtkgui_message(void *data); + gboolean gtkgui_progress(void *data); + gboolean gtkgui_resize(void *data); #endif Index: plugin-threads.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-threads.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** plugin-threads.cpp 27 Feb 2004 20:35:53 -0000 1.23 --- plugin-threads.cpp 29 Feb 2004 21:17:55 -0000 1.24 *************** *** 350,357 **** #endif #ifdef GTK_ENABLED ! gdk_threads_enter(); ! if (local_td->instance->status != NULL) ! gtk_label_set_text(local_td->instance->status, "Loading Media..."); ! gdk_threads_leave(); #endif --- 350,355 ---- #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage,1024,"Loading Media..."); ! g_idle_add(gtkgui_message,local_td->instance); #endif *************** *** 407,414 **** #endif #ifdef GTK_ENABLED ! gdk_threads_enter(); ! if (local_td->instance->status != NULL) ! gtk_label_set_text(local_td->instance->status, message); ! gdk_threads_leave(); #endif --- 405,410 ---- #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage,1024,message); ! g_idle_add(gtkgui_message,local_td->instance); #endif *************** *** 527,542 **** #endif #ifdef GTK_ENABLED ! gdk_threads_enter(); ! if (local_td->instance->progress_bar != NULL) { ! gtk_progress_bar_update(local_td-> ! instance-> ! progress_bar, ! (cfpercent / ! 100.0)); ! } ! if (local_td->instance->status != NULL) ! gtk_label_set_text(local_td->instance-> ! status, message); ! gdk_threads_leave(); #endif } --- 523,530 ---- #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage,1024,message); ! g_idle_add(gtkgui_message,local_td->instance); ! local_td->instance->percent = (cfpercent / 100.0); ! g_idle_add(gtkgui_progress,local_td->instance); #endif } *************** *** 552,560 **** #endif #ifdef GTK_ENABLED ! gdk_threads_enter(); ! if (local_td->instance->status != NULL) ! gtk_label_set_text(local_td->instance->status, ! message); ! gdk_threads_leave(); #endif } --- 540,545 ---- #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage,1024,message); ! g_idle_add(gtkgui_message,local_td->instance); #endif } *************** *** 574,580 **** local_list->play_y; - #ifdef GTK_ENABLED - gdk_threads_enter(); - #endif if (local_td->instance->player_window != 0) { --- 559,562 ---- *************** *** 591,609 **** #ifdef GTK_ENABLED ! gtk_widget_set_usize(local_td->instance->drawing_area, ! local_list->play_x, ! local_td->instance-> ! embed_height - ! local_td->instance-> ! panel_height); #endif } - #ifdef GTK2_ENABLED - gdk_window_process_all_updates(); - #endif - #ifdef GTK_ENABLED - gdk_threads_leave(); - #endif if (DEBUG) printf("panel height in thread = %i\n", --- 573,582 ---- #ifdef GTK_ENABLED ! local_td->instance->movie_height = local_list->play_y; ! local_td->instance->movie_width = local_list->play_x; ! g_idle_add(gtkgui_resize,local_td->instance); #endif } if (DEBUG) printf("panel height in thread = %i\n", *************** *** 624,633 **** #endif #ifdef GTK_ENABLED ! gdk_threads_enter(); ! if (local_td->instance->status != NULL) ! gtk_label_set_text(local_td->instance->status, ! message); ! gdk_threads_leave(); ! #endif } --- 597,603 ---- #endif #ifdef GTK_ENABLED ! snprintf(local_td->instance->lastmessage,1024,message); ! g_idle_add(gtkgui_message,local_td->instance); ! #endif } Index: plugin-ui.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-ui.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** plugin-ui.cpp 29 Feb 2004 15:00:19 -0000 1.22 --- plugin-ui.cpp 29 Feb 2004 21:17:55 -0000 1.23 *************** *** 99,102 **** --- 99,103 ---- { #ifdef GTK2_ENABLED + instance->logo = gdk_pixbuf_new_from_xpm_data((const char **) logo_xpm); *************** *** 146,150 **** #ifdef GTK1_ENABLED ! instance->logo = gdk_pixmap_colormap_create_from_xpm_d(instance->gtkwidget->window, --- 147,151 ---- #ifdef GTK1_ENABLED ! instance->logo = gdk_pixmap_colormap_create_from_xpm_d(instance->gtkwidget->window, *************** *** 505,513 **** #ifdef X_ENABLED FreeUI((Display *) instance->display); #endif XtRemoveCallback(instance->widget, XtNdestroyCallback, DestroyCB, (XtPointer) instance); ! XtRemoveEventHandler(instance->widget, ExposureMask, FALSE, ! (XtEventHandler) RedrawCB, instance); instance->widget = NULL; instance->state = STATE_PLAY_CANCELLED; --- 506,515 ---- #ifdef X_ENABLED FreeUI((Display *) instance->display); + XtRemoveEventHandler(instance->widget, ExposureMask, FALSE, + (XtEventHandler) RedrawCB, instance); #endif XtRemoveCallback(instance->widget, XtNdestroyCallback, DestroyCB, (XtPointer) instance); ! instance->widget = NULL; instance->state = STATE_PLAY_CANCELLED; *************** *** 565,568 **** --- 567,571 ---- } #ifdef GTK2_ENABLED + gdk_threads_enter(); if (instance->panel_drawn == 1) { gtk_widget_destroy(instance->play_event_box); *************** *** 579,582 **** --- 582,586 ---- gtk_widget_destroy(instance->gtkwidget); gdk_window_process_all_updates(); + gdk_threads_leave(); #endif *************** *** 1192,1193 **** --- 1196,1231 ---- } #endif + + + gboolean gtkgui_message(void *data) + { + nsPluginInstance * instance; + + instance = (nsPluginInstance *) data; + gtk_label_set_text(instance->status,instance->lastmessage); + return FALSE; + } + + gboolean gtkgui_progress(void *data) + { + nsPluginInstance * instance; + + instance = (nsPluginInstance *) data; + gtk_progress_bar_update(instance->progress_bar, instance->percent); + return FALSE; + } + + gboolean gtkgui_resize(void *data) + { + nsPluginInstance * instance; + + instance = (nsPluginInstance *) data; + + if (DEBUG) printf("in resize method\n"); + gtk_widget_set_usize(instance->drawing_area, + instance->movie_width, + instance->movie_height); + + return FALSE; + + } Index: plugin.h =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** plugin.h 27 Feb 2004 20:35:53 -0000 1.13 --- plugin.h 29 Feb 2004 21:17:55 -0000 1.14 *************** *** 101,104 **** --- 101,106 ---- uint32 embed_width; uint32 embed_height; + uint32 movie_width; + uint32 movie_height; int setwindow; char *baseurl; *************** *** 127,130 **** --- 129,133 ---- int panel_height; int panel_drawn; + float percent; #ifdef GTK_ENABLED |
From: <kdekorte@us...> - 2004-02-29 21:36:18
|
Update of /cvsroot/mplayerplug-in/mplayerplug-in In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27820 Modified Files: ChangeLog Log Message: GTK2 async calls Index: ChangeLog =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/ChangeLog,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** ChangeLog 29 Feb 2004 15:00:19 -0000 1.32 --- ChangeLog 29 Feb 2004 21:17:55 -0000 1.33 *************** *** 9,12 **** --- 9,13 ---- When in GTK mode, draw to a GTK window Fix GTK2 hang after playing movie + Fix GTK2 async GUI calls. 2.40 Set default value of DEBUG = 0, not 1 |
From: <kdekorte@us...> - 2004-02-29 15:18:28
|
Update of /cvsroot/mplayerplug-in/mplayerplug-in In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16830 Modified Files: ChangeLog Log Message: Fix hang in GTK2 after playing movie Index: ChangeLog =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/ChangeLog,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** ChangeLog 27 Feb 2004 20:35:52 -0000 1.31 --- ChangeLog 29 Feb 2004 15:00:19 -0000 1.32 *************** *** 8,11 **** --- 8,12 ---- Updated downloading status message When in GTK mode, draw to a GTK window + Fix GTK2 hang after playing movie 2.40 Set default value of DEBUG = 0, not 1 |
From: <kdekorte@us...> - 2004-02-29 15:18:28
|
Update of /cvsroot/mplayerplug-in/mplayerplug-in/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16830/Source Modified Files: plugin-ui.cpp plugin.cpp Log Message: Fix hang in GTK2 after playing movie Index: plugin-ui.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-ui.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** plugin-ui.cpp 27 Feb 2004 20:35:53 -0000 1.21 --- plugin-ui.cpp 29 Feb 2004 15:00:19 -0000 1.22 *************** *** 578,581 **** --- 578,582 ---- instance->player_window = 0; gtk_widget_destroy(instance->gtkwidget); + gdk_window_process_all_updates(); #endif Index: plugin.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** plugin.cpp 27 Feb 2004 20:35:53 -0000 1.21 --- plugin.cpp 29 Feb 2004 15:00:19 -0000 1.22 *************** *** 227,234 **** printf("~nsPluginInstance called\n"); - #ifdef GTK2_ENABLED - gdk_window_process_all_updates(); - #endif - if (mScriptablePeer != NULL) mScriptablePeer->SetInstance(NULL); --- 227,230 ---- *************** *** 449,452 **** --- 445,449 ---- ws = (NPSetWindowCallbackStruct *) aWindow->ws_info; + widget = XtWindowToWidget((Display *) ws->display, *************** *** 455,461 **** XtAddCallback(widget, XtNdestroyCallback, DestroyCB, (XtPointer) this); XtAddEventHandler(widget, ExposureMask, FALSE, (XtEventHandler) RedrawCB, this); ! display = ws->display; window = (Window) aWindow->window; --- 452,459 ---- XtAddCallback(widget, XtNdestroyCallback, DestroyCB, (XtPointer) this); + #ifdef X_ENABLED XtAddEventHandler(widget, ExposureMask, FALSE, (XtEventHandler) RedrawCB, this); ! #endif display = ws->display; window = (Window) aWindow->window; *************** *** 474,483 **** #ifdef GTK2_ENABLED - if (!g_thread_supported()) g_thread_init(NULL); - gdk_threads_init(); g_signal_connect(G_OBJECT(gtkwidget), "expose_event", G_CALLBACK(gtkwin_expose), this); - g_signal_connect(G_OBJECT(gtkwidget), "destroy", - G_CALLBACK(gtk_widget_destroy),>kwidget); gtk_widget_set_size_request(gtkwidget, aWindow->width, aWindow->height); --- 472,477 ---- *************** *** 561,565 **** XMapWindow(GDK_WINDOW_XDISPLAY(gtkwidget->window), GDK_WINDOW_XWINDOW(gtkwidget->window)); ! gdk_threads_leave(); --- 555,559 ---- XMapWindow(GDK_WINDOW_XDISPLAY(gtkwidget->window), GDK_WINDOW_XWINDOW(gtkwidget->window)); ! gdk_threads_leave(); |