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);
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) {
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) {
virtual void MoveWindow() = 0;
virtual void DestroyWindow() = 0;
virtual void DisplayModeChanged() = 0;
+ virtual void SetAspectRatioMode() = 0;
};
struct _GstDshowVideoSink