原文链接:https://blog.youkuaiyun.com/bersonking/article/details/85267405
原文为vlc3.0.4版本,修改后发现录制会把视频全部缓存到内存,停止录制才会到本地文件,改为3.0.7.1版本则无此问题
具体方法如下:
一、修改源代码
1、修改vlc-3.0.7/lib目录下的video.c文件中新增接口libvlc_video_toggle_record( libvlc_media_player_t *p_mi, const char *psz_filepath, const char *psz_filename );建议放在libvlc_video_take_snapshot()这个函数后面。
int libvlc_video_toggle_record( libvlc_media_player_t *p_mi,
const char *psz_filepath,
const char *psz_filename )
{
assert( psz_filepath );
assert( psz_filename );
input_thread_t *p_inpu