Commit f9967e4a authored by Wim Taymans's avatar Wim Taymans
Browse files

Merge branch 'master' into 0.11

Conflicts:
	gst-libs/gst/video/video.h
	gst/playback/gstplaysinkaudioconvert.c
	gst/playback/gstplaysinkvideoconvert.c
	tests/check/libs/rtp.c
parents ea672b68 5c97aa2e
......@@ -76,6 +76,7 @@ check: check-exports
CRUFT_FILES = \
$(top_builddir)/common/shave \
$(top_builddir)/common/shave-libtool \
$(top_builddir)/gst-libs/gst/audio/testchannels \
$(top_builddir)/tools/gst-discoverer
......
......@@ -1004,6 +1004,7 @@ tests/Makefile
tests/check/Makefile
tests/examples/Makefile
tests/examples/app/Makefile
tests/examples/audio/Makefile
tests/examples/dynamic/Makefile
tests/examples/encoding/Makefile
tests/examples/gio/Makefile
......
libgstaudio_la-multichannel-enumtypes.lo
audio-enumtypes.c
audio-enumtypes.h
testchannels
......@@ -52,11 +52,6 @@ libgstaudio_@GST_MAJORMINOR@_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) \
$(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la
libgstaudio_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
noinst_PROGRAMS = testchannels
testchannels_SOURCES = testchannels.c
testchannels_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
testchannels_LDADD = $(GST_LIBS)
include $(top_srcdir)/common/gst-glib-gen.mak
if HAVE_INTROSPECTION
......
......@@ -186,11 +186,11 @@ gst_fft_f32_window (GstFFTF32 * self, gfloat * timedata, GstFFTWindow window)
break;
case GST_FFT_WINDOW_HAMMING:
for (i = 0; i < len; i++)
timedata[i] *= (0.53836 - 0.46164 * cos (2.0 * M_PI * i / len));
timedata[i] *= (0.53836 - 0.46164 * cos (2.0 * G_PI * i / len));
break;
case GST_FFT_WINDOW_HANN:
for (i = 0; i < len; i++)
timedata[i] *= (0.5 - 0.5 * cos (2.0 * M_PI * i / len));
timedata[i] *= (0.5 - 0.5 * cos (2.0 * G_PI * i / len));
break;
case GST_FFT_WINDOW_BARTLETT:
for (i = 0; i < len; i++)
......
......@@ -186,11 +186,11 @@ gst_fft_f64_window (GstFFTF64 * self, gdouble * timedata, GstFFTWindow window)
break;
case GST_FFT_WINDOW_HAMMING:
for (i = 0; i < len; i++)
timedata[i] *= (0.53836 - 0.46164 * cos (2.0 * M_PI * i / len));
timedata[i] *= (0.53836 - 0.46164 * cos (2.0 * G_PI * i / len));
break;
case GST_FFT_WINDOW_HANN:
for (i = 0; i < len; i++)
timedata[i] *= (0.5 - 0.5 * cos (2.0 * M_PI * i / len));
timedata[i] *= (0.5 - 0.5 * cos (2.0 * G_PI * i / len));
break;
case GST_FFT_WINDOW_BARTLETT:
for (i = 0; i < len; i++)
......
......@@ -186,11 +186,11 @@ gst_fft_s16_window (GstFFTS16 * self, gint16 * timedata, GstFFTWindow window)
break;
case GST_FFT_WINDOW_HAMMING:
for (i = 0; i < len; i++)
timedata[i] *= (0.53836 - 0.46164 * cos (2.0 * M_PI * i / len));
timedata[i] *= (0.53836 - 0.46164 * cos (2.0 * G_PI * i / len));
break;
case GST_FFT_WINDOW_HANN:
for (i = 0; i < len; i++)
timedata[i] *= (0.5 - 0.5 * cos (2.0 * M_PI * i / len));
timedata[i] *= (0.5 - 0.5 * cos (2.0 * G_PI * i / len));
break;
case GST_FFT_WINDOW_BARTLETT:
for (i = 0; i < len; i++)
......
......@@ -185,11 +185,11 @@ gst_fft_s32_window (GstFFTS32 * self, gint32 * timedata, GstFFTWindow window)
break;
case GST_FFT_WINDOW_HAMMING:
for (i = 0; i < len; i++)
timedata[i] *= (0.53836 - 0.46164 * cos (2.0 * M_PI * i / len));
timedata[i] *= (0.53836 - 0.46164 * cos (2.0 * G_PI * i / len));
break;
case GST_FFT_WINDOW_HANN:
for (i = 0; i < len; i++)
timedata[i] *= (0.5 - 0.5 * cos (2.0 * M_PI * i / len));
timedata[i] *= (0.5 - 0.5 * cos (2.0 * G_PI * i / len));
break;
case GST_FFT_WINDOW_BARTLETT:
for (i = 0; i < len; i++)
......
......@@ -436,67 +436,137 @@ typedef enum {
#define GST_VIDEO_BUFFER_PROGRESSIVE GST_BUFFER_FLAG_MEDIA4
/* functions */
const GValue *gst_video_frame_rate (GstPad *pad);
gboolean gst_video_get_size (GstPad *pad,
gint *width,
gint *height);
gboolean gst_video_calculate_display_ratio (guint *dar_n, guint *dar_d,
guint video_width, guint video_height,
guint video_par_n, guint video_par_d,
guint display_par_n, guint display_par_d);
gboolean gst_video_format_parse_caps (const GstCaps *caps,
GstVideoFormat *format, int *width, int *height);
gboolean gst_video_format_parse_caps_interlaced (GstCaps *caps, gboolean *interlaced);
gboolean gst_video_parse_caps_framerate (GstCaps *caps,
int *fps_n, int *fps_d);
gboolean gst_video_parse_caps_pixel_aspect_ratio (GstCaps *caps,
int *par_n, int *par_d);
const char *gst_video_parse_caps_color_matrix (GstCaps * caps);
const char *gst_video_parse_caps_chroma_site (GstCaps * caps);
GstBuffer *gst_video_parse_caps_palette (GstCaps * caps);
GstCaps * gst_video_format_new_caps (GstVideoFormat format,
int width, int height, int framerate_n, int framerate_d,
int par_n, int par_d);
GstCaps * gst_video_format_new_caps_interlaced (GstVideoFormat format,
int width, int height, int framerate_n, int framerate_d,
int par_n, int par_d, gboolean interlaced);
GstCaps * gst_video_format_new_template_caps (GstVideoFormat format);
GstVideoFormat gst_video_format_from_fourcc (guint32 fourcc);
guint32 gst_video_format_to_fourcc (GstVideoFormat format);
gboolean gst_video_format_is_rgb (GstVideoFormat format);
gboolean gst_video_format_is_yuv (GstVideoFormat format);
gboolean gst_video_format_is_gray (GstVideoFormat format);
gboolean gst_video_format_has_alpha (GstVideoFormat format);
int gst_video_format_get_component_depth (GstVideoFormat format, int component);
int gst_video_format_get_row_stride (GstVideoFormat format, int component,
int width);
int gst_video_format_get_pixel_stride (GstVideoFormat format, int component);
int gst_video_format_get_component_width (GstVideoFormat format, int component,
int width);
int gst_video_format_get_component_height (GstVideoFormat format, int component,
int height);
int gst_video_format_get_component_offset (GstVideoFormat format, int component,
int width, int height);
int gst_video_format_get_size (GstVideoFormat format, int width, int height);
gboolean gst_video_get_size_from_caps (const GstCaps * caps, gint * size);
gboolean gst_video_format_convert (GstVideoFormat format, int width, int height,
int fps_n, int fps_d,
GstFormat src_format, gint64 src_value,
GstFormat dest_format, gint64 * dest_value);
GstEvent *gst_video_event_new_still_frame (gboolean in_still);
gboolean gst_video_event_parse_still_frame (GstEvent *event, gboolean *in_still);
GstBuffer *gst_video_convert_frame(GstBuffer *buf, GstCaps *from_caps, const GstCaps *to_caps,
GstClockTime timeout, GError **error);
typedef void (*GstVideoConvertFrameCallback) (GstBuffer *buf, GError *error, gpointer user_data);
void gst_video_convert_frame_async(GstBuffer *buf, GstCaps *from_caps, const GstCaps *to_caps,
GstClockTime timeout, GstVideoConvertFrameCallback callback,
gpointer user_data, GDestroyNotify destroy_notify);
const GValue * gst_video_frame_rate (GstPad * pad);
gboolean gst_video_get_size (GstPad * pad,
gint * width,
gint * height);
gboolean gst_video_calculate_display_ratio (guint * dar_n,
guint * dar_d,
guint video_width,
guint video_height,
guint video_par_n,
guint video_par_d,
guint display_par_n,
guint display_par_d);
gboolean gst_video_format_parse_caps (const GstCaps * caps,
GstVideoFormat * format,
int * width,
int * height);
gboolean gst_video_format_parse_caps_interlaced (GstCaps * caps,
gboolean * interlaced);
gboolean gst_video_parse_caps_pixel_aspect_ratio (GstCaps * caps,
int * par_n,
int * par_d);
gboolean gst_video_parse_caps_framerate (GstCaps * caps,
int * fps_n,
int * fps_d);
const char * gst_video_parse_caps_color_matrix (GstCaps * caps);
const char * gst_video_parse_caps_chroma_site (GstCaps * caps);
GstBuffer * gst_video_parse_caps_palette (GstCaps * caps);
/* create caps given format and details */
GstCaps * gst_video_format_new_caps (GstVideoFormat format,
int width, int height,
int framerate_n,
int framerate_d,
int par_n, int par_d);
GstCaps * gst_video_format_new_caps_interlaced (GstVideoFormat format,
int width, int height,
int framerate_n,
int framerate_d,
int par_n, int par_d,
gboolean interlaced);
GstCaps * gst_video_format_new_template_caps (GstVideoFormat format);
/* format properties */
GstVideoFormat gst_video_format_from_fourcc (guint32 fourcc) G_GNUC_CONST;
guint32 gst_video_format_to_fourcc (GstVideoFormat format) G_GNUC_CONST;
gboolean gst_video_format_is_rgb (GstVideoFormat format) G_GNUC_CONST;
gboolean gst_video_format_is_yuv (GstVideoFormat format) G_GNUC_CONST;
gboolean gst_video_format_is_gray (GstVideoFormat format) G_GNUC_CONST;
gboolean gst_video_format_has_alpha (GstVideoFormat format) G_GNUC_CONST;
int gst_video_format_get_component_depth (GstVideoFormat format,
int component) G_GNUC_CONST;
int gst_video_format_get_row_stride (GstVideoFormat format,
int component,
int width) G_GNUC_CONST;
int gst_video_format_get_pixel_stride (GstVideoFormat format,
int component) G_GNUC_CONST;
int gst_video_format_get_component_width (GstVideoFormat format,
int component,
int width) G_GNUC_CONST;
int gst_video_format_get_component_height (GstVideoFormat format,
int component,
int height) G_GNUC_CONST;
int gst_video_format_get_component_offset (GstVideoFormat format,
int component,
int width,
int height) G_GNUC_CONST;
int gst_video_format_get_size (GstVideoFormat format,
int width,
int height) G_GNUC_CONST;
gboolean gst_video_get_size_from_caps (const GstCaps * caps, gint * size);
gboolean gst_video_format_convert (GstVideoFormat format,
int width,
int height,
int fps_n,
int fps_d,
GstFormat src_format,
gint64 src_value,
GstFormat dest_format,
gint64 * dest_value);
/* video still frame event creation and parsing */
GstEvent * gst_video_event_new_still_frame (gboolean in_still);
gboolean gst_video_event_parse_still_frame (GstEvent * event, gboolean * in_still);
/* convert/encode video frame from one format to another */
typedef void (*GstVideoConvertFrameCallback) (GstBuffer * buf, GError *error, gpointer user_data);
void gst_video_convert_frame_async (GstBuffer * buf,
const GstCaps * to_caps,
GstClockTime timeout,
GstVideoConvertFrameCallback callback,
gpointer user_data,
GDestroyNotify destroy_notify);
GstBuffer * gst_video_convert_frame (GstBuffer * buf,
const GstCaps * to_caps,
GstClockTime timeout,
GError ** error);
G_END_DECLS
#endif /* __GST_VIDEO_H__ */
......@@ -63,12 +63,12 @@
/* the volume factor is a range from 0.0 to (arbitrary) VOLUME_MAX_DOUBLE = 10.0
* we map 1.0 to VOLUME_UNITY_INT*
*/
#define VOLUME_UNITY_INT8 32 /* internal int for unity 2^(8-3) */
#define VOLUME_UNITY_INT8_BIT_SHIFT 5 /* number of bits to shift for unity */
#define VOLUME_UNITY_INT16 8192 /* internal int for unity 2^(16-3) */
#define VOLUME_UNITY_INT16_BIT_SHIFT 13 /* number of bits to shift for unity */
#define VOLUME_UNITY_INT24 2097152 /* internal int for unity 2^(24-3) */
#define VOLUME_UNITY_INT24_BIT_SHIFT 21 /* number of bits to shift for unity */
#define VOLUME_UNITY_INT8 8 /* internal int for unity 2^(8-5) */
#define VOLUME_UNITY_INT8_BIT_SHIFT 3 /* number of bits to shift for unity */
#define VOLUME_UNITY_INT16 2048 /* internal int for unity 2^(16-5) */
#define VOLUME_UNITY_INT16_BIT_SHIFT 11 /* number of bits to shift for unity */
#define VOLUME_UNITY_INT24 524288 /* internal int for unity 2^(24-5) */
#define VOLUME_UNITY_INT24_BIT_SHIFT 19 /* number of bits to shift for unity */
#define VOLUME_UNITY_INT32 134217728 /* internal int for unity 2^(32-5) */
#define VOLUME_UNITY_INT32_BIT_SHIFT 27
#define VOLUME_MAX_DOUBLE 10.0
......@@ -677,7 +677,7 @@ volume_process_int16 (GstVolume * self, gpointer bytes, guint n_bytes)
guint num_samples = n_bytes / sizeof (gint16);
/* hard coded in volume.orc */
g_assert (VOLUME_UNITY_INT16_BIT_SHIFT == 13);
g_assert (VOLUME_UNITY_INT16_BIT_SHIFT == 11);
orc_process_int16 (data, self->current_vol_i16, num_samples);
}
......@@ -689,7 +689,7 @@ volume_process_int16_clamp (GstVolume * self, gpointer bytes, guint n_bytes)
guint num_samples = n_bytes / sizeof (gint16);
/* hard coded in volume.orc */
g_assert (VOLUME_UNITY_INT16_BIT_SHIFT == 13);
g_assert (VOLUME_UNITY_INT16_BIT_SHIFT == 11);
orc_process_int16_clamp (data, self->current_vol_i16, num_samples);
}
......@@ -725,7 +725,7 @@ volume_process_int8 (GstVolume * self, gpointer bytes, guint n_bytes)
guint num_samples = n_bytes / sizeof (gint8);
/* hard coded in volume.orc */
g_assert (VOLUME_UNITY_INT8_BIT_SHIFT == 5);
g_assert (VOLUME_UNITY_INT8_BIT_SHIFT == 3);
orc_process_int8 (data, self->current_vol_i8, num_samples);
}
......@@ -737,7 +737,7 @@ volume_process_int8_clamp (GstVolume * self, gpointer bytes, guint n_bytes)
guint num_samples = n_bytes / sizeof (gint8);
/* hard coded in volume.orc */
g_assert (VOLUME_UNITY_INT8_BIT_SHIFT == 5);
g_assert (VOLUME_UNITY_INT8_BIT_SHIFT == 3);
orc_process_int8_clamp (data, self->current_vol_i8, num_samples);
}
......
......@@ -37,7 +37,7 @@ convsssql d1, t1
.temp 4 t1
mulswl t1, d1, p1
shrsl t1, t1, 13
shrsl t1, t1, 11
convlw d1, t1
......@@ -47,7 +47,7 @@ convlw d1, t1
.temp 4 t1
mulswl t1, d1, p1
shrsl t1, t1, 13
shrsl t1, t1, 11
convssslw d1, t1
.function orc_process_int8
......@@ -56,7 +56,7 @@ convssslw d1, t1
.temp 2 t1
mulsbw t1, d1, p1
shrsw t1, t1, 5
shrsw t1, t1, 3
convwb d1, t1
......@@ -66,7 +66,7 @@ convwb d1, t1
.temp 2 t1
mulsbw t1, d1, p1
shrsw t1, t1, 5
shrsw t1, t1, 3
convssswb d1, t1
.function orc_memset_f64
......
......@@ -172,6 +172,7 @@ VALGRIND_TO_FIX = \
noinst_PROGRAMS = $(check_libvisual)
noinst_HEADERS = \
libs/struct_arm.h \
libs/struct_i386.h \
libs/struct_i386_osx.h \
libs/struct_x86_64.h
......
......@@ -26,4 +26,5 @@ videoscale
vorbistag
playbin
playbin2
playbin2-compressed
subparse
......@@ -573,7 +573,6 @@ GST_START_TEST (test_add_pad)
GstElement *bin, *src1, *src2, *adder, *sink;
GstBus *bus;
GstPad *srcpad;
GstStreamConsistency *consist;
gboolean res;
GST_INFO ("preparing test");
......@@ -600,7 +599,6 @@ GST_START_TEST (test_add_pad)
fail_unless (res == TRUE, NULL);
srcpad = gst_element_get_static_pad (adder, "src");
consist = gst_consistency_checker_new (srcpad);
gst_object_unref (srcpad);
main_loop = g_main_loop_new (NULL, FALSE);
......@@ -656,7 +654,6 @@ GST_START_TEST (test_remove_pad)
GstBus *bus;
GstPad *pad, *srcpad;
gboolean res;
GstStreamConsistency *consist;
GST_INFO ("preparing test");
......@@ -682,7 +679,6 @@ GST_START_TEST (test_remove_pad)
fail_if (pad == NULL, NULL);
srcpad = gst_element_get_static_pad (adder, "src");
consist = gst_consistency_checker_new (srcpad);
gst_object_unref (srcpad);
main_loop = g_main_loop_new (NULL, FALSE);
......
......@@ -174,7 +174,7 @@ check_rgb_buf (const guint8 * pixels, guint32 r_mask, guint32 g_mask,
guint32 b_mask, guint32 a_mask, guint8 r_expected, guint8 g_expected,
guint8 b_expected, guint endianness, guint bpp, guint depth)
{
guint32 pixel, red, green, blue, alpha;
guint32 pixel, red, green, blue;
switch (bpp) {
case 32:{
......@@ -210,7 +210,7 @@ check_rgb_buf (const guint8 * pixels, guint32 r_mask, guint32 g_mask,
red = right_shift_colour (r_mask, pixel);
green = right_shift_colour (g_mask, pixel);
blue = right_shift_colour (b_mask, pixel);
alpha = right_shift_colour (a_mask, pixel);
/* alpha = right_shift_colour (a_mask, pixel); */
/* can't enable this by default, valgrind will complain about accessing
* uninitialised memory for the depth=24,bpp=32 formats ... */
......
......@@ -313,6 +313,53 @@ GST_START_TEST (test_double_s8)
GST_END_TEST;
GST_START_TEST (test_ten_s8)
{
GstElement *volume;
GstBuffer *inbuffer;
GstBuffer *outbuffer;
GstCaps *caps;
gint8 in[2] = { 64, -10 };
gint8 out[2] = { 127, -100 }; /* notice the clamped sample */
gint8 *res;
volume = setup_volume ();
g_object_set (G_OBJECT (volume), "volume", 10.0, NULL);
fail_unless (gst_element_set_state (volume,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
inbuffer = gst_buffer_new_and_alloc (2);
memcpy (GST_BUFFER_DATA (inbuffer), in, 2);
fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 2) == 0);
caps = gst_caps_from_string (VOLUME_CAPS_STRING_S8);
gst_buffer_set_caps (inbuffer, caps);
gst_caps_unref (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
/* FIXME: reffing the inbuffer should make the transformation not be
* inplace
gst_buffer_ref (inbuffer);
*/
/* pushing gives away my reference ... */
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
/* ... but it ends up being modified inplace and
* collected on the global buffer list */
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
fail_unless_equals_int (g_list_length (buffers), 1);
fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
fail_unless (inbuffer == outbuffer);
res = (gint8 *) GST_BUFFER_DATA (outbuffer);
GST_INFO ("expected %+5d %+5d real %+5d %+5d", out[0], out[1], res[0],
res[1]);
fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 2) == 0);
/* cleanup */
cleanup_volume (volume);
}
GST_END_TEST;
GST_START_TEST (test_mute_s8)
{
GstElement *volume;
......@@ -496,6 +543,53 @@ GST_START_TEST (test_double_s16)
GST_END_TEST;
GST_START_TEST (test_ten_s16)
{
GstElement *volume;
GstBuffer *inbuffer;
GstBuffer *outbuffer;
GstCaps *caps;
gint16 in[2] = { 16384, -10 };
gint16 out[2] = { 32767, -100 }; /* notice the clamped sample */
gint16 *res;
volume = setup_volume ();
g_object_set (G_OBJECT (volume), "volume", 10.0, NULL);
fail_unless (gst_element_set_state (volume,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
inbuffer = gst_buffer_new_and_alloc (4);
memcpy (GST_BUFFER_DATA (inbuffer), in, 4);
fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 4) == 0);
caps = gst_caps_from_string (VOLUME_CAPS_STRING_S16);
gst_buffer_set_caps (inbuffer, caps);
gst_caps_unref (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
/* FIXME: reffing the inbuffer should make the transformation not be
* inplace
gst_buffer_ref (inbuffer);
*/
/* pushing gives away my reference ... */
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
/* ... but it ends up being modified inplace and
* collected on the global buffer list */
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
fail_unless_equals_int (g_list_length (buffers), 1);
fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
fail_unless (inbuffer == outbuffer);
res = (gint16 *) GST_BUFFER_DATA (outbuffer);
GST_INFO ("expected %+5d %+5d real %+5d %+5d", out[0], out[1], res[0],
res[1]);
fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 4) == 0);
/* cleanup */
cleanup_volume (volume);
}
GST_END_TEST;
GST_START_TEST (test_mute_s16)
{
......@@ -716,6 +810,61 @@ GST_START_TEST (test_double_s24)
GST_END_TEST;
GST_START_TEST (test_ten_s24)
{
GstElement *volume;
GstBuffer *inbuffer;
GstBuffer *outbuffer;
GstCaps *caps;
gint32 in_32[2] = { 4194304, -10 };
guint8 in[6];
guint8 *res;
gint32 res_32[2];
gint32 out_32[2] = { 8388607, -100 }; /* notice the clamped sample */
write_unaligned_u24 (in, in_32[0]);
write_unaligned_u24 (in + 3, in_32[1]);
volume = setup_volume ();
g_object_set (G_OBJECT (volume), "volume", 10.0, NULL);
fail_unless (gst_element_set_state (volume,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
inbuffer = gst_buffer_new_and_alloc (6);
memcpy (GST_BUFFER_DATA (inbuffer), in, 6);
fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 6) == 0);
caps = gst_caps_from_string (VOLUME_CAPS_STRING_S24);
gst_buffer_set_caps (inbuffer, caps);
gst_caps_unref (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
/* FIXME: reffing the inbuffer should make the transformation not be
* inplace
gst_buffer_ref (inbuffer);
*/
/* pushing gives away my reference ... */
fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
/* ... but it ends up being modified inplace and
* collected on the global buffer list */
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);