Re: Two Webcam in a graph



On Fri, 17 Jun 2005 01:07:08 -0700, Pierre wrote:

> Hi, i'm putting two webcam in a graph for make stereoscopic image.
> I use the sub graph method :
>
> Cam 1 - Grabber1 - PGraph->Render(Grabber1 Out pin)
> Cam 2 - Grabber2 - PGraph->Render(Grabber2 Out pin)
>
> I have a problem, with the video window, I put video window to false but one
> video window (of the 2 cam) stay active.
> I do :
> CComPtr< IVideoWindow > pVideoWindow ;
> hr = pGraph->QueryInterface(IID_IVideoWindow,(void**)&pVideoWindow);
> if (pVideoWindow)
> hr = pVideoWindow->put_AutoShow(OAFALSE);
>
> I thinks this method put the video window to false for only one video
> renderer.
> Only one active movie window is always run.
>
> I want to put the two window to false.
> How i can access at each camera's pwindow (renderer) and put their autoshow
> to false.

>From the docs:

"In most cases, an application should query the Filter Graph Manager for
this interface, and not call the filter directly, because of the messaging
issue just described. However, if the filter graph has more than one Video
Renderer, the Filter Graph Manager only communicates with one of them,
selected arbitrarily. Therefore, if your application uses multiple video
windows, use the IVideoWindow interface directly on the filters. In that
case, you must forward window messages to each Video Renderer instance,
using the IVideoWindow::NotifyOwnerMessage method."

So you need to QI on each video renderer filter, not on the FGM.


--
Please read this before replying:
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
.



Relevant Pages

  • Re: SetRate() does not work
    ... i created an instance of the Filter Graph Manager ... specified the container window that the video should be clipped to ... plays with 50% all others continue with normal speed. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Run my graph kills the video window ??
    ... the video window is closing. ... >> The GetStatecommand of the graph builder says S_OK, ... It's a very simple graph to decoding mpeg2 video with source, demuxer, ... But if I insert another video renderer before rendering the ...
    (microsoft.public.win32.programmer.directx.video)
  • Cant get multipass encoding with WM ASF Writer Filter to work & Filter graph locks up on first R
    ... I'm using DirectShow with a filter graph exactly like ... The graph doesn't run on first run. ... the MPEG-2 decoder output pin with the video input pin of the ASF ... encoding really work with the WM ASF Writer filter? ...
    (microsoft.public.windowsmedia.sdk)
  • Re: Run my graph kills the video window ??
    ... I build my graph in realtime. ... that only the self added video renderer cause the ... the video window is closing. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: updating video-rendering in VB
    ... I could not find any method to destroy a filter graph in VB, ... frame of the previous video is still being displayed. ...
    (microsoft.public.win32.programmer.directx.video)