pipelines_gio_CFLAGS = $(GIO_CFLAGS) $(AM_CFLAGS)
pipelines_gio_LDADD = $(GIO_LIBS) $(LDADD)
+pipelines_streamheader_CFLAGS = $(GIO_CFLAGS) $(AM_CFLAGS)
+pipelines_streamheader_LDADD = $(GIO_LIBS) $(LDADD)
+
pipelines_vorbisenc_CFLAGS = \
$(GST_PLUGINS_BASE_CFLAGS) \
$(AM_CFLAGS)
GST_DEBUG ("setup_appsink");
appsink = gst_check_setup_element ("appsink");
mysrcpad = gst_check_setup_src_pad (appsink, &srctemplate);
+ gst_pad_set_active (mysrcpad, TRUE);
return appsink;
}
/* check GstRTPHeader structure alignment and packing */
buf = gst_rtp_buffer_new_allocate (16, 4, 0);
fail_unless (buf != NULL);
- data = gst_buffer_map (buf, &size, NULL, GST_MAP_READ);
+ data = gst_buffer_map (buf, &size, NULL, GST_MAP_READWRITE);
fail_unless_equals_int (size, RTP_HEADER_LEN + 16 + 4);
gst_rtp_buffer_map (buf, GST_MAP_READWRITE, &rtp);
/* and again, this time with CSRCs */
buf = gst_rtp_buffer_new_allocate (16, 4, 3);
fail_unless (buf != NULL);
- data = gst_buffer_map (buf, &size, NULL, GST_MAP_READ);
+ data = gst_buffer_map (buf, &size, NULL, GST_MAP_READWRITE);
fail_unless_equals_int (size, RTP_HEADER_LEN + 16 + 4 + 4 * 3);
gst_rtp_buffer_map (buf, GST_MAP_READWRITE, &rtp);
/* check GstRTPHeader structure alignment and packing */
buf = gst_rtp_buffer_new_allocate (4, 0, 0);
- data = gst_buffer_map (buf, &bsize, NULL, GST_MAP_READ);
+ data = gst_buffer_map (buf, &bsize, NULL, GST_MAP_READWRITE);
gst_rtp_buffer_map (buf, GST_MAP_READWRITE, &rtp);
gst_buffer_unref (buf);
buf = gst_rtp_buffer_new_allocate (20, 0, 0);
- data = gst_buffer_map (buf, &bsize, NULL, GST_MAP_READ);
+ data = gst_buffer_map (buf, &bsize, NULL, GST_MAP_READWRITE);
gst_rtp_buffer_map (buf, GST_MAP_READWRITE, &rtp);
fail_unless (gst_rtp_buffer_get_extension (&rtp) == FALSE);
/* Test header extensions with a one byte header */
buf = gst_rtp_buffer_new_allocate (20, 0, 0);
- data = gst_buffer_map (buf, &bsize, NULL, GST_MAP_READ);
+ data = gst_buffer_map (buf, &bsize, NULL, GST_MAP_READWRITE);
gst_rtp_buffer_map (buf, GST_MAP_READWRITE, &rtp);
fail_unless (gst_rtp_buffer_get_extension (&rtp) == FALSE);
/* Test header extensions with a two bytes header */
buf = gst_rtp_buffer_new_allocate (20, 0, 0);
- data = gst_buffer_map (buf, &bsize, NULL, GST_MAP_READ);
+ data = gst_buffer_map (buf, &bsize, NULL, GST_MAP_READWRITE);
gst_rtp_buffer_map (buf, GST_MAP_READWRITE, &rtp);
fail_unless (gst_rtp_buffer_get_extension (&rtp) == FALSE);
#include <unistd.h>
+#include <gio/gio.h>
#include <gst/check/gstcheck.h>
#include <gst/check/gstbufferstraw.h>
#ifndef GST_DISABLE_PARSE
/* this tests a gdp-serialized tag from audiotestsrc being sent only once
- * to clients of multifdsink */
+ * to clients of multisocketsink */
static int n_tags = 0;
return GST_PAD_PROBE_OK;
}
-GST_START_TEST (test_multifdsink_gdp_tag)
+GST_START_TEST (test_multisocketsink_gdp_tag)
{
GstElement *p1, *p2;
GstElement *src, *sink, *depay;
GstPad *pad;
GMainLoop *loop;
int pfd[2];
+ GSocket *s[2];
loop = g_main_loop_new (NULL, FALSE);
p1 = gst_parse_launch ("audiotestsrc num-buffers=10 ! gdppay"
- " ! multifdsink name=p1sink", NULL);
+ " ! multisocketsink name=p1sink", NULL);
fail_if (p1 == NULL);
p2 = gst_parse_launch ("fdsrc name=p2src ! gdpdepay name=depay"
" ! fakesink name=p2sink signal-handoffs=True", NULL);
fail_if (pipe (pfd) == -1);
+ s[0] = g_socket_new_from_fd (pfd[0], NULL);
gst_element_set_state (p1, GST_STATE_READY);
sink = gst_bin_get_by_name (GST_BIN (p1), "p1sink");
- g_signal_emit_by_name (sink, "add", pfd[1], NULL);
+ g_signal_emit_by_name (sink, "add", s[1], NULL);
gst_object_unref (sink);
src = gst_bin_get_by_name (GST_BIN (p2), "p2src");
#ifdef HAVE_VORBIS
/* this tests gdp-serialized Vorbis header pages being sent only once
- * to clients of multifdsink; the gdp depayloader should deserialize
+ * to clients of multisocketsink; the gdp depayloader should deserialize
* exactly three in_caps buffers for the three header packets */
static int n_in_caps = 0;
return TRUE;
}
-GST_START_TEST (test_multifdsink_gdp_vorbisenc)
+GST_START_TEST (test_multisocketsink_gdp_vorbisenc)
{
GstElement *p1, *p2;
GstElement *src, *sink, *depay;
GstPad *pad;
GMainLoop *loop;
int pfd[2];
+ GSocket *s[2];
loop = g_main_loop_new (NULL, FALSE);
p1 = gst_parse_launch ("audiotestsrc num-buffers=10 ! audioconvert "
- " ! vorbisenc ! gdppay ! multifdsink name=p1sink", NULL);
+ " ! vorbisenc ! gdppay ! multisocketsink name=p1sink", NULL);
fail_if (p1 == NULL);
p2 = gst_parse_launch ("fdsrc name=p2src ! gdpdepay name=depay"
" ! fakesink name=p2sink signal-handoffs=True", NULL);
fail_if (pipe (pfd) == -1);
+ s[0] = g_socket_new_from_fd (pfd[0], NULL);
gst_element_set_state (p1, GST_STATE_READY);
sink = gst_bin_get_by_name (GST_BIN (p1), "p1sink");
- g_signal_emit_by_name (sink, "add", pfd[1], NULL);
+ g_signal_emit_by_name (sink, "add", s[1], NULL);
gst_object_unref (sink);
src = gst_bin_get_by_name (GST_BIN (p2), "p2src");
suite_add_tcase (s, tc_chain);
#ifndef GST_DISABLE_PARSE
- tcase_add_test (tc_chain, test_multifdsink_gdp_tag);
+ tcase_add_test (tc_chain, test_multisocketsink_gdp_tag);
#ifdef HAVE_VORBIS
- tcase_add_test (tc_chain, test_multifdsink_gdp_vorbisenc);
+ tcase_add_test (tc_chain, test_multisocketsink_gdp_vorbisenc);
#endif
#endif