diff --git a/ChangeLog b/ChangeLog index 578b3e69ea..f08df9e35d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,78 @@ +2008-03-03 Sebastian Dröge + + * ext/alsa/gstalsamixertrack.c: (gst_alsa_mixer_track_get_type): + * ext/alsa/gstalsasink.c: (set_hwparams): + * ext/alsa/gstalsasrc.c: (set_hwparams): + * ext/gio/gstgio.c: (gst_gio_uri_handler_get_uri): + * ext/ogg/gstoggmux.h: + * ext/ogg/gstogmparse.c: + * gst-libs/gst/audio/audio.c: + * gst-libs/gst/fft/kiss_fft_f64.c: (kiss_fft_f64_alloc): + * gst-libs/gst/pbutils/missing-plugins.c: + (gst_missing_uri_sink_message_new), + (gst_missing_element_message_new), + (gst_missing_decoder_message_new), + (gst_missing_encoder_message_new): + * gst-libs/gst/rtp/gstbasertppayload.c: + * gst-libs/gst/rtp/gstrtcpbuffer.c: + (gst_rtcp_packet_bye_get_reason): + * gst/audioconvert/gstaudioconvert.c: + * gst/audioresample/gstaudioresample.c: + * gst/ffmpegcolorspace/imgconvert.c: + * gst/playback/test.c: (gen_video_element), (gen_audio_element): + * gst/typefind/gsttypefindfunctions.c: + * gst/videoscale/vs_4tap.c: + * gst/videoscale/vs_4tap.h: + * sys/v4l/gstv4lelement.c: + * sys/v4l/gstv4lsrc.c: (gst_v4lsrc_get_any_caps): + * sys/v4l/v4l_calls.c: + * sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_capture_init), + (gst_v4lsrc_try_capture): + * sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls), + (gst_ximagesink_ximage_new): + * sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls), + (gst_xvimagesink_xvimage_new): + * tests/check/elements/audioconvert.c: + * tests/check/elements/audioresample.c: + (fail_unless_perfect_stream): + * tests/check/elements/audiotestsrc.c: (setup_audiotestsrc): + * tests/check/elements/decodebin.c: + * tests/check/elements/gdpdepay.c: (setup_gdpdepay), + (setup_gdpdepay_streamheader): + * tests/check/elements/gdppay.c: (setup_gdppay), (GST_START_TEST), + (setup_gdppay_streamheader): + * tests/check/elements/gnomevfssink.c: (setup_gnomevfssink): + * tests/check/elements/multifdsink.c: (setup_multifdsink): + * tests/check/elements/textoverlay.c: + * tests/check/elements/videorate.c: (setup_videorate): + * tests/check/elements/videotestsrc.c: (setup_videotestsrc): + * tests/check/elements/volume.c: (setup_volume): + * tests/check/elements/vorbisdec.c: (setup_vorbisdec): + * tests/check/elements/vorbistag.c: + * tests/check/generic/clock-selection.c: + * tests/check/generic/states.c: (setup), (teardown): + * tests/check/libs/cddabasesrc.c: + * tests/check/libs/video.c: + * tests/check/pipelines/gio.c: + * tests/check/pipelines/oggmux.c: + * tests/check/pipelines/simple-launch-lines.c: + (simple_launch_lines_suite): + * tests/check/pipelines/streamheader.c: + * tests/check/pipelines/theoraenc.c: + * tests/check/pipelines/vorbisdec.c: + * tests/check/pipelines/vorbisenc.c: + * tests/examples/seek/scrubby.c: + * tests/examples/seek/seek.c: (query_positions_elems), + (query_positions_pads): + * tests/icles/stress-xoverlay.c: (myclock): + Correct all relevant warnings found by the sparse semantic code + analyzer. This include marking several symbols static, using + NULL instead of 0 for pointers and using "foo (void)" instead + of "foo ()" for declarations. + + * win32/common/libgstrtp.def: + Add gst_rtp_buffer_set_extension_data to the symbol definition file. + 2008-03-02 Tim-Philipp Müller Patch by: José Alburquerque diff --git a/ext/alsa/gstalsamixertrack.c b/ext/alsa/gstalsamixertrack.c index 90f3fee504..12831b5b46 100644 --- a/ext/alsa/gstalsamixertrack.c +++ b/ext/alsa/gstalsamixertrack.c @@ -47,7 +47,7 @@ gst_alsa_mixer_track_get_type (void) sizeof (GstAlsaMixerTrack), 0, (GInstanceInitFunc) gst_alsa_mixer_track_init, - 0 + NULL }; track_type = diff --git a/ext/alsa/gstalsasink.c b/ext/alsa/gstalsasink.c index 1e90108cc7..63c4e7fbd1 100644 --- a/ext/alsa/gstalsasink.c +++ b/ext/alsa/gstalsasink.c @@ -371,7 +371,7 @@ retry: no_channels); /* set the stream rate */ rrate = alsa->rate; - CHECK (snd_pcm_hw_params_set_rate_near (alsa->handle, params, &rrate, 0), + CHECK (snd_pcm_hw_params_set_rate_near (alsa->handle, params, &rrate, NULL), no_rate); if (rrate != alsa->rate) goto rate_match; diff --git a/ext/alsa/gstalsasrc.c b/ext/alsa/gstalsasrc.c index 806e044256..b9464b2f3e 100644 --- a/ext/alsa/gstalsasrc.c +++ b/ext/alsa/gstalsasrc.c @@ -363,7 +363,7 @@ set_hwparams (GstAlsaSrc * alsa) no_channels); /* set the stream rate */ rrate = alsa->rate; - CHECK (snd_pcm_hw_params_set_rate_near (alsa->handle, params, &rrate, 0), + CHECK (snd_pcm_hw_params_set_rate_near (alsa->handle, params, &rrate, NULL), no_rate); if (rrate != alsa->rate) goto rate_match; diff --git a/ext/gio/gstgio.c b/ext/gio/gstgio.c index cfe41db880..6420d536e2 100644 --- a/ext/gio/gstgio.c +++ b/ext/gio/gstgio.c @@ -127,7 +127,7 @@ gst_gio_uri_handler_get_uri (GstURIHandler * handler) GstElement *element = GST_ELEMENT (handler); const gchar *uri; - g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE); + g_return_val_if_fail (GST_IS_ELEMENT (element), NULL); g_object_get (G_OBJECT (element), "location", &uri, NULL); diff --git a/ext/ogg/gstoggmux.h b/ext/ogg/gstoggmux.h index 7564fbe927..5a510c030e 100644 --- a/ext/ogg/gstoggmux.h +++ b/ext/ogg/gstoggmux.h @@ -122,6 +122,8 @@ struct _GstOggMuxClass GstElementClass parent_class; }; +GType gst_ogg_mux_get_type (void); + G_END_DECLS #endif /* __GST_OGG_MUX_H__ */ diff --git a/ext/ogg/gstogmparse.c b/ext/ogg/gstogmparse.c index e4acdcd097..cdf3c75296 100644 --- a/ext/ogg/gstogmparse.c +++ b/ext/ogg/gstogmparse.c @@ -231,7 +231,7 @@ gst_ogm_audio_parse_get_type (void) return ogm_audio_parse_type; } -GType +static GType gst_ogm_video_parse_get_type (void) { static GType ogm_video_parse_type = 0; @@ -257,7 +257,7 @@ gst_ogm_video_parse_get_type (void) return ogm_video_parse_type; } -GType +static GType gst_ogm_text_parse_get_type (void) { static GType ogm_text_parse_type = 0; diff --git a/gst-libs/gst/audio/audio.c b/gst-libs/gst/audio/audio.c index 86888b74cb..99425d820a 100644 --- a/gst-libs/gst/audio/audio.c +++ b/gst-libs/gst/audio/audio.c @@ -239,6 +239,7 @@ typedef enum GST_AUDIO_FIELD_SIGNED = (1 << 5), } GstAudioFieldFlag; #endif /* GST_DISABLE_DEPRECATED */ + void gst_audio_structure_set_int (GstStructure * structure, GstAudioFieldFlag flag) { diff --git a/gst-libs/gst/fft/kiss_fft_f64.c b/gst-libs/gst/fft/kiss_fft_f64.c index c75a4a0b45..4f0cbc5adb 100644 --- a/gst-libs/gst/fft/kiss_fft_f64.c +++ b/gst-libs/gst/fft/kiss_fft_f64.c @@ -344,6 +344,8 @@ kiss_fft_f64_cfg kiss_fft_f64_alloc (int nfft, int inverse_fft, void *mem, size_t * lenmem) { kiss_fft_f64_cfg st = NULL; + const double pi = + 3.141592653589793238462643383279502884197169399375105820974944; size_t memneeded = sizeof (struct kiss_fft_f64_state) + sizeof (kiss_fft_f64_cpx) * (nfft - 1); /* twiddle factors */ @@ -361,8 +363,6 @@ kiss_fft_f64_alloc (int nfft, int inverse_fft, void *mem, size_t * lenmem) st->inverse = inverse_fft; for (i = 0; i < nfft; ++i) { - const double pi = - 3.141592653589793238462643383279502884197169399375105820974944; double phase = -2 * pi * i / nfft; if (st->inverse) diff --git a/gst-libs/gst/pbutils/missing-plugins.c b/gst-libs/gst/pbutils/missing-plugins.c index 18c1eff5f5..6b7693eda3 100644 --- a/gst-libs/gst/pbutils/missing-plugins.c +++ b/gst-libs/gst/pbutils/missing-plugins.c @@ -202,9 +202,9 @@ gst_missing_uri_sink_message_new (GstElement * element, const gchar * protocol) GstStructure *s; gchar *description; - g_return_val_if_fail (element != NULL, FALSE); - g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE); - g_return_val_if_fail (protocol != NULL, FALSE); + g_return_val_if_fail (element != NULL, NULL); + g_return_val_if_fail (GST_IS_ELEMENT (element), NULL); + g_return_val_if_fail (protocol != NULL, NULL); description = gst_pb_utils_get_sink_description (protocol); @@ -235,9 +235,9 @@ gst_missing_element_message_new (GstElement * element, GstStructure *s; gchar *description; - g_return_val_if_fail (element != NULL, FALSE); - g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE); - g_return_val_if_fail (factory_name != NULL, FALSE); + g_return_val_if_fail (element != NULL, NULL); + g_return_val_if_fail (GST_IS_ELEMENT (element), NULL); + g_return_val_if_fail (factory_name != NULL, NULL); description = gst_pb_utils_get_element_description (factory_name); @@ -268,13 +268,13 @@ gst_missing_decoder_message_new (GstElement * element, GstCaps *caps; gchar *description; - g_return_val_if_fail (element != NULL, FALSE); - g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE); - g_return_val_if_fail (decode_caps != NULL, FALSE); - g_return_val_if_fail (GST_IS_CAPS (decode_caps), FALSE); - g_return_val_if_fail (!gst_caps_is_any (decode_caps), FALSE); - g_return_val_if_fail (!gst_caps_is_empty (decode_caps), FALSE); - g_return_val_if_fail (gst_caps_is_fixed (decode_caps), FALSE); + g_return_val_if_fail (element != NULL, NULL); + g_return_val_if_fail (GST_IS_ELEMENT (element), NULL); + g_return_val_if_fail (decode_caps != NULL, NULL); + g_return_val_if_fail (GST_IS_CAPS (decode_caps), NULL); + g_return_val_if_fail (!gst_caps_is_any (decode_caps), NULL); + g_return_val_if_fail (!gst_caps_is_empty (decode_caps), NULL); + g_return_val_if_fail (gst_caps_is_fixed (decode_caps), NULL); description = gst_pb_utils_get_decoder_description (decode_caps); caps = copy_and_clean_caps (decode_caps); @@ -308,13 +308,13 @@ gst_missing_encoder_message_new (GstElement * element, GstCaps *caps; gchar *description; - g_return_val_if_fail (element != NULL, FALSE); - g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE); - g_return_val_if_fail (encode_caps != NULL, FALSE); - g_return_val_if_fail (GST_IS_CAPS (encode_caps), FALSE); - g_return_val_if_fail (!gst_caps_is_any (encode_caps), FALSE); - g_return_val_if_fail (!gst_caps_is_empty (encode_caps), FALSE); - g_return_val_if_fail (gst_caps_is_fixed (encode_caps), FALSE); + g_return_val_if_fail (element != NULL, NULL); + g_return_val_if_fail (GST_IS_ELEMENT (element), NULL); + g_return_val_if_fail (encode_caps != NULL, NULL); + g_return_val_if_fail (GST_IS_CAPS (encode_caps), NULL); + g_return_val_if_fail (!gst_caps_is_any (encode_caps), NULL); + g_return_val_if_fail (!gst_caps_is_empty (encode_caps), NULL); + g_return_val_if_fail (gst_caps_is_fixed (encode_caps), NULL); description = gst_pb_utils_get_encoder_description (encode_caps); caps = copy_and_clean_caps (encode_caps); diff --git a/gst-libs/gst/rtp/gstbasertppayload.c b/gst-libs/gst/rtp/gstbasertppayload.c index 5399c8f11e..aa347e73c2 100644 --- a/gst-libs/gst/rtp/gstbasertppayload.c +++ b/gst-libs/gst/rtp/gstbasertppayload.c @@ -438,7 +438,7 @@ gst_basertppayload_set_options (GstBaseRTPPayload * payload, payload->clock_rate = clock_rate; } -gboolean +static gboolean copy_fixed (GQuark field_id, const GValue * value, GstStructure * dest) { if (gst_value_is_fixed (value)) { diff --git a/gst-libs/gst/rtp/gstrtcpbuffer.c b/gst-libs/gst/rtp/gstrtcpbuffer.c index 6804531b19..787174a3b8 100644 --- a/gst-libs/gst/rtp/gstrtcpbuffer.c +++ b/gst-libs/gst/rtp/gstrtcpbuffer.c @@ -1533,7 +1533,7 @@ gst_rtcp_packet_bye_get_reason (GstRTCPPacket * packet) guint8 len; g_return_val_if_fail (packet != NULL, NULL); - g_return_val_if_fail (packet->type == GST_RTCP_TYPE_BYE, 0); + g_return_val_if_fail (packet->type == GST_RTCP_TYPE_BYE, NULL); g_return_val_if_fail (GST_IS_BUFFER (packet->buffer), NULL); roffset = get_reason_offset (packet); diff --git a/gst/audioconvert/gstaudioconvert.c b/gst/audioconvert/gstaudioconvert.c index bcbb0ea540..5b67079c18 100644 --- a/gst/audioconvert/gstaudioconvert.c +++ b/gst/audioconvert/gstaudioconvert.c @@ -723,7 +723,7 @@ static const GstAudioChannelPosition default_positions[8][8] = { } }; -const GValue * +static const GValue * find_suitable_channel_layout (const GValue * val, guint chans) { /* if output layout is fixed already and looks sane, we're done */ diff --git a/gst/audioresample/gstaudioresample.c b/gst/audioresample/gstaudioresample.c index ebcd1ea6a6..2ff585c80f 100644 --- a/gst/audioresample/gstaudioresample.c +++ b/gst/audioresample/gstaudioresample.c @@ -50,7 +50,7 @@ #include #include -GST_DEBUG_CATEGORY (audioresample_debug); +GST_DEBUG_CATEGORY_STATIC (audioresample_debug); #define GST_CAT_DEFAULT audioresample_debug /* elementfactory information */ diff --git a/gst/ffmpegcolorspace/imgconvert.c b/gst/ffmpegcolorspace/imgconvert.c index c73e16b4c9..b7d47cbc36 100644 --- a/gst/ffmpegcolorspace/imgconvert.c +++ b/gst/ffmpegcolorspace/imgconvert.c @@ -439,7 +439,8 @@ avcodec_get_pix_fmt (const char *name) return pix_fmt_info[i].format; } -int +#if 0 +static int avpicture_layout (const AVPicture * src, int pix_fmt, int width, int height, unsigned char *dest, int dest_size) { @@ -490,6 +491,7 @@ avpicture_layout (const AVPicture * src, int pix_fmt, int width, int height, return size; } +#endif int avpicture_get_size (int pix_fmt, int width, int height) @@ -670,7 +672,7 @@ img_copy_plane (uint8_t * dst, int dst_wrap, /** * Copy image 'src' to 'dst'. */ -void +static void img_copy (AVPicture * dst, const AVPicture * src, int pix_fmt, int width, int height) { @@ -2198,7 +2200,7 @@ get_convert_table_entry (int src_pix_fmt, int dst_pix_fmt) return NULL; } -int +static int avpicture_alloc (AVPicture * picture, int pix_fmt, int width, int height) { unsigned int size; @@ -2215,7 +2217,7 @@ fail: return -1; } -void +static void avpicture_free (AVPicture * picture) { av_free (picture->data[0]); @@ -2593,6 +2595,7 @@ img_get_alpha_info (const AVPicture * src, int pix_fmt, int width, int height) #endif /* filter parameters: [-1 4 2 4 -1] // 8 */ +#if 0 static void deinterlace_line (uint8_t * dst, const uint8_t * lum_m4, const uint8_t * lum_m3, @@ -2684,10 +2687,12 @@ deinterlace_line_inplace (uint8_t * lum_m4, uint8_t * lum_m3, uint8_t * lum_m2, } #endif } +#endif /* deinterlacing : 2 temporal taps, 3 spatial taps linear filter. The top field is copied as is, but the bottom field is deinterlaced against the top field. */ +#if 0 static void deinterlace_bottom_field (uint8_t * dst, int dst_wrap, const uint8_t * src1, int src_wrap, int width, int height) @@ -2743,10 +2748,11 @@ deinterlace_bottom_field_inplace (uint8_t * src1, int src_wrap, deinterlace_line_inplace (buf, src_m1, src_0, src_0, src_0, width); av_free (buf); } - +#endif /* deinterlace - if not supported return -1 */ -int +#if 0 +static int avpicture_deinterlace (AVPicture * dst, const AVPicture * src, int pix_fmt, int width, int height) { @@ -2789,5 +2795,6 @@ avpicture_deinterlace (AVPicture * dst, const AVPicture * src, #endif return 0; } +#endif #undef FIX diff --git a/gst/playback/test.c b/gst/playback/test.c index 0d3683827f..7117b630fd 100644 --- a/gst/playback/test.c +++ b/gst/playback/test.c @@ -27,7 +27,7 @@ static GMainLoop *loop; static GstElement * -gen_video_element () +gen_video_element (void) { GstElement *element; GstElement *conv; @@ -50,7 +50,7 @@ gen_video_element () } static GstElement * -gen_audio_element () +gen_audio_element (void) { GstElement *element; GstElement *conv; diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index a735a4f8fb..bf8cbba51b 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -1421,7 +1421,7 @@ static GstStaticCaps mpegts_caps = GST_STATIC_CAPS ("video/mpegts, " /* Helper function to search ahead at intervals of packet_size for mpegts * headers */ -gint +static gint mpeg_ts_probe_headers (GstTypeFind * tf, guint64 offset, gint packet_size) { /* We always enter this function having found at least one header already */ diff --git a/gst/videoscale/vs_4tap.c b/gst/videoscale/vs_4tap.c index 97e79b0b06..b25482076f 100644 --- a/gst/videoscale/vs_4tap.c +++ b/gst/videoscale/vs_4tap.c @@ -28,6 +28,8 @@ #include "vs_image.h" #include "vs_scanline.h" +#include "vs_4tap.h" + #include #include @@ -45,9 +47,9 @@ #define rint(x) (floor((x)+0.5)) #endif -int16_t vs_4tap_taps[256][4]; +static int16_t vs_4tap_taps[256][4]; -double +static double vs_4tap_func (double x) { #if 0 diff --git a/gst/videoscale/vs_4tap.h b/gst/videoscale/vs_4tap.h index 830441aef3..aae3850eb7 100644 --- a/gst/videoscale/vs_4tap.h +++ b/gst/videoscale/vs_4tap.h @@ -34,7 +34,7 @@ void vs_4tap_init (void); void vs_scanline_resample_4tap_Y (uint8_t *dest, uint8_t *src, - int n, int *xacc, int increment); + int n, int src_width, int *xacc, int increment); void vs_scanline_merge_4tap_Y (uint8_t *dest, uint8_t *src1, uint8_t *src2, uint8_t *src3, uint8_t *src4, int n, int acc); void vs_image_scale_4tap_Y (const VSImage * dest, const VSImage * src, diff --git a/sys/v4l/gstv4lelement.c b/sys/v4l/gstv4lelement.c index c9c9621a4b..1f04d8f7e9 100644 --- a/sys/v4l/gstv4lelement.c +++ b/sys/v4l/gstv4lelement.c @@ -245,7 +245,7 @@ gst_v4l_property_probe_interface_init (GstPropertyProbeInterface * iface) } #define GST_TYPE_V4L_DEVICE_FLAGS (gst_v4l_device_get_type ()) -GType +static GType gst_v4l_device_get_type (void) { static GType v4l_device_type = 0; diff --git a/sys/v4l/gstv4lsrc.c b/sys/v4l/gstv4lsrc.c index 6e410e9f8b..802e9e6c28 100644 --- a/sys/v4l/gstv4lsrc.c +++ b/sys/v4l/gstv4lsrc.c @@ -349,7 +349,7 @@ gst_v4lsrc_palette_to_caps (int palette) } static GstCaps * -gst_v4lsrc_get_any_caps () +gst_v4lsrc_get_any_caps (void) { gint i; GstCaps *caps = gst_caps_new_empty (), *one; diff --git a/sys/v4l/v4l_calls.c b/sys/v4l/v4l_calls.c index 285ac26e04..4d336d4fd3 100644 --- a/sys/v4l/v4l_calls.c +++ b/sys/v4l/v4l_calls.c @@ -277,7 +277,7 @@ gst_v4l_close (GstV4lElement * v4lelement) * return value: the number of video input channels ******************************************************/ -gint +static gint gst_v4l_get_num_chans (GstV4lElement * v4lelement) { GST_DEBUG_OBJECT (v4lelement, "getting number of channels"); diff --git a/sys/v4l/v4lsrc_calls.c b/sys/v4l/v4lsrc_calls.c index a110c16150..54bf55f856 100644 --- a/sys/v4l/v4lsrc_calls.c +++ b/sys/v4l/v4lsrc_calls.c @@ -49,7 +49,7 @@ GST_DEBUG_CATEGORY_EXTERN (v4l_debug); #ifndef GST_DISABLE_GST_DEBUG /* palette names */ -const char *v4l_palette_name[] = { +static const char *v4l_palette_name[] = { "", /* 0 */ "grayscale", /* VIDEO_PALETTE_GREY */ "Hi-420", /* VIDEO_PALETTE_HI420 */ @@ -197,7 +197,7 @@ gst_v4lsrc_capture_init (GstV4lSrc * v4lsrc) v4lsrc->cond_queue_state = g_cond_new (); /* Map the buffers */ - GST_V4LELEMENT (v4lsrc)->buffer = mmap (0, v4lsrc->mbuf.size, + GST_V4LELEMENT (v4lsrc)->buffer = mmap (NULL, v4lsrc->mbuf.size, PROT_READ | PROT_WRITE, MAP_SHARED, GST_V4LELEMENT (v4lsrc)->video_fd, 0); if (GST_V4LELEMENT (v4lsrc)->buffer == MAP_FAILED) { GST_ELEMENT_ERROR (v4lsrc, RESOURCE, OPEN_READ_WRITE, (NULL), @@ -461,7 +461,7 @@ gst_v4lsrc_try_capture (GstV4lSrc * v4lsrc, gint width, gint height, return FALSE; } /* Map the buffers */ - buffer = mmap (0, vmbuf.size, PROT_READ | PROT_WRITE, + buffer = mmap (NULL, vmbuf.size, PROT_READ | PROT_WRITE, MAP_SHARED, GST_V4LELEMENT (v4lsrc)->video_fd, 0); if (buffer == MAP_FAILED) { GST_ELEMENT_ERROR (v4lsrc, RESOURCE, OPEN_READ_WRITE, (NULL), @@ -634,7 +634,7 @@ static void gst_v4lsrc_buffer_finalize (GstV4lSrcBuffer * v4lsrc_buffer); static GstBufferClass *v4lbuffer_parent_class = NULL; -GType +static GType gst_v4lsrc_buffer_get_type (void) { static GType _gst_v4lsrc_buffer_type; diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index d6757f88fb..5d9bd3f77a 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -275,7 +275,7 @@ gst_ximage_buffer_class_init (gpointer g_class, gpointer class_data) gst_ximage_buffer_finalize; } -GType +static GType gst_ximage_buffer_get_type (void) { static GType _gst_ximage_buffer_type; @@ -361,18 +361,18 @@ gst_ximagesink_check_xshm_calls (GstXImageSink * ximagesink, goto beach; } - SHMInfo.shmaddr = shmat (SHMInfo.shmid, 0, 0); + SHMInfo.shmaddr = shmat (SHMInfo.shmid, NULL, 0); if (SHMInfo.shmaddr == ((void *) -1)) { GST_WARNING ("Failed to shmat: %s", g_strerror (errno)); /* Clean up shm seg */ - shmctl (SHMInfo.shmid, IPC_RMID, 0); + shmctl (SHMInfo.shmid, IPC_RMID, NULL); goto beach; } /* Delete the shared memory segment as soon as we manage to attach. * This way, it will be deleted as soon as we detach later, and not * leaked if we crash. */ - shmctl (SHMInfo.shmid, IPC_RMID, 0); + shmctl (SHMInfo.shmid, IPC_RMID, NULL); ximage->data = SHMInfo.shmaddr; SHMInfo.readOnly = FALSE; @@ -476,7 +476,7 @@ gst_ximagesink_ximage_new (GstXImageSink * ximagesink, GstCaps * caps) goto beach; } - ximage->SHMInfo.shmaddr = shmat (ximage->SHMInfo.shmid, 0, 0); + ximage->SHMInfo.shmaddr = shmat (ximage->SHMInfo.shmid, NULL, 0); if (ximage->SHMInfo.shmaddr == ((void *) -1)) { g_mutex_unlock (ximagesink->x_lock); GST_ELEMENT_ERROR (ximagesink, RESOURCE, WRITE, @@ -484,14 +484,14 @@ gst_ximagesink_ximage_new (GstXImageSink * ximagesink, GstCaps * caps) ximage->width, ximage->height), ("Failed to shmat: %s", g_strerror (errno))); /* Clean up the shared memory segment */ - shmctl (ximage->SHMInfo.shmid, IPC_RMID, 0); + shmctl (ximage->SHMInfo.shmid, IPC_RMID, NULL); goto beach; } /* Now that we've attached, we can delete the shared memory segment. * This way, it will be deleted as soon as we detach later, and not * leaked if we crash. */ - shmctl (ximage->SHMInfo.shmid, IPC_RMID, 0); + shmctl (ximage->SHMInfo.shmid, IPC_RMID, NULL); ximage->ximage->data = ximage->SHMInfo.shmaddr; ximage->SHMInfo.readOnly = FALSE; diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index c9b63b5747..92ac60dfa4 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -369,7 +369,7 @@ gst_xvimage_buffer_class_init (gpointer g_class, gpointer class_data) gst_xvimage_buffer_finalize; } -GType +static GType gst_xvimage_buffer_get_type (void) { static GType _gst_xvimage_buffer_type; @@ -453,18 +453,18 @@ gst_xvimagesink_check_xshm_calls (GstXContext * xcontext) goto beach; } - SHMInfo.shmaddr = shmat (SHMInfo.shmid, 0, 0); + SHMInfo.shmaddr = shmat (SHMInfo.shmid, NULL, 0); if (SHMInfo.shmaddr == ((void *) -1)) { GST_WARNING ("Failed to shmat: %s", g_strerror (errno)); /* Clean up the shared memory segment */ - shmctl (SHMInfo.shmid, IPC_RMID, 0); + shmctl (SHMInfo.shmid, IPC_RMID, NULL); goto beach; } /* Delete the shared memory segment as soon as we manage to attach. * This way, it will be deleted as soon as we detach later, and not * leaked if we crash. */ - shmctl (SHMInfo.shmid, IPC_RMID, 0); + shmctl (SHMInfo.shmid, IPC_RMID, NULL); xvimage->data = SHMInfo.shmaddr; SHMInfo.readOnly = FALSE; @@ -623,7 +623,7 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink, GstCaps * caps) goto beach_unlocked; } - xvimage->SHMInfo.shmaddr = shmat (xvimage->SHMInfo.shmid, 0, 0); + xvimage->SHMInfo.shmaddr = shmat (xvimage->SHMInfo.shmid, NULL, 0); if (xvimage->SHMInfo.shmaddr == ((void *) -1)) { g_mutex_unlock (xvimagesink->x_lock); GST_ELEMENT_ERROR (xvimagesink, RESOURCE, WRITE, @@ -631,14 +631,14 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink, GstCaps * caps) xvimage->width, xvimage->height), ("Failed to shmat: %s", g_strerror (errno))); /* Clean up the shared memory segment */ - shmctl (xvimage->SHMInfo.shmid, IPC_RMID, 0); + shmctl (xvimage->SHMInfo.shmid, IPC_RMID, NULL); goto beach_unlocked; } /* Delete the shared memory segment as soon as we manage to attach. * This way, it will be deleted as soon as we detach later, and not * leaked if we crash. */ - shmctl (xvimage->SHMInfo.shmid, IPC_RMID, 0); + shmctl (xvimage->SHMInfo.shmid, IPC_RMID, NULL); xvimage->xvimage->data = xvimage->SHMInfo.shmaddr; xvimage->SHMInfo.readOnly = FALSE; diff --git a/tests/check/elements/audioconvert.c b/tests/check/elements/audioconvert.c index 5624a91fc1..c61d7e9bf5 100644 --- a/tests/check/elements/audioconvert.c +++ b/tests/check/elements/audioconvert.c @@ -26,12 +26,10 @@ #include #include -gboolean have_eos = FALSE; - /* For ease of programming we use globals to keep refs for our floating * src and sink pads we create; otherwise we always have to do get_pad, * get_peer, and then remove references in every test function */ -GstPad *mysrcpad, *mysinkpad; +static GstPad *mysrcpad, *mysinkpad; #define CONVERT_CAPS_TEMPLATE_STRING \ "audio/x-raw-float, " \ @@ -80,7 +78,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", ); /* takes over reference for outcaps */ -GstElement * +static GstElement * setup_audioconvert (GstCaps * outcaps) { GstElement *audioconvert; @@ -106,7 +104,7 @@ setup_audioconvert (GstCaps * outcaps) return audioconvert; } -void +static void cleanup_audioconvert (GstElement * audioconvert) { GST_DEBUG ("cleanup_audioconvert"); @@ -850,7 +848,7 @@ GST_START_TEST (test_caps_negotiation) GST_END_TEST; -Suite * +static Suite * audioconvert_suite (void) { Suite *s = suite_create ("audioconvert"); diff --git a/tests/check/elements/audioresample.c b/tests/check/elements/audioresample.c index 4fc1863615..4145be197e 100644 --- a/tests/check/elements/audioresample.c +++ b/tests/check/elements/audioresample.c @@ -25,12 +25,10 @@ #include -gboolean have_eos = FALSE; - /* For ease of programming we use globals to keep refs for our floating * src and sink pads we create; otherwise we always have to do get_pad, * get_peer, and then remove references in every test function */ -GstPad *mysrcpad, *mysinkpad; +static GstPad *mysrcpad, *mysinkpad; #define RESAMPLE_CAPS_TEMPLATE_STRING \ @@ -53,7 +51,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_CAPS (RESAMPLE_CAPS_TEMPLATE_STRING) ); -GstElement * +static GstElement * setup_audioresample (int channels, int inrate, int outrate) { GstElement *audioresample; @@ -100,7 +98,7 @@ setup_audioresample (int channels, int inrate, int outrate) return audioresample; } -void +static void cleanup_audioresample (GstElement * audioresample) { GST_DEBUG ("cleanup_audioresample"); @@ -116,7 +114,7 @@ cleanup_audioresample (GstElement * audioresample) } static void -fail_unless_perfect_stream () +fail_unless_perfect_stream (void) { guint64 timestamp = 0L, duration = 0L; guint64 offset = 0L, offset_end = 0L; diff --git a/tests/check/elements/audiotestsrc.c b/tests/check/elements/audiotestsrc.c index 4b392d44e1..cd2dec6441 100644 --- a/tests/check/elements/audiotestsrc.c +++ b/tests/check/elements/audiotestsrc.c @@ -24,12 +24,10 @@ #include -gboolean have_eos = FALSE; - /* For ease of programming we use globals to keep refs for our floating * src and sink pads we create; otherwise we always have to do get_pad, * get_peer, and then remove references in every test function */ -GstPad *mysinkpad; +static GstPad *mysinkpad; #define CAPS_TEMPLATE_STRING \ @@ -47,8 +45,8 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", GST_STATIC_CAPS (CAPS_TEMPLATE_STRING) ); -GstElement * -setup_audiotestsrc () +static GstElement * +setup_audiotestsrc (void) { GstElement *audiotestsrc; @@ -60,7 +58,7 @@ setup_audiotestsrc () return audiotestsrc; } -void +static void cleanup_audiotestsrc (GstElement * audiotestsrc) { GST_DEBUG ("cleanup_audiotestsrc"); @@ -115,7 +113,7 @@ GST_START_TEST (test_all_waves) GST_END_TEST; -Suite * +static Suite * audiotestsrc_suite (void) { Suite *s = suite_create ("audiotestsrc"); diff --git a/tests/check/elements/decodebin.c b/tests/check/elements/decodebin.c index 24d9ea7d36..eb6f38a4e6 100644 --- a/tests/check/elements/decodebin.c +++ b/tests/check/elements/decodebin.c @@ -25,7 +25,8 @@ #include #include -const gchar dummytext[] = "Quick Brown Fox Jumps over a Lazy Frog Quick Brown " +static const gchar dummytext[] = + "Quick Brown Fox Jumps over a Lazy Frog Quick Brown " "Fox Jumps over a Lazy Frog Quick Brown Fox Jumps over a Lazy Frog Quick " "Brown Fox Jumps over a Lazy Frog Quick Brown Fox Jumps over a Lazy Frog " "Quick Brown Fox Jumps over a Lazy Frog Quick Brown Fox Jumps over a Lazy " diff --git a/tests/check/elements/gdpdepay.c b/tests/check/elements/gdpdepay.c index 119f1cdff8..703e0ade8f 100644 --- a/tests/check/elements/gdpdepay.c +++ b/tests/check/elements/gdpdepay.c @@ -25,12 +25,10 @@ #include #include -gboolean have_eos = FALSE; - /* For ease of programming we use globals to keep refs for our floating * src and sink pads we create; otherwise we always have to do get_pad, * get_peer, and then remove references in every test function */ -GstPad *mysrcpad, *mysinkpad, *myshsinkpad; +static GstPad *mysrcpad, *mysinkpad, *myshsinkpad; #define AUDIO_CAPS_TEMPLATE_STRING \ "audio/x-raw-int, " \ @@ -63,8 +61,8 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", ); /* takes over reference for outcaps */ -GstElement * -setup_gdpdepay () +static GstElement * +setup_gdpdepay (void) { GstElement *gdpdepay; @@ -78,7 +76,7 @@ setup_gdpdepay () return gdpdepay; } -void +static void cleanup_gdpdepay (GstElement * gdpdepay) { GST_DEBUG ("cleanup_gdpdepay"); @@ -266,8 +264,8 @@ static GstStaticPadTemplate shsinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", GST_STATIC_CAPS ("application/x-gst-test-streamheader") ); -GstElement * -setup_gdpdepay_streamheader () +static GstElement * +setup_gdpdepay_streamheader (void) { GstElement *gdpdepay; @@ -402,7 +400,7 @@ GST_END_TEST; #endif /* ifndef HAVE_CPU_PPC64 */ -Suite * +static Suite * gdpdepay_suite (void) { Suite *s = suite_create ("gdpdepay"); diff --git a/tests/check/elements/gdppay.c b/tests/check/elements/gdppay.c index 80f386fe82..267b266dc0 100644 --- a/tests/check/elements/gdppay.c +++ b/tests/check/elements/gdppay.c @@ -24,12 +24,10 @@ #include #include -gboolean have_eos = FALSE; - /* For ease of programming we use globals to keep refs for our floating * src and sink pads we create; otherwise we always have to do get_pad, * get_peer, and then remove references in every test function */ -GstPad *mysrcpad, *myshsrcpad, *mysinkpad; +static GstPad *mysrcpad, *myshsrcpad, *mysinkpad; #define AUDIO_CAPS_TEMPLATE_STRING \ "audio/x-raw-int, " \ @@ -62,8 +60,8 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", ); /* takes over reference for outcaps */ -GstElement * -setup_gdppay () +static GstElement * +setup_gdppay (void) { GstElement *gdppay; @@ -77,7 +75,7 @@ setup_gdppay () return gdppay; } -void +static void cleanup_gdppay (GstElement * gdppay) { GST_DEBUG ("cleanup_gdppay"); @@ -204,7 +202,7 @@ GST_START_TEST (test_audio) g_list_free (buffers); buffers = NULL; ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1); - gst_object_unref (gdppay); + cleanup_gdppay (gdppay); } GST_END_TEST; @@ -216,8 +214,8 @@ static GstStaticPadTemplate shsrctemplate = GST_STATIC_PAD_TEMPLATE ("src", ); -GstElement * -setup_gdppay_streamheader () +static GstElement * +setup_gdppay_streamheader (void) { GstElement *gdppay; @@ -378,7 +376,7 @@ GST_START_TEST (test_streamheader) g_list_free (buffers); buffers = NULL; ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1); - gst_object_unref (gdppay); + cleanup_gdppay (gdppay); } GST_END_TEST; @@ -411,7 +409,7 @@ GST_START_TEST (test_first_no_caps) g_list_free (buffers); buffers = NULL; ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1); - gst_object_unref (gdppay); + cleanup_gdppay (gdppay); } GST_END_TEST; @@ -434,6 +432,7 @@ GST_START_TEST (test_first_no_new_segment) inbuffer = gst_buffer_new_and_alloc (4); caps = gst_caps_from_string (AUDIO_CAPS_STRING); gst_buffer_set_caps (inbuffer, caps); + gst_caps_unref (caps); ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); @@ -452,7 +451,7 @@ GST_START_TEST (test_first_no_new_segment) g_list_free (buffers); buffers = NULL; ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1); - gst_object_unref (gdppay); + cleanup_gdppay (gdppay); } GST_END_TEST; @@ -542,13 +541,13 @@ GST_START_TEST (test_crc) g_list_free (buffers); buffers = NULL; ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1); - gst_object_unref (gdppay); + cleanup_gdppay (gdppay); } GST_END_TEST; -Suite * +static Suite * gdppay_suite (void) { Suite *s = suite_create ("gdppay"); diff --git a/tests/check/elements/gnomevfssink.c b/tests/check/elements/gnomevfssink.c index 4aa83c7a40..61effa768c 100644 --- a/tests/check/elements/gnomevfssink.c +++ b/tests/check/elements/gnomevfssink.c @@ -34,9 +34,7 @@ #include -gboolean have_eos = FALSE; - -GstPad *mysrcpad; +static GstPad *mysrcpad; static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, @@ -44,7 +42,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_CAPS_ANY); static GstElement * -setup_gnomevfssink () +setup_gnomevfssink (void) { GstElement *gnomevfssink; diff --git a/tests/check/elements/multifdsink.c b/tests/check/elements/multifdsink.c index 6e934974d7..a45230bfcd 100644 --- a/tests/check/elements/multifdsink.c +++ b/tests/check/elements/multifdsink.c @@ -26,7 +26,7 @@ #include -GstPad *mysrcpad; +static GstPad *mysrcpad; static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, @@ -34,8 +34,8 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_CAPS ("application/x-gst-check") ); -GstElement * -setup_multifdsink () +static GstElement * +setup_multifdsink (void) { GstElement *multifdsink; @@ -46,7 +46,7 @@ setup_multifdsink () return multifdsink; } -void +static void cleanup_multifdsink (GstElement * multifdsink) { GST_DEBUG ("cleanup_multifdsink"); @@ -844,7 +844,7 @@ GST_END_TEST; * an old client still needs to read from before the new streamheaders * a new client gets the new streamheaders */ -Suite * +static Suite * multifdsink_suite (void) { Suite *s = suite_create ("multifdsink"); diff --git a/tests/check/elements/textoverlay.c b/tests/check/elements/textoverlay.c index 1a0e27c924..c5ad32024d 100644 --- a/tests/check/elements/textoverlay.c +++ b/tests/check/elements/textoverlay.c @@ -35,8 +35,6 @@ #define WIDTH 240 #define HEIGHT 120 -gboolean have_eos = FALSE; - /* For ease of programming we use globals to keep refs for our floating * src and sink pads we create; otherwise we always have to do get_pad, * get_peer, and then remove references in every test function */ diff --git a/tests/check/elements/videorate.c b/tests/check/elements/videorate.c index 163914e469..485545bf4e 100644 --- a/tests/check/elements/videorate.c +++ b/tests/check/elements/videorate.c @@ -24,12 +24,10 @@ #include -gboolean have_eos = FALSE; - /* For ease of programming we use globals to keep refs for our floating * src and sink pads we create; otherwise we always have to do get_pad, * get_peer, and then remove references in every test function */ -GstPad *mysrcpad, *mysinkpad; +static GstPad *mysrcpad, *mysinkpad; #define VIDEO_CAPS_TEMPLATE_STRING \ @@ -66,7 +64,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_CAPS (VIDEO_CAPS_TEMPLATE_STRING) ); -void +static void assert_videorate_stats (GstElement * videorate, gchar * reason, guint64 xin, guint64 xout, guint64 xdropped, guint64 xduplicated) { @@ -90,8 +88,8 @@ G_STMT_START { \ _assert_equals_uint64 (duplicated, xduplicated); } -GstElement * -setup_videorate () +static GstElement * +setup_videorate (void) { GstElement *videorate; @@ -105,7 +103,7 @@ setup_videorate () return videorate; } -void +static void cleanup_videorate (GstElement * videorate) { GST_DEBUG ("cleanup_videorate"); diff --git a/tests/check/elements/videotestsrc.c b/tests/check/elements/videotestsrc.c index d7860c351b..a2a8c7b2db 100644 --- a/tests/check/elements/videotestsrc.c +++ b/tests/check/elements/videotestsrc.c @@ -33,12 +33,10 @@ #include -gboolean have_eos = FALSE; - /* For ease of programming we use globals to keep refs for our floating * src and sink pads we create; otherwise we always have to do get_pad, * get_peer, and then remove references in every test function */ -GstPad *mysinkpad; +static GstPad *mysinkpad; #define CAPS_TEMPLATE_STRING \ @@ -54,8 +52,8 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", GST_STATIC_CAPS (CAPS_TEMPLATE_STRING) ); -GstElement * -setup_videotestsrc () +static GstElement * +setup_videotestsrc (void) { GstElement *videotestsrc; @@ -67,7 +65,7 @@ setup_videotestsrc () return videotestsrc; } -void +static void cleanup_videotestsrc (GstElement * videotestsrc) { GST_DEBUG ("cleanup_videotestsrc"); diff --git a/tests/check/elements/volume.c b/tests/check/elements/volume.c index 0bb12f49ed..e112488091 100644 --- a/tests/check/elements/volume.c +++ b/tests/check/elements/volume.c @@ -26,12 +26,10 @@ #include #include -gboolean have_eos = FALSE; - /* For ease of programming we use globals to keep refs for our floating * src and sink pads we create; otherwise we always have to do get_pad, * get_peer, and then remove references in every test function */ -GstPad *mysrcpad, *mysinkpad; +static GstPad *mysrcpad, *mysinkpad; #define VOLUME_CAPS_TEMPLATE_STRING \ @@ -119,8 +117,8 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_CAPS (VOLUME_CAPS_TEMPLATE_STRING) ); -GstElement * -setup_volume () +static GstElement * +setup_volume (void) { GstElement *volume; @@ -134,7 +132,7 @@ setup_volume () return volume; } -void +static void cleanup_volume (GstElement * volume) { GST_DEBUG ("cleanup_volume"); diff --git a/tests/check/elements/vorbisdec.c b/tests/check/elements/vorbisdec.c index fa412ec9ba..66d7ba121f 100644 --- a/tests/check/elements/vorbisdec.c +++ b/tests/check/elements/vorbisdec.c @@ -30,10 +30,10 @@ /* For ease of programming we use globals to keep refs for our floating * src and sink pads we create; otherwise we always have to do get_pad, * get_peer, and then remove references in every test function */ -GstPad *mysrcpad, *mysinkpad; +static GstPad *mysrcpad, *mysinkpad; /* a valid first header packet */ -guchar identification_header[30] = { +static guchar identification_header[30] = { 1, /* packet_type */ 'v', 'o', 'r', 'b', 'i', 's', 0, 0, 0, 0, /* vorbis_version */ @@ -46,7 +46,7 @@ guchar identification_header[30] = { 0x01, /* framing_flag */ }; -guchar comment_header[] = { +static guchar comment_header[] = { 3, /* packet_type */ 'v', 'o', 'r', 'b', 'i', 's', 2, 0, 0, 0, /* vendor_length */ @@ -66,8 +66,8 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); -GstElement * -setup_vorbisdec () +static GstElement * +setup_vorbisdec (void) { GstElement *vorbisdec; @@ -81,7 +81,7 @@ setup_vorbisdec () return vorbisdec; } -void +static void cleanup_vorbisdec (GstElement * vorbisdec) { GST_DEBUG ("cleanup_vorbisdec"); @@ -233,10 +233,10 @@ GST_START_TEST (test_identification_header) GST_END_TEST; -vorbis_comment vc; -vorbis_dsp_state vd; -vorbis_info vi; -vorbis_block vb; +static vorbis_comment vc; +static vorbis_dsp_state vd; +static vorbis_info vi; +static vorbis_block vb; static GstBuffer * _create_codebook_header_buffer (void) diff --git a/tests/check/elements/vorbistag.c b/tests/check/elements/vorbistag.c index 4dc9586611..4b20d6d77e 100644 --- a/tests/check/elements/vorbistag.c +++ b/tests/check/elements/vorbistag.c @@ -30,7 +30,7 @@ #include /* a valid first header packet */ -guchar identification_header[30] = { +static guchar identification_header[30] = { 1, /* packet_type */ 'v', 'o', 'r', 'b', 'i', 's', 0, 0, 0, 0, /* vorbis_version */ @@ -43,7 +43,7 @@ guchar identification_header[30] = { 0x01 /* framing_flag */ }; -guchar artist_comment_header[] = { +static guchar artist_comment_header[] = { 3, /* packet_type */ 'v', 'o', 'r', 'b', 'i', 's', 2, 0, 0, 0, /* vendor_length */ @@ -54,7 +54,7 @@ guchar artist_comment_header[] = { 0x01, /* framing bit */ }; -guchar title_comment_header[] = { +static guchar title_comment_header[] = { 3, /* packet_type */ 'v', 'o', 'r', 'b', 'i', 's', 2, 0, 0, 0, /* vendor_length */ @@ -65,7 +65,7 @@ guchar title_comment_header[] = { 0x01, /* framing bit */ }; -guchar empty_comment_header[] = { +static guchar empty_comment_header[] = { 3, /* packet_type */ 'v', 'o', 'r', 'b', 'i', 's', 2, 0, 0, 0, /* vendor_length */ @@ -84,8 +84,8 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); -GstPad *mysrcpad, *mysinkpad; -GAsyncQueue *pending_buffers; +static GstPad *mysrcpad, *mysinkpad; +static GAsyncQueue *pending_buffers; static gulong id; @@ -160,10 +160,10 @@ stop_pipeline (GstElement * element) pending_buffers = NULL; } -vorbis_comment vc; -vorbis_dsp_state vd; -vorbis_info vi; -vorbis_block vb; +static vorbis_comment vc; +static vorbis_dsp_state vd; +static vorbis_info vi; +static vorbis_block vb; static GstBuffer * _create_codebook_header_buffer (void) diff --git a/tests/check/generic/clock-selection.c b/tests/check/generic/clock-selection.c index b09c5a52f1..8e332f814c 100644 --- a/tests/check/generic/clock-selection.c +++ b/tests/check/generic/clock-selection.c @@ -42,7 +42,7 @@ GST_START_TEST (test_add) GST_END_TEST; -Suite * +static Suite * volume_suite (void) { Suite *s = suite_create ("clocks"); diff --git a/tests/check/generic/states.c b/tests/check/generic/states.c index 6b5ab99064..c6ebd6b19d 100644 --- a/tests/check/generic/states.c +++ b/tests/check/generic/states.c @@ -31,7 +31,7 @@ static GList *elements = NULL; static void -setup () +setup (void) { GList *features, *f; GList *plugins, *p; @@ -88,7 +88,7 @@ setup () } static void -teardown () +teardown (void) { GList *e; @@ -204,7 +204,7 @@ GST_START_TEST (test_state_changes_down_seq) GST_END_TEST; -Suite * +static Suite * states_suite (void) { Suite *s = suite_create ("states"); diff --git a/tests/check/libs/cddabasesrc.c b/tests/check/libs/cddabasesrc.c index 0daf49965c..c737c8c046 100644 --- a/tests/check/libs/cddabasesrc.c +++ b/tests/check/libs/cddabasesrc.c @@ -154,7 +154,7 @@ struct _test_disc /* FIXME: now we just need to find out how to treat * data tracks for the cddb id calculation .... */ -struct _test_disc test_discs[NUM_TEST_DISCS] = { +static struct _test_disc test_discs[NUM_TEST_DISCS] = { {nh_cd2_tracks, G_N_ELEMENTS (nh_cd2_tracks), 0xae11900e, NULL}, {mb_sample_tracks, G_N_ELEMENTS (mb_sample_tracks), 0x00000000, diff --git a/tests/check/pipelines/gio.c b/tests/check/pipelines/gio.c index 07ca0136b8..c4b17f2a4b 100644 --- a/tests/check/pipelines/gio.c +++ b/tests/check/pipelines/gio.c @@ -135,7 +135,7 @@ GST_START_TEST (test_memory_stream) GST_END_TEST; -Suite * +static Suite * gio_testsuite (void) { Suite *s = suite_create ("gio"); diff --git a/tests/check/pipelines/oggmux.c b/tests/check/pipelines/oggmux.c index 254f810dca..dbb607b990 100644 --- a/tests/check/pipelines/oggmux.c +++ b/tests/check/pipelines/oggmux.c @@ -46,8 +46,8 @@ typedef struct ChainCodec codec; } ChainState; -ogg_sync_state oggsync; -GHashTable *eos_chain_states; +static ogg_sync_state oggsync; +static GHashTable *eos_chain_states; static gulong probe_id; diff --git a/tests/check/pipelines/simple-launch-lines.c b/tests/check/pipelines/simple-launch-lines.c index 3f0bdc178e..51c3052e19 100644 --- a/tests/check/pipelines/simple-launch-lines.c +++ b/tests/check/pipelines/simple-launch-lines.c @@ -129,7 +129,8 @@ GST_START_TEST (test_element_negotiation) #endif } -GST_END_TEST +GST_END_TEST; + GST_START_TEST (test_basetransform_based) { /* Each of these tests is to check whether various basetransform based @@ -201,9 +202,11 @@ GST_START_TEST (test_basetransform_based) GST_MESSAGE_UNKNOWN); } -GST_END_TEST +GST_END_TEST; + #endif /* #ifndef GST_DISABLE_PARSE */ - Suite * simple_launch_lines_suite (void) +static Suite * +simple_launch_lines_suite (void) { Suite *s = suite_create ("Pipelines"); TCase *tc_chain = tcase_create ("linear"); diff --git a/tests/check/pipelines/streamheader.c b/tests/check/pipelines/streamheader.c index d581482049..ebd86e460b 100644 --- a/tests/check/pipelines/streamheader.c +++ b/tests/check/pipelines/streamheader.c @@ -36,7 +36,7 @@ static int n_tags = 0; -gboolean +static gboolean tag_event_probe_cb (GstPad * pad, GstEvent * event, GMainLoop * loop) { switch (GST_EVENT_TYPE (event)) { @@ -113,7 +113,7 @@ GST_END_TEST; static int n_in_caps = 0; -gboolean +static gboolean buffer_probe_cb (GstPad * pad, GstBuffer * buffer) { if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_IN_CAPS)) { @@ -208,7 +208,7 @@ GST_END_TEST; #endif /* #ifndef GST_DISABLE_PARSE */ -Suite * +static Suite * streamheader_suite (void) { Suite *s = suite_create ("streamheader"); diff --git a/tests/check/pipelines/theoraenc.c b/tests/check/pipelines/theoraenc.c index 673fa01cfb..76cb8a9b44 100644 --- a/tests/check/pipelines/theoraenc.c +++ b/tests/check/pipelines/theoraenc.c @@ -426,7 +426,7 @@ GST_END_TEST; #endif /* #ifndef GST_DISABLE_PARSE */ -Suite * +static Suite * theoraenc_suite (void) { Suite *s = suite_create ("theoraenc"); diff --git a/tests/check/pipelines/vorbisdec.c b/tests/check/pipelines/vorbisdec.c index cd8bd06bbd..9d46760755 100644 --- a/tests/check/pipelines/vorbisdec.c +++ b/tests/check/pipelines/vorbisdec.c @@ -25,10 +25,10 @@ #ifndef GST_DISABLE_PARSE -GMainLoop *loop; -gint messages = 0; +static GMainLoop *loop; +static gint messages = 0; -void +static void element_message_cb (GstBus * bus, GstMessage * message, gpointer user_data) { gchar *s; @@ -40,7 +40,7 @@ element_message_cb (GstBus * bus, GstMessage * message, gpointer user_data) messages++; } -void +static void eos_message_cb (GstBus * bus, GstMessage * message, gpointer user_data) { GST_DEBUG ("Received eos"); @@ -93,7 +93,7 @@ GST_START_TEST (test_timestamps) GST_END_TEST; #endif /* #ifndef GST_DISABLE_PARSE */ -Suite * +static Suite * vorbisenc_suite (void) { Suite *s = suite_create ("vorbisenc"); diff --git a/tests/check/pipelines/vorbisenc.c b/tests/check/pipelines/vorbisenc.c index 5d12ac54a4..0f2bff0f12 100644 --- a/tests/check/pipelines/vorbisenc.c +++ b/tests/check/pipelines/vorbisenc.c @@ -376,7 +376,7 @@ GST_END_TEST; #endif /* #ifndef GST_DISABLE_PARSE */ -Suite * +static Suite * vorbisenc_suite (void) { Suite *s = suite_create ("vorbisenc"); diff --git a/tests/examples/seek/scrubby.c b/tests/examples/seek/scrubby.c index c8f62487ed..f619b87275 100644 --- a/tests/examples/seek/scrubby.c +++ b/tests/examples/seek/scrubby.c @@ -34,12 +34,12 @@ static guint schanged_id = 0; #define SEGMENT_LEN 100 #define UPDATE_INTERVAL 500 -gdouble prev_range = -1.0; -GstClockTime prev_time = GST_CLOCK_TIME_NONE; -gdouble cur_range; -GstClockTime cur_time; -GstClockTimeDiff diff; -gdouble cur_speed = 1.0; +static gdouble prev_range = -1.0; +static GstClockTime prev_time = GST_CLOCK_TIME_NONE; +static gdouble cur_range; +static GstClockTime cur_time; +static GstClockTimeDiff diff; +static gdouble cur_speed = 1.0; typedef struct { diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c index c954daad37..d4aa985684 100644 --- a/tests/examples/seek/seek.c +++ b/tests/examples/seek/seek.c @@ -994,7 +994,7 @@ query_rates (void) } G_GNUC_UNUSED static void -query_positions_elems () +query_positions_elems (void) { GList *walk = seekable_elements; @@ -1026,7 +1026,7 @@ query_positions_elems () } G_GNUC_UNUSED static void -query_positions_pads () +query_positions_pads (void) { GList *walk = seekable_pads; diff --git a/tests/icles/stress-xoverlay.c b/tests/icles/stress-xoverlay.c index 8dcaaef683..41a6c923b6 100644 --- a/tests/icles/stress-xoverlay.c +++ b/tests/icles/stress-xoverlay.c @@ -39,7 +39,7 @@ static gint width = 320, height = 240, x = 0, y = 0; static gint disp_width, disp_height; static inline long -myclock () +myclock (void) { struct timeval tv; diff --git a/win32/common/libgstrtp.def b/win32/common/libgstrtp.def index d9f91c26cf..4c14a5a283 100644 --- a/win32/common/libgstrtp.def +++ b/win32/common/libgstrtp.def @@ -87,6 +87,7 @@ EXPORTS gst_rtp_buffer_pad_to gst_rtp_buffer_set_csrc gst_rtp_buffer_set_extension + gst_rtp_buffer_set_extension_data gst_rtp_buffer_set_marker gst_rtp_buffer_set_packet_len gst_rtp_buffer_set_padding