[gst-devel] fractions
Thomas Vander Stichele
thomas at apestaart.org
Thu Jul 15 01:52:02 CEST 2004
On Wed, 2004-07-14 at 22:17, Ronald S. Bultje wrote:
> Hi Thomas,
>
> On Thu, 2004-07-15 at 02:23, Thomas Vander Stichele wrote:
> [..]
> > Let me know, I'd at least like to know if I should bother to keep
> > working on it.
>
> Of course, because it - in the end - fixes an issue that was broken
> before.
Ok, good to know, but not everybody agrees that the use of
floats/doubles for these properties is broken.
> Anyway, something that scares me is plugins that will not
> implement ASR. What happens if:
>
> * matroskademux specifies a 5:4 aspect ratio on a 256x256 movie
> * ffdec_something decodes the 256x256 video to 256x256 YUV
> * xvimagesink displays this 256x256 movie as 256x256 because
> ffdec_something didn't specify ASR on its source caps
If a plugin doesn't implement it, I'd expect it to copy caps and only
change what it knows about. Ie, ffdec_something should copy over all
the caps it doesn't deal with. Of course, ideally, any element that
handles video should actually be able to deal with pixel aspect ratio.
In the case of ffdec_, that would mean the same thing; the decoder
should copy over the pixel-aspect-ratio property. The difference is
that the first behaviour is something I would assume should be done in
general in a plugin, maybe even with a convenience method. The second
behaviour is something that you'd implement to support par correctly in
all plugins.
At present, if ffdec_ currently strips the pixel-aspect-ratio property
from sink to src (not sure it does, I tried an .mkv file but I didn't
find any with non-1:1 par), then you will indeed get an incorrect
display, but it will be just as it is now. You can however force an
aspect-ratio on the caps after it to get it correct again.
Anyway, if a video plugin doesn't handle par when it should, it's a bug
that should be fixed.
> This same thing applies to my multichannel patch as well, btw. How do we
> handle this (both in this specific case and in the general case)? I know
> it was broken before as well, so that's no reason to not apply the
> patch, but is there a general solution for this?
For a person like me to come up with suggestions, I'd need to understand
what problem you're seeing and how it is similar. Otherwise I can't
generalize. Can you give an example of a problem and what happens ?
That way we can both think about how we solve it generally.
> E.g. a
> gst_structure_copy_with_new_mimetype() or something similar (I'm sure
> you get the idea)?
Not sure I get it, but if you mean "copy caps and change the mimetype to
something like x-old/caps-with-pixel-aspect-ratio", then I'd prefer not
to. We shouldn't invent mime types when we can fix the plugins.
Thomas
Dave/Dina : future TV today ! - http://www.davedina.org/
<-*- thomas (dot) apestaart (dot) org -*->
To all the clumsy lovers who never seem to get it right
<-*- thomas (at) apestaart (dot) org -*->
URGent, best radio on the net - 24/7 ! - http://urgent.fm/
More information about the gstreamer-devel
mailing list