问题描述
我正在尝试以编程方式将字幕文件设置为DirectShow VSFilter。
可以通过其属性页来执行此操作,但是我找不到任何有关其API的文档,即使它有一个。
I'm trying to set up a subtitles file to DirectShow VSFilter programmatically.There is a way to do so through its property pages but I can't find any documentation regarding its API or even if it has one.
是否有任何API,互操作性以及可以为VSFilter设置字幕文件的东西?
Is there any sort of API, Interop, anything which would allow to set up a subtitle file for VSFilter?
推荐答案
VSFilter上没有特定的文档,但是它是开源软件。因此,您可以下载源代码,并参考其接口定义,例如在MPC-HC源 \Mpc-hc\src\filters\transform\vsfilter\IDirectVobSub.h
中,并使用该界面以编程方式控制过滤器。
There is no specific documentation on VSFilter, however it's open source software. So you can download source code, reference its interface definition e.g. in MPC-HC source \Mpc-hc\src\filters\transform\vsfilter\IDirectVobSub.h
and use the interface to control the filter programmatically.
interface __declspec(uuid("EBE1FB08-3957-47ca-AF13-5827E5442E56"))
IDirectVobSub : public IUnknown
{
STDMETHOD(get_FileName) (THIS_
WCHAR* fn // fn should point to a buffer allocated to at
// least the length of MAX_PATH (=260)
) PURE;
STDMETHOD(put_FileName) (THIS_
WCHAR* fn
) PURE;
// ...
这篇关于有什么方法可以通过编程方式控制DirectShow VSFilter吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!