From 2d109a18fb9bb87100c8b788457bc5c8458f9f50 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 29 Jun 2005 16:14:30 +0000 Subject: [PATCH] configure.ac (GST_CFLAGS): GCC strikes back!!! Let the build breakage ensue!!! Original commit message from CVS: 2005-06-29 Andy Wingo * configure.ac (GST_CFLAGS): GCC strikes back!!! Let the build breakage ensue!!! * gst/rtsp/gstrtspsrc.c (gst_rtspsrc_loop, gst_rtspsrc_open): Signedness, unused var fixes. (gst_rtspsrc_close): Unused? * gst/realmedia/rmdemux.c (re_hexdump_bytes): Unused. * gst/law/mulaw-encode.c (gst_mulawenc_chain): Signeness fix. * gst/law/alaw-encode.c (alawenc_getcaps): Remove unneeded declarations. Typo (probably crasher) fix. * gst/law/mulaw-encode.c (mulawdec_getcaps): * gst/law/mulaw-encode.c (mulawenc_getcaps): * gst/law/alaw-decode.c (alawdec_getcaps): Same crasher fix. * gst/goom/gstgoom.c (gst_goom_init): Hook up the event function. * gst/effectv/gstwarp.c (gst_warptv_setup): Signedness fix. * gst/effectv/gstdice.c (gst_dicetv_draw): Um, deferencing uninitialized pointer not good. * gst/videofilter/gstvideoexample.c (plugin_init): * gst/videofilter/Makefile.am (libgstvideoexample_la_LIBADD): Link to libgstvideofilter instead of gst_library_load. * gst/alpha/gstalpha.c (gst_alpha_chroma_key_i420) (gst_alpha_chroma_key_ayuv): Signedness fixen. --- ChangeLog | 34 ++++++++++++++++++++++++++++++++++ configure.ac | 2 ++ gst/alpha/gstalpha.c | 4 ++-- gst/effectv/gstdice.c | 6 +++--- gst/effectv/gstwarp.c | 2 +- gst/goom/gstgoom.c | 2 ++ gst/law/alaw-decode.c | 2 +- gst/law/alaw-encode.c | 6 ++---- gst/law/mulaw-decode.c | 2 +- gst/law/mulaw-encode.c | 4 ++-- gst/rtsp/gstrtspsrc.c | 7 ++----- gst/rtsp/rtspconnection.c | 7 +++++-- gst/videofilter/Makefile.am | 2 +- 13 files changed, 58 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 85aad67126..15b4db478c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,37 @@ +2005-06-29 Andy Wingo + + * configure.ac (GST_CFLAGS): GCC strikes back!!! Let the build + breakage ensue!!! + + * gst/rtsp/gstrtspsrc.c (gst_rtspsrc_loop, gst_rtspsrc_open): + Signedness, unused var fixes. + (gst_rtspsrc_close): Unused? + + * gst/realmedia/rmdemux.c (re_hexdump_bytes): Unused. + + * gst/law/mulaw-encode.c (gst_mulawenc_chain): Signeness fix. + + * gst/law/alaw-encode.c (alawenc_getcaps): Remove unneeded + declarations. Typo (probably crasher) fix. + + * gst/law/mulaw-encode.c (mulawdec_getcaps): + * gst/law/mulaw-encode.c (mulawenc_getcaps): + * gst/law/alaw-decode.c (alawdec_getcaps): Same crasher fix. + + * gst/goom/gstgoom.c (gst_goom_init): Hook up the event function. + + * gst/effectv/gstwarp.c (gst_warptv_setup): Signedness fix. + + * gst/effectv/gstdice.c (gst_dicetv_draw): Um, deferencing + uninitialized pointer not good. + + * gst/videofilter/gstvideoexample.c (plugin_init): + * gst/videofilter/Makefile.am (libgstvideoexample_la_LIBADD): Link + to libgstvideofilter instead of gst_library_load. + + * gst/alpha/gstalpha.c (gst_alpha_chroma_key_i420) + (gst_alpha_chroma_key_ayuv): Signedness fixen. + 2005-06-29 Wim Taymans * gst/rtsp/gstrtspsrc.c: (gst_rtsp_proto_get_type), diff --git a/configure.ac b/configure.ac index 3b100287e5..6864b29572 100644 --- a/configure.ac +++ b/configure.ac @@ -439,6 +439,8 @@ GST_CHECK_FEATURE(ESD, [esound plug-ins], esdsink, [ ]) ]) +GST_CFLAGS="$GST_CFLAGS $GST_ERROR" + AC_SUBST(GST_LIBS) AC_SUBST(GST_CFLAGS) diff --git a/gst/alpha/gstalpha.c b/gst/alpha/gstalpha.c index a7573a5fdc..4e403cbc2b 100644 --- a/gst/alpha/gstalpha.c +++ b/gst/alpha/gstalpha.c @@ -497,7 +497,7 @@ gst_alpha_set_i420 (guint8 * src, guint8 * dest, gint width, gint height, } static void -gst_alpha_chroma_key_ayuv (gchar * src, gchar * dest, gint width, gint height, +gst_alpha_chroma_key_ayuv (guint8 * src, guint8 * dest, gint width, gint height, GstAlpha * alpha) { gint b_alpha; @@ -608,7 +608,7 @@ gst_alpha_chroma_key_ayuv (gchar * src, gchar * dest, gint width, gint height, /* based on http://www.cs.utah.edu/~michael/chroma/ */ static void -gst_alpha_chroma_key_i420 (gchar * src, gchar * dest, gint width, gint height, +gst_alpha_chroma_key_i420 (guint8 * src, guint8 * dest, gint width, gint height, GstAlpha * alpha) { gint b_alpha; diff --git a/gst/effectv/gstdice.c b/gst/effectv/gstdice.c index 75c3377282..84d5052eff 100644 --- a/gst/effectv/gstdice.c +++ b/gst/effectv/gstdice.c @@ -238,9 +238,9 @@ gst_dicetv_draw (GstVideofilter * videofilter, void *d, void *s) gint map_x, map_y, map_i; gint base; gint dx, dy, di; - gint video_width = filter->width; - gint g_cube_bits = filter->g_cube_bits; - gint g_cube_size = filter->g_cube_size; + gint video_width; + gint g_cube_bits; + gint g_cube_size; filter = GST_DICETV (videofilter); src = (guint32 *) s; diff --git a/gst/effectv/gstwarp.c b/gst/effectv/gstwarp.c index 00bd7d00cf..b674a67b67 100644 --- a/gst/effectv/gstwarp.c +++ b/gst/effectv/gstwarp.c @@ -265,7 +265,7 @@ gst_warptv_setup (GstVideofilter * videofilter) g_free (warptv->disttable); g_free (warptv->offstable); - warptv->offstable = (guint32 *) g_malloc (height * sizeof (guint32)); + warptv->offstable = g_malloc (height * sizeof (guint32)); warptv->disttable = g_malloc (width * height * sizeof (guint32)); initSinTable (warptv); diff --git a/gst/goom/gstgoom.c b/gst/goom/gstgoom.c index 8b5c49e35d..1b95517806 100644 --- a/gst/goom/gstgoom.c +++ b/gst/goom/gstgoom.c @@ -121,6 +121,7 @@ static void gst_goom_dispose (GObject * object); static GstElementStateReturn gst_goom_change_state (GstElement * element); static GstFlowReturn gst_goom_chain (GstPad * pad, GstBuffer * buffer); +static gboolean gst_goom_event (GstPad * pad, GstEvent * event); static GstPadLinkReturn gst_goom_sink_setcaps (GstPad * pad, GstCaps * caps); static GstPadLinkReturn gst_goom_src_setcaps (GstPad * pad, GstCaps * caps); @@ -194,6 +195,7 @@ gst_goom_init (GstGOOM * goom) gst_element_add_pad (GST_ELEMENT (goom), goom->srcpad); gst_pad_set_chain_function (goom->sinkpad, gst_goom_chain); + gst_pad_set_event_function (goom->sinkpad, gst_goom_event); gst_pad_set_setcaps_function (goom->sinkpad, gst_goom_sink_setcaps); gst_pad_set_setcaps_function (goom->srcpad, gst_goom_src_setcaps); diff --git a/gst/law/alaw-decode.c b/gst/law/alaw-decode.c index 7cf7a37f1f..e7496e2c43 100644 --- a/gst/law/alaw-decode.c +++ b/gst/law/alaw-decode.c @@ -100,7 +100,7 @@ alawdec_getcaps (GstPad * pad) structure = gst_caps_get_structure (othercaps, 0); orate = gst_structure_get_value (structure, "rate"); ochans = gst_structure_get_value (structure, "channels"); - if (!rate || !chans) + if (!orate || !ochans) goto done; structure = gst_caps_get_structure (base_caps, 0); diff --git a/gst/law/alaw-encode.c b/gst/law/alaw-encode.c index e7bf33e569..d0bff55e5c 100644 --- a/gst/law/alaw-encode.c +++ b/gst/law/alaw-encode.c @@ -119,9 +119,7 @@ alawenc_getcaps (GstPad * pad) { GstALawEnc *alawenc; GstPad *otherpad; - GstCaps *base_caps, *othercaps, *result; - GstStructure *structure; - const GValue *rate, *chans; + GstCaps *base_caps, *othercaps; alawenc = GST_ALAWENC (GST_PAD_PARENT (pad)); @@ -144,7 +142,7 @@ alawenc_getcaps (GstPad * pad) structure = gst_caps_get_structure (othercaps, 0); orate = gst_structure_get_value (structure, "rate"); ochans = gst_structure_get_value (structure, "channels"); - if (!rate || !chans) + if (!orate || !ochans) goto done; structure = gst_caps_get_structure (base_caps, 0); diff --git a/gst/law/mulaw-decode.c b/gst/law/mulaw-decode.c index 23df98e38c..515093565e 100644 --- a/gst/law/mulaw-decode.c +++ b/gst/law/mulaw-decode.c @@ -75,7 +75,7 @@ mulawdec_getcaps (GstPad * pad) structure = gst_caps_get_structure (othercaps, 0); orate = gst_structure_get_value (structure, "rate"); ochans = gst_structure_get_value (structure, "channels"); - if (!rate || !chans) + if (!orate || !ochans) goto done; structure = gst_caps_get_structure (base_caps, 0); diff --git a/gst/law/mulaw-encode.c b/gst/law/mulaw-encode.c index 4a2576ac21..e17b519322 100644 --- a/gst/law/mulaw-encode.c +++ b/gst/law/mulaw-encode.c @@ -75,7 +75,7 @@ mulawenc_getcaps (GstPad * pad) structure = gst_caps_get_structure (othercaps, 0); orate = gst_structure_get_value (structure, "rate"); ochans = gst_structure_get_value (structure, "channels"); - if (!rate || !chans) + if (!orate || !ochans) goto done; structure = gst_caps_get_structure (base_caps, 0); @@ -210,7 +210,7 @@ gst_mulawenc_chain (GstPad * pad, GstBuffer * buffer) GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buffer); GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (buffer); gst_buffer_set_caps (outbuf, GST_PAD_CAPS (mulawenc->srcpad)); - mulaw_data = (gint8 *) GST_BUFFER_DATA (outbuf); + mulaw_data = (guint8 *) GST_BUFFER_DATA (outbuf); mulaw_encode (linear_data, mulaw_data, GST_BUFFER_SIZE (outbuf)); diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index e82d9087e0..a522e357d7 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -292,7 +292,6 @@ static gboolean gst_rtspsrc_stream_setup_rtp (GstRTSPStream * stream, gint * rtpport, gint * rtcpport) { - GstElement *rtpsrc; GstElementStateReturn ret; GstRTSPSrc *src; @@ -428,10 +427,9 @@ gst_rtspsrc_loop (GstRTSPSrc * src) gint channel; GList *lstream; GstRTSPStream *stream; - GstPadChainFunction chainfunc; GstPad *outpad = NULL; guint8 *data; - gint size; + guint size; do { GST_DEBUG ("doing reveive"); @@ -627,7 +625,6 @@ gst_rtspsrc_open (GstRTSPSrc * src) gchar *new; gint rtpport, rtcpport; gchar *trxparams; - gboolean res; /* allocate two udp ports */ if (!gst_rtspsrc_stream_setup_rtp (stream, &rtpport, &rtcpport)) @@ -730,7 +727,7 @@ setup_rtp_failed: } } -static gboolean +G_GNUC_UNUSED static gboolean gst_rtspsrc_close (GstRTSPSrc * src) { RTSPMessage request = { 0 }; diff --git a/gst/rtsp/rtspconnection.c b/gst/rtsp/rtspconnection.c index 9f5caa60d6..69557f053c 100644 --- a/gst/rtsp/rtspconnection.c +++ b/gst/rtsp/rtspconnection.c @@ -152,7 +152,8 @@ rtsp_connection_send (RTSPConnection * conn, RTSPMessage * message) g_free (len); /* header ends here */ g_string_append (str, "\r\n"); - str = g_string_append_len (str, message->body, message->body_size); + str = + g_string_append_len (str, (gchar *) message->body, message->body_size); } else { /* just end headers */ g_string_append (str, "\r\n"); @@ -376,7 +377,7 @@ read_body (gint fd, glong content_length, RTSPMessage * msg) } done: - rtsp_message_set_body (msg, body, content_length); + rtsp_message_set_body (msg, (guint8 *) body, content_length); return RTSP_OK; @@ -545,4 +546,6 @@ rtsp_connection_free (RTSPConnection * conn) return RTSP_EINVAL; g_free (conn); + + return RTSP_OK; } diff --git a/gst/videofilter/Makefile.am b/gst/videofilter/Makefile.am index d24b3b3b3b..62ddcccf69 100644 --- a/gst/videofilter/Makefile.am +++ b/gst/videofilter/Makefile.am @@ -13,7 +13,7 @@ libgstvideofilter_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_LIBS) libgstvideoexample_la_SOURCES = gstvideoexample.c libgstvideoexample_la_CFLAGS = $(GST_CFLAGS) -libgstvideoexample_la_LIBADD = +libgstvideoexample_la_LIBADD = libgstvideofilter-@GST_MAJORMINOR@.la libgstvideoexample_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) # libgstvideoflip_la_SOURCES = gstvideoflip.c