APIlibvlc_instance_t* libvlc_new(int argc, const char* const* argv)
libvlc_instance_t*libvlc_new(intargc,constchar*const*argv)
创建并初始化一个LIBVLC实例
这个函数接受一个命令行参数列表,这个参数列表影响LIBVLC INSTANCE的缺省配置.
Version:
参数意味着被从命令行传递到LIBVLC,就像VLC媒体播放器做的那样。有效的参数列表依赖于LIBVLC的版本、操作系统、平台以及LIBVLC的插件集。无效或不支持的参数将会导致该API的失败(returnNULL)。此外,某些参数可能会改变LIBVLC的行为或以其它方式干扰LIBVLC的其它功能。
Parameters:
argc : 命令行参数个数
argv : 命令行类型参数
Returns:
成功返回LIBVLC实例,失败返回NULL。
VLC_PUBLIC_API void libvlc_release( libvlc_instance_t *p_instance );
减少LIBVLC INSTANCE的引用计数,并且如果计数为零的话就摧毁它。
(Decrement the reference count of a libvlc instance, and destroy itifit reaches zero)
param:
要摧毁的LIBVLC INSTANCE
VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new( libvlc_instance_t *p_libvlc_instance );
创建一个空的媒体播放器对象
Parameters:
p_libvlc_instance:被创建的媒体播放器所属的实例
Return:
一个新的媒体播放器对象,出错返回NULL.
VLC_PUBLIC_API void libvlc_media_player_release( libvlc_media_player_t *p_mi );
使用后释放媒体播放器对象,减少媒体播放器对象的引用次数。如果计数已经为零,该方法将释放掉媒体播放器对象,如果媒体播放器对象已经被释放了,这个方法不应该再被调用(Release a media_player after use Decrement the reference count of a media playerobject. If the reference countis0, then libvlc_media_player_release() will release the media playerobject. If the media playerobjecthas been released, then it should not be used again.)
param:
<