[Mplayer-cvslog] CVS: main spudec.c,NONE,1.1 spudec.h,NONE,1.1 mplayer.c,1.86,1.87 Makefile,1.19,1.20
Gabor Lenart
lgb at users.sourceforge.net
Sat Apr 21 17:38:03 CEST 2001
Update of /cvsroot/mplayer/main
In directory usw-pr-cvs1:/tmp/cvs-serv31644/main
Modified Files:
mplayer.c Makefile
Added Files:
spudec.c spudec.h
Log Message:
Separated dvdsub code to be able to work with it easier
--- NEW FILE ---
/* SPUdec.c
Skeleton of function spudec_process_controll() was written by Apri.
Further works:
LGB,... (yeah, try to improve it and insert your name here! ;-) */
#include <stdio.h>
#include "spudec.h"
void spudec_process_control(unsigned char *control, int size, int* d1, int* d2)
{
int off = 2;
int a,b; /* Temporary vars */
do {
int type = control[off];
off++;
printf("cmd=%d ",type);
switch(type) {
case 0x00:
/* Menu ID, 1 byte */
printf("Menu ID\n");
break;
case 0x01:
/* Start display */
printf("Start display!\n");
// gSpudec.geom.bIsVisible = 1;
break;
case 0x03:
/* Palette */
printf("Palette\n");
// palette[3] = &(gSpudec.clut[(control[off] >> 4)]);
// palette[2] = &(gSpudec.clut[control[off] & 0xf]);
// palette[1] = &(gSpudec.clut[(control[off+1] >> 4)]);
// palette[0] = &(gSpudec.clut[control[off+1] & 0xf]);
off+=2;
break;
case 0x04:
/* Alpha */
printf("Alpha\n");
// alpha[3] = control[off] & 0xf0;
// alpha[2] = (control[off] & 0xf) << 4;
// alpha[1] = control[off+1] & 0xf0;
// alpha[0] = (control[off+1] & 0xf) << 4;
off+=2;
break;
case 0x05:
/* Co-ords */
a = (control[off] << 16) + (control[off+1] << 8) + control[off+2];
b = (control[off+3] << 16) + (control[off+4] << 8) + control[off+5];
printf("Coords col: %d - %d row: %d - %d\n",a >> 12,a & 0xfff,b >> 12,b & 0xfff);
// gSpudec.geom.start_col = a >> 12;
// gSpudec.geom.end_col = a & 0xfff;
// gSpudec.geom.start_row = b >> 12;
// gSpudec.geom.end_row = b & 0xfff;
off+=6;
break;
case 0x06:
/* Graphic lines */
*(d1) = (control[off] << 8) + control[off+1];
*(d2) = (control[off+2] << 8) + control[off+3];
printf("Graphic pos color: %d b/w: %d\n",*d1,*d2);
off+=4;
break;
case 0xff:
/* All done, bye-bye */
printf("Done!\n");
return;
break;
default:
printf("spudec: Error determining control type 0x%02x.\n",type);
return;
break;
}
/* printf("spudec: Processsed control type 0x%02x.\n",type); */
} while(off < size);
}
--- NEW FILE ---
#ifndef _MPLAYER_SPUDEC_H
#define _MPLAYER_SPUDEC_H
void spudec_process_control(unsigned char *, int, int*, int*);
#endif
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -C2 -r1.86 -r1.87
*** mplayer.c 2001/04/21 02:24:36 1.86
--- mplayer.c 2001/04/21 15:38:01 1.87
***************
*** 52,55 ****
--- 52,56 ----
#include "dvdauth.h"
+ #include "spudec.h"
#ifdef USE_DIRECTSHOW
***************
*** 184,266 ****
vo_sub=NULL; // no sub here
}
-
-
-
-
-
- void spudec_process_control(unsigned char *control, int size, int* d1, int* d2)
- {
- int off = 2;
- int a,b; /* Temporary vars */
-
- do {
- int type = control[off];
- off++;
- printf("cmd=%d ",type);
-
- switch(type) {
- case 0x00:
- /* Menu ID, 1 byte */
- printf("Menu ID\n");
- break;
- case 0x01:
- /* Start display */
- printf("Start display!\n");
- // gSpudec.geom.bIsVisible = 1;
- break;
- case 0x03:
- /* Palette */
- printf("Palette\n");
- // palette[3] = &(gSpudec.clut[(control[off] >> 4)]);
- // palette[2] = &(gSpudec.clut[control[off] & 0xf]);
- // palette[1] = &(gSpudec.clut[(control[off+1] >> 4)]);
- // palette[0] = &(gSpudec.clut[control[off+1] & 0xf]);
- off+=2;
- break;
- case 0x04:
- /* Alpha */
- printf("Alpha\n");
- // alpha[3] = control[off] & 0xf0;
- // alpha[2] = (control[off] & 0xf) << 4;
- // alpha[1] = control[off+1] & 0xf0;
- // alpha[0] = (control[off+1] & 0xf) << 4;
- off+=2;
- break;
- case 0x05:
- /* Co-ords */
- a = (control[off] << 16) + (control[off+1] << 8) + control[off+2];
- b = (control[off+3] << 16) + (control[off+4] << 8) + control[off+5];
-
- printf("Coords col: %d - %d row: %d - %d\n",a >> 12,a & 0xfff,b >> 12,b & 0xfff);
-
- // gSpudec.geom.start_col = a >> 12;
- // gSpudec.geom.end_col = a & 0xfff;
- // gSpudec.geom.start_row = b >> 12;
- // gSpudec.geom.end_row = b & 0xfff;
-
- off+=6;
- break;
- case 0x06:
- /* Graphic lines */
- *(d1) = (control[off] << 8) + control[off+1];
- *(d2) = (control[off+2] << 8) + control[off+3];
- printf("Graphic pos color: %d b/w: %d\n",*d1,*d2);
- off+=4;
- break;
- case 0xff:
- /* All done, bye-bye */
- printf("Done!\n");
- return;
- break;
- default:
- printf("spudec: Error determining control type 0x%02x.\n",type);
- return;
- break;
- }
-
- /* printf("spudec: Processsed control type 0x%02x.\n",type); */
- } while(off < size);
- }
-
--- 185,188 ----
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** Makefile 2001/04/17 22:04:44 1.19
--- Makefile 2001/04/21 15:38:01 1.20
***************
*** 21,26 ****
BINDIR = ${prefix}/bin
# BINDIR = /usr/local/bin
! SRCS = codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c lirc_mp.c cfgparser.c mixer.c dvdauth.c
! OBJS = codec-cfg.o subreader.o linux/getch2.o linux/timer-lx.o linux/shmem.o xa/xa_gsm.o lirc_mp.o cfgparser.o mixer.o dvdauth.o
CFLAGS = $(OPTFLAGS) $(CSS_INC) -Iloader -Ilibvo # -Wall
A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3
--- 21,26 ----
BINDIR = ${prefix}/bin
# BINDIR = /usr/local/bin
! SRCS = codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c lirc_mp.c cfgparser.c mixer.c dvdauth.c spudec.c
! OBJS = codec-cfg.o subreader.o linux/getch2.o linux/timer-lx.o linux/shmem.o xa/xa_gsm.o lirc_mp.o cfgparser.o mixer.o dvdauth.o spudec.o
CFLAGS = $(OPTFLAGS) $(CSS_INC) -Iloader -Ilibvo # -Wall
A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3
_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog
More information about the MPlayer-cvslog
mailing list