summaryrefslogtreecommitdiffstats
path: root/ext/xine/xineaudiosink.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/xine/xineaudiosink.c')
-rw-r--r--ext/xine/xineaudiosink.c94
1 files changed, 47 insertions, 47 deletions
diff --git a/ext/xine/xineaudiosink.c b/ext/xine/xineaudiosink.c
index 4638526d..64c5e6f8 100644
--- a/ext/xine/xineaudiosink.c
+++ b/ext/xine/xineaudiosink.c
@@ -48,7 +48,7 @@ struct _GstXineAudioSink
GstPad *sinkpad;
ao_driver_t *driver;
- guint open; /* number of bytes per sample or 0 if driver not open */
+ guint open; /* number of bytes per sample or 0 if driver not open */
};
struct _GstXineAudioSinkClass
@@ -63,7 +63,7 @@ struct _GstXineAudioSinkClass
GST_BOILERPLATE (GstXineAudioSink, gst_xine_audio_sink, GstXine, GST_TYPE_XINE)
static GstElementStateReturn
- gst_xine_audio_sink_change_state (GstElement * element);
+ gst_xine_audio_sink_change_state (GstElement * element);
static void gst_xine_audio_sink_base_init (gpointer g_class)
{
@@ -89,7 +89,7 @@ gst_xine_audio_sink_chain (GstPad * pad, GstData * data)
GST_XINE_AUDIO_SINK (gst_object_get_parent (GST_OBJECT (pad)));
while (xine->driver->write (xine->driver, (guint16 *) GST_BUFFER_DATA (data),
- GST_BUFFER_SIZE (data) / xine->open) == 0);
+ GST_BUFFER_SIZE (data) / xine->open) == 0);
gst_data_unref (GST_DATA (data));
}
@@ -104,22 +104,22 @@ gst_xine_audio_sink_change_state (GstElement * element)
switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_NULL_TO_READY:
if (driver == NULL) {
- xine_audio_port_t *port =
- xine_open_audio_driver (GST_XINE_GET_CLASS (xine)->xine,
- GST_XINE_AUDIO_SINK_GET_CLASS (xine)->plugin_node->info->id, NULL);
-
- if (!port)
- return GST_STATE_FAILURE;
- port->exit (port);
- driver =
- (audio_driver_class_t *) GST_XINE_AUDIO_SINK_GET_CLASS (xine)->
- plugin_node->plugin_class;
- if (driver == NULL)
- return GST_STATE_FAILURE;
+ xine_audio_port_t *port =
+ xine_open_audio_driver (GST_XINE_GET_CLASS (xine)->xine,
+ GST_XINE_AUDIO_SINK_GET_CLASS (xine)->plugin_node->info->id, NULL);
+
+ if (!port)
+ return GST_STATE_FAILURE;
+ port->exit (port);
+ driver =
+ (audio_driver_class_t *) GST_XINE_AUDIO_SINK_GET_CLASS (xine)->
+ plugin_node->plugin_class;
+ if (driver == NULL)
+ return GST_STATE_FAILURE;
}
xine->driver = driver->open_plugin (driver, NULL);
if (!xine->driver)
- return GST_STATE_FAILURE;
+ return GST_STATE_FAILURE;
break;
case GST_STATE_READY_TO_PAUSED:
break;
@@ -129,7 +129,7 @@ gst_xine_audio_sink_change_state (GstElement * element)
break;
case GST_STATE_PAUSED_TO_READY:
if (xine->open != 0)
- xine->driver->close (xine->driver);
+ xine->driver->close (xine->driver);
xine->open = 0;
break;
case GST_STATE_READY_TO_NULL:
@@ -169,31 +169,31 @@ _xine_audio_sink_get_caps (GstPad * pad)
do {
if (capa & AO_CAP_8BITS) {
caps = gst_caps_from_string ("audio/x-raw-int, "
- "signed = (boolean) FALSE, "
- "width = (int) 8, "
- "depth = (int) 8, " "rate = (int) [ 8000, 192000 ]");
+ "signed = (boolean) FALSE, "
+ "width = (int) 8, "
+ "depth = (int) 8, " "rate = (int) [ 8000, 192000 ]");
capa &= ~AO_CAP_8BITS;
} else {
caps = gst_caps_from_string ("audio/x-raw-int, "
- "endianness = (int) BYTE_ORDER, "
- "signed = (boolean) TRUE, "
- "width = (int) 16, "
- "depth = (int) 16, " "rate = (int) [ 8000, 192000 ]");
+ "endianness = (int) BYTE_ORDER, "
+ "signed = (boolean) TRUE, "
+ "width = (int) 16, "
+ "depth = (int) 16, " "rate = (int) [ 8000, 192000 ]");
capa = -1;
}
switch (channels) {
case AO_CAP_MODE_MONO | AO_CAP_MODE_STEREO:
- gst_caps_set_simple (caps, "channels", GST_TYPE_INT_RANGE, 1, 2, NULL);
- break;
+ gst_caps_set_simple (caps, "channels", GST_TYPE_INT_RANGE, 1, 2, NULL);
+ break;
case AO_CAP_MODE_MONO:
- gst_caps_set_simple (caps, "channels", G_TYPE_INT, 1, NULL);
- break;
+ gst_caps_set_simple (caps, "channels", G_TYPE_INT, 1, NULL);
+ break;
case AO_CAP_MODE_STEREO:
- gst_caps_set_simple (caps, "channels", G_TYPE_INT, 2, NULL);
- break;
+ gst_caps_set_simple (caps, "channels", G_TYPE_INT, 2, NULL);
+ break;
default:
- g_assert_not_reached ();
- break;
+ g_assert_not_reached ();
+ break;
}
gst_caps_append (ret, caps);
} while (capa != -1);
@@ -229,7 +229,7 @@ _xine_audio_sink_link (GstPad * pad, const GstCaps * caps)
if (temp != rate) {
/* FIXME? */
GST_WARNING_OBJECT (xine, "rates don't match (requested: %u, got %u)", rate,
- temp);
+ temp);
}
return GST_PAD_LINK_OK;
@@ -241,17 +241,17 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, "
- "signed = (boolean) FALSE, "
- "width = (int) 8, "
- "depth = (int) 8, "
- "rate = (int) [ 8000, 192000 ], "
- "channels = (int) [1, 2]; "
- "audio/x-raw-int, "
- "endianness = (int) BYTE_ORDER, "
- "signed = (boolean) TRUE, "
- "width = (int) 16, "
- "depth = (int) 16, "
- "rate = (int) [ 8000, 192000 ], " "channels = (int) [1, 2]")
+ "signed = (boolean) FALSE, "
+ "width = (int) 8, "
+ "depth = (int) 8, "
+ "rate = (int) [ 8000, 192000 ], "
+ "channels = (int) [1, 2]; "
+ "audio/x-raw-int, "
+ "endianness = (int) BYTE_ORDER, "
+ "signed = (boolean) TRUE, "
+ "width = (int) 16, "
+ "depth = (int) 16, "
+ "rate = (int) [ 8000, 192000 ], " "channels = (int) [1, 2]")
);
static void
@@ -286,7 +286,7 @@ gst_xine_audio_sink_sub_init (GTypeInstance * instance, gpointer g_class)
xine->sinkpad =
gst_pad_new_from_template (gst_element_class_get_pad_template (klass,
- "sink"), "sink");
+ "sink"), "sink");
gst_pad_set_chain_function (xine->sinkpad, gst_xine_audio_sink_chain);
gst_pad_set_getcaps_function (xine->sinkpad, _xine_audio_sink_get_caps);
gst_pad_set_link_function (xine->sinkpad, _xine_audio_sink_link);
@@ -320,8 +320,8 @@ gst_xine_audio_sink_init_plugin (GstPlugin * plugin)
plugin_info.class_data = node;
type =
- g_type_register_static (GST_TYPE_XINE_AUDIO_SINK, type_name,
- &plugin_info, 0);
+ g_type_register_static (GST_TYPE_XINE_AUDIO_SINK, type_name,
+ &plugin_info, 0);
g_free (type_name);
if (!gst_element_register (plugin, plugin_name, GST_RANK_MARGINAL, type)) {
g_free (plugin_name);