添加VLC模块
来源:互联网 发布:单片机音乐代码生成器 编辑:程序博客网 时间:2024/05/21 22:22
转自:http://tianxiaoma.blog.51cto.com/1501174/303430
64 How to add a module
65 -------------------
66
67 To add a module to the repository, just add its sources to a Modules.am
68 file. If you add a new directory you will need to create a new Modules.am,
69 inside that directory. Do not forget to add a corresponding
70 Makefile line at the end of configure.ac for this new Modules.am file.
71
72 To have the module built, you need to add a call to VLC_ADD_PLUGIN or
73 VLC_ADD_BUILTINS to configure.ac with your new module name as argument.
74 Look at other modules for guidelines on how to add build and linkage options.
75
76 After changing configure.ac you will always need to rerun bootstrap and
77 configure.
78
79 VLC keeps a cache of its modules (in ~/.cache/vlc/ on Linux), so you'll have to
80 delete it (or use vlc --reset-plugins-cache). Then use vlc -vvv --color --list
81 to check that your plugin is seen by VLC.
65 -------------------
66
67 To add a module to the repository, just add its sources to a Modules.am
68 file. If you add a new directory you will need to create a new Modules.am,
69 inside that directory. Do not forget to add a corresponding
70 Makefile line at the end of configure.ac for this new Modules.am file.
71
72 To have the module built, you need to add a call to VLC_ADD_PLUGIN or
73 VLC_ADD_BUILTINS to configure.ac with your new module name as argument.
74 Look at other modules for guidelines on how to add build and linkage options.
75
76 After changing configure.ac you will always need to rerun bootstrap and
77 configure.
78
79 VLC keeps a cache of its modules (in ~/.cache/vlc/ on Linux), so you'll have to
80 delete it (or use vlc --reset-plugins-cache). Then use vlc -vvv --color --list
81 to check that your plugin is seen by VLC.
VLC提供的模块说明如上图。下面分别讲解了如何添加模块目录和添加模块,源代码见最后。
一、添加“模块目录。
(1) 在Modules目录下新建MyModules子目录,加入“模块源代码”mymdule1.c
(2) 添加Modules.am文件
SOURCES_mymodule1 = mymodule1.c
libvlc_LTLIBRARIES += \
$(NULL)
$(NULL)
(3) 修改Modules/Makefile.am文件,添加MyModules子目录
BASE_SUBDIRS = \
....
MyModules
....
MyModules
(4) 修改根目录下的configure.ac文件,添加模块,支持编译
dnl
dnl mymodules
dnl
VLC_ADD_PLUGIN([mymodule1])
dnl mymodules
dnl
VLC_ADD_PLUGIN([mymodule1])
(4) 运行./bootstrap
./configure**.sh (自己定义的configure文件)
二、添加“模块”
例如:在Demux目录下添加MyModule1模块
(1) 修改Demux目录下的Modules.am文件,增加1行
SOURCES_mymodule1 = mymodule1.c
(2) 复制MyModule1.c到Demux目录
(3) 修改根目录下的configure.ac文件,添加模块,支持编译
dnl
dnl mymodules
dnl
VLC_ADD_PLUGIN([mymodule1])
dnl mymodules
dnl
VLC_ADD_PLUGIN([mymodule1])
(4) 运行./bootstrap
./configure**.sh (自己定义的configure文件)
附:MyModule1.c源代码:
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_plugin.h>
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
vlc_module_begin()
add_shortcut( "testmodule" )
set_description("testmodle plug-in")
set_callbacks( Open, Close )
set_capability( "testing", 0 )
set_category( CAT_INPUT )
vlc_module_end ()
/*****************************************************************************
* Open: initialize interface
*****************************************************************************/
static int Open( vlc_object_t *p_this )
{
msg_Dbg(p_this,"Using test module...\n");
return VLC_SUCCESS;
}
/*****************************************************************************
* Close: destroy interface
*****************************************************************************/
static void Close( vlc_object_t *p_this )
{
msg_Dbg(p_this,"Close test module!\n");
}
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_plugin.h>
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
vlc_module_begin()
add_shortcut( "testmodule" )
set_description("testmodle plug-in")
set_callbacks( Open, Close )
set_capability( "testing", 0 )
set_category( CAT_INPUT )
vlc_module_end ()
/*****************************************************************************
* Open: initialize interface
*****************************************************************************/
static int Open( vlc_object_t *p_this )
{
msg_Dbg(p_this,"Using test module...\n");
return VLC_SUCCESS;
}
/*****************************************************************************
* Close: destroy interface
*****************************************************************************/
static void Close( vlc_object_t *p_this )
{
msg_Dbg(p_this,"Close test module!\n");
}
0 0
- 添加VLC模块
- 添加VLC模块
- vlc-0.8.6i中添加自己的模块
- VLC数据访问模块
- vlc模块分析查看
- VLC中的各个模块
- 改变VLC模块参数
- 添加VLC录像API
- 添加VLC录像API
- 添加VLC录像API
- vlc模块间共享变量
- VLC可用的模块列表!
- VLC可用的模块列表
- vlc模块中设置模块能力
- VLC中添加real的支持
- vlc缓冲事件添加及缓冲进度
- 树莓派如何添加“vlc 命令”自启动
- 给 vlc sdk 添加录像接口
- VSCode从非根目录编译golang程序
- 安卓几种图片加载框架的比较
- 物体检测及分类
- CSS第一天
- 编译报错:Duplicate Symbols for Architecture arm64
- 添加VLC模块
- java实现凯撒密码简单破解
- 表达式计算
- linux的计划任务
- OmniGraffle v6 注册码
- CString与string类型互相转换、CString转化为LPCSTR、TCHAR转化为CString、CString型字符串连接
- java 基础学习笔记2
- PAT 乙级 1039. 到底买不买(20)Java版
- Android系统下不同字体的环境判断