[gst-devel] fractions and aspect ratios
rbultje at ronald.bitfreak.net
Wed Jul 14 07:03:06 CEST 2004
On Wed, 14 Jul 2004, Benjamin Otte wrote:
> Why is the information necessary from where you came?
> Also, what are other systems/libraries (theora, X, ...) using for pixel
> aspect ratios?
mjpegtools uses ratios, ffmpeg uses floats.
> > - Having an increment value in RANGE types would also be nice for
> > framerate for webcams or width/height for encoders. For webcams,
> > allowed framerates are a multiple of 15/16, and for encoders, typically
> > multiples of 8 or 16 only are allowed. In the case of webcams, being
> > able to specify 75/16 instead of 4.6875 seems like a plus to me.
> A huge list is probably not an option in that case? (I have no clue up to
> what framerate is supported, but webcams should have an upper limit of the
> framerate they support, and with even 100 values in that list, you'd get
> up to 1500/16 = 93.75 fps, which is quite a lot)
Lists would work better. I tend to agree here that this might just not be
worth it. Autogenerating the list in a loop should be good enough.
> Also, does v4l(2) or whatever we use in these cases even allow such exact
> querying of capabilities? Because if they don't it's a bit of a moot point
> to add that now.
They specify a range, and there's a test function that can be called which
will round the specified values to the closest exact allowed ones. So if
my webcam allows 1,2,4 and 10 fps, and I do ioctl(fd,ioctl_name_test,&8),
it will return 4 or 10 in the variable that was originally 8 (this is
obviously pseudocode, you get the idea though).
More information about the gstreamer-devel