sub_cc.c
来自「自己移植的linux下的流媒体播放器原代码,支持mms协议,支持ftp和http」· C语言 代码 · 共 50 行
C
50 行
/* * 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 + =
减小字号Ctrl + -
显示快捷键?