Quote:
Originally Posted by LaTo
If we really need some writable class member, what is a good method?
(I was thinking about a wrapper which dispatch data between threads using a hashmap of thread id)
|
There is also an option of letting the core create a few instances of your filter class. This way you won't have to implement any kind of synchronization or complicate your plugin.
Using a hashmap in this case is quite hard. You will either have to implement a thread-safe hashmap or know all possible filter ids during hashmap creation in filter constructor. First way will complicate your implementation a lot, the other one will bind your plugin to avs+, plus it is somewhat a bad api design.