[totem] Add a visuals-quality property to BaconVideoWidget



commit 1d94c7e07bb9675272d92a1056a35566888eab67
Author: Philip Withnall <philip tecnocode co uk>
Date:   Thu Aug 19 21:19:55 2010 +0100

    Add a visuals-quality property to BaconVideoWidget

 src/backend/bacon-video-widget-gst-0.10.c |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index 24f14ba..4ccf3a4 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -138,7 +138,8 @@ enum
   PROP_DOWNLOAD_FILENAME,
   PROP_AUTO_RESIZE,
   PROP_DEINTERLACING,
-  PROP_CONNECTION_SPEED
+  PROP_CONNECTION_SPEED,
+  PROP_VISUALS_QUALITY
 };
 
 static const gchar *video_props_str[4] = {
@@ -1181,6 +1182,18 @@ bacon_video_widget_class_init (BaconVideoWidgetClass * klass)
                                                       G_PARAM_READWRITE |
                                                       G_PARAM_STATIC_STRINGS));
 
+  /**
+   * BaconVideoWidget:visuals-quality:
+   *
+   * The size of the visualizations to display when playing audio.
+   **/
+  g_object_class_install_property (object_class, PROP_VISUALS_QUALITY,
+                                   g_param_spec_enum ("visuals-quality", NULL,
+                                                      NULL, BVW_TYPE_VISUALS_QUALITY,
+                                                      VISUAL_SMALL,
+                                                      G_PARAM_READWRITE |
+                                                      G_PARAM_STATIC_STRINGS));
+
   /* Signals */
   /**
    * BaconVideoWidget::error:
@@ -2832,6 +2845,9 @@ bacon_video_widget_set_property (GObject * object, guint property_id,
     case PROP_CONNECTION_SPEED:
       bacon_video_widget_set_connection_speed (bvw, g_value_get_enum (value));
       break;
+    case PROP_VISUALS_QUALITY:
+      bacon_video_widget_set_visuals_quality (bvw, g_value_get_enum (value));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       break;
@@ -2891,6 +2907,9 @@ bacon_video_widget_get_property (GObject * object, guint property_id,
     case PROP_CONNECTION_SPEED:
       g_value_set_enum (value, bvw->priv->connection_speed);
       break;
+    case PROP_VISUALS_QUALITY:
+      g_value_set_enum (value, bvw->priv->visq);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       break;
@@ -5125,6 +5144,8 @@ bacon_video_widget_set_visuals_quality (BaconVideoWidget * bvw,
   bvw->priv->visq = quality;
   
   setup_vis (bvw);
+
+  g_object_notify (G_OBJECT (bvw), "visuals-quality");
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]