GNOME Bugzilla – Bug 623272
[dshowvideosink] setting force-aspect-ratio has no effect after the sink's renderer has been configured
Last modified: 2010-07-07 05:44:39 UTC
When the force-aspect-ratio property has been updated the sink's renderer should be partially reconfigured, this code should be called, I think: if (sink->keep_aspect_ratio) { control->SetAspectRatioMode(VMR9ARMode_LetterBox); } else { control->SetAspectRatioMode(VMR9ARMode_None); } So maybe we could add a new virtual function RendererSupport to call this code and call the new function when the property has been set.
Created attachment 165017 [details] [review] [dshowvideosink] update renderer aspect ratio after force-aspect-ratio property update. A new virtual method has been added to the RendererSupport class. It is called during the initial renderer configuration and each time the force-aspec-ratio property of the sink is updated. Fixes bug 623272.
I can't test this here but it looks good. Did you test if this works and compiles and all that? :)
Yes I tested on windows with OSSBuild and my WebKit branch. But then I found a check of the renderer pointer is missing in set_property, so a simple pipeline like videotestsrc ! dshowvideosink force-aspect-ratio crashes :) Will upload a new patch.
Created attachment 165074 [details] [review] [dshowvideosink] update renderer aspect ratio after force-aspect-ratio property update. A new virtual method has been added to the RendererSupport class. It is called during the initial renderer configuration and each time the force-aspect-ratio property of the sink is updated. Fixes bug 623272.
I have tested it too, and it works.
commit 0c38d700ca0303ede4a55acb660e437c6e925179 Author: Philippe Normand <pnormand@igalia.com> Date: Thu Jul 1 10:56:19 2010 +0200 dshowvideosink: Update renderer aspect ratio after force-aspect-ratio proper A new virtual method has been added to the RendererSupport class. It is called during the initial renderer configuration and each time the force-aspect-ratio property of the sink is updated. Fixes bug #623272.