Re: Creating a sample grabber to connect to YUY2 / VideoInfo2
- From: "Jeremy Noring" <somewhere@xxxxxxxxxx>
- Date: Wed, 27 Jul 2005 11:21:01 -0600
"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?
.
- References:
- Prev by Date: Re: Changed motherboard, VMR9 stopped to work in more than 3 instances
- Next by Date: Re: Pack DirectShow application?
- Previous by thread: Re: Creating a sample grabber to connect to YUY2 / VideoInfo2
- Next by thread: Source filter events
- Index(es):
Relevant Pages
|