Nevcairiel / LAVFilters

LAV Filters - Open-Source DirectShow Media Splitter and Decoders
GNU General Public License v2.0
7.53k stars 792 forks source link

Send custom graph event after audio stream change #607

Open clsid2 opened 4 months ago

clsid2 commented 4 months ago

MPC-HC has an option to show some details of the current audio stream in its statusbar. However, this info is not updated when the stream is changed through LAV Splitter. And of course I would like to avoid having to frequently check the graph for changes.

Could you send a custom graph event when audio stream is changed? https://learn.microsoft.com/en-us/windows/win32/directshow/cbasefilter-notifyevent madvr uses 0xfa17 as a custom eventcode, so I suggest using a value in a similar range.

Nevcairiel commented 4 months ago

Changing an audio stream by the user stops and restarts the graph, that seems like quite a noticeable event to watch for.

clsid2 commented 4 months ago

That only fires the generic EC_PAUSED event, which is quite common, e.g. fires after each frame step or pause.

I could use that. But would be less efficient.