开发者

Send message to property page from DirectShow filter

开发者 https://www.devze.com 2023-03-10 05:59 出处:网络
I\'ve written a Directshow filter that derives from CTransInPlace and implement开发者_如何学Gos a single property page.Passing data to the filter from the property page and pulling data from the filte

I've written a Directshow filter that derives from CTransInPlace and implement开发者_如何学Gos a single property page. Passing data to the filter from the property page and pulling data from the filter to the property page works great (using a defined interface), but I want to send a notification from the filter to the property page to signify something has happened (in this case, clipping has occurred in an equalizer).

I'm having trouble at this point, because I have no reference to the property page from within the filter, and the property page is instantiated by GraphEdit.

What's the best way to send some type of message or notification to the property page?


You can implement a callback function in the filter. Take a look at the samplegrabber filter. There is a simular situation:

The samplegrabber filter implements the ISampleGrabber Interface which includes a SetCallback function. The class which needs to receive the callback, needs to implement the ISampleGrabberCB Interface. When calling SetCallback you pass a pointer to the ISampleGrabberCB Interface. Now the samplegrabber filter can call a function (BufferCB or SampleCB) in that interface.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号