From 4fd57bbe3fef59592a8664dcc9fa2ab32ae99c69 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Mon, 15 Mar 2004 19:32:27 +0000 Subject: don't mix tabs and spaces Original commit message from CVS: don't mix tabs and spaces --- ext/xine/xine.c | 4 +-- ext/xine/xineaudiodec.c | 91 +++++++++++++++++++++++----------------------- ext/xine/xineaudiosink.c | 94 ++++++++++++++++++++++++------------------------ ext/xine/xineinput.c | 44 +++++++++++------------ 4 files changed, 117 insertions(+), 116 deletions(-) (limited to 'ext/xine') diff --git a/ext/xine/xine.c b/ext/xine/xine.c index f1dbb399..8357ff56 100644 --- a/ext/xine/xine.c +++ b/ext/xine/xine.c @@ -72,7 +72,7 @@ gst_xine_change_state (GstElement * element) break; case GST_STATE_READY_TO_NULL: if (xine->stream != NULL) - gst_xine_free_stream (xine); + gst_xine_free_stream (xine); break; default: GST_ERROR_OBJECT (element, "invalid state change"); @@ -107,7 +107,7 @@ gst_xine_get_stream (GstXine * xine) xine->audio_driver = klass->create_audio_driver (xine); xine->video_driver = klass->create_video_driver (xine); xine->stream = - xine_stream_new (klass->xine, xine->audio_driver, xine->video_driver); + xine_stream_new (klass->xine, xine->audio_driver, xine->video_driver); /* FIXME: fail gracefully */ g_assert (xine->stream); diff --git a/ext/xine/xineaudiodec.c b/ext/xine/xineaudiodec.c index 869c3b4d..1d5288bd 100644 --- a/ext/xine/xineaudiodec.c +++ b/ext/xine/xineaudiodec.c @@ -67,7 +67,8 @@ typedef struct xine_ao_driver_t driver; GstXineAudioDec *xine; gboolean open; -} GstXineAudioDriver; +} +GstXineAudioDriver; static guint32 _driver_get_capabilities (xine_ao_driver_t * driver) @@ -152,19 +153,19 @@ _driver_status (xine_ao_driver_t * driver, xine_stream_t * stream, return 0; structure = gst_caps_get_structure (caps, 0); - *bits = 0; /* FIXME */ + *bits = 0; /* FIXME */ if (!gst_structure_get_int (structure, "rate", &temp)) { - g_assert_not_reached (); /* may never happen with negotiated caps */ + g_assert_not_reached (); /* may never happen with negotiated caps */ return 0; } *rate = temp; if (!gst_structure_get_int (structure, "channels", &temp)) { - g_assert_not_reached (); /* may never happen with negotiated caps */ + g_assert_not_reached (); /* may never happen with negotiated caps */ return 0; } *mode = (temp == 2) ? AO_CAP_MODE_STEREO : AO_CAP_MODE_MONO; if (!gst_structure_get_int (structure, "width", &temp)) { - g_assert_not_reached (); /* may never happen with negotiated caps */ + g_assert_not_reached (); /* may never happen with negotiated caps */ return 0; } if (temp == 8) @@ -233,11 +234,11 @@ GST_BOILERPLATE (GstXineAudioDec, gst_xine_audio_dec, GstXine, GST_TYPE_XINE) static void gst_xine_audio_dec_chain (GstPad * pad, GstData * in); static GstElementStateReturn - gst_xine_audio_dec_change_state (GstElement * element); + gst_xine_audio_dec_change_state (GstElement * element); /* this function handles the link with other plug-ins */ static GstPadLinkReturn - gst_xine_audio_dec_sink_link (GstPad * pad, const GstCaps * caps) + gst_xine_audio_dec_sink_link (GstPad * pad, const GstCaps * caps) { guint temp; GstStructure *structure; @@ -255,7 +256,7 @@ GST_BOILERPLATE (GstXineAudioDec, gst_xine_audio_dec, GstXine, GST_TYPE_XINE) xine->wave.nChannels = temp; if (gst_structure_get_int (structure, "rate", &temp)) xine->wave.nSamplesPerSec = temp; - xine->wave.wBitsPerSample = 16; /* FIXME: how do we figure this thing out? */ + xine->wave.wBitsPerSample = 16; /* FIXME: how do we figure this thing out? */ /* FIXME: fill wave header better */ return GST_PAD_LINK_OK; @@ -304,7 +305,7 @@ gst_xine_audio_dec_chain (GstPad * pad, GstData * in) if (xine->format == 0) { /* no caps yet */ GST_ELEMENT_ERROR (xine, CORE, NEGOTIATION, (NULL), - ("buffer sent before doing caps nego")); + ("buffer sent before doing caps nego")); gst_data_unref (in); return; } @@ -329,7 +330,7 @@ gst_xine_audio_dec_chain (GstPad * pad, GstData * in) /* FIXME: qdm2 only right now */ g_assert (gst_pad_get_negotiated_caps (xine->sinkpad)); structure = - gst_caps_get_structure (gst_pad_get_negotiated_caps (xine->sinkpad), 0); + gst_caps_get_structure (gst_pad_get_negotiated_caps (xine->sinkpad), 0); *((guint32 *) & stsd[56]) = GUINT32_TO_BE (12); memcpy (&stsd[60], "frmaQDM2", 8); *((guint32 *) & stsd[68]) = GUINT32_TO_BE (36); @@ -409,7 +410,7 @@ gst_xine_audio_dec_change_state (GstElement * element) case GST_STATE_NULL_TO_READY: xine->decoder = _load_decoder (xine); if (!xine->decoder) - return GST_STATE_FAILURE; + return GST_STATE_FAILURE; break; case GST_STATE_READY_TO_PAUSED: break; @@ -422,7 +423,7 @@ gst_xine_audio_dec_change_state (GstElement * element) case GST_STATE_READY_TO_NULL: xine->setup = FALSE; _x_free_audio_decoder (gst_xine_get_stream (GST_XINE (xine)), - xine->decoder); + xine->decoder); break; default: GST_ERROR_OBJECT (element, "invalid state change"); @@ -439,17 +440,17 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw-int, " - "endianness = (int) BYTE_ORDER, " - "signed = (boolean) TRUE, " - "width = (int) 16, " - "depth = (int) 16, " - "rate = (int) [ 1, MAX ], " - "channels = (int) [ 1, 2 ]; " - "audio/x-raw-int, " - "signed = (boolean) FALSE, " - "width = (int) 8, " - "depth = (int) 8, " - "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]") + "endianness = (int) BYTE_ORDER, " + "signed = (boolean) TRUE, " + "width = (int) 16, " + "depth = (int) 16, " + "rate = (int) [ 1, MAX ], " + "channels = (int) [ 1, 2 ]; " + "audio/x-raw-int, " + "signed = (boolean) FALSE, " + "width = (int) 8, " + "depth = (int) 8, " + "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]") ); static void @@ -483,7 +484,7 @@ gst_xine_audio_dec_subclass_init (gpointer g_class, gpointer class_data) while (dec->supported_types[i] != 0) { const gchar *type_str = - gst_xine_get_caps_for_format (dec->supported_types[i]); + gst_xine_get_caps_for_format (dec->supported_types[i]); if (type_str) { gst_caps_append (caps, gst_caps_from_string (type_str)); } @@ -501,14 +502,14 @@ gst_xine_audio_dec_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_link_function (xine->sinkpad, gst_xine_audio_dec_sink_link); gst_pad_set_chain_function (xine->sinkpad, gst_xine_audio_dec_chain); gst_element_add_pad (GST_ELEMENT (xine), xine->sinkpad); xine->srcpad = gst_pad_new_from_template (gst_element_class_get_pad_template (klass, - "src"), "src"); + "src"), "src"); gst_pad_use_explicit_caps (xine->srcpad); gst_element_add_pad (GST_ELEMENT (xine), xine->srcpad); } @@ -545,26 +546,26 @@ gst_xine_audio_dec_init_plugin (GstPlugin * plugin) dec = node->info->special_info; while (dec->supported_types[format] != 0) { const gchar *caps = - gst_xine_get_caps_for_format (dec->supported_types[format]); + gst_xine_get_caps_for_format (dec->supported_types[format]); if (caps) { - gchar *plugin_name = - g_strdup_printf ("xineaudiodec_%s", node->info->id); - gchar *type_name = - g_strdup_printf ("GstXineAudioDec%s", node->info->id); - GType type; - - plugin_info.class_data = node; - type = - g_type_register_static (GST_TYPE_XINE_AUDIO_DEC, type_name, - &plugin_info, 0); - g_free (type_name); - if (!gst_element_register (plugin, plugin_name, - MAX (GST_RANK_MARGINAL, - GST_RANK_MARGINAL * dec->priority / 10 + 1), type)) { - g_free (plugin_name); - return FALSE; - } - g_free (plugin_name); + gchar *plugin_name = + g_strdup_printf ("xineaudiodec_%s", node->info->id); + gchar *type_name = + g_strdup_printf ("GstXineAudioDec%s", node->info->id); + GType type; + + plugin_info.class_data = node; + type = + g_type_register_static (GST_TYPE_XINE_AUDIO_DEC, type_name, + &plugin_info, 0); + g_free (type_name); + if (!gst_element_register (plugin, plugin_name, + MAX (GST_RANK_MARGINAL, + GST_RANK_MARGINAL * dec->priority / 10 + 1), type)) { + g_free (plugin_name); + return FALSE; + } + g_free (plugin_name); } format++; } 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); diff --git a/ext/xine/xineinput.c b/ext/xine/xineinput.c index 19a4bbbe..35aa1dca 100644 --- a/ext/xine/xineinput.c +++ b/ext/xine/xineinput.c @@ -75,7 +75,7 @@ GST_BOILERPLATE (GstXineInput, gst_xine_input, GstXine, GST_TYPE_XINE) static void gst_xine_input_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static GstElementStateReturn - gst_xine_input_change_state (GstElement * element); + gst_xine_input_change_state (GstElement * element); static void gst_xine_input_base_init (gpointer g_class) { @@ -95,7 +95,7 @@ gst_xine_input_class_init (GstXineInputClass * klass) g_object_class_install_property (object, ARG_LOCATION, g_param_spec_string ("location", "location", "location", - NULL, G_PARAM_READWRITE)); + NULL, G_PARAM_READWRITE)); } static void @@ -123,9 +123,9 @@ gst_xine_input_set_property (GObject * object, guint prop_id, switch (prop_id) { case ARG_LOCATION: if (gst_element_get_state (GST_ELEMENT (xine)) != GST_STATE_NULL) - return; + return; if (xine->location) - g_free (xine->location); + g_free (xine->location); xine->location = g_strdup (g_value_get_string (value)); break; default: @@ -150,7 +150,7 @@ gst_xine_input_get_property (GObject * object, guint prop_id, GValue * value, } } -#define BUFFER_SIZE 4096 /* FIXME: what size? */ +#define BUFFER_SIZE 4096 /* FIXME: what size? */ static GstData * gst_xine_input_get (GstPad * pad) { @@ -176,7 +176,7 @@ gst_xine_input_get (GstPad * pad) GST_BUFFER_SIZE (buf) = real_size; if (real_size < 0) { GST_ELEMENT_ERROR (xine, RESOURCE, READ, (NULL), ("error %d reading data", - real_size)); + real_size)); gst_data_unref (GST_DATA (buf)); return NULL; } else if (real_size == 0) { @@ -184,8 +184,8 @@ gst_xine_input_get (GstPad * pad) if (xine->input->get_capabilities (xine->input) & INPUT_CAP_BLOCK) element = - xine->input->read_block (xine->input, - gst_xine_get_stream (GST_XINE (xine))->audio_fifo, xine->blocksize); + xine->input->read_block (xine->input, + gst_xine_get_stream (GST_XINE (xine))->audio_fifo, xine->blocksize); if (element == NULL) { /* FIXME: is this EOS? */ gst_element_set_eos (GST_ELEMENT (xine)); @@ -213,15 +213,15 @@ gst_xine_input_change_state (GstElement * element) switch (GST_STATE_TRANSITION (element)) { case GST_STATE_NULL_TO_READY: xine->input = - input->get_instance (input, gst_xine_get_stream (GST_XINE (xine)), - xine->location); + input->get_instance (input, gst_xine_get_stream (GST_XINE (xine)), + xine->location); if (!xine->input) - return GST_STATE_FAILURE; + return GST_STATE_FAILURE; if (xine->input->open (xine->input) == 0) - return GST_STATE_FAILURE; + return GST_STATE_FAILURE; xine->blocksize = xine->input->get_blocksize (xine->input); if (xine->blocksize == 0) - xine->blocksize = BUFFER_SIZE; + xine->blocksize = BUFFER_SIZE; break; case GST_STATE_READY_TO_PAUSED: break; @@ -256,10 +256,10 @@ static GstStaticPadTemplate cdda_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw-int, " - "endianness = (int) LITTLE_ENDIAN, " - "signed = (boolean) true, " - "width = (int) 16, " - "depth = (int) 16, " "rate = (int) 44100, " "channels = (int) 2") + "endianness = (int) LITTLE_ENDIAN, " + "signed = (boolean) true, " + "width = (int) 16, " + "depth = (int) 16, " "rate = (int) 44100, " "channels = (int) 2") ); static void @@ -285,10 +285,10 @@ gst_xine_input_subclass_init (gpointer g_class, gpointer class_data) /* FIXME: this is pretty hackish, anyone knows a better idea (xine doesn't) */ if (strcmp (input->get_identifier (input), "cdda") == 0) { gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&cdda_template)); + gst_static_pad_template_get (&cdda_template)); } else { gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&any_template)); + gst_static_pad_template_get (&any_template)); } } @@ -300,7 +300,7 @@ gst_xine_input_sub_init (GTypeInstance * instance, gpointer g_class) xine->srcpad = gst_pad_new_from_template (gst_element_class_get_pad_template (klass, - "src"), "src"); + "src"), "src"); gst_pad_set_get_function (xine->srcpad, gst_xine_input_get); gst_element_add_pad (GST_ELEMENT (xine), xine->srcpad); } @@ -332,8 +332,8 @@ gst_xine_input_init_plugin (GstPlugin * plugin) plugin_info.class_data = node; type = - g_type_register_static (GST_TYPE_XINE_INPUT, type_name, &plugin_info, - 0); + g_type_register_static (GST_TYPE_XINE_INPUT, type_name, &plugin_info, + 0); g_free (type_name); if (!gst_element_register (plugin, plugin_name, GST_RANK_MARGINAL, type)) { g_free (plugin_name); -- cgit v1.2.1