Remove callback from within same callback
Posted: 18 Nov 2012 00:13
I wish to remove a callback function after it runs, if a certain condition is met. However, when I call var_DelCallback from within the callback function, the GUI controls freeze up. How can I accomplish my aim?
Details:
My routine adds a filter to a filter_chain on a given vout thread, but I know of no callback that will fire when a vout thread becomes created, so I'm using an "item-change" callback on the playlist. Each time the "item-change" callback fires, I check the input thread for a vout thread, and if a vout thread is available, I would like to remove the "item-change" callback. As stated before, I can't call remove the callback from within the callback itself, however.
Details:
My routine adds a filter to a filter_chain on a given vout thread, but I know of no callback that will fire when a vout thread becomes created, so I'm using an "item-change" callback on the playlist. Each time the "item-change" callback fires, I check the input thread for a vout thread, and if a vout thread is available, I would like to remove the "item-change" callback. As stated before, I can't call remove the callback from within the callback itself, however.