[totem] Add an audio-output-type property to BaconVideoWidget
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] Add an audio-output-type property to BaconVideoWidget
- Date: Wed, 15 Dec 2010 22:40:47 +0000 (UTC)
commit 66bc7ef1d961040b60dd98897cec689eedcfa7f6
Author: Philip Withnall <philip tecnocode co uk>
Date: Wed Dec 15 22:03:47 2010 +0000
Add an audio-output-type 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 134e4c2..07c0289 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -140,7 +140,8 @@ enum
PROP_BRIGHTNESS,
PROP_CONTRAST,
PROP_SATURATION,
- PROP_HUE
+ PROP_HUE,
+ PROP_AUDIO_OUTPUT_TYPE
};
static const gchar *video_props_str[4] = {
@@ -1233,6 +1234,18 @@ bacon_video_widget_class_init (BaconVideoWidgetClass * klass)
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ /**
+ * BaconVideoWidget:audio-output-type:
+ *
+ * The type of audio output to use (e.g. the number of channels).
+ **/
+ g_object_class_install_property (object_class, PROP_AUDIO_OUTPUT_TYPE,
+ g_param_spec_enum ("audio-output-type", NULL,
+ NULL, BVW_TYPE_AUDIO_OUT_TYPE,
+ BVW_AUDIO_SOUND_STEREO,
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
/* Signals */
/**
* BaconVideoWidget::error:
@@ -2865,6 +2878,9 @@ bacon_video_widget_set_property (GObject * object, guint property_id,
case PROP_HUE:
bacon_video_widget_set_video_property (bvw, BVW_VIDEO_HUE, g_value_get_int (value));
break;
+ case PROP_AUDIO_OUTPUT_TYPE:
+ bacon_video_widget_set_audio_out_type (bvw, g_value_get_enum (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -2939,6 +2955,9 @@ bacon_video_widget_get_property (GObject * object, guint property_id,
case PROP_HUE:
g_value_set_int (value, bacon_video_widget_get_video_property (bvw, BVW_VIDEO_HUE));
break;
+ case PROP_AUDIO_OUTPUT_TYPE:
+ g_value_set_enum (value, bacon_video_widget_get_audio_out_type (bvw));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -3500,6 +3519,8 @@ bacon_video_widget_set_audio_out_type (BaconVideoWidget *bvw,
return;
bvw->priv->speakersetup = type;
+ g_object_notify (G_OBJECT (bvw), "audio-output-type");
+
g_settings_set_enum (bvw->priv->settings, "audio-output-type", type);
set_audio_filter (bvw);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]