Programmatically requiring module of cap "video filter2"
Posted: 28 Sep 2012 21:11
I'm trying to require a video filter module from an interface module.
* I have looked at the possibility of using filter_chain_AppendFilter or a related function, but I don't see how to get a hold of the pointer to the current video filter chain. Any instruction is welcome.
** I tried attaching attaching a callback to the playlist using var_AddCallback( p_playlist, "item-current", PlaylistChangeCallback, p_intf ), then in the callback requiring the video filter module if playlist_CurrentInput( p_playlist ) returned a valid pointer, but that appears to be insufficient: when the video filter module opens, it holds an unrecognizeable input chroma code. This problem does not arise when I load the filter with a command line option (--video-filter my_video_filter). When I use the command line option, the input chroma is x30323449, whereas it is x5 when I use module_need in the callback function described above.
- Is there a better function for this than module_need? (I have tried to understand alternatives. See notes *)
- What callback trigger is appropriate for triggering said function? (I have made attempts. See notes **)
- Had I better module_unneed the filter module at any time?
* I have looked at the possibility of using filter_chain_AppendFilter or a related function, but I don't see how to get a hold of the pointer to the current video filter chain. Any instruction is welcome.
** I tried attaching attaching a callback to the playlist using var_AddCallback( p_playlist, "item-current", PlaylistChangeCallback, p_intf ), then in the callback requiring the video filter module if playlist_CurrentInput( p_playlist ) returned a valid pointer, but that appears to be insufficient: when the video filter module opens, it holds an unrecognizeable input chroma code. This problem does not arise when I load the filter with a command line option (--video-filter my_video_filter). When I use the command line option, the input chroma is x30323449, whereas it is x5 when I use module_need in the callback function described above.