+2008-03-03 Sebastian Dröge <slomo@circular-chaos.org>
+
+ * 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 <tim at centricular dot net>
Patch by: José Alburquerque <jaalburqu svn gnome org>
sizeof (GstAlsaMixerTrack),
0,
(GInstanceInitFunc) gst_alsa_mixer_track_init,
- 0
+ NULL
};
track_type =
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;
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;
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);
GstElementClass parent_class;
};
+GType gst_ogg_mux_get_type (void);
+
G_END_DECLS
#endif /* __GST_OGG_MUX_H__ */
return ogm_audio_parse_type;
}
-GType
+static GType
gst_ogm_video_parse_get_type (void)
{
static GType ogm_video_parse_type = 0;
return ogm_video_parse_type;
}
-GType
+static GType
gst_ogm_text_parse_get_type (void)
{
static GType ogm_text_parse_type = 0;
GST_AUDIO_FIELD_SIGNED = (1 << 5),
} GstAudioFieldFlag;
#endif /* GST_DISABLE_DEPRECATED */
+
void
gst_audio_structure_set_int (GstStructure * structure, GstAudioFieldFlag flag)
{
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 */
st->inverse = inverse_fft;
for (i = 0; i < nfft; ++i) {
- const double pi =
- 3.141592653589793238462643383279502884197169399375105820974944;
double phase = -2 * pi * i / nfft;
if (st->inverse)
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);
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);
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);
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);
payload->clock_rate = clock_rate;
}
-gboolean
+static gboolean
copy_fixed (GQuark field_id, const GValue * value, GstStructure * dest)
{
if (gst_value_is_fixed (value)) {
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);
}
};
-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 */
#include <gst/audio/audio.h>
#include <gst/base/gstbasetransform.h>
-GST_DEBUG_CATEGORY (audioresample_debug);
+GST_DEBUG_CATEGORY_STATIC (audioresample_debug);
#define GST_CAT_DEFAULT audioresample_debug
/* elementfactory information */
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)
{
return size;
}
+#endif
int
avpicture_get_size (int pix_fmt, int width, int height)
/**
* Copy image 'src' to 'dst'.
*/
-void
+static void
img_copy (AVPicture * dst, const AVPicture * src,
int pix_fmt, int width, int height)
{
return NULL;
}
-int
+static int
avpicture_alloc (AVPicture * picture, int pix_fmt, int width, int height)
{
unsigned int size;
return -1;
}
-void
+static void
avpicture_free (AVPicture * picture)
{
av_free (picture->data[0]);
#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,
}
#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)
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)
{
#endif
return 0;
}
+#endif
#undef FIX
static GMainLoop *loop;
static GstElement *
-gen_video_element ()
+gen_video_element (void)
{
GstElement *element;
GstElement *conv;
}
static GstElement *
-gen_audio_element ()
+gen_audio_element (void)
{
GstElement *element;
GstElement *conv;
/* 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 */
#include "vs_image.h"
#include "vs_scanline.h"
+#include "vs_4tap.h"
+
#include <liboil/liboil.h>
#include <math.h>
#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
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,
}
#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;
}
static GstCaps *
-gst_v4lsrc_get_any_caps ()
+gst_v4lsrc_get_any_caps (void)
{
gint i;
GstCaps *caps = gst_caps_new_empty (), *one;
* 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");
#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 */
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),
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),
static GstBufferClass *v4lbuffer_parent_class = NULL;
-GType
+static GType
gst_v4lsrc_buffer_get_type (void)
{
static GType _gst_v4lsrc_buffer_type;
gst_ximage_buffer_finalize;
}
-GType
+static GType
gst_ximage_buffer_get_type (void)
{
static GType _gst_ximage_buffer_type;
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;
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,
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;
gst_xvimage_buffer_finalize;
}
-GType
+static GType
gst_xvimage_buffer_get_type (void)
{
static GType _gst_xvimage_buffer_type;
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;
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,
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;
#include <gst/check/gstcheck.h>
#include <gst/audio/multichannel.h>
-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, " \
);
/* takes over reference for outcaps */
-GstElement *
+static GstElement *
setup_audioconvert (GstCaps * outcaps)
{
GstElement *audioconvert;
return audioconvert;
}
-void
+static void
cleanup_audioconvert (GstElement * audioconvert)
{
GST_DEBUG ("cleanup_audioconvert");
GST_END_TEST;
-Suite *
+static Suite *
audioconvert_suite (void)
{
Suite *s = suite_create ("audioconvert");
#include <gst/check/gstcheck.h>
-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 \
GST_STATIC_CAPS (RESAMPLE_CAPS_TEMPLATE_STRING)
);
-GstElement *
+static GstElement *
setup_audioresample (int channels, int inrate, int outrate)
{
GstElement *audioresample;
return audioresample;
}
-void
+static void
cleanup_audioresample (GstElement * audioresample)
{
GST_DEBUG ("cleanup_audioresample");
}
static void
-fail_unless_perfect_stream ()
+fail_unless_perfect_stream (void)
{
guint64 timestamp = 0L, duration = 0L;
guint64 offset = 0L, offset_end = 0L;
#include <gst/check/gstcheck.h>
-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 \
GST_STATIC_CAPS (CAPS_TEMPLATE_STRING)
);
-GstElement *
-setup_audiotestsrc ()
+static GstElement *
+setup_audiotestsrc (void)
{
GstElement *audiotestsrc;
return audiotestsrc;
}
-void
+static void
cleanup_audiotestsrc (GstElement * audiotestsrc)
{
GST_DEBUG ("cleanup_audiotestsrc");
GST_END_TEST;
-Suite *
+static Suite *
audiotestsrc_suite (void)
{
Suite *s = suite_create ("audiotestsrc");
#include <gst/check/gstcheck.h>
#include <unistd.h>
-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 "
#include <gst/check/gstcheck.h>
#include <gst/dataprotocol/dataprotocol.h>
-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, " \
);
/* takes over reference for outcaps */
-GstElement *
-setup_gdpdepay ()
+static GstElement *
+setup_gdpdepay (void)
{
GstElement *gdpdepay;
return gdpdepay;
}
-void
+static void
cleanup_gdpdepay (GstElement * gdpdepay)
{
GST_DEBUG ("cleanup_gdpdepay");
GST_STATIC_CAPS ("application/x-gst-test-streamheader")
);
-GstElement *
-setup_gdpdepay_streamheader ()
+static GstElement *
+setup_gdpdepay_streamheader (void)
{
GstElement *gdpdepay;
#endif /* ifndef HAVE_CPU_PPC64 */
-Suite *
+static Suite *
gdpdepay_suite (void)
{
Suite *s = suite_create ("gdpdepay");
#include <gst/check/gstcheck.h>
#include <gst/dataprotocol/dataprotocol.h>
-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, " \
);
/* takes over reference for outcaps */
-GstElement *
-setup_gdppay ()
+static GstElement *
+setup_gdppay (void)
{
GstElement *gdppay;
return gdppay;
}
-void
+static void
cleanup_gdppay (GstElement * gdppay)
{
GST_DEBUG ("cleanup_gdppay");
g_list_free (buffers);
buffers = NULL;
ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1);
- gst_object_unref (gdppay);
+ cleanup_gdppay (gdppay);
}
GST_END_TEST;
);
-GstElement *
-setup_gdppay_streamheader ()
+static GstElement *
+setup_gdppay_streamheader (void)
{
GstElement *gdppay;
g_list_free (buffers);
buffers = NULL;
ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1);
- gst_object_unref (gdppay);
+ cleanup_gdppay (gdppay);
}
GST_END_TEST;
g_list_free (buffers);
buffers = NULL;
ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1);
- gst_object_unref (gdppay);
+ cleanup_gdppay (gdppay);
}
GST_END_TEST;
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);
g_list_free (buffers);
buffers = NULL;
ASSERT_OBJECT_REFCOUNT (gdppay, "gdppay", 1);
- gst_object_unref (gdppay);
+ cleanup_gdppay (gdppay);
}
GST_END_TEST;
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");
#include <gst/check/gstcheck.h>
-gboolean have_eos = FALSE;
-
-GstPad *mysrcpad;
+static GstPad *mysrcpad;
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_STATIC_CAPS_ANY);
static GstElement *
-setup_gnomevfssink ()
+setup_gnomevfssink (void)
{
GstElement *gnomevfssink;
#include <gst/check/gstcheck.h>
-GstPad *mysrcpad;
+static GstPad *mysrcpad;
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_STATIC_CAPS ("application/x-gst-check")
);
-GstElement *
-setup_multifdsink ()
+static GstElement *
+setup_multifdsink (void)
{
GstElement *multifdsink;
return multifdsink;
}
-void
+static void
cleanup_multifdsink (GstElement * multifdsink)
{
GST_DEBUG ("cleanup_multifdsink");
* 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");
#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 */
#include <gst/check/gstcheck.h>
-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 \
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)
{
_assert_equals_uint64 (duplicated, xduplicated);
}
-GstElement *
-setup_videorate ()
+static GstElement *
+setup_videorate (void)
{
GstElement *videorate;
return videorate;
}
-void
+static void
cleanup_videorate (GstElement * videorate)
{
GST_DEBUG ("cleanup_videorate");
#include <gst/check/gstcheck.h>
-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 \
GST_STATIC_CAPS (CAPS_TEMPLATE_STRING)
);
-GstElement *
-setup_videotestsrc ()
+static GstElement *
+setup_videotestsrc (void)
{
GstElement *videotestsrc;
return videotestsrc;
}
-void
+static void
cleanup_videotestsrc (GstElement * videotestsrc)
{
GST_DEBUG ("cleanup_videotestsrc");
#include <gst/check/gstcheck.h>
#include <gst/controller/gstcontroller.h>
-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 \
GST_STATIC_CAPS (VOLUME_CAPS_TEMPLATE_STRING)
);
-GstElement *
-setup_volume ()
+static GstElement *
+setup_volume (void)
{
GstElement *volume;
return volume;
}
-void
+static void
cleanup_volume (GstElement * volume)
{
GST_DEBUG ("cleanup_volume");
/* 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 */
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 */
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
-GstElement *
-setup_vorbisdec ()
+static GstElement *
+setup_vorbisdec (void)
{
GstElement *vorbisdec;
return vorbisdec;
}
-void
+static void
cleanup_vorbisdec (GstElement * vorbisdec)
{
GST_DEBUG ("cleanup_vorbisdec");
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)
#include <gst/check/gstcheck.h>
/* 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 */
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 */
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 */
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 */
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
-GstPad *mysrcpad, *mysinkpad;
-GAsyncQueue *pending_buffers;
+static GstPad *mysrcpad, *mysinkpad;
+static GAsyncQueue *pending_buffers;
static gulong id;
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)
GST_END_TEST;
-Suite *
+static Suite *
volume_suite (void)
{
Suite *s = suite_create ("clocks");
static GList *elements = NULL;
static void
-setup ()
+setup (void)
{
GList *features, *f;
GList *plugins, *p;
}
static void
-teardown ()
+teardown (void)
{
GList *e;
GST_END_TEST;
-Suite *
+static Suite *
states_suite (void)
{
Suite *s = suite_create ("states");
/* 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,
GST_END_TEST;
-Suite *
+static Suite *
gio_testsuite (void)
{
Suite *s = suite_create ("gio");
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;
#endif
}
-GST_END_TEST
+GST_END_TEST;
+
GST_START_TEST (test_basetransform_based)
{
/* Each of these tests is to check whether various 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");
static int n_tags = 0;
-gboolean
+static gboolean
tag_event_probe_cb (GstPad * pad, GstEvent * event, GMainLoop * loop)
{
switch (GST_EVENT_TYPE (event)) {
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)) {
#endif /* #ifndef GST_DISABLE_PARSE */
-Suite *
+static Suite *
streamheader_suite (void)
{
Suite *s = suite_create ("streamheader");
#endif /* #ifndef GST_DISABLE_PARSE */
-Suite *
+static Suite *
theoraenc_suite (void)
{
Suite *s = suite_create ("theoraenc");
#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;
messages++;
}
-void
+static void
eos_message_cb (GstBus * bus, GstMessage * message, gpointer user_data)
{
GST_DEBUG ("Received eos");
GST_END_TEST;
#endif /* #ifndef GST_DISABLE_PARSE */
-Suite *
+static Suite *
vorbisenc_suite (void)
{
Suite *s = suite_create ("vorbisenc");
#endif /* #ifndef GST_DISABLE_PARSE */
-Suite *
+static Suite *
vorbisenc_suite (void)
{
Suite *s = suite_create ("vorbisenc");
#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
{
}
G_GNUC_UNUSED static void
-query_positions_elems ()
+query_positions_elems (void)
{
GList *walk = seekable_elements;
}
G_GNUC_UNUSED static void
-query_positions_pads ()
+query_positions_pads (void)
{
GList *walk = seekable_pads;
static gint disp_width, disp_height;
static inline long
-myclock ()
+myclock (void)
{
struct timeval tv;
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