After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 623272 - [dshowvideosink] setting force-aspect-ratio has no effect after the sink's renderer has been configured
[dshowvideosink] setting force-aspect-ratio has no effect after the sink's re...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Windows
: Normal normal
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-01 08:10 UTC by Philippe Normand
Modified: 2010-07-07 05:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[dshowvideosink] update renderer aspect ratio after force-aspect-ratio property update. (2.33 KB, patch)
2010-07-01 09:01 UTC, Philippe Normand
none Details | Review
[dshowvideosink] update renderer aspect ratio after force-aspect-ratio property update. (2.37 KB, patch)
2010-07-02 07:35 UTC, Philippe Normand
committed Details | Review

Description Philippe Normand 2010-07-01 08:10:19 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.
Comment 1 Philippe Normand 2010-07-01 09:01:49 UTC
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.
Comment 2 Sebastian Dröge (slomo) 2010-07-02 07:15:28 UTC
I can't test this here but it looks good. Did you test if this works and compiles and all that? :)
Comment 3 Philippe Normand 2010-07-02 07:32:40 UTC
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.
Comment 4 Philippe Normand 2010-07-02 07:35:46 UTC
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.
Comment 5 Andoni Morales 2010-07-06 22:58:13 UTC
I have tested it too, and it works.
Comment 6 Sebastian Dröge (slomo) 2010-07-07 05:44:36 UTC
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.