Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Absurd-Chaos

DirectShow - IVideoFilter's behavior

This topic is 5435 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Here comes my code which smoothy switches video clip files without returning from fullscreen to windowed mode and screen flicking. This code work perfectly, but it loses fullscreen mode when new clip have different resolution. Can anybody help me? HRESULT ReConstructGraph(const TCHAR * Movie) { USES_CONVERSION; HRESULT hr; WCHAR wFile[MAX_PATH]; wcscpy(wFile, T2W(Movie)); do{ CComQIPtr pGC(_pGB); // pGB - IGraphBuilder void* p; // Stop the graph in order to disconnect pins hr = _pMC->Stop();// IMediaControl if(FAILED(hr)) break; //Disconnect Pins CComPtr pFatherPin(GetPin(_pVideoFilter,PINDIR_INPUT)); hr = pFatherPin->ConnectedTo((IPin**)&p); if(FAILED(hr)) break; CComPtr pMotherPin((IPin*)p); hr = _pGB->Disconnect(pMotherPin); if(FAILED(hr)) break; hr = _pGB->Disconnect(pFatherPin); if(FAILED(hr)) break; //Add Video Filter to Cache hr = pGC->AddFilterToCache(_pVideoFilter); if(FAILED(hr)) break; //Build new graph (cached filters are connected in the first order) hr = _pGB->RenderFile(wFile, NULL); if(FAILED(hr)) break; // Run the new graph hr = _pMC->Run(); if(FAILED(hr)) break; }while(0); return hr; }

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!