Just a thought (maybe wrong):
Since both filters are inside one dll, you can put the ColocKeyFrame data in an STL container (a map) and use child's address as the key. Because many ColorKeyFrame calls may be chained to a single clip, the value of the map should be a container also (a stack, a queue, a vector, a list,..., depending on how ColorInterpolation accesses the data).
ColocKeyFrame pseudocode:
Code:
your_type data = CalcData(child, keyframe);
size_t key = (size_t) child->p;
map<size_t, list<your_type>>::iterator it = global_map.find(key);
if (it == global_map.end()) {
// first time; init value container
global_map[key] = new list<your_type>(1, data);
}
else {
// not first time; add an element
it->second.push_back(data);
}
ColocInterpolation pseudocode:
Code:
size_t key = (size_t) second_child->p;
map<size_t, list<your_type>>::iterator it = global_map.find(key);
if (it == global_map.end()) {
// no values; handle error
...
}
else {
// it->second contains the list with data; do your stuff
...
}