[totem/gsettings: 8/20] Fix naming of visualization methods in BaconVideoWidget
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gsettings: 8/20] Fix naming of visualization methods in BaconVideoWidget
- Date: Sat, 21 Aug 2010 19:34:48 +0000 (UTC)
commit 1a281fb36e56c09923b87fa1b52467542affb347
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Aug 19 21:33:04 2010 +0100
Fix naming of visualization methods in BaconVideoWidget
browser-plugin/totem-plugin-viewer.c | 2 +-
docs/reference/totem-sections.txt | 14 +++---
src/backend/bacon-video-widget-gst-0.10.c | 72 ++++++++++++++--------------
src/backend/bacon-video-widget.h | 36 +++++++--------
src/totem-preferences.c | 14 +++---
5 files changed, 68 insertions(+), 70 deletions(-)
---
diff --git a/browser-plugin/totem-plugin-viewer.c b/browser-plugin/totem-plugin-viewer.c
index 95ba966..6335489 100644
--- a/browser-plugin/totem-plugin-viewer.c
+++ b/browser-plugin/totem-plugin-viewer.c
@@ -1721,7 +1721,7 @@ video_widget_size_allocate_cb (GtkWidget *controls,
GtkAllocation *allocation,
BaconVideoWidget *bvw)
{
- bacon_video_widget_set_show_visuals (bvw, allocation->height > MINIMUM_VIDEO_SIZE);
+ bacon_video_widget_set_show_visualizations (bvw, allocation->height > MINIMUM_VIDEO_SIZE);
g_signal_handlers_disconnect_by_func (controls, G_CALLBACK (video_widget_size_allocate_cb), NULL);
}
diff --git a/docs/reference/totem-sections.txt b/docs/reference/totem-sections.txt
index 793e7d8..b065815 100644
--- a/docs/reference/totem-sections.txt
+++ b/docs/reference/totem-sections.txt
@@ -180,7 +180,7 @@ BvwAudioOutType
BvwConnectionSpeed
BvwDVDEvent
BvwMetadataType
-BvwVisualsQuality
+BvwVisualizationQuality
BvwVideoProperty
BvwError
BvwUseType
@@ -226,7 +226,7 @@ bacon_video_widget_set_referrer
bacon_video_widget_set_scale_ratio
bacon_video_widget_get_show_cursor
bacon_video_widget_set_show_cursor
-bacon_video_widget_set_show_visuals
+bacon_video_widget_set_show_visualizations
bacon_video_widget_get_stream_length
bacon_video_widget_get_subtitles
bacon_video_widget_get_subtitle
@@ -236,9 +236,9 @@ bacon_video_widget_set_subtitle_font
bacon_video_widget_set_user_agent
bacon_video_widget_get_video_property
bacon_video_widget_set_video_property
-bacon_video_widget_get_visuals_list
-bacon_video_widget_set_visuals
-bacon_video_widget_set_visuals_quality
+bacon_video_widget_get_visualization_list
+bacon_video_widget_set_visualization
+bacon_video_widget_set_visualization_quality
bacon_video_widget_get_volume
bacon_video_widget_set_volume
bacon_video_widget_get_zoom
@@ -257,7 +257,7 @@ BVW_TYPE_ERROR
BVW_TYPE_METADATA_TYPE
BVW_TYPE_USE_TYPE
BVW_TYPE_VIDEO_PROPERTY
-BVW_TYPE_VISUALS_QUALITY
+BVW_TYPE_VISUALIZATION_QUALITY
bvw_aspect_ratio_get_type
bvw_audio_out_type_get_type
bvw_connection_speed_get_type
@@ -266,7 +266,7 @@ bvw_error_get_type
bvw_metadata_type_get_type
bvw_use_type_get_type
bvw_video_property_get_type
-bvw_visuals_quality_get_type
+bvw_visualization_quality_get_type
bacon_video_widget_error_quark
bacon_video_widget_get_type
BVW_ERROR
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index 5cebe62..6c764f1 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -132,14 +132,14 @@ enum
PROP_REFERRER,
PROP_SEEKABLE,
PROP_SHOW_CURSOR,
- PROP_SHOW_VISUALS,
+ PROP_SHOW_VISUALIZATIONS,
PROP_USER_AGENT,
PROP_VOLUME,
PROP_DOWNLOAD_FILENAME,
PROP_AUTO_RESIZE,
PROP_DEINTERLACING,
PROP_CONNECTION_SPEED,
- PROP_VISUALS_QUALITY
+ PROP_VISUALIZATION_QUALITY
};
static const gchar *video_props_str[4] = {
@@ -207,7 +207,7 @@ struct BaconVideoWidgetPrivate
GList *vis_plugins_list;
gboolean show_vfx;
gboolean vis_changed;
- BvwVisualsQuality visq;
+ BvwVisualizationQuality visq;
gchar *vis_element_name;
GstElement *audio_capsfilter;
@@ -1105,12 +1105,12 @@ bacon_video_widget_class_init (BaconVideoWidgetClass * klass)
G_PARAM_STATIC_STRINGS));
/**
- * BaconVideoWidget:show-visuals:
+ * BaconVideoWidget:show-visualizations:
*
* Whether visualisations should be shown for audio-only streams.
**/
- g_object_class_install_property (object_class, PROP_SHOW_VISUALS,
- g_param_spec_boolean ("show-visuals", NULL,
+ g_object_class_install_property (object_class, PROP_SHOW_VISUALIZATIONS,
+ g_param_spec_boolean ("show-visualizations", NULL,
NULL, FALSE,
G_PARAM_WRITABLE |
G_PARAM_STATIC_STRINGS));
@@ -1183,14 +1183,14 @@ bacon_video_widget_class_init (BaconVideoWidgetClass * klass)
G_PARAM_STATIC_STRINGS));
/**
- * BaconVideoWidget:visuals-quality:
+ * BaconVideoWidget:visualization-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_object_class_install_property (object_class, PROP_VISUALIZATION_QUALITY,
+ g_param_spec_enum ("visualization-quality", NULL,
+ NULL, BVW_TYPE_VISUALIZATION_QUALITY,
+ BVW_VISUALIZATION_SMALL,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
@@ -2825,8 +2825,8 @@ bacon_video_widget_set_property (GObject * object, guint property_id,
bacon_video_widget_set_show_cursor (bvw,
g_value_get_boolean (value));
break;
- case PROP_SHOW_VISUALS:
- bacon_video_widget_set_show_visuals (bvw,
+ case PROP_SHOW_VISUALIZATIONS:
+ bacon_video_widget_set_show_visualizations (bvw,
g_value_get_boolean (value));
break;
case PROP_USER_AGENT:
@@ -2845,8 +2845,8 @@ 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));
+ case PROP_VISUALIZATION_QUALITY:
+ bacon_video_widget_set_visualization_quality (bvw, g_value_get_enum (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -2907,7 +2907,7 @@ 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:
+ case PROP_VISUALIZATION_QUALITY:
g_value_set_enum (value, bvw->priv->visq);
break;
default:
@@ -4814,10 +4814,10 @@ static struct {
int height;
int fps;
} const vis_qualities[] = {
- { 240, 15 }, /* VISUAL_SMALL */
- { 320, 25 }, /* VISUAL_NORMAL */
- { 480, 25 }, /* VISUAL_LARGE */
- { 600, 30 } /* VISUAL_EXTRA_LARGE */
+ { 240, 15 }, /* BVW_VISUALIZATION_SMALL */
+ { 320, 25 }, /* BVW_VISUALIZATION_NORMAL */
+ { 480, 25 }, /* BVW_VISUALIZATION_LARGE */
+ { 600, 30 } /* BVW_VISUALIZATION_EXTRA_LARGE */
};
static void
@@ -5017,24 +5017,24 @@ beach:
}
/**
- * bacon_video_widget_set_show_visuals:
+ * bacon_video_widget_set_show_visualizations:
* @bvw: a #BaconVideoWidget
- * @show_visuals: %TRUE to show visualisations, %FALSE otherwise
+ * @show_visualizations: %TRUE to show visualisations, %FALSE otherwise
*
* Sets whether to show visualisations when playing audio-only streams.
**/
void
-bacon_video_widget_set_show_visuals (BaconVideoWidget * bvw,
- gboolean show_visuals)
+bacon_video_widget_set_show_visualizations (BaconVideoWidget * bvw,
+ gboolean show_visualizations)
{
g_return_if_fail (bvw != NULL);
g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
g_return_if_fail (GST_IS_ELEMENT (bvw->priv->play));
- if (show_visuals == bvw->priv->show_vfx)
+ if (show_visualizations == bvw->priv->show_vfx)
return;
- bvw->priv->show_vfx = show_visuals;
+ bvw->priv->show_vfx = show_visualizations;
setup_vis (bvw);
}
@@ -5066,7 +5066,7 @@ add_longname (GstElementFactory *f, GList ** to)
}
/**
- * bacon_video_widget_get_visuals_list:
+ * bacon_video_widget_get_visualization_list:
* @bvw: a #BaconVideoWidget
*
* Returns a list of the visualisations available when playing audio-only streams.
@@ -5074,7 +5074,7 @@ add_longname (GstElementFactory *f, GList ** to)
* Return value: a #GList of visualisation names; owned by @bvw
**/
GList *
-bacon_video_widget_get_visuals_list (BaconVideoWidget * bvw)
+bacon_video_widget_get_visualization_list (BaconVideoWidget * bvw)
{
GList *features, *names = NULL;
@@ -5095,19 +5095,19 @@ bacon_video_widget_get_visuals_list (BaconVideoWidget * bvw)
}
/**
- * bacon_video_widget_set_visuals:
+ * bacon_video_widget_set_visualization:
* @bvw: a #BaconVideoWidget
* @name: the visualisation's name, or %NULL
*
* Sets the visualisation to display when playing audio-only streams.
*
* If @name is %NULL, visualisations will be disabled. Otherwise, @name
- * should be from the list returned by bacon_video_widget_get_visuals_list().
+ * should be from the list returned by bacon_video_widget_get_visualization_list().
*
* Return value: %TRUE on success, %FALSE otherwise
**/
gboolean
-bacon_video_widget_set_visuals (BaconVideoWidget * bvw, const char *name)
+bacon_video_widget_set_visualization (BaconVideoWidget * bvw, const char *name)
{
g_return_val_if_fail (bvw != NULL, FALSE);
g_return_val_if_fail (BACON_IS_VIDEO_WIDGET (bvw), FALSE);
@@ -5132,15 +5132,15 @@ bacon_video_widget_set_visuals (BaconVideoWidget * bvw, const char *name)
}
/**
- * bacon_video_widget_set_visuals_quality:
+ * bacon_video_widget_set_visualization_quality:
* @bvw: a #BaconVideoWidget
* @quality: the visualisation quality
*
* Sets the quality/size of displayed visualisations.
**/
void
-bacon_video_widget_set_visuals_quality (BaconVideoWidget * bvw,
- BvwVisualsQuality quality)
+bacon_video_widget_set_visualization_quality (BaconVideoWidget * bvw,
+ BvwVisualizationQuality quality)
{
g_return_if_fail (bvw != NULL);
g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
@@ -5153,7 +5153,7 @@ bacon_video_widget_set_visuals_quality (BaconVideoWidget * bvw,
setup_vis (bvw);
- g_object_notify (G_OBJECT (bvw), "visuals-quality");
+ g_object_notify (G_OBJECT (bvw), "visualization-quality");
}
/**
@@ -6873,7 +6873,7 @@ bacon_video_widget_new (int width, int height,
bvw->priv->speakersetup = BVW_AUDIO_SOUND_STEREO;
bvw->priv->media_device = g_strdup ("/dev/dvd");
- bvw->priv->visq = VISUAL_SMALL;
+ bvw->priv->visq = BVW_VISUALIZATION_SMALL;
bvw->priv->show_vfx = FALSE;
bvw->priv->vis_element_name = g_strdup ("goom");
bvw->priv->connection_speed = 11;
diff --git a/src/backend/bacon-video-widget.h b/src/backend/bacon-video-widget.h
index 890a36e..6cea8c6 100644
--- a/src/backend/bacon-video-widget.h
+++ b/src/backend/bacon-video-widget.h
@@ -327,31 +327,29 @@ void bacon_video_widget_get_metadata (BaconVideoWidget *bvw,
/* Visualisation functions */
/**
- * BvwVisualsQuality:
- * @VISUAL_SMALL: small size (240Ã?15)
- * @VISUAL_NORMAL: normal size (320Ã?25)
- * @VISUAL_LARGE: large size (480Ã?25)
- * @VISUAL_EXTRA_LARGE: extra large size (600Ã?30)
- * @NUM_VISUAL_QUALITIES: the number of visual qualities available
+ * BvwVisualizationQuality:
+ * @BVW_VISUALIZATION_SMALL: small size (240Ã?15)
+ * @BVW_VISUALIZATION_NORMAL: normal size (320Ã?25)
+ * @BVW_VISUALIZATION_LARGE: large size (480Ã?25)
+ * @BVW_VISUALIZATION_EXTRA_LARGE: extra large size (600Ã?30)
*
* The different visualisation sizes or qualities available for use
- * with bacon_video_widget_set_visuals_quality().
+ * with bacon_video_widget_set_visualization_quality().
**/
typedef enum {
- VISUAL_SMALL = 0,
- VISUAL_NORMAL,
- VISUAL_LARGE,
- VISUAL_EXTRA_LARGE,
- NUM_VISUAL_QUALITIES
-} BvwVisualsQuality;
-
-void bacon_video_widget_set_show_visuals (BaconVideoWidget *bvw,
- gboolean show_visuals);
-GList *bacon_video_widget_get_visuals_list (BaconVideoWidget *bvw);
-gboolean bacon_video_widget_set_visuals (BaconVideoWidget *bvw,
+ BVW_VISUALIZATION_SMALL = 0,
+ BVW_VISUALIZATION_NORMAL,
+ BVW_VISUALIZATION_LARGE,
+ BVW_VISUALIZATION_EXTRA_LARGE
+} BvwVisualizationQuality;
+
+void bacon_video_widget_set_show_visualizations (BaconVideoWidget *bvw,
+ gboolean show_visualizations);
+GList *bacon_video_widget_get_visualization_list (BaconVideoWidget *bvw);
+gboolean bacon_video_widget_set_visualization (BaconVideoWidget *bvw,
const char *name);
-void bacon_video_widget_set_visuals_quality (BaconVideoWidget *bvw,
- BvwVisualsQuality quality);
+void bacon_video_widget_set_visualization_quality (BaconVideoWidget *bvw,
+ BvwVisualizationQuality quality);
/* Picture settings */
/**
diff --git a/src/totem-preferences.c b/src/totem-preferences.c
index e0015cc..38d4c98 100644
--- a/src/totem-preferences.c
+++ b/src/totem-preferences.c
@@ -149,7 +149,7 @@ totem_prefs_set_show_visuals (Totem *totem, gboolean value)
"tpw_visuals_size_combobox"));
gtk_widget_set_sensitive (item, value);
- bacon_video_widget_set_show_visuals
+ bacon_video_widget_set_show_visualizations
(BACON_VIDEO_WIDGET (totem->bvw), value);
}
@@ -389,7 +389,7 @@ visual_menu_changed (GtkComboBox *combobox, Totem *totem)
int i;
i = gtk_combo_box_get_active (combobox);
- list = bacon_video_widget_get_visuals_list (totem->bvw);
+ list = bacon_video_widget_get_visualization_list (totem->bvw);
name = g_list_nth_data (list, i);
old_name = gconf_client_get_string (totem->gc,
@@ -400,7 +400,7 @@ visual_menu_changed (GtkComboBox *combobox, Totem *totem)
gconf_client_set_string (totem->gc, GCONF_PREFIX"/visual",
name, NULL);
- if (bacon_video_widget_set_visuals (totem->bvw, name) != FALSE)
+ if (bacon_video_widget_set_visualization (totem->bvw, name) != FALSE)
totem_action_info (_("Changing the visuals effect type will require a restart to take effect."), totem);
}
@@ -415,7 +415,7 @@ visual_quality_menu_changed (GtkComboBox *combobox, Totem *totem)
i = gtk_combo_box_get_active (combobox);
gconf_client_set_int (totem->gc,
GCONF_PREFIX"/visual_quality", i, NULL);
- bacon_video_widget_set_visuals_quality (totem->bvw, i);
+ bacon_video_widget_set_visualization_quality (totem->bvw, i);
}
void
@@ -699,7 +699,7 @@ totem_setup_preferences (Totem *totem)
totem, NULL, NULL);
/* Visuals list */
- list = bacon_video_widget_get_visuals_list (totem->bvw);
+ list = bacon_video_widget_get_visualization_list (totem->bvw);
menu = gtk_menu_new ();
gtk_widget_show (menu);
@@ -728,7 +728,7 @@ totem_setup_preferences (Totem *totem)
/* Visualisation quality */
i = gconf_client_get_int (totem->gc,
GCONF_PREFIX"/visual_quality", NULL);
- bacon_video_widget_set_visuals_quality (totem->bvw, i);
+ bacon_video_widget_set_visualization_quality (totem->bvw, i);
item = gtk_builder_get_object (totem->xml, "tpw_visuals_size_combobox");
gtk_combo_box_set_active (GTK_COMBO_BOX (item), i);
@@ -824,6 +824,6 @@ totem_preferences_visuals_setup (Totem *totem)
visual = g_strdup ("goom");
}
- bacon_video_widget_set_visuals (totem->bvw, visual);
+ bacon_video_widget_set_visualization (totem->bvw, visual);
g_free (visual);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]