📄 sub_cc.c
字号:
/* * sub_cc.c - Decoder for Closed Captions * * This decoder relies on MPlayer's OSD to display subtitles. * Be warned that the decoding is somewhat preliminary, though it basically works. * * Most notably, only the text information is decoded as of now, discarding color, * background and position info (see source below). * * by Matteo Giani * * uses source from the xine closed captions decoder */#include <stdio.h>#include <stdlib.h>#include <string.h>#include "sub_cc.h"#include "subreader.h"#include "libvo/video_out.h"#include "libvo/sub.h"#define CC_INPUTBUFFER_SIZE 256#define CC_MAX_LINE_LENGTH 64static char chartbl[128];static subtitle buf1,buf2;static subtitle *fb,*bb;static unsigned int cursor_pos=0;static int inited=0;static unsigned char inputbuffer[CC_INPUTBUFFER_SIZE];static unsigned int inputlength;static void build_char_table(void){ int i; /* first the normal ASCII codes */ for (i = 0; i < 128; i++) chartbl[i] = (char) i; /* now the special codes */ chartbl[0x2a] = '
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -