diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2005-05-05 16:23:20 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2005-05-05 16:23:20 +0000 |
commit | 5ea79c29563d2fb55d21a49f4804206a66de5fb5 (patch) | |
tree | 7805be2060d219d85c768bfe408d2bee5fa1531d | |
parent | 49f86d3ee6242be6f324edc2cbf36089ff5a2640 (diff) | |
download | gst-plugins-bad-5ea79c29563d2fb55d21a49f4804206a66de5fb5.tar.gz gst-plugins-bad-5ea79c29563d2fb55d21a49f4804206a66de5fb5.tar.bz2 gst-plugins-bad-5ea79c29563d2fb55d21a49f4804206a66de5fb5.zip |
More gcc-4.0 fixes.
Original commit message from CVS:
* ext/nas/nassink.c: (gst_nassink_init), (gst_nassink_sync_parms),
(gst_nassink_sinkconnect), (gst_nassink_chain_handle_event),
(gst_nassink_chain):
* sys/glsink/glimagesink.c: (gst_glimagesink_buffer_alloc):
* sys/v4l/gstv4ltuner.c: (gst_v4l_tuner_signal_strength):
* sys/v4l/gstv4lxoverlay.c: (gst_v4l_xoverlay_open):
* sys/v4l2/gstv4l2element.c: (gst_v4l2element_get_property):
* sys/v4l2/gstv4l2xoverlay.c: (gst_v4l2_xoverlay_open):
* sys/v4l2/v4l2_calls.c: (gst_v4l2_fill_lists):
* sys/v4lradio/gstv4lradiotuner.c:
(gst_v4lradio_tuner_signal_strength):
* sys/ximage/ximagesink.c: (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support),
(gst_xvimagesink_sink_link), (gst_xvimagesink_buffer_alloc):
More gcc-4.0 fixes.
-rw-r--r-- | ChangeLog | 18 | ||||
-rw-r--r-- | ext/nas/nassink.c | 45 | ||||
-rw-r--r-- | sys/glsink/glimagesink.c | 2 | ||||
-rw-r--r-- | sys/v4l2/gstv4l2element.c | 2 | ||||
-rw-r--r-- | sys/v4l2/gstv4l2xoverlay.c | 3 | ||||
-rw-r--r-- | sys/v4l2/v4l2_calls.c | 8 |
6 files changed, 69 insertions, 9 deletions
@@ -1,5 +1,23 @@ 2005-05-05 Tim-Philipp Müller <tim at centricular dot net> + * ext/nas/nassink.c: (gst_nassink_init), (gst_nassink_sync_parms), + (gst_nassink_sinkconnect), (gst_nassink_chain_handle_event), + (gst_nassink_chain): + * sys/glsink/glimagesink.c: (gst_glimagesink_buffer_alloc): + * sys/v4l/gstv4ltuner.c: (gst_v4l_tuner_signal_strength): + * sys/v4l/gstv4lxoverlay.c: (gst_v4l_xoverlay_open): + * sys/v4l2/gstv4l2element.c: (gst_v4l2element_get_property): + * sys/v4l2/gstv4l2xoverlay.c: (gst_v4l2_xoverlay_open): + * sys/v4l2/v4l2_calls.c: (gst_v4l2_fill_lists): + * sys/v4lradio/gstv4lradiotuner.c: + (gst_v4lradio_tuner_signal_strength): + * sys/ximage/ximagesink.c: (gst_ximagesink_buffer_alloc): + * sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support), + (gst_xvimagesink_sink_link), (gst_xvimagesink_buffer_alloc): + More gcc-4.0 fixes. + +2005-05-05 Tim-Philipp Müller <tim at centricular dot net> + * gst/speed/demo-mp3.c: (time_tick_cb): * gst/speed/gstspeed.c: (speed_parse_caps): * gst/subparse/gstsubparse.c: (get_next_line), diff --git a/ext/nas/nassink.c b/ext/nas/nassink.c index a47292a9..722d17cc 100644 --- a/ext/nas/nassink.c +++ b/ext/nas/nassink.c @@ -170,6 +170,8 @@ gst_nassink_init (GstNassink * nassink) gst_pad_set_getcaps_function (nassink->sinkpad, gst_nassink_getcaps); gst_pad_set_fixate_function (nassink->sinkpad, gst_nassink_fixate); + GST_FLAG_SET (nassink, GST_ELEMENT_EVENT_AWARE); + nassink->mute = FALSE; nassink->depth = 16; nassink->tracks = 2; @@ -357,9 +359,39 @@ gst_nassink_sinkconnect (GstPad * pad, const GstCaps * caps) } static void +gst_nassink_chain_handle_event (GstNassink * nassink, GstPad * pad, + GstEvent * event) +{ + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_EOS: +/* + gst_audio_clock_set_active (GST_AUDIO_CLOCK (esdsink->provided_clock), + FALSE); +*/ + gst_pad_event_default (pad, event); + return; + case GST_EVENT_DISCONTINUOUS: + /* evil hack */ + gst_nassink_close_audio (nassink); + gst_nassink_open_audio (nassink); + nassink->flow = AuGetScratchFlow (nassink->audio, NULL); + if (nassink->flow == 0) { + GST_CAT_DEBUG (NAS, "couldn't get flow"); + // return -1 (throw error?) + } + gst_pad_event_default (pad, event); + return; + default: + gst_pad_event_default (pad, event); + return; + } + gst_event_unref (event); +} + +static void gst_nassink_chain (GstPad * pad, GstData * _data) { - GstBuffer *buf = GST_BUFFER (_data); + GstBuffer *buf; int pos = 0; int remaining; int available; @@ -367,12 +399,21 @@ gst_nassink_chain (GstPad * pad, GstData * _data) g_return_if_fail (pad != NULL); g_return_if_fail (GST_IS_PAD (pad)); - g_return_if_fail (buf != NULL); + g_return_if_fail (_data != NULL); nassink = GST_NASSINK (gst_pad_get_parent (pad)); + if (GST_IS_EVENT (_data)) { + gst_nassink_chain_handle_event (nassink, pad, GST_EVENT (_data)); + return; + } + + if (nassink->buf == NULL) + gst_nassink_sync_parms (nassink); // FIXME: if return false, error + g_return_if_fail (nassink->buf != NULL); + buf = GST_BUFFER (_data); if (GST_BUFFER_DATA (buf) != NULL) { if (!nassink->mute && nassink->audio != NULL) { diff --git a/sys/glsink/glimagesink.c b/sys/glsink/glimagesink.c index 73ed7aa6..13549a71 100644 --- a/sys/glsink/glimagesink.c +++ b/sys/glsink/glimagesink.c @@ -1137,7 +1137,7 @@ gst_glimagesink_buffer_alloc (GstPad * pad, guint64 offset, guint size) /* Storing some pointers in the buffer */ GST_BUFFER_PRIVATE (buffer) = ximage; - GST_BUFFER_DATA (buffer) = ximage->data; + GST_BUFFER_DATA (buffer) = (guint8 *) ximage->data; GST_BUFFER_FREE_DATA_FUNC (buffer) = gst_glimagesink_buffer_free; GST_BUFFER_SIZE (buffer) = ximage->size; return buffer; diff --git a/sys/v4l2/gstv4l2element.c b/sys/v4l2/gstv4l2element.c index 09953c94..c29d074e 100644 --- a/sys/v4l2/gstv4l2element.c +++ b/sys/v4l2/gstv4l2element.c @@ -535,7 +535,7 @@ gst_v4l2element_get_property (GObject * object, gchar *new = NULL; if (GST_V4L2_IS_OPEN (v4l2element)) - new = v4l2element->vcap.card; + new = (gchar *) v4l2element->vcap.card; g_value_set_string (value, new); break; } diff --git a/sys/v4l2/gstv4l2xoverlay.c b/sys/v4l2/gstv4l2xoverlay.c index 2e416b3e..60c258ad 100644 --- a/sys/v4l2/gstv4l2xoverlay.c +++ b/sys/v4l2/gstv4l2xoverlay.c @@ -65,7 +65,8 @@ gst_v4l2_xoverlay_open (GstV4l2Element * v4l2element) struct stat s; GstV4l2Xv *v4l2xv; const gchar *name = g_getenv ("DISPLAY"); - int ver, rel, req, ev, err, anum, i, id = 0, first_id = 0, min; + unsigned int ver, rel, req, ev, err, anum; + int i, id = 0, first_id = 0, min; XvAdaptorInfo *ai; Display *dpy; diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c index fa9f3988..b630fc04 100644 --- a/sys/v4l2/v4l2_calls.c +++ b/sys/v4l2/v4l2_calls.c @@ -106,7 +106,7 @@ gst_v4l2_fill_lists (GstV4l2Element * v4l2element) v4l2channel = g_object_new (GST_TYPE_V4L2_TUNER_CHANNEL, NULL); channel = GST_TUNER_CHANNEL (v4l2channel); - channel->label = g_strdup (input.name); + channel->label = g_strdup ((const gchar *) input.name); channel->flags = GST_TUNER_CHANNEL_INPUT; v4l2channel->index = n; if (input.type == V4L2_INPUT_TYPE_TUNER) { @@ -162,7 +162,7 @@ gst_v4l2_fill_lists (GstV4l2Element * v4l2element) v4l2channel = g_object_new (GST_TYPE_V4L2_TUNER_CHANNEL, NULL); channel = GST_TUNER_CHANNEL (v4l2channel); - channel->label = g_strdup (output.name); + channel->label = g_strdup ((const gchar *) output.name); channel->flags = GST_TUNER_CHANNEL_OUTPUT; v4l2channel->index = n; if (output.audioset) { @@ -198,7 +198,7 @@ gst_v4l2_fill_lists (GstV4l2Element * v4l2element) v4l2norm = g_object_new (GST_TYPE_V4L2_TUNER_NORM, NULL); norm = GST_TUNER_NORM (v4l2norm); - norm->label = g_strdup (standard.name); + norm->label = g_strdup ((const gchar *) standard.name); norm->fps = (gfloat) standard.frameperiod.denominator / standard.frameperiod.numerator; v4l2norm->index = standard.id; @@ -259,7 +259,7 @@ gst_v4l2_fill_lists (GstV4l2Element * v4l2element) v4l2channel = g_object_new (GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL, NULL); channel = GST_COLOR_BALANCE_CHANNEL (v4l2channel); - channel->label = g_strdup (control.name); + channel->label = g_strdup ((const gchar *) control.name); v4l2channel->index = n; #if 0 |