How can I directly embed a DirectShow Push Source filter in an EXE?

前端 未结 2 1980
情歌与酒
情歌与酒 2021-01-23 01:46

I have a Delphi 6 program that receives audio from an external program via a socket. Now I want to feed that audio to a DirectShow filter graph I create that routes that audio

2条回答
  •  Happy的楠姐
    2021-01-23 02:35

    Filters don't have to be put into libraries (DLL), and they don't have to be even registered COM objects, no. As mentioned, the only reason to make this, is to make the filter available to applications through CoCreateInstance and/or through enumeration of DirectShow categories.

    Being put into your application directly, it has to implement IBaseFilter and you will IFilterGraph::AddFilter it into the graph. An advantage of having filter privately, is that you don't need to implement communication between application and filter through COM interface, and you can use native/direct pointers.

    See also Geraint's post Using Filters Without Registration.

提交回复
热议问题