Changeset 168


Ignore:
Timestamp:
May 3, 2006, 9:34:43 PM (19 years ago)
Author:
vladest
Message:

Fixed crash when moving window with OSD
Changed About page in settings
Fixed Mozilla plugin crash when close window
Fixed slight desync introduced in 1.0GA
Optimized bswap in libdvdread

Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/gui/makefile

    r160 r168  
    128128   -@nmake clean
    129129   -@cd gui
     130
     131rebuild:
     132   -@cd ..
     133   -@nmake clean
     134   -@cd gui
     135   -@nmake
  • TabularUnified trunk/gui/np/npwv.cpp

    r152 r168  
    1212#include <stdlib.h>
    1313#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>
    1421
    1522#include "npapi.h"
     
    1926extern "C" void _CRT_term(void);
    2027
    21 //#define DEBUG
     28#define DEBUG
     29
     30static 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
     46void 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
     56void 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
    2278//#undef DEBUG
    2379
    2480#define FID_PANE        255
     81
     82#define strcasecmp strcmpi /* VAC workaround */
    2583
    2684static char *newstrdup( const char *s )
     
    75133    int             fToWV; // 0 - processing, 1 - success, 2 - error;
    76134    char            *url;
     135    char            *url_src;
    77136    char            *errstr;
    78137    int             tid;
     
    80139    int             wvstarted;
    81140    int             urlsent;
     141    int width;
     142    int height;
     143    int loop_play;
    82144} PluginInstance;
    83145
     
    169231    // dependant DLLs
    170232//    pmdicon = WinLoadPointer( HWND_DESKTOP , NULL/*_os2hmod*/ , 1 );
     233    dprintf("NPP_Initialize\n");
    171234    return NPERR_NO_ERROR;
    172235}
     
    181244    //    This->fToWV = 1;
    182245    //    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");
    188247//    WinDestroyPointer( pmdicon );
    189248    // do your one time uninitialization here, such as unloading dynamically
     
    196255//----------------------------------------------------------------------------
    197256NPError 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)
    204263{
    205264    int i;
    206265
    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);
    212267    for (i = 0; i < argc; i++) {
    213268        if (strstr(argn[i],"flashvars") != NULL) /* we doesnt supports Flash */
     
    218273            if (strstr(argv[i],"swf") != NULL) /* we doesnt supports Flash */
    219274            {
    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);
    225276                return NPERR_INVALID_PLUGIN_ERROR;
    226277            }
     
    229280
    230281    if (instance == NULL)
     282    {
     283        dprintf("NPP_New error. Invalid instance\n");
    231284        return NPERR_INVALID_INSTANCE_ERROR;
     285    }
    232286
    233287    instance->pdata = NPN_MemAlloc(sizeof(PluginInstance));
     
    259313
    260314    /* parse args */
    261 #ifdef DEBUG
    262     f = fopen("wvnp.log","a");
    263315    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;
    289339}
    290340
     
    295345NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save)
    296346{
     347
     348    dprintf("NPP_Destroy(). instance: %x\n", instance);
    297349    if (instance == NULL)
    298350        return NPERR_INVALID_INSTANCE_ERROR;
     
    306358    // recreated.
    307359    //
    308 #ifdef DEBUG
    309     f = fopen("wvnp.log","a");
    310     fprintf (f,"NPP_Destroy()\n");
    311     fclose(f);
    312 #endif
    313360
    314361    if (This != NULL)
     
    380427    SWP swp;
    381428
     429    dprintf("NPP_SetWindow(). instance: %x, window: %x\n", instance, window);
    382430    if (instance == NULL)
    383431        return NPERR_INVALID_INSTANCE_ERROR;
     
    386434
    387435    PluginInstance* This = (PluginInstance*) instance->pdata;
    388 #ifdef DEBUG
    389     f = fopen("wvnp.log","a");
    390     fprintf (f,"NPP_SetWindow()\n");
    391     fclose(f);
    392 #endif
    393436
    394437    //
     
    457500{
    458501    char s[100] = {0};
     502
     503    dprintf("NPP_NewStream...Starting WV(). instance: %x\n", instance);
     504
    459505    if (instance == NULL)
    460506        return NPERR_INVALID_INSTANCE_ERROR;
    461507    PluginInstance* This = (PluginInstance*) instance->pdata;
    462 #ifdef DEBUG
    463     f = fopen("wvnp.log","a");
    464     fprintf (f,"NPP_NewStream...Starting WV()\n");
    465     fclose(f);
    466 #endif
    467508
    468509    // Need start WV...
    469510    if (!startWV(This))
    470511    {
    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");
    476513        This->errstr = newstrdup( "Can't start WarpVision..." );
    477514        return NPERR_NO_ERROR;
     
    518555            strcat( s , optNPWV );
    519556        }
    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);
    525558    }
    526559    else
    527560    {
    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);
    533562        This->errstr = newstrdup( "Unsupported protocol." );
    534563    }
     
    566595NPP_WriteReady(NPP instance, NPStream *stream)
    567596{
     597    dprintf("NPP_WriteReady(). instance: %x\n", instance);
    568598    if (instance != NULL)
    569599        PluginInstance* This = (PluginInstance*) instance->pdata;
     
    580610          int32 offset, int32 len, void *buffer)
    581611{
     612    dprintf("NPP_Write(). instance: %x\n", instance);
     613
    582614    //return -1 to tell it I don't want data.
    583615    return -1;
     
    599631NPP_DestroyStream(NPP instance, NPStream *stream, NPError reason)
    600632{
     633    dprintf("NPP_DestroyStream(). instance: %x\n", instance);
     634
    601635    if (instance == NULL)
    602636        return NPERR_INVALID_INSTANCE_ERROR;
     
    613647NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname)
    614648{
     649    dprintf("NPP_StreamAsFile(). instance: %x\n", instance);
     650
    615651    if (instance == NULL)
    616652        return;
     
    629665NPP_Print(NPP instance, NPPrint* printInfo)
    630666{
     667    dprintf("NPP_Print(). instance: %x\n", instance);
     668
    631669    if (printInfo == NULL)   // trap invalid parm
    632670        return;
     
    684722{
    685723    NPBool eventHandled = FALSE;
     724
     725    dprintf("NPP_HandleEvent(). instance: %x\n", instance);
     726
    686727    if (instance == NULL)
    687728        return eventHandled;
     
    716757NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)
    717758{
     759    dprintf("URL Notyfy() [%s], reason: %i. instance: %x\n", url, reason, instance);
    718760    if (instance != NULL)
    719761        PluginInstance* This = (PluginInstance*) instance->pdata;
    720 #if 1
    721     f = fopen("wvnp.log","a");
    722     fprintf(f,"URL Notyfy() [%s], reason: %i\n", url, reason);
    723     fclose(f);
    724 #endif
    725762
    726763}
     
    733770NPP_GetJavaClass(void)
    734771{
     772    dprintf("NPP_GetJavaClass()\n");
    735773    return((jref) 0);
    736774}
     
    743781NPP_GetValue(NPP instance, NPPVariable variable, void* value)
    744782{
     783    dprintf("NPP_GetValue(). instance: %x\n", instance);
    745784    if (instance != NULL)
    746785        PluginInstance* This = (PluginInstance*) instance->pdata;
     
    756795NPP_SetValue(NPP instance, NPNVariable variable, void* value)
    757796{
     797    dprintf("NPP_SetValue(). instance: %x\n", instance);
     798
    758799    if (instance != NULL)
    759800        PluginInstance* This = (PluginInstance*) instance->pdata;
     
    768809    PluginInstance *This = NULL;
    769810#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);
    773812#endif
    774813
     
    791830        return WinDefWindowProc(hWnd,Message,wParam,lParam);
    792831#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);
    796833#endif
    797834        if (This && !This->wvstarted)
     
    873910        break;
    874911    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);
    881914        break;
    882915    default:
     
    897930    memcpy(&r,&rcl,sizeof(RECTL));
    898931    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);
    904933    if (This->urlsent)
    905934    {
     
    926955        This->fToWV = 0;
    927956        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");
    933958        WinInvalidateRect( This->hWnd , NULL, TRUE );
    934959    }
     
    946971    int i;
    947972
    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");
    953974    while ( threadstop == 0)
    954975    {
     
    9791000            if ( rc == NO_ERROR )
    9801001            {
    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);
    9861003                /* make sure, that url sent to avoid erasing url from buffer by wm_paint */
    9871004                if (memicmp(pipeBuf,optUrl, 5) == 0) //
     
    9901007                    /* now tell the window that we need to repaint and
    9911008                     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");
    9971010                    WinInvalidateRect(This->hWndCl, 0, TRUE);
    9981011                }
     
    10061019                This->errstr = newstrdup( errmsg );
    10071020                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);
    10131022            }
    10141023            DosClose( PipeHandle );
     
    10171026        {
    10181027            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);
    10241029        }
    10251030
     
    10281033
    10291034    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");
    10351036    _endthread();
    10361037}
     
    10551056    {
    10561057        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);
    10621059        if ( rc == 0 )  return TRUE;
    10631060    }
     
    11151112    if ( happ == NULLHANDLE )
    11161113    {
    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));
    11231115        return FALSE;
    11241116    }
    11251117
    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");
    11311119#if 1
    11321120    int counter = 16;    // 16 x 250 = 4 ᥪ㭀ë
  • TabularUnified trunk/gui/np/npwv.rc

    r134 r168  
    66RCDATA 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" }
    77RCDATA 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" }
    118RCDATA NP_INFO_FileDescription { "WarpVision streaming plugin, <a href=""http://www.netlabs.org"">http://www.netlabs.org</a>" }
    129RCDATA NP_INFO_ProductName     { "WarpVision" }
  • TabularUnified trunk/gui/play.hpp

    r161 r168  
    468468            {
    469469                audio_time = sh_audio->pts;
    470 #if 0
     470#if 1
    471471                audio_time=d_audioM->pts;
    472472                audio_time+=(ds_tell_pts(d_audioM)-sh_audio->a_in_buffer_len)/
     
    796796            showsubs = FALSE;
    797797            sub_curr = NULL;
    798             sub_curr_ogg = NULL;
     798            vo_sub = NULL;
    799799            if (OSDCommand > OSDPOS)
    800800                OSDCommand = OSDNONE;
     
    25142514        case DEMUXER_TYPE_ASF:
    25152515        case DEMUXER_TYPE_OGG:
     2516        case DEMUXER_TYPE_MATROSKA:
    25162517        case DEMUXER_TYPE_LAVF:
    25172518            sh_video->aspect = 1.0;
  • TabularUnified trunk/gui/showwin.hpp

    r161 r168  
    7373extern RECTL OutWin;
    7474HWND mozHWND;
     75volatile int window_moving = 0;
    7576
    7677int show_mouse(void)
     
    18811882            mbp = TRUE;
    18821883            if (fFullScreen) break; // dont track when fullscreen
     1884            window_moving = 1;
    18831885            return WinSendMsg(WinQueryWindow(hwnd,QW_PARENT), WM_TRACKFRAME, MPFROMSHORT(TF_MOVE), MPVOID);
    18841886        }
     
    18861888    case WM_BUTTON1MOTIONEND:
    18871889        {
     1890            window_moving = 0;
    18881891            mbp = FALSE;
    18891892            break;
     
    21642167    int briperc;
    21652168    char langtxt[60] = {0};
     2169
     2170    if (window_moving)
     2171    {
     2172        OSDStopTimer();
     2173        OSDEventClear();
     2174        return; /* no OSD while window moving */
     2175    }
     2176
    21662177    if (Ft2EnableFontEngine && conf.UseFt2Lib)
    21672178        Ft2EnableFontEngine(TRUE);
     
    22182229    if (Ft2EnableFontEngine)
    22192230        Ft2EnableFontEngine(FALSE);
    2220 
    22212231}
    22222232
     
    25932603    if (!sub) return 1;
    25942604
    2595     if (prev_sub == sub && !sub_ogg_changed) // still the same subtitle. Just put it into frame
     2605    if (prev_sub == sub && !vo_sub_changed) // still the same subtitle. Just put it into frame
    25962606    {
    25972607        if (SubOSD.Bits != NULL)
     
    28012811        DevCloseDC(hdct);
    28022812        prev_sub = sub;
    2803         sub_ogg_changed = 0;
     2813        vo_sub_changed = 0;
    28042814    }
    28052815    return 0;
  • TabularUnified trunk/gui/version.h

    r161 r168  
    1 #define VERSION "2 May 2006"
     1#define VERSION "3 May 2006"
  • TabularUnified trunk/gui/video2.cpp

    r161 r168  
    15031503                    }
    15041504
    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;
    15081508                        OSDCommand = OSDSUBT;
    15091509                        DosAsyncTimer(OSD_TIMEOUT,(HSEM) OSDEvent, &htimerOSDEvent);
  • TabularUnified trunk/gui/video2.hpp

    r161 r168  
    376376sub_data* subtitles=NULL;
    377377subtitle* sub_curr=NULL;
    378 extern subtitle* sub_curr_ogg;
    379 extern int sub_ogg_changed;
     378extern subtitle* vo_sub;
     379extern int vo_sub_changed;
    380380float sub_last_pts = -303;
    381381float zoomScale = 1.0f;
     
    11741174        showsubs = FALSE;
    11751175        sub_curr = NULL;
    1176         sub_curr_ogg = NULL;
     1176        vo_sub = NULL;
    11771177        if (OSDCommand > OSDPOS)
    11781178            OSDCommand = OSDNONE;
  • TabularUnified trunk/gui/wvguidlg.dlg

    r146 r168  
    123123                        PRESPARAMS PP_FOREGROUNDCOLOR, 0x00000000L
    124124                        PRESPARAMS PP_FONTNAMESIZE, "20.Helv"
    125         CTEXT           "http://os2.kiev.ua", 402, 5, 51, 200, 8, DT_VCENTER
     125        CTEXT           "http://warpvision.netlabs.org", 402, 5, 51, 200, 8, DT_VCENTER
    126126        CTEXT           "An AVI (MPEG4,DivX), MPEG, DVD, VCD video player for OS/2", 403, 5, 64, 200, 8, DT_VCENTER | SS_AUTOSIZE
    127127                        PRESPARAMS PP_FOREGROUNDCOLOR, 0x00000000L
    128128        CTEXT           "Build date: ", 1997, 5, 35, 200, 8, DT_VCENTER | DT_CENTER
    129129        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
    130131        LTEXT           "Registered to: Unregistered", IDD_REGISTRATION, 5, 5, 400, 8
    131132    END
  • TabularUnified trunk/libdvdread/Makefile

    r154 r168  
    11!include ..\Makefile.inc
    22
    3 OBJ_C = dvd_input.obj dvd_reader.obj dvd_udf.obj ifo_read.obj \
     3OBJ_C = dvd_input.obj dvd_reader.obj dvd_udf.obj ifo_read.obj ifo_print.obj \
    44        nav_read.obj nav_print.obj md5.obj
    55
  • TabularUnified trunk/libdvdread/bswap.h

    r64 r168  
    2424
    2525#if defined(WORDS_BIGENDIAN)
    26 /* All bigendian systems are fine, just ignore the swaps. */ 
     26/* All bigendian systems are fine, just ignore the swaps. */
    2727#define B2N_16(x) (void)(x)
    2828#define B2N_32(x) (void)(x)
    2929#define B2N_64(x) (void)(x)
    3030
    31 #else 
     31#else
    3232
    3333#if defined(OS2)
    3434
    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)
     35inline static unsigned short bswap_16(unsigned short x)
    4136{
    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
     44inline 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
     61inline 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;
    5069}
    5170
     
    7291#define B2N_64(x) x = swap64(x)
    7392
    74 /* This is a slow but portable implementation, it has multiple evaluation 
     93/* This is a slow but portable implementation, it has multiple evaluation
    7594 * 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!
    7897 */
    7998
  • TabularUnified trunk/libdvdread/ifo_print.c

    r160 r168  
    1 /*
     1/* 
    22 * Copyright (C) 2000, 2001, 2002, 2003
    33 *               Björn Englund <d4bjorn@dtek.chalmers.se>,
     
    764764 
    765765  for(i = 0; i < 8; i++) {
    766       if(pgc->audio_control[i].present) {
     766      if(pgc->audio_control[i] & 0x8000) {
    767767        printf("Audio stream %i control: %04x\n",
    768768               i, pgc->audio_control[i]);
     
    771771 
    772772  for(i = 0; i < 32; i++) {
    773       if(pgc->subp_control[i].present) {
     773      if(pgc->subp_control[i] & 0x80000000) {
    774774          printf("Subpicture stream %2i control: %08x\n",
    775775                 i, pgc->subp_control[i]);
  • TabularUnified trunk/video/vdecode.c

    r154 r168  
    897897                decompress_win32_video(sh_video->codec, in_size, start, pp_buffer, (sh_video->ds->flags&1));
    898898                OSDBuffer = pp_buffer;
    899                 if (OSDCommand != OSDNONE)
    900                     OSDMain();
     899                conf.VideoFormat = formatConvert(PIX_FMT_YUV422);
    901900                avpicture_fill(&src_pic, pp_buffer,
    902901                               PIX_FMT_YUV422, width, height);
    903902                avpicture_fill(&dst_pic, dive_buffer,
    904903                               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
    905911                ret = img_convert(&dst_pic, VOutCaps->Formats[0],
    906912                                  &src_pic, PIX_FMT_YUV422,
    907913                                  width, height);
    908                 conf.VideoFormat = formatConvert(PIX_FMT_YUV422);
    909914                //printf("conv ret: %i\n", ret);
    910915            }
     
    11071112                y1 = y0+y;
    11081113
    1109                 suby[x1 + y1 * subwidth] =  COMPUTE_Y(r,g,b);
     1114                if (suby) suby[x1 + y1 * subwidth] =  COMPUTE_Y(r,g,b);
    11101115
    11111116                if (((x1 % 2) == 0) && ((y1 % 2) == 0))
    11121117                {
    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);
    11151120                }
    11161121
     
    12071212                y1 = y0+y;
    12081213
    1209                 suby[x1 + y1 * subwidth] =  COMPUTE_Y(r,g,b);
     1214                if (suby) suby[x1 + y1 * subwidth] =  COMPUTE_Y(r,g,b);
    12101215                //                    printf("c\n");
    1211 
    12121216                if (((x1 % 2) == 0) && ((y1 % 2) == 0))
    12131217                {
    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);
    12161220                }
    12171221            }
     
    13581362        WidthRequested = dive_internal_bpl / video_header.format_bpp;
    13591363
    1360     WidthRequested = (WidthRequested + 15) &~ 15;
     1364//    WidthRequested = (WidthRequested + 15) &~ 15;
    13611365
    13621366    suby = py;
     
    14161420            ret = img_convert(&dst_conv, PIX_FMT_YUV420P,
    14171421                        (AVPicture *)&video_picture, video_context->pix_fmt,
    1418                               (width + 15) &~ 15, height);
     1422                              width, height);
    14191423            if (ret < 0)
    14201424                printf("conv rc %i\n", ret);
     
    14851489            yuv2rgb((unsigned char *)dive_internal_buffer,
    14861490                    suby, subu, subv,
    1487                     (width + 15) &~ 15, height,
     1491                    width, height,
    14881492                    WidthRequested, stride0, stride1);
    14891493#endif
     
    15081512                    yv12toyuy2(suby, subu, subv,
    15091513                               (unsigned char *)dive_internal_buffer,
    1510                                (width + 15) &~ 15, height,
     1514                               width, height,
    15111515                               stride0, stride1, WidthRequested * 2, bytes);
    15121516
  • TabularUnified trunk/vout.c

    r131 r168  
    2121#include "plugin.h"
    2222#include "plugins\ovplug.h"
     23#include "libmpdemux\subreader.h"
    2324
    2425#define FMT_RGB16   1
     
    4445
    4546VideoOutPlugin *video_out_plugins = NULL;
     47
     48subtitle* vo_sub = NULL;
     49int vo_sub_changed = 0;
    4650
    4751extern t_VOutCaps *VOutCaps; /* Video out plugin caps */
     
    137141    }
    138142}
     143/* for mplayer demuxer's compatible */
     144int vo_osd_changed(int new_value)
     145{
     146    vo_sub_changed = 1;
     147    return 0;
     148}
  • TabularUnified trunk/vout.h

    r132 r168  
    2222
    2323extern int CurrVideoOutPlug; // plugin index
    24 
     24extern int vo_sub_changed;
    2525#endif
  • TabularUnified trunk/yuv/yuv2rgb.c

    r79 r168  
    190190    int x, y;
    191191
     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);
    192194    yuv2rgb_pxor();
    193195
Note: See TracChangeset for help on using the changeset viewer.