Re: Video flipped in AMCap



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


.



Relevant Pages

  • Re: Video flipped in AMCap
    ... CheckMediaType, since CheckMediaType is called by QueryAccept in the ... Also, you shouldn't apply any media type in CheckMediaType, because the ... BITMAPINFOHEADER in the video format. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Video flipped in AMCap
    ... CheckMediaType, since CheckMediaType is called by QueryAccept in the ... Also, you shouldn't apply any media type in CheckMediaType, because the ... BITMAPINFOHEADER in the video format. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Video flipped in AMCap
    ... CheckMediaType, since CheckMediaType is called by QueryAccept in the ... Also, you shouldn't apply any media type in CheckMediaType, because the ... BITMAPINFOHEADER in the video format. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: NEWBIE QUESTION: problem with full screen mode
    ... With DES things are a little more complicated. ... > All groups must define an uncompressed media type, ... The uncompressed media type is the format that viewers see or hear during ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Connecting to VMR without Color Space Converter
    ... now I just need to know what format was used for the ... "This method enables a filter to make limited changes to the media type, ... Since my change requires reconnecting (due different buffer sizes) can I ... In this case, the VMR owns the allocator, so it will change the buffer size ...
    (microsoft.public.win32.programmer.directx.video)