From: Philippe Normand Date: Thu, 1 Jul 2010 08:56:19 +0000 (+0200) Subject: dshowvideosink: Update renderer aspect ratio after force-aspect-ratio property update. X-Git-Tag: 1.19.3~507^2~16751 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c38d700ca0303ede4a55acb660e437c6e925179;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/sys/dshowvideosink/dshowvideosink.cpp b/sys/dshowvideosink/dshowvideosink.cpp index ab9aecd..7a14664 100644 --- a/sys/dshowvideosink/dshowvideosink.cpp +++ b/sys/dshowvideosink/dshowvideosink.cpp @@ -256,6 +256,8 @@ gst_dshowvideosink_set_property (GObject * object, guint prop_id, break; case PROP_KEEP_ASPECT_RATIO: sink->keep_aspect_ratio = g_value_get_boolean (value); + if (sink->renderersupport) + sink->renderersupport->SetAspectRatioMode(); break; case PROP_FULL_SCREEN: sink->full_screen = g_value_get_boolean (value); @@ -979,13 +981,17 @@ public: return FALSE; } + SetAspectRatioMode(); + return TRUE; + } + + void SetAspectRatioMode() { if (sink->keep_aspect_ratio) { control->SetAspectRatioMode(VMR9ARMode_LetterBox); } else { control->SetAspectRatioMode(VMR9ARMode_None); } - return TRUE; } gboolean SetRendererWindow(HWND window) { @@ -1102,13 +1108,17 @@ public: return FALSE; } + SetAspectRatioMode(); + return TRUE; + } + + void SetAspectRatioMode() { if (sink->keep_aspect_ratio) { control->SetAspectRatioMode(VMR_ARMODE_LETTER_BOX); } else { control->SetAspectRatioMode(VMR_ARMODE_NONE); } - return TRUE; } gboolean SetRendererWindow(HWND window) { diff --git a/sys/dshowvideosink/dshowvideosink.h b/sys/dshowvideosink/dshowvideosink.h index 9c9d073..8b60087 100644 --- a/sys/dshowvideosink/dshowvideosink.h +++ b/sys/dshowvideosink/dshowvideosink.h @@ -54,6 +54,7 @@ public: virtual void MoveWindow() = 0; virtual void DestroyWindow() = 0; virtual void DisplayModeChanged() = 0; + virtual void SetAspectRatioMode() = 0; }; struct _GstDshowVideoSink