Is there any way to control DirectShow VSFilter programmatically?

假装没事ソ 提交于 2019-12-13 00:42:24

问题


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.

Is there any sort of API, Interop, anything which would allow to set up a subtitle file for VSFilter?


回答1:


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;
// ...


来源:https://stackoverflow.com/questions/25179308/is-there-any-way-to-control-directshow-vsfilter-programmatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!