Insert SmartTee AND control preview and capture independently ?
- From: Erwin Bellon <erwin . bellon at uz . leuven>
- Date: Mon, 23 May 2005 10:50:10 -0700
I learned from this group that many capture cards cannot simultaneously
capture and preview in high resolution (see e.g. Alessandro Angeli’s answer
to a question on 5/8/2005 “record + preview from…”). That makes the preview
pin on my capture filter useless to me, so I decided to ignore it and instead
to explicitly insert a smart tee in my graph.
After that I did not succeed to control preview and capture independently.
When I stop capture I do not get a preview anymore, and all my attempts to
have only the preview part of the graph running also start capture. When I
use another capture device that does not have a preview pin (making the
RenderStream call insert a smart tee filter automatically) I can control both
streams independently as expected. Details follow at the end of this posting.
Any hint or pointer to material that can give me more insight was appreciated.
Details:
Before explicitly wiring in my own smart tee, a call such as
graphBuilder->ControlStream(&PIN_CATEGORY_CAPTURE, NULL, NULL, &never,
&immediately, 0, 0);
stopped capture while leaving preview, whether or not a smart tee was
inserted in the graph automatically. I assume that ControlStream internally
copes with the “automatic” smart tee.
After I inserted my smart tee explicitly, this call seems to stop all
streams. Seems fair. ControlStream may not know that the smart tee should
continue getting input. After all, there is a dangling preview pin on the
capture filter, so the rest of the graph may totally be devoted to capture.
I tried by not specifying “any capture filter” (NULL) in the ControlStream
call but by explicitly specifying my smart tee, as conceptually that is my
capture filter. I always get an invalid result code. Maybe ControlStream
really only accepts a capture filter there? Or do the output pins on the
smart tee behave in a different way then those on the capture filter?
I tried to explicitly start just the capture filter again (leaving the rest
blocked) using a ControlStream call with that filter instead of NULL, to
learn that *all* streams start again. I could have expected that from the
documentation as ControlStream seems to look for all pins downstream and
controls those.
I then tried to explicitly StartAt() the preview pin of my smart tee (after
stopping all streams using the ControlStream call given above) but that did
not give me any preview. Before I try starting all downstream pins that have
an IAMStreamControl interface I hope one of the kind experts in this group
will point out where I may have taken a wrong turn.
B.t.w., I believe the same question was asked by Jon Evans on 08/25/04
“ICaptureGraphBuilder2::ControlStream doesn…” on which Hesham Desouky replied
“you should specify the media format of the smart tee capture pin before
render it”. I apologize for not understanding how I could to so.
Maybe I did something wrong from the very start. I gave “my” smart tee a
dedicated name. I connected it to the capture filter using RenderStream (only
when the capture filter has indeed a preview pin, as otherwise RenderStream
seemed to always insert its own smart tee as well). Then I tried to specify
my smart tee in the RenderStream calls for the preview and capture filter
chains, which resulted in an error code. I only could persuade RenderStream
to automatically connect with the VMR9 or the Avi MUX by explicitly
specifying the output pin on the smart tee (instead of that filter itself)
and by specifying NULL for both pin category and media type. The graph seems
OK in GraphEdt, however, and I can start it from there (with capture and
preview running simultaneously, though, so that does not give me much insight
to my problem).
I am using DirectX version 9.0 December 2004 update. I actually integrate my
C++ classes into Java, but I was surprised that to be at the source of these
problems.
--
Erwin Bellon
University Hospitals Leuven
Belgium
.
- Follow-Ups:
- Re: Insert SmartTee AND control preview and capture independently ?
- From: Alessandro Angeli [MVP::DigitalMedia]
- Re: Insert SmartTee AND control preview and capture independently ?
- From: The March Hare [MVP]
- Re: Insert SmartTee AND control preview and capture independently ?
- Prev by Date: Re: Direct frame access
- Next by Date: Re: Insert SmartTee AND control preview and capture independently ?
- Previous by thread: What after the filling of the buffer?
- Next by thread: Re: Insert SmartTee AND control preview and capture independently ?
- Index(es):
Relevant Pages
|