一、参考资料
官网的编译教程:http://wiki.videolan.org/Win32CompileMSYS
编译的各种问题:http://wiki.videolan.org/Win32CompileMSYSTroubleShooting
已经编译好的各种版本:http://nightlies.videolan.org/build/
VS下编译项目:https://github.com/sunqueen?tab=repositories
VLC文档:http://www.videolan.org/developers/vlc/doc/doxygen/html/index.html
VLC开发者中心:https://wiki.videolan.org/Developers_Corner
汇编指令拷贝
vlc-2.2.1.32-2013\modules\video_chroma
二、零散知识点备忘
/* Maximum delay between 2 displayed pictures.
* XXX it is needed for now but should be removed in the long term.
*/
#define VOUT_REDISPLAY_DELAY (INT64_C(80000)) //两帧延时超过80ms就扔掉;
/**
* Late pictures having a delay higher than this value are thrashed.
*/
#define VOUT_DISPLAY_LATE_THRESHOLD (INT64_C(20000)) //当前系统时间-图像时间>20ms,说明改图像已经延时过多,即抛弃
// 1、解码模块在解码前先判断是否有帧延时了,如果有,判断延时是否超过5s,如果超过直接释放;判断是否标记为要加速,且延时帧已超过4帧,大于4小于12立即解码,否则抛弃;
// 2、费解:不知为什么vlc需要调用两次avcodec_decode_video2,注释说重新解析,防止丢弃I帧?
// 3、貌似:解码出的帧送渲染前判断缓存的帧的数量是否已经超过1s,如果超过就标记为满。
#define DECODER_MAX_BUFFERING_VIDEO_DURATION (1*CLOCK_FREQ)
/* Pictures which are DECODER_BOGUS_VIDEO_DELAY or more in advance probably have
* a bogus PTS and won't be displayed */
#define DECODER_BOGUS_VIDEO_DELAY ((mtime_t)(DEFAULT_PTS_DELAY * 30))
vlc_object_t *debug = NULL;
msg_Output(debug,"--------bank.c-----module_InitBank()---------------");
// avcodec_decode_video2函数第一参数可以设置出帧策略,丢B帧,丢I帧,丢P帧等; vlc为什么要调用两次这个函数,Reparse it to not drop the I frame
// PCR Abbreviation for Program Clock Reference. 程序参考时钟; MPEG-2标准音视频均为27 MHz
// PTS(Presentation Time Stamp)显示时间标签
// DTS解码时间标签(Decoding Time Stamp)
//live555.cpp中初始化i_pts的值;并非使用码流的timestamp值;
int64_t i_pts = (int64_t)pts.tv_sec * INT64_C(1000000) + (int64_t)pts.tv_usec;
/*FIXME: for h264 you should check that packetization-mode=1 in sdp-file */
p_block->i_dts = ( tk->fmt.i_codec == VLC_CODEC_MPGV ) ? VLC_TS_INVALID : (VLC_TS_0 + i_pts);