Re: setting video format

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Joe Johnson (joe_at_eirbase.com)
Date: 06/28/04


Date: Mon, 28 Jun 2004 15:43:59 +0100

On Mon, 28 Jun 2004 07:19:06 -0600, The March Hare (MVP) wrote:

> On Mon, 28 Jun 2004 12:47:49 +0100, Joe Johnson wrote:
>
>> I live in Europe and thus need to change the video format on my
>> capture cards from the default of NTSC to PAL.
>>
>> The VIDEO_STREAM_CONFIG_CAPS seems to be the structure to use in
>> this case. I can retrieve the populated structure using the
>> IAMStreamConfig::GetStreamCaps() method but there doesn't seem to
>> be a way to return the altered structure.
>>
>> The IAMStreamConfig::SetFormat() method takes a pointer to an
>> AM_MEDIA_TYPE structure, but the 'formattype' member doesn't
>> seem to support passing the VIDEO_STREAM_CONFIG_CAPS structure
>> back.
>>
>> Has anybody come across this problem before and/or have a solution?
>> I don't want to have to call up a property page if at all possible.
>
> See "Configure the Video Output Format" in the SDK docs for setting frame
> rate and resolution. Particularly:
>
> "To request a particular frame rate, modify the value of AvgTimePerFrame in
> the VIDEOINFOHEADER or VIDEOINFOHEADER2 structure in the media type. The
> device may not support every possible value between the minimum and
> maximum, so the driver will use the closest value that it can. To see what
> value the driver actually used, call IAMStreamConfig::GetFormat after you
> call SetFormat."

Sorry, I didn't make the question clear enough. I've been through that
example many times already. As I said in my previous mail, the
AM_MEDIA_TYPE only supports certain casts, namely:

FORMAT_DvInfo DVINFO
FORMAT_MPEGVideo MPEG1VIDEOINFO
FORMAT_MPEG2Video MPEG2VIDEOINFO
FORMAT_VideoInfo VIDEOINFOHEADER
FORMAT_VideoInfo2 VIDEOINFOHEADER2
FORMAT_WaveFormatEx WAVEFORMATEX

They give a very nice example on how to change things in the
VIDEOINFOHEADER, which is easy to follow and understand because it's a
supported format type. But VIDEO_STREAM_CONFIG_CAPS is the structure
I need to change and I don't see it anywhere in the list of supported
types, so how do I pass it in?

Could it be that the the documentation is wrong and this structure was
omitted?



Relevant Pages

  • Re: setting video format
    ... >> the VIDEOINFOHEADER or VIDEOINFOHEADER2 structure in the media type. ... >> device may not support every possible value between the minimum and ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Grabbing images from highspeed videos
    ... some reason doesn't seem to want to support any other video format ...
    (comp.soft-sys.matlab)
  • Re: Quicktime player for pocket pc
    ... some may say that it is apple that has yet to provide support for their ... video format for the PPC market. ... the only portable device they will support is the ipod. ...
    (microsoft.public.pocketpc)