Changeset 168
- Timestamp:
- May 3, 2006, 9:34:43 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/gui/makefile ¶
r160 r168 128 128 -@nmake clean 129 129 -@cd gui 130 131 rebuild: 132 -@cd .. 133 -@nmake clean 134 -@cd gui 135 -@nmake -
TabularUnified trunk/gui/np/npwv.cpp ¶
r152 r168 12 12 #include <stdlib.h> 13 13 #include <process.h> 14 #include <stdarg.h> 15 #include <direct.h> 16 #include <ctype.h> 17 #include <string.h> 18 #include <math.h> 19 #include <errno.h> 20 #include <time.h> 14 21 15 22 #include "npapi.h" … … 19 26 extern "C" void _CRT_term(void); 20 27 21 //#define DEBUG 28 #define DEBUG 29 30 static char *months[] = 31 { 32 "Jan", 33 "Feb", 34 "Mar", 35 "Apr", 36 "May", 37 "Jun", 38 "Jul", 39 "Aug", 40 "Sep", 41 "Oct", 42 "Nov", 43 "Dec" 44 }; 45 46 void myctime(time_t *tt_in, char *tt_out) 47 { 48 struct tm tt1; 49 50 tt1 = *localtime(tt_in); 51 sprintf(tt_out,"%2d %.3s %.4d %.2d:%.2d:%.2d", 52 tt1.tm_mday,months[tt1.tm_mon],tt1.tm_year+1900, 53 tt1.tm_hour,tt1.tm_min,tt1.tm_sec); 54 } 55 56 void dprintf(const char *fmt,...) 57 { 58 FILE *wvnp_log = NULL; 59 va_list arg_ptr; 60 time_t curtime; 61 char temp[100] = {0}; 62 63 #ifdef DEBUG 64 time(&curtime); 65 myctime(&curtime,temp); 66 67 wvnp_log = fopen("wvnp.log","a"); 68 69 va_start(arg_ptr, fmt); 70 if (wvnp_log) fprintf(wvnp_log,"%s ",temp); 71 if (wvnp_log) vfprintf(wvnp_log, fmt, arg_ptr); 72 va_end(arg_ptr); 73 if (wvnp_log) fclose(wvnp_log); 74 #endif 75 return; 76 } 77 22 78 //#undef DEBUG 23 79 24 80 #define FID_PANE 255 81 82 #define strcasecmp strcmpi /* VAC workaround */ 25 83 26 84 static char *newstrdup( const char *s ) … … 75 133 int fToWV; // 0 - processing, 1 - success, 2 - error; 76 134 char *url; 135 char *url_src; 77 136 char *errstr; 78 137 int tid; … … 80 139 int wvstarted; 81 140 int urlsent; 141 int width; 142 int height; 143 int loop_play; 82 144 } PluginInstance; 83 145 … … 169 231 // dependant DLLs 170 232 // pmdicon = WinLoadPointer( HWND_DESKTOP , NULL/*_os2hmod*/ , 1 ); 233 dprintf("NPP_Initialize\n"); 171 234 return NPERR_NO_ERROR; 172 235 } … … 181 244 // This->fToWV = 1; 182 245 // DosSleep(32); 183 #ifdef DEBUG 184 f = fopen("wvnp.log","a"); 185 fprintf(f,"NPP_Shutdown\n"); 186 fclose(f); 187 #endif 246 dprintf("NPP_Shutdown\n"); 188 247 // WinDestroyPointer( pmdicon ); 189 248 // do your one time uninitialization here, such as unloading dynamically … … 196 255 //---------------------------------------------------------------------------- 197 256 NPError NP_LOADDS NPP_New(NPMIMEType pluginType, 198 NPP instance,199 uint16 mode,200 int16 argc,201 char* argn[],202 char* argv[],203 NPSavedData* saved)257 NPP instance, 258 uint16 mode, 259 int16 argc, 260 char* argn[], 261 char* argv[], 262 NPSavedData* saved) 204 263 { 205 264 int i; 206 265 207 #ifdef DEBUG 208 f = fopen("wvnp.log","a"); 209 fprintf(f,"NPP_New. Mime [%s]\n", pluginType); 210 fclose(f); 211 #endif 266 dprintf("NPP_New. Mime [%s]\n", pluginType); 212 267 for (i = 0; i < argc; i++) { 213 268 if (strstr(argn[i],"flashvars") != NULL) /* we doesnt supports Flash */ … … 218 273 if (strstr(argv[i],"swf") != NULL) /* we doesnt supports Flash */ 219 274 { 220 #ifdef DEBUG 221 f = fopen("wvnp.log","a"); 222 fprintf(f,"Flash doesnt supported\n", pluginType); 223 fclose(f); 224 #endif 275 dprintf("Flash doesnt supported\n", pluginType); 225 276 return NPERR_INVALID_PLUGIN_ERROR; 226 277 } … … 229 280 230 281 if (instance == NULL) 282 { 283 dprintf("NPP_New error. Invalid instance\n"); 231 284 return NPERR_INVALID_INSTANCE_ERROR; 285 } 232 286 233 287 instance->pdata = NPN_MemAlloc(sizeof(PluginInstance)); … … 259 313 260 314 /* parse args */ 261 #ifdef DEBUG262 f = fopen("wvnp.log","a");263 315 for (i = 0; i < argc; i++) { 264 fprintf (f," argument '%s'='%s'\n", argn[i], argv[i]); 265 } 266 fclose(f); 267 #endif 268 269 #if 0 270 if (!strcasecmp (argn[i], "loop")) { 271 if (!strcasecmp (argv[i], "true") || !strcasecmp (argv[i], "yes") || 272 !strcmp (argv[i], "1")) { 273 this->loop_play = 1; 274 } 275 } else if (!strcasecmp (argn[i], "width")) { 276 this->width = atoi(argv[i]); 277 } else if (!strcasecmp (argn[i], "height")) { 278 this->height = atoi(argv[i]); 279 } else if (!strcasecmp (argn[i], "src")) { 280 this->url_src = strdup(argv[i]); 281 } else if (!strcasecmp (argn[i], "mrl")) { 282 snprintf(this->url,MAX_URL,argv[i]); 283 this->url[MAX_URL-1]='\0'; 284 } 285 } 286 #endif 287 288 return NPERR_NO_ERROR; 316 dprintf(" argument '%s'='%s'\n", argn[i], argv[i]); 317 } 318 319 for (i = 0; i < argc; i++) 320 { 321 if (!strcasecmp (argn[i], "loop")) { 322 if (!strcasecmp (argv[i], "true") || !strcasecmp (argv[i], "yes") || 323 !strcmp (argv[i], "1")) { 324 This->loop_play = 1; 325 } 326 } else if (!strcasecmp (argn[i], "width")) { 327 This->width = atoi(argv[i]); 328 } else if (!strcasecmp (argn[i], "height")) { 329 This->height = atoi(argv[i]); 330 } else if (!strcasecmp (argn[i], "src")) { 331 This->url_src = strdup(argv[i]); 332 } else if (!strcasecmp (argn[i], "FileName")) { 333 This->url = strdup(argv[i]); 334 } else if (!strcasecmp (argn[i], "mrl")) { 335 This->url = strdup(argv[i]); 336 } 337 } 338 return NPERR_NO_ERROR; 289 339 } 290 340 … … 295 345 NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save) 296 346 { 347 348 dprintf("NPP_Destroy(). instance: %x\n", instance); 297 349 if (instance == NULL) 298 350 return NPERR_INVALID_INSTANCE_ERROR; … … 306 358 // recreated. 307 359 // 308 #ifdef DEBUG309 f = fopen("wvnp.log","a");310 fprintf (f,"NPP_Destroy()\n");311 fclose(f);312 #endif313 360 314 361 if (This != NULL) … … 380 427 SWP swp; 381 428 429 dprintf("NPP_SetWindow(). instance: %x, window: %x\n", instance, window); 382 430 if (instance == NULL) 383 431 return NPERR_INVALID_INSTANCE_ERROR; … … 386 434 387 435 PluginInstance* This = (PluginInstance*) instance->pdata; 388 #ifdef DEBUG389 f = fopen("wvnp.log","a");390 fprintf (f,"NPP_SetWindow()\n");391 fclose(f);392 #endif393 436 394 437 // … … 457 500 { 458 501 char s[100] = {0}; 502 503 dprintf("NPP_NewStream...Starting WV(). instance: %x\n", instance); 504 459 505 if (instance == NULL) 460 506 return NPERR_INVALID_INSTANCE_ERROR; 461 507 PluginInstance* This = (PluginInstance*) instance->pdata; 462 #ifdef DEBUG463 f = fopen("wvnp.log","a");464 fprintf (f,"NPP_NewStream...Starting WV()\n");465 fclose(f);466 #endif467 508 468 509 // Need start WV... 469 510 if (!startWV(This)) 470 511 { 471 #ifdef DEBUG 472 f = fopen("wvnp.log","a"); 473 fprintf (f,"cant start WV()\n"); 474 fclose(f); 475 #endif 512 dprintf("cant start WV()\n"); 476 513 This->errstr = newstrdup( "Can't start WarpVision..." ); 477 514 return NPERR_NO_ERROR; … … 518 555 strcat( s , optNPWV ); 519 556 } 520 #ifdef DEBUG 521 f = fopen("wvnp.log","a"); 522 fprintf(f,"sending [%s] to WV\n",s); 523 fclose(f); 524 #endif 557 dprintf("sending [%s] to WV\n",s); 525 558 } 526 559 else 527 560 { 528 #ifdef DEBUG 529 f = fopen("wvnp.log","a"); 530 fprintf(f,"ERROR unsupported protocol in [%s]\n",This->url); 531 fclose(f); 532 #endif 561 dprintf("ERROR unsupported protocol in [%s]\n",This->url); 533 562 This->errstr = newstrdup( "Unsupported protocol." ); 534 563 } … … 566 595 NPP_WriteReady(NPP instance, NPStream *stream) 567 596 { 597 dprintf("NPP_WriteReady(). instance: %x\n", instance); 568 598 if (instance != NULL) 569 599 PluginInstance* This = (PluginInstance*) instance->pdata; … … 580 610 int32 offset, int32 len, void *buffer) 581 611 { 612 dprintf("NPP_Write(). instance: %x\n", instance); 613 582 614 //return -1 to tell it I don't want data. 583 615 return -1; … … 599 631 NPP_DestroyStream(NPP instance, NPStream *stream, NPError reason) 600 632 { 633 dprintf("NPP_DestroyStream(). instance: %x\n", instance); 634 601 635 if (instance == NULL) 602 636 return NPERR_INVALID_INSTANCE_ERROR; … … 613 647 NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname) 614 648 { 649 dprintf("NPP_StreamAsFile(). instance: %x\n", instance); 650 615 651 if (instance == NULL) 616 652 return; … … 629 665 NPP_Print(NPP instance, NPPrint* printInfo) 630 666 { 667 dprintf("NPP_Print(). instance: %x\n", instance); 668 631 669 if (printInfo == NULL) // trap invalid parm 632 670 return; … … 684 722 { 685 723 NPBool eventHandled = FALSE; 724 725 dprintf("NPP_HandleEvent(). instance: %x\n", instance); 726 686 727 if (instance == NULL) 687 728 return eventHandled; … … 716 757 NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData) 717 758 { 759 dprintf("URL Notyfy() [%s], reason: %i. instance: %x\n", url, reason, instance); 718 760 if (instance != NULL) 719 761 PluginInstance* This = (PluginInstance*) instance->pdata; 720 #if 1721 f = fopen("wvnp.log","a");722 fprintf(f,"URL Notyfy() [%s], reason: %i\n", url, reason);723 fclose(f);724 #endif725 762 726 763 } … … 733 770 NPP_GetJavaClass(void) 734 771 { 772 dprintf("NPP_GetJavaClass()\n"); 735 773 return((jref) 0); 736 774 } … … 743 781 NPP_GetValue(NPP instance, NPPVariable variable, void* value) 744 782 { 783 dprintf("NPP_GetValue(). instance: %x\n", instance); 745 784 if (instance != NULL) 746 785 PluginInstance* This = (PluginInstance*) instance->pdata; … … 756 795 NPP_SetValue(NPP instance, NPNVariable variable, void* value) 757 796 { 797 dprintf("NPP_SetValue(). instance: %x\n", instance); 798 758 799 if (instance != NULL) 759 800 PluginInstance* This = (PluginInstance*) instance->pdata; … … 768 809 PluginInstance *This = NULL; 769 810 #if 0 770 f = fopen("wvnp.log","a"); 771 fprintf(f,"fr win: msg: %X, mp1: %X mp2: %X\n",msg, mp1, mp2); 772 fclose(f); 811 dprintf("fr win: msg: %X, mp1: %X mp2: %X\n",msg, mp1, mp2); 773 812 #endif 774 813 … … 791 830 return WinDefWindowProc(hWnd,Message,wParam,lParam); 792 831 #if 0 793 f = fopen("wvnp.log","a"); 794 fprintf(f,"clr win: msg: %X, mp1: %X mp2: %X\n",Message, wParam, lParam); 795 fclose(f); 832 dprintf("clr win: msg: %X, mp1: %X mp2: %X\n",Message, wParam, lParam); 796 833 #endif 797 834 if (This && !This->wvstarted) … … 873 910 break; 874 911 case WM_DESTROY: 875 #ifdef DEBUG 876 f = fopen("wvnp.log","a"); 877 fprintf(f,"got WM_DESTROY\n"); 878 fclose(f); 879 #endif 880 WinSetWindowULong(hWnd, QWL_USER, 0); 912 dprintf("got WM_DESTROY\n"); 913 //WinSetWindowULong(hWnd, QWL_USER, 0); 881 914 break; 882 915 default: … … 897 930 memcpy(&r,&rcl,sizeof(RECTL)); 898 931 WinMapWindowPoints (hwnd, HWND_DESKTOP, (PPOINTL)&r, 2); 899 #ifdef DEBUG 900 f = fopen("wvnp.log","a"); 901 fprintf (f,"urlsent: %i\n",This->urlsent); 902 fclose(f); 903 #endif 932 dprintf("urlsent: %i\n",This->urlsent); 904 933 if (This->urlsent) 905 934 { … … 926 955 This->fToWV = 0; 927 956 This->errstr = newstrdup( "Can't create thread." ); 928 #ifdef DEBUG 929 f = fopen("wvnp.log","a"); 930 fprintf (f,"Send to WV..cant start thread\n"); 931 fclose(f); 932 #endif 957 dprintf("Send to WV..cant start thread\n"); 933 958 WinInvalidateRect( This->hWnd , NULL, TRUE ); 934 959 } … … 946 971 int i; 947 972 948 #ifdef DEBUG 949 f = fopen("wvnp.log","a"); 950 fprintf(f,"Pipe thread started\n"); 951 fclose(f); 952 #endif 973 dprintf("Pipe thread started\n"); 953 974 while ( threadstop == 0) 954 975 { … … 979 1000 if ( rc == NO_ERROR ) 980 1001 { 981 #ifdef DEBUG 982 f = fopen("wvnp.log","a"); 983 fprintf(f,"sent to pipe %i bytes from [%s]\n",Written,pipeBuf); 984 fclose(f); 985 #endif 1002 dprintf("sent to pipe %i bytes from [%s]\n",Written,pipeBuf); 986 1003 /* make sure, that url sent to avoid erasing url from buffer by wm_paint */ 987 1004 if (memicmp(pipeBuf,optUrl, 5) == 0) // … … 990 1007 /* now tell the window that we need to repaint and 991 1008 resend /OUT */ 992 #ifdef DEBUG 993 f = fopen("wvnp.log","a"); 994 fprintf(f,"call repaint\n"); 995 fclose(f); 996 #endif 1009 dprintf("call repaint\n"); 997 1010 WinInvalidateRect(This->hWndCl, 0, TRUE); 998 1011 } … … 1006 1019 This->errstr = newstrdup( errmsg ); 1007 1020 delete errmsg; 1008 #ifdef DEBUG 1009 f = fopen("wvnp.log","a"); 1010 fprintf(f,"ERROR %i sending to pipe [%s]\n",rc,pipeBuf); 1011 fclose(f); 1012 #endif 1021 dprintf("ERROR %i sending to pipe [%s]\n",rc,pipeBuf); 1013 1022 } 1014 1023 DosClose( PipeHandle ); … … 1017 1026 { 1018 1027 This->wvstarted = 0; 1019 #ifdef DEBUG 1020 f = fopen("wvnp.log","a"); 1021 fprintf(f,"ERROR %i opening pipe [%s]\n",rc,pipeName); 1022 fclose(f); 1023 #endif 1028 dprintf("ERROR %i opening pipe [%s]\n",rc,pipeName); 1024 1029 } 1025 1030 … … 1028 1033 1029 1034 This->tid = -1; 1030 #ifdef DEBUG 1031 f = fopen("wvnp.log","a"); 1032 fprintf(f,"Pipe thread closed\n"); 1033 fclose(f); 1034 #endif 1035 dprintf("Pipe thread closed\n"); 1035 1036 _endthread(); 1036 1037 } … … 1055 1056 { 1056 1057 rc = DosWaitNPipe( pipeName , 10000 ); 1057 #ifdef DEBUG 1058 f = fopen("wvnp.log","a"); 1059 fprintf(f,"DosWaitNPipe rc=%i\n",rc); 1060 fclose(f); 1061 #endif 1058 dprintf("DosWaitNPipe rc=%i\n",rc); 1062 1059 if ( rc == 0 ) return TRUE; 1063 1060 } … … 1115 1112 if ( happ == NULLHANDLE ) 1116 1113 { 1117 #ifdef DEBUG 1118 f = fopen("wvnp.log","a"); 1119 fprintf(f,"WV at [%s] starting error: %x. \n", pmdExe, WinGetLastError(0)); 1120 fclose(f); 1121 #endif 1122 1114 dprintf("WV at [%s] starting error: %x. \n", pmdExe, WinGetLastError(0)); 1123 1115 return FALSE; 1124 1116 } 1125 1117 1126 #ifdef DEBUG 1127 f = fopen("wvnp.log","a"); 1128 fprintf(f,"WV started\n"); 1129 fclose(f); 1130 #endif 1118 dprintf("WV started\n"); 1131 1119 #if 1 1132 1120 int counter = 16; // 16 x 250 = 4 ᥪã€ë -
TabularUnified trunk/gui/np/npwv.rc ¶
r134 r168 6 6 RCDATA NP_INFO_FileExtents { "mov|mov|mp4|sdp|mov|avi|avi|mpg,mpeg|mp4|mpg,mpeg|mpv2,mp2ve|ram|rpm|ra|asf,asx|ogg|ogg|ogg|wmv|asf|asf,asx|wmv|wvx|wax|wma|asx|wmv|wav|wav|smil|nsv|asx|m3u|divx|divx\0" } 7 7 RCDATA NP_INFO_FileOpenName { "Quicktime|Quicktime|Quicktime|Quicktime - Session Description Protocol|Quicktime|AVI|AVI|MPEG|MPEG Video|MPEG|MPEG2|RealAudio|RealAudio|RealAudio|Windows Media|Ogg Vorbis Media|Ogg Vorbis Audio|Ogg Vorbis|WMV|MSNBCPlayer|MS ASF video|Windows Media|Windows Media|Windows Media|Windows Media|Windows Media|Windows Media|Microsoft wave file|Microsoft wave file|SMIL|Nullsoft Streaming Video|WMP|MPEG url|DivX Media Format|DivX Media Format\0" } 8 //RCDATA NP_INFO_MIMEType { "audio/mpeg|audio/x-mpeg|video/mpeg|video/x-mpeg|video/mpeg-system|video/x-mpeg-system|video/mpeg4|audio/mpeg4|application/mpeg4-iod|application/mpeg4-muxcodetable|video/x-msvideo|video/quicktime|application/x-ogg|application/x-vlc-plugin|video/x-ms-asf-plugin|video/x-ms-asf|application/x-mplayer2|video/x-ms-wmv\0" }9 //RCDATA NP_INFO_FileExtents { "mp2,mp3,mpga,mpega|mp2,mp3,mpga,mpega|mpg,mpeg,mpe|mpg,mpeg,mpe|mpg,mpeg,vob|mpg,mpeg,vob|mp4,mpg4|mp4,mpg4|mp4,mpg4|mp4,mpg4|avi|mov,qt|ogg\0" }10 //RCDATA NP_INFO_FileOpenName { "MPEG audio|MPEG audio|MPEG video|MPEG video|MPEG video|MPEG video|MPEG-4 video|MPEG-4 audio|MPEG-4 video|MPEG-4 video|AVI video|QuickTime video|Ogg stream|WV plugin\0" }11 8 RCDATA NP_INFO_FileDescription { "WarpVision streaming plugin, <a href=""http://www.netlabs.org"">http://www.netlabs.org</a>" } 12 9 RCDATA NP_INFO_ProductName { "WarpVision" } -
TabularUnified trunk/gui/play.hpp ¶
r161 r168 468 468 { 469 469 audio_time = sh_audio->pts; 470 #if 0470 #if 1 471 471 audio_time=d_audioM->pts; 472 472 audio_time+=(ds_tell_pts(d_audioM)-sh_audio->a_in_buffer_len)/ … … 796 796 showsubs = FALSE; 797 797 sub_curr = NULL; 798 sub_curr_ogg= NULL;798 vo_sub = NULL; 799 799 if (OSDCommand > OSDPOS) 800 800 OSDCommand = OSDNONE; … … 2514 2514 case DEMUXER_TYPE_ASF: 2515 2515 case DEMUXER_TYPE_OGG: 2516 case DEMUXER_TYPE_MATROSKA: 2516 2517 case DEMUXER_TYPE_LAVF: 2517 2518 sh_video->aspect = 1.0; -
TabularUnified trunk/gui/showwin.hpp ¶
r161 r168 73 73 extern RECTL OutWin; 74 74 HWND mozHWND; 75 volatile int window_moving = 0; 75 76 76 77 int show_mouse(void) … … 1881 1882 mbp = TRUE; 1882 1883 if (fFullScreen) break; // dont track when fullscreen 1884 window_moving = 1; 1883 1885 return WinSendMsg(WinQueryWindow(hwnd,QW_PARENT), WM_TRACKFRAME, MPFROMSHORT(TF_MOVE), MPVOID); 1884 1886 } … … 1886 1888 case WM_BUTTON1MOTIONEND: 1887 1889 { 1890 window_moving = 0; 1888 1891 mbp = FALSE; 1889 1892 break; … … 2164 2167 int briperc; 2165 2168 char langtxt[60] = {0}; 2169 2170 if (window_moving) 2171 { 2172 OSDStopTimer(); 2173 OSDEventClear(); 2174 return; /* no OSD while window moving */ 2175 } 2176 2166 2177 if (Ft2EnableFontEngine && conf.UseFt2Lib) 2167 2178 Ft2EnableFontEngine(TRUE); … … 2218 2229 if (Ft2EnableFontEngine) 2219 2230 Ft2EnableFontEngine(FALSE); 2220 2221 2231 } 2222 2232 … … 2593 2603 if (!sub) return 1; 2594 2604 2595 if (prev_sub == sub && ! sub_ogg_changed) // still the same subtitle. Just put it into frame2605 if (prev_sub == sub && !vo_sub_changed) // still the same subtitle. Just put it into frame 2596 2606 { 2597 2607 if (SubOSD.Bits != NULL) … … 2801 2811 DevCloseDC(hdct); 2802 2812 prev_sub = sub; 2803 sub_ogg_changed = 0;2813 vo_sub_changed = 0; 2804 2814 } 2805 2815 return 0; -
TabularUnified trunk/gui/version.h ¶
r161 r168 1 #define VERSION " 2May 2006"1 #define VERSION "3 May 2006" -
TabularUnified trunk/gui/video2.cpp ¶
r161 r168 1503 1503 } 1504 1504 1505 if ( sub_curr_ogg && sub_curr_ogg->lines > 0)1506 { 1507 sub_curr= sub_curr_ogg;1505 if (vo_sub && vo_sub->lines > 0) 1506 { 1507 sub_curr=vo_sub; 1508 1508 OSDCommand = OSDSUBT; 1509 1509 DosAsyncTimer(OSD_TIMEOUT,(HSEM) OSDEvent, &htimerOSDEvent); -
TabularUnified trunk/gui/video2.hpp ¶
r161 r168 376 376 sub_data* subtitles=NULL; 377 377 subtitle* sub_curr=NULL; 378 extern subtitle* sub_curr_ogg;379 extern int sub_ogg_changed;378 extern subtitle* vo_sub; 379 extern int vo_sub_changed; 380 380 float sub_last_pts = -303; 381 381 float zoomScale = 1.0f; … … 1174 1174 showsubs = FALSE; 1175 1175 sub_curr = NULL; 1176 sub_curr_ogg= NULL;1176 vo_sub = NULL; 1177 1177 if (OSDCommand > OSDPOS) 1178 1178 OSDCommand = OSDNONE; -
TabularUnified trunk/gui/wvguidlg.dlg ¶
r146 r168 123 123 PRESPARAMS PP_FOREGROUNDCOLOR, 0x00000000L 124 124 PRESPARAMS PP_FONTNAMESIZE, "20.Helv" 125 CTEXT "http:// os2.kiev.ua", 402, 5, 51, 200, 8, DT_VCENTER125 CTEXT "http://warpvision.netlabs.org", 402, 5, 51, 200, 8, DT_VCENTER 126 126 CTEXT "An AVI (MPEG4,DivX), MPEG, DVD, VCD video player for OS/2", 403, 5, 64, 200, 8, DT_VCENTER | SS_AUTOSIZE 127 127 PRESPARAMS PP_FOREGROUNDCOLOR, 0x00000000L 128 128 CTEXT "Build date: ", 1997, 5, 35, 200, 8, DT_VCENTER | DT_CENTER 129 129 CTEXT VERSION, 1998, 5, 25, 200, 8, DT_VCENTER | DT_CENTER 130 CTEXT "(c) by netlabs.org", 1996, 5, 15, 200, 8, DT_VCENTER | DT_CENTER 130 131 LTEXT "Registered to: Unregistered", IDD_REGISTRATION, 5, 5, 400, 8 131 132 END -
TabularUnified trunk/libdvdread/Makefile ¶
r154 r168 1 1 !include ..\Makefile.inc 2 2 3 OBJ_C = dvd_input.obj dvd_reader.obj dvd_udf.obj ifo_read.obj \3 OBJ_C = dvd_input.obj dvd_reader.obj dvd_udf.obj ifo_read.obj ifo_print.obj \ 4 4 nav_read.obj nav_print.obj md5.obj 5 5 -
TabularUnified trunk/libdvdread/bswap.h ¶
r64 r168 24 24 25 25 #if defined(WORDS_BIGENDIAN) 26 /* All bigendian systems are fine, just ignore the swaps. */ 26 /* All bigendian systems are fine, just ignore the swaps. */ 27 27 #define B2N_16(x) (void)(x) 28 28 #define B2N_32(x) (void)(x) 29 29 #define B2N_64(x) (void)(x) 30 30 31 #else 31 #else 32 32 33 33 #if defined(OS2) 34 34 35 #define bswap_16(x) (((x) & 0x00ff) << 8 | ((x) & 0xff00) >> 8) 36 // code from bits/byteswap.h (C) 1997, 1998 Free Software Foundation, Inc. 37 #define bswap_32(x) \ 38 ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ 39 (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) 40 static __inline uint64_t bswap_64(uint64_t x) 35 inline static unsigned short bswap_16(unsigned short x) 41 36 { 42 union { 43 uint64_t ll; 44 uint32_t l[2]; 45 } w, r; 46 w.ll = x; 47 r.l[0] = bswap_32 (w.l[1]); 48 r.l[1] = bswap_32 (w.l[0]); 49 return r.ll; 37 __asm("xchgb %b0,%h0" : 38 "=q" (x) : 39 "0" (x)); 40 return x; 41 } 42 #define B2N_16(x) x = bswap_16(x) 43 44 inline static unsigned int bswap_32(unsigned int x) 45 { 46 __asm( 47 #if __CPU__ > 386 48 "bswap %0": 49 "=r" (x) : 50 #else 51 "xchgb %b0,%h0\n" 52 " rorl $16,%0\n" 53 " xchgb %b0,%h0": 54 "=q" (x) : 55 #endif 56 "0" (x)); 57 return x; 58 } 59 #define B2N_32(x) x = bswap_32(x) 60 61 inline static unsigned long long int bswap_64(unsigned long long int x) 62 { 63 register union { __extension__ uint64_t __ll; 64 uint32_t __l[2]; } __x; 65 asm("xchgl %0,%1": 66 "=r"(__x.__l[0]),"=r"(__x.__l[1]): 67 "0"(bswap_32((unsigned long)x)),"1"(bswap_32((unsigned long)(x>>32)))); 68 return __x.__ll; 50 69 } 51 70 … … 72 91 #define B2N_64(x) x = swap64(x) 73 92 74 /* This is a slow but portable implementation, it has multiple evaluation 93 /* This is a slow but portable implementation, it has multiple evaluation 75 94 * problems so beware. 76 * FreeBSD and Solaris don't have <byteswap.h> or any other such 77 * functionality! 95 * FreeBSD and Solaris don't have <byteswap.h> or any other such 96 * functionality! 78 97 */ 79 98 -
TabularUnified trunk/libdvdread/ifo_print.c ¶
r160 r168 1 /* 1 /* 2 2 * Copyright (C) 2000, 2001, 2002, 2003 3 3 * Björn Englund <d4bjorn@dtek.chalmers.se>, … … 764 764 765 765 for(i = 0; i < 8; i++) { 766 if(pgc->audio_control[i] .present) {766 if(pgc->audio_control[i] & 0x8000) { 767 767 printf("Audio stream %i control: %04x\n", 768 768 i, pgc->audio_control[i]); … … 771 771 772 772 for(i = 0; i < 32; i++) { 773 if(pgc->subp_control[i] .present) {773 if(pgc->subp_control[i] & 0x80000000) { 774 774 printf("Subpicture stream %2i control: %08x\n", 775 775 i, pgc->subp_control[i]); -
TabularUnified trunk/video/vdecode.c ¶
r154 r168 897 897 decompress_win32_video(sh_video->codec, in_size, start, pp_buffer, (sh_video->ds->flags&1)); 898 898 OSDBuffer = pp_buffer; 899 if (OSDCommand != OSDNONE) 900 OSDMain(); 899 conf.VideoFormat = formatConvert(PIX_FMT_YUV422); 901 900 avpicture_fill(&src_pic, pp_buffer, 902 901 PIX_FMT_YUV422, width, height); 903 902 avpicture_fill(&dst_pic, dive_buffer, 904 903 VOutCaps->Formats[0], width, height); 904 suby = src_pic.data[0]; 905 subu = src_pic.data[1]; 906 subv = src_pic.data[2]; 907 908 if (OSDCommand != OSDNONE) 909 OSDMain(); 910 905 911 ret = img_convert(&dst_pic, VOutCaps->Formats[0], 906 912 &src_pic, PIX_FMT_YUV422, 907 913 width, height); 908 conf.VideoFormat = formatConvert(PIX_FMT_YUV422);909 914 //printf("conv ret: %i\n", ret); 910 915 } … … 1107 1112 y1 = y0+y; 1108 1113 1109 suby[x1 + y1 * subwidth] = COMPUTE_Y(r,g,b);1114 if (suby) suby[x1 + y1 * subwidth] = COMPUTE_Y(r,g,b); 1110 1115 1111 1116 if (((x1 % 2) == 0) && ((y1 % 2) == 0)) 1112 1117 { 1113 subu[x1/2 + subwidth/2 * y1/2] = COMPUTE_U(r,g,b);1114 subv[x1/2 + subwidth/2 * y1/2] = COMPUTE_V(r,g,b);1118 if (subu) subu[x1/2 + subwidth/2 * y1/2] = COMPUTE_U(r,g,b); 1119 if (subv) subv[x1/2 + subwidth/2 * y1/2] = COMPUTE_V(r,g,b); 1115 1120 } 1116 1121 … … 1207 1212 y1 = y0+y; 1208 1213 1209 suby[x1 + y1 * subwidth] = COMPUTE_Y(r,g,b);1214 if (suby) suby[x1 + y1 * subwidth] = COMPUTE_Y(r,g,b); 1210 1215 // printf("c\n"); 1211 1212 1216 if (((x1 % 2) == 0) && ((y1 % 2) == 0)) 1213 1217 { 1214 subu[x1/2 + subwidth/2 * y1/2] = COMPUTE_U(r,g,b);1215 subv[x1/2 + subwidth/2 * y1/2] = COMPUTE_V(r,g,b);1218 if (subu) subu[x1/2 + subwidth/2 * y1/2] = COMPUTE_U(r,g,b); 1219 if (subv) subv[x1/2 + subwidth/2 * y1/2] = COMPUTE_V(r,g,b); 1216 1220 } 1217 1221 } … … 1358 1362 WidthRequested = dive_internal_bpl / video_header.format_bpp; 1359 1363 1360 WidthRequested = (WidthRequested + 15) &~ 15;1364 // WidthRequested = (WidthRequested + 15) &~ 15; 1361 1365 1362 1366 suby = py; … … 1416 1420 ret = img_convert(&dst_conv, PIX_FMT_YUV420P, 1417 1421 (AVPicture *)&video_picture, video_context->pix_fmt, 1418 (width + 15) &~ 15, height);1422 width, height); 1419 1423 if (ret < 0) 1420 1424 printf("conv rc %i\n", ret); … … 1485 1489 yuv2rgb((unsigned char *)dive_internal_buffer, 1486 1490 suby, subu, subv, 1487 (width + 15) &~ 15, height,1491 width, height, 1488 1492 WidthRequested, stride0, stride1); 1489 1493 #endif … … 1508 1512 yv12toyuy2(suby, subu, subv, 1509 1513 (unsigned char *)dive_internal_buffer, 1510 (width + 15) &~ 15, height,1514 width, height, 1511 1515 stride0, stride1, WidthRequested * 2, bytes); 1512 1516 -
TabularUnified trunk/vout.c ¶
r131 r168 21 21 #include "plugin.h" 22 22 #include "plugins\ovplug.h" 23 #include "libmpdemux\subreader.h" 23 24 24 25 #define FMT_RGB16 1 … … 44 45 45 46 VideoOutPlugin *video_out_plugins = NULL; 47 48 subtitle* vo_sub = NULL; 49 int vo_sub_changed = 0; 46 50 47 51 extern t_VOutCaps *VOutCaps; /* Video out plugin caps */ … … 137 141 } 138 142 } 143 /* for mplayer demuxer's compatible */ 144 int vo_osd_changed(int new_value) 145 { 146 vo_sub_changed = 1; 147 return 0; 148 } -
TabularUnified trunk/vout.h ¶
r132 r168 22 22 23 23 extern int CurrVideoOutPlug; // plugin index 24 24 extern int vo_sub_changed; 25 25 #endif -
TabularUnified trunk/yuv/yuv2rgb.c ¶
r79 r168 190 190 int x, y; 191 191 192 // printf("h: %i, w: %i, rgbstr: %i, y_str: %i, uv_str: %i\n", 193 // h_size, v_size, rgb_stride, y_stride, uv_stride); 192 194 yuv2rgb_pxor(); 193 195
Note:
See TracChangeset
for help on using the changeset viewer.