Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Fri, 08 Aug 2008 11:33:19 +0200,    group: microsoft.public.win32.programmer.directx.video        back       


querying for a video's screen size   
Hi all, I'm new to DirectShow so please bare with me.
I'm trying to get a video file's screen size.
What's the correct way to query for this?

Thanks
Tom
date: Fri, 08 Aug 2008 11:33:19 +0200   author:   Tom

Re: querying for a video's screen size   
On Fri, 08 Aug 2008 11:33:19 +0200, Tom wrote:

> Hi all, I'm new to DirectShow so please bare with me.

That's a bit presumptuous ;)  (you meant "bear," not "bare")

> I'm trying to get a video file's screen size.

Do you mean the dimensions of the video?

> What's the correct way to query for this?

It depends on the type of video.  Some work with IMediaDet (samples of its
use are in the docs and SDK).  Some you have to render the graph and query
the output pin on the video decoder.


-- 
Please read this before replying:
1. Dshow & posting help:  http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others:  follow up if you are helped or you found a solution
date: Fri, 8 Aug 2008 12:06:07 -0600   author:   The March Hare [MVP] erland

Re: querying for a video's screen size   
The March Hare [MVP] wrote:
> On Fri, 08 Aug 2008 11:33:19 +0200, Tom wrote:
> 
>> Hi all, I'm new to DirectShow so please bare with me.
> 
> That's a bit presumptuous ;)  (you meant "bear," not "bare")
> 
>> I'm trying to get a video file's screen size.
> 
> Do you mean the dimensions of the video?
> 
>> What's the correct way to query for this?
> 
> It depends on the type of video.  Some work with IMediaDet (samples of its
> use are in the docs and SDK).  Some you have to render the graph and query
> the output pin on the video decoder.

LOL I'm sorry, of course I meant "bear" !!! :D
Yes I mean the actual video size and I think I'll have a look at:
"Some you have to render the graph and query the output pin on the video 
decoder." first!

Thanks
Tom
date: Sat, 09 Aug 2008 14:18:59 +0200   author:   Tom

Re: querying for a video's screen size   
On Sat, 09 Aug 2008 14:18:59 +0200, Tom wrote:

> LOL I'm sorry, of course I meant "bear" !!! :D

We programmers sometimes get too dependent on the compiler to catch our
errors :)

> Yes I mean the actual video size and I think I'll have a look at:
> "Some you have to render the graph and query the output pin on the video 
> decoder." first!

Some other things to keep in mind:

- some video files may have the metadata in the header and the dimensions
can be extracted more quickly that way (WMV sometimes, IIRC)

- some video types do not have square pixels so you need to be careful
whether you are getting the native resolution or adjusted resolution
(example: NTSC DV Video is 740x480 native for both 4:3 and 16:9 output; the
VMR9 will correct the aspect ratio based on information in the media type
from the DV Video Decoder's output pin which uses VideoInfoHeader2)

- there is no universal solution :(


-- 
Please read this before replying:
1. Dshow & posting help:  http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others:  follow up if you are helped or you found a solution
date: Sat, 9 Aug 2008 06:36:03 -0600   author:   The March Hare [MVP] erland

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us