[Xbyamp-cvs] xbmp/player/mplayer af_equalizer.c,1.1,1.2 ao_plugin.c,1.2,1.3 find_sub.c,1.2,1.3 font_
Status: Pre-Alpha
Brought to you by:
yamp
Update of /cvsroot/xbyamp/xbmp/player/mplayer In directory sc8-pr-cvs1:/tmp/cvs-serv25740/player/mplayer Modified Files: af_equalizer.c ao_plugin.c find_sub.c font_load.c helper.c spudec.c subreader.cpp libmpcodecs.lib libmpdemux.lib Log Message: removed compiler warnings Index: af_equalizer.c =================================================================== RCS file: /cvsroot/xbyamp/xbmp/player/mplayer/af_equalizer.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** af_equalizer.c 28 Nov 2002 21:47:32 -0000 1.1 --- af_equalizer.c 3 Dec 2002 17:46:59 -0000 1.2 *************** *** 105,109 **** // Generate filter taps for(k=0;k<s->K;k++) ! bp2( s->a[k],s->b[k], (float)(F[k]/(af->data->rate)),Q ); // Calculate how much this plugin adds to the overall time delay --- 105,109 ---- // Generate filter taps for(k=0;k<s->K;k++) ! bp2( s->a[k],s->b[k], (float)(F[k]/(af->data->rate)),(float)Q ); // Calculate how much this plugin adds to the overall time delay Index: ao_plugin.c =================================================================== RCS file: /cvsroot/xbyamp/xbmp/player/mplayer/ao_plugin.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ao_plugin.c 2 Dec 2002 18:46:48 -0000 1.2 --- ao_plugin.c 3 Dec 2002 17:46:59 -0000 1.3 *************** *** 10,13 **** --- 10,14 ---- #include "audio_plugin.h" + #include "mp_msg.h" static ao_info_t info = Index: find_sub.c =================================================================== RCS file: /cvsroot/xbyamp/xbmp/player/mplayer/find_sub.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** find_sub.c 2 Dec 2002 18:46:52 -0000 1.2 --- find_sub.c 3 Dec 2002 17:47:00 -0000 1.3 *************** *** 40,49 **** if(vo_sub) { ! if(key>=vo_sub->start && key<=vo_sub->end) return; // OK! } else { ! if(key>nosub_range_start && key<nosub_range_end) return; // OK! } --- 40,49 ---- if(vo_sub) { ! if(key>=(int)vo_sub->start && key<=(int)vo_sub->end) return; // OK! } else { ! if(key>(int)nosub_range_start && key<(int)nosub_range_end) return; // OK! } *************** *** 64,68 **** if(current_sub>=0 && current_sub+1<sub_num) { ! if(key>subtitles[current_sub].end && key<subtitles[current_sub+1].start) { // no sub --- 64,68 ---- if(current_sub>=0 && current_sub+1<sub_num) { ! if(key>(int)subtitles[current_sub].end && key<(int)subtitles[current_sub+1].start) { // no sub *************** *** 75,79 **** ++current_sub; vo_sub=&subtitles[current_sub]; ! if(key>=vo_sub->start && key<=vo_sub->end) return; // OK! } --- 75,79 ---- ++current_sub; vo_sub=&subtitles[current_sub]; ! if(key>=(int)vo_sub->start && key<=(int)vo_sub->end) return; // OK! } *************** *** 90,96 **** current_sub=(i+j+1)/2; vo_sub=&subtitles[current_sub]; ! if(key<vo_sub->start) j=current_sub-1; ! else if(key>vo_sub->end) i=current_sub+1; else --- 90,96 ---- current_sub=(i+j+1)/2; vo_sub=&subtitles[current_sub]; ! if(key<(int)vo_sub->start) j=current_sub-1; ! else if(key>(int)vo_sub->end) i=current_sub+1; else *************** *** 101,105 **** // check where are we... ! if(key<vo_sub->start) { if(current_sub<=0) --- 101,105 ---- // check where are we... ! if(key<(int)vo_sub->start) { if(current_sub<=0) *************** *** 113,117 **** } --current_sub; ! if(key>subtitles[current_sub].end && key<subtitles[current_sub+1].start) { // no sub --- 113,117 ---- } --current_sub; ! if(key>(int)subtitles[current_sub].end && key<(int)subtitles[current_sub+1].start) { // no sub *************** *** 126,130 **** else { ! if(key<=vo_sub->end) mp_msg(0,0,"JAJJ! "); else --- 126,130 ---- else { ! if(key<=(int)vo_sub->end) mp_msg(0,0,"JAJJ! "); else *************** *** 139,143 **** } else ! if(key>subtitles[current_sub].end && key<subtitles[current_sub+1].start) { // no sub --- 139,143 ---- } else ! if(key>(int)subtitles[current_sub].end && key<(int)subtitles[current_sub+1].start) { // no sub Index: font_load.c =================================================================== RCS file: /cvsroot/xbyamp/xbmp/player/mplayer/font_load.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** font_load.c 2 Dec 2002 18:46:52 -0000 1.2 --- font_load.c 3 Dec 2002 17:47:00 -0000 1.3 *************** *** 321,325 **** { // re-sample alpha ! int f=factor*256.0f; int size=desc->pic_a[i]->w*desc->pic_a[i]->h; int j; --- 321,325 ---- { // re-sample alpha ! int f=(int)(factor*256.0f); int size=desc->pic_a[i]->w*desc->pic_a[i]->h; int j; Index: helper.c =================================================================== RCS file: /cvsroot/xbyamp/xbmp/player/mplayer/helper.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** helper.c 30 Nov 2002 16:03:08 -0000 1.3 --- helper.c 3 Dec 2002 17:47:00 -0000 1.4 *************** *** 161,166 **** LARGE_INTEGER qwTicksPerSec; QueryPerformanceFrequency( &qwTicksPerSec ); // ticks/sec ! m_fuSecsPerTick = ((FLOAT)(qwTicksPerSec.QuadPart)) /1000.0; // tics/msec ! m_fuSecsPerTick = m_fuSecsPerTick/1000.0; // tics/usec QueryPerformanceCounter( &m_lStartTime ); --- 161,166 ---- LARGE_INTEGER qwTicksPerSec; QueryPerformanceFrequency( &qwTicksPerSec ); // ticks/sec ! m_fuSecsPerTick = (FLOAT)(((FLOAT)(qwTicksPerSec.QuadPart)) /1000.0); // tics/msec ! m_fuSecsPerTick = (FLOAT)(m_fuSecsPerTick/1000.0); // tics/usec QueryPerformanceCounter( &m_lStartTime ); Index: spudec.c =================================================================== RCS file: /cvsroot/xbyamp/xbmp/player/mplayer/spudec.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** spudec.c 2 Dec 2002 18:46:56 -0000 1.2 --- spudec.c 3 Dec 2002 17:47:00 -0000 1.3 *************** *** 579,583 **** src_step = (delta_src << 16) / delta_tar >>1; for (t = 0; t<=delta_tar; src += (src_step << 1), t++){ ! table[t].position= MIN(src >> 16, end_src - 1); table[t].right_down = src & 0xffff; table[t].left_up = 0x10000 - table[t].right_down; --- 579,583 ---- src_step = (delta_src << 16) / delta_tar >>1; for (t = 0; t<=delta_tar; src += (src_step << 1), t++){ ! table[t].position= MIN(src >> 16, (int)end_src - 1); table[t].right_down = src & 0xffff; table[t].left_up = 0x10000 - table[t].right_down; Index: subreader.cpp =================================================================== RCS file: /cvsroot/xbyamp/xbmp/player/mplayer/subreader.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** subreader.cpp 2 Dec 2002 18:46:57 -0000 1.2 --- subreader.cpp 3 Dec 2002 17:47:00 -0000 1.3 *************** *** 660,666 **** while (sscanf (line, "%f %f", &a, &b) !=2); ! mpsub_position += a*(sub_uses_time ? 100.0 : 1.0); current->start=(int) mpsub_position; ! mpsub_position += b*(sub_uses_time ? 100.0 : 1.0); current->end=(int) mpsub_position; --- 660,666 ---- while (sscanf (line, "%f %f", &a, &b) !=2); ! mpsub_position += (float)(a*(sub_uses_time ? 100.0 : 1.0)); current->start=(int) mpsub_position; ! mpsub_position += (float)(b*(sub_uses_time ? 100.0 : 1.0)); current->end=(int) mpsub_position; *************** *** 1221,1225 **** subtitle* nextsub; int i = sub_num; ! unsigned long subfms = (sub_uses_time ? 100 : fps) * subtime; n=m=0; --- 1221,1225 ---- subtitle* nextsub; int i = sub_num; ! unsigned long subfms = (unsigned long)((sub_uses_time ? 100 : fps) * subtime); n=m=0; *************** *** 1260,1265 **** if(sub_uses_time && sub_fps) { ! sub->start *= sub_fps/fps; ! sub->end *= sub_fps/fps; } } --- 1260,1265 ---- if(sub_uses_time && sub_fps) { ! sub->start *= (unsigned long)(sub_fps/fps); ! sub->end *= (unsigned long)(sub_fps/fps); } } *************** *** 1599,1753 **** mp_msg(0,0,"Read %i subtitles, %i errors.\n", sub_num, sub_errs); - } - void dump_srt(subtitle* subs, float fps) - { - int i,j; - int h,m,s,ms; - FILE* fd; - subtitle * onesub; - unsigned long temp; - - if (!sub_uses_time && sub_fps == 0) - sub_fps = fps; - fd=fopen("dumpsub.srt","w"); - if(!fd) - { - perror("dump_srt: fopen"); - return; - } - for(i=0;i<sub_num;i++) - { - onesub=subs+i; //=&subs[i]; - fprintf(fd,"%d\n",i+1);//line number - - temp=onesub->start; - if (!sub_uses_time) - temp = temp * 100 / sub_fps; - temp -= sub_delay * 100; - h=temp/360000; - temp%=360000; //h =1*100*60*60 - m=temp/6000; - temp%=6000; //m =1*100*60 - s=temp/100; - temp%=100; //s =1*100 - ms=temp*10; //ms=1*10 - fprintf(fd,"%02d:%02d:%02d,%03d --> ",h,m,s,ms); - - temp=onesub->end; - if (!sub_uses_time) - temp = temp * 100 / sub_fps; - temp -= sub_delay * 100; - h=temp/360000; - temp%=360000; - m=temp/6000; - temp%=6000; - s=temp/100; - temp%=100; - ms=temp*10; - fprintf(fd,"%02d:%02d:%02d,%03d\n",h,m,s,ms); - - for(j=0;j<onesub->lines;j++) - fprintf(fd,"%s\n",onesub->text[j]); - - fprintf(fd,"\n"); - } - fclose(fd); - mp_msg(MSGT_SUBREADER,MSGL_INFO,"SUB: Subtitles dumped in \'dumpsub.srt\'.\n"); - } - - void dump_mpsub(subtitle* subs, float fps) - { - int i,j; - FILE*fd; - float a,b; - - mpsub_position=sub_uses_time?(sub_delay*100):(sub_delay*fps); - if (sub_fps==0) - sub_fps=fps; - - fd=fopen ("dump.mpsub", "w"); - if (!fd) - { - perror ("dump_mpsub: fopen"); - return; - } - - - if (sub_uses_time) - fprintf (fd,"FORMAT=TIME\n\n"); - else - fprintf (fd, "FORMAT=%5.2f\n\n", fps); - - for(j=0;j<sub_num;j++) - { - subtitle* egysub=&subs[j]; - if (sub_uses_time) - { - a=((egysub->start-mpsub_position)/100.0); - b=((egysub->end-egysub->start)/100.0); - if ( (float)((int)a) == a) - fprintf (fd, "%.0f",a); - else - fprintf (fd, "%.2f",a); - - if ( (float)((int)b) == b) - fprintf (fd, " %.0f\n",b); - else - fprintf (fd, " %.2f\n",b); - } - else - { - fprintf (fd, "%ld %ld\n", (long)((egysub->start*(fps/sub_fps))-((mpsub_position*(fps/sub_fps)))), - (long)(((egysub->end)-(egysub->start))*(fps/sub_fps))); - } - - mpsub_position = egysub->end; - for (i=0; i<egysub->lines; i++) - { - fprintf (fd, "%s\n",egysub->text[i]); - } - fprintf (fd, "\n"); - } - fclose (fd); - mp_msg(MSGT_SUBREADER,MSGL_INFO,"SUB: Subtitles dumped in \'dump.mpsub\'.\n"); - } - - void dump_microdvd(subtitle* subs, float fps) - { - int i, delay; - FILE*fd; - if (sub_fps == 0) - sub_fps = fps; - fd = fopen("dumpsub.txt", "w"); - if (!fd) - { - perror("dumpsub.txt: fopen"); - return; - } - delay = sub_delay * sub_fps; - for (i = 0; i < sub_num; ++i) - { - int j, start, end; - start = subs[i].start; - end = subs[i].end; - if (sub_uses_time) - { - start = start * sub_fps / 100 ; - end = end * sub_fps / 100; - } - else - { - start = start * sub_fps / fps; - end = end * sub_fps / fps; - } - start -= delay; - end -= delay; - fprintf(fd, "{%d}{%d}", start, end); - for (j = 0; j < subs[i].lines; ++j) - fprintf(fd, "%s%s", j ? "|" : "", subs[i].text[j]); - fprintf(fd, "\n"); - } - fclose(fd); - mp_msg(MSGT_SUBREADER,MSGL_INFO,"SUB: Subtitles dumped in \'dumpsub.txt\'.\n"); } --- 1599,1602 ---- Index: libmpcodecs.lib =================================================================== RCS file: /cvsroot/xbyamp/xbmp/player/mplayer/libmpcodecs.lib,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Binary files /tmp/cvsy1hnIm and /tmp/cvsczPMqO differ Index: libmpdemux.lib =================================================================== RCS file: /cvsroot/xbyamp/xbmp/player/mplayer/libmpdemux.lib,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvsbZVKRW and /tmp/cvsmn74pQ differ |