Re: Video flipped in AMCap
- From: "SmartSentry" <SmartSentry@xxxxxxxxxxxxxxxxx>
- Date: Thu, 02 Mar 2006 19:47:44 GMT
Thore
I've also seen the behaviour Chris describes and dealt with it in a very
similar way. The way I interpret the docs, it is consistent with the last
sentence of the clip you've quoted. I've found it useful to test every
sample with GetMediaType(), it will consistently return S_FALSE rather than
S_OK if no media type is attached.
Regards
Mike Gardner
SmartSentry
"Thore Karlsen [DShow MVP]" <sid@xxxxxxxx> wrote in message
news:ecbe029ngvdomsusc8rkoooeqhu6rsi8ck@xxxxxxxxxx
On Thu, 2 Mar 2006 12:34:53 -0500, "Chris P. [MVP]" <msdn@xxxxxxxxxxxx>
wrote:
You shouldn't have to implement QueryAccept if you're implementing
CheckMediaType, since CheckMediaType is called by QueryAccept in the
base classes. For a capture source you probably do want to implement
GetFormat and SetFormat to allow the user to specify things like the
resolution, frame rate, and color space.
Also, you shouldn't apply any media type in CheckMediaType, because the
connection has not yet been established. All you do in CheckMediaType is
determine if the media type is acceptable, but you don't have to keep
track of it.
I found that this was not the case when connecting to the VMR. The *only*
notification I received that renderer was requesting an inverted surface
(RGB) was in CheckMediaType() and/or QueryAccept(). I had to hold onto
the
last MediaType given in CheckMediaType() at least for the purposes of
identifying the sign flag of the height when RGB. At first this seemed
odd
but it is consistent with the documentation.
Really? There was no media type attached to the next sample? That's not
consistent with this:
"The graphics hardware may require a larger surface stride than the
image width. In that case, the VMR requests a new format by calling
QueryAccept. It reports the surface stride in the biWidth member of the
BITMAPINFOHEADER in the video format. If the upstream filter does not
return S_OK from QueryAccept, the VMR rejects the format and tries to
connect using the next format advertised by the upstream filter. The VMR
attaches the media type with the new format to the first media sample.
After the first sample, the format remains constant; the VMR will not
switch formats while the graph is running."
--
New to newsgroups? Read: http://dev.6581.com/newsgroups.html
.
- Follow-Ups:
- Re: Video flipped in AMCap
- From: Thore Karlsen [DShow MVP]
- Re: Video flipped in AMCap
- References:
- Re: Video flipped in AMCap
- From: Thore Karlsen [DShow MVP]
- Re: Video flipped in AMCap
- From: Chris P. [MVP]
- Re: Video flipped in AMCap
- From: Thore Karlsen [DShow MVP]
- Re: Video flipped in AMCap
- Prev by Date: overlay with VMR
- Next by Date: Problem with Temporal Seeking with ASF files
- Previous by thread: Re: Video flipped in AMCap
- Next by thread: Re: Video flipped in AMCap
- Index(es):
Relevant Pages
|