summaryrefslogtreecommitdiff
path: root/sys/d3dvideosink
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-12-22 11:34:43 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-12-22 11:34:43 +0100
commit872dc5feb68bac38bc3e75b2214b068a26f30244 (patch)
tree763029388646a0ff1c0e51aefa08e697020537b7 /sys/d3dvideosink
parent5ea516d73526346f50407b0cf5c2e8a8774f665c (diff)
d3dvideosink: Rename keep-aspect-ratio to force-aspect-ratio and default to TRUE
For consistency with other video sinks.
Diffstat (limited to 'sys/d3dvideosink')
-rw-r--r--sys/d3dvideosink/d3dhelpers.c4
-rw-r--r--sys/d3dvideosink/d3dvideosink.c18
2 files changed, 11 insertions, 11 deletions
diff --git a/sys/d3dvideosink/d3dhelpers.c b/sys/d3dvideosink/d3dhelpers.c
index 099cbceb4..3cecc283b 100644
--- a/sys/d3dvideosink/d3dhelpers.c
+++ b/sys/d3dvideosink/d3dhelpers.c
@@ -685,7 +685,7 @@ d3d_get_render_coordinates (GstD3DVideoSink * sink, gint in_x, gint in_y,
goto end;
/* Convert window coordinates to source frame pixel coordinates */
- if (sink->keep_aspect_ratio) {
+ if (sink->force_aspect_ratio) {
GstVideoRectangle tmp = { 0, 0, 0, 0 }
, dst = {
0, 0, 0, 0};
@@ -1557,7 +1557,7 @@ d3d_stretch_and_copy (GstD3DVideoSink * sink, LPDIRECT3DSURFACE9 back_buffer)
render_rect = sink->d3d.render_rect;
- if (sink->keep_aspect_ratio) {
+ if (sink->force_aspect_ratio) {
gint window_width;
gint window_height;
GstVideoRectangle src;
diff --git a/sys/d3dvideosink/d3dvideosink.c b/sys/d3dvideosink/d3dvideosink.c
index afb444482..ad2f3a8cc 100644
--- a/sys/d3dvideosink/d3dvideosink.c
+++ b/sys/d3dvideosink/d3dvideosink.c
@@ -29,14 +29,14 @@
enum
{
PROP_0,
- PROP_KEEP_ASPECT_RATIO,
+ PROP_FORCE_ASPECT_RATIO,
PROP_CREATE_RENDER_WINDOW,
PROP_STREAM_STOP_ON_CLOSE,
PROP_ENABLE_NAVIGATION_EVENTS,
PROP_LAST
};
-#define DEFAULT_KEEP_ASPECT_RATIO FALSE
+#define DEFAULT_FORCE_ASPECT_RATIO TRUE
#define DEFAULT_CREATE_RENDER_WINDOW TRUE
#define DEFAULT_STREAM_STOP_ON_CLOSE TRUE
#define DEFAULT_ENABLE_NAVIGATION_EVENTS TRUE
@@ -123,10 +123,10 @@ gst_d3dvideosink_class_init (GstD3DVideoSinkClass * klass)
/* Add properties */
g_object_class_install_property (G_OBJECT_CLASS (klass),
- PROP_KEEP_ASPECT_RATIO, g_param_spec_boolean ("force-aspect-ratio",
+ PROP_FORCE_ASPECT_RATIO, g_param_spec_boolean ("force-aspect-ratio",
"Force aspect ratio",
"When enabled, scaling will respect original aspect ratio",
- DEFAULT_KEEP_ASPECT_RATIO, (GParamFlags) G_PARAM_READWRITE));
+ DEFAULT_FORCE_ASPECT_RATIO, (GParamFlags) G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass),
PROP_CREATE_RENDER_WINDOW, g_param_spec_boolean ("create-render-window",
"Create render window",
@@ -173,7 +173,7 @@ gst_d3dvideosink_init (GstD3DVideoSink * sink)
gst_value_set_fraction (&sink->par, 1, 1);
/* Init Properties */
- sink->keep_aspect_ratio = DEFAULT_KEEP_ASPECT_RATIO;
+ sink->force_aspect_ratio = DEFAULT_FORCE_ASPECT_RATIO;
sink->create_internal_window = DEFAULT_CREATE_RENDER_WINDOW;
sink->stream_stop_on_close = DEFAULT_STREAM_STOP_ON_CLOSE;
sink->enable_navigation_events = DEFAULT_ENABLE_NAVIGATION_EVENTS;
@@ -205,8 +205,8 @@ gst_d3dvideosink_set_property (GObject * object, guint prop_id,
GstD3DVideoSink *sink = GST_D3DVIDEOSINK (object);
switch (prop_id) {
- case PROP_KEEP_ASPECT_RATIO:
- sink->keep_aspect_ratio = g_value_get_boolean (value);
+ case PROP_FORCE_ASPECT_RATIO:
+ sink->force_aspect_ratio = g_value_get_boolean (value);
break;
case PROP_CREATE_RENDER_WINDOW:
sink->create_internal_window = g_value_get_boolean (value);
@@ -230,8 +230,8 @@ gst_d3dvideosink_get_property (GObject * object, guint prop_id, GValue * value,
GstD3DVideoSink *sink = GST_D3DVIDEOSINK (object);
switch (prop_id) {
- case PROP_KEEP_ASPECT_RATIO:
- g_value_set_boolean (value, sink->keep_aspect_ratio);
+ case PROP_FORCE_ASPECT_RATIO:
+ g_value_set_boolean (value, sink->force_aspect_ratio);
break;
case PROP_CREATE_RENDER_WINDOW:
g_value_set_boolean (value, sink->create_internal_window);