Re: Creating a sample grabber to connect to YUY2 / VideoInfo2



"Odie" <maps@xxxxxxxxxxxxxx> wrote in message
news:m_OdnUd54INbQX_fRVn-vA@xxxxxxxxxxxxxx
>I want the MS sample grabber to work with DVDs and MPEG-2 files. Which
>require it to be able to attach to Video Info 2 formatted streams. (Also
>some other codecs require this as well.)
>
> I've tried messing around with the samples until my ears turned red. I
> could get it working, but some video would be upside down, some righside
> up.

Keep in mind that many image formats are either top-down or bottom-up in
memory; DIBs in YUV formats are always top-down. RGB formats can be either,
but you can check the biHeight member of the BITMAPINFOHEADER structure to
see which orientation the images are.

> I can get it working fine with RGB24/32 but many MPEG-2 codecs produce
> YUY2. And with the transinplace filter/Grabber sample I couldn't get the
> allocator to attach properly, causing the whole thing to be incredibly
> slow.

You can't do this with a trans-in-place filter if you're hooking the filter
directly to a video renderer, because you'd be reading from video memory
which is ridiculously slow. You need to create a regular transform filter
(CTransformFilter instead of CTransInPlaceFilter). You may also have to
account for stride issues in your video samples when you hand them to the
renderer if you write a regular transform filter.

> I know I can get a sample from the VMR but not all MPEG-2 codecs support
> the VMR.
>
> Can anyone help me with writing a improved sample grabber filter? or point
> me to some already completed code?

I know of no completed code to do this; you're probably going to have to
write the filter yourself if the sample grabber doesn't meet your needs.
How frequently are you grabbing samples?

--
Where am I going?
And why am I in this handbasket?


.



Relevant Pages

  • Unable to Stop a graph
    ... I wrote code to programmaticaly build a filter graph to play MPEG-2 ... As MPEG-2 video decoder, I am using the ULead, uldsmpeg.ax filter. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Unable to Stop a graph
    ... >I wrote code to programmaticaly build a filter graph to play MPEG-2 ... >As MPEG-2 video decoder, I am using the ULead, uldsmpeg.ax filter. ...
    (microsoft.public.win32.programmer.directx.video)
  • Aspect Ratio DS filter
    ... adjust various input formats to a 16:9 display. ... the filter samples that come with the directshow SDK. ... But digging into video ...
    (microsoft.public.win32.programmer.directx.video)
  • NewestShareware.com Issue #171
    ... Program Name - Supported Platforms - Type - Category ... Turbine Video Encoder - Win XP/2Kx - Graphics ... Download file size: 7168 K ... Result videos can be published in many popular video formats such as ...
    (comp.software.shareware.announce)
  • NewestShareware.com Issue #138
    ... Program Name - Supported Platforms - Type - Category ... Download file size: 1193 K ... MIDI Converter Studio can use all common MIDI file formats (MIDI 0, ... PresentaVid is a powerful video presentation editor with nice and easy ...
    (comp.software.shareware.announce)