Reputation: 19
I had some problems in my app I made an app that can detect the available webcams and render them we can shift from one webcam to another at any time but the problems is when i switch the new render is shown as main stream and the old chosen webcam is shown in the background
Here is an image that shows the prob:
what i have done is releasing the graphbuilder and reinit again with the new filter it works but i'm not satisfied with this logic
MessageBox(NULL,"this is the reload","",NULL);
if(this->videoFilter){ this->videoFilter->Release(); this->videoFilter=NULL; }
if(this->mediaEvent){ this->mediaEvent->Release(); this->mediaEvent=NULL; }
if(this->videoWindow){ this->videoWindow->Release(); this->videoFilter=NULL; }
if(this->mediaControl){ this->mediaControl->Release(); this->mediaControl=NULL; }
// and reallocate them
Upvotes: 0
Views: 120
Reputation: 1046
You didn't remove the filters from the graph. Releasing them is not removing.
Upvotes: 1