gst_caps_unref (caps);
fail_if (gst_pad_get_current_caps (srcpad));
+ caps = gst_caps_new_empty_simple ("application/x-gdp");
+ gst_check_setup_events (mysrcpad, gdpdepay, caps, GST_FORMAT_BYTES);
+ gst_caps_unref (caps);
+
/* create caps and buffer packets and push them */
caps = gst_caps_from_string (AUDIO_CAPS_STRING);
fail_unless (pk->packet_from_caps (caps, 0, &len, &header, &payload));
gst_caps_unref (caps);
fail_if (gst_pad_get_current_caps (srcpad));
+ caps = gst_caps_new_empty_simple ("application/x-gdp");
+ gst_check_setup_events (mysrcpad, gdpdepay, caps, GST_FORMAT_BYTES);
+ gst_caps_unref (caps);
+
/* create caps and buffer packets and push them as one buffer */
caps = gst_caps_from_string (AUDIO_CAPS_STRING);
fail_unless (pk->packet_from_caps (caps, 0, &header_len, &caps_header,
gst_caps_unref (caps);
fail_if (gst_pad_get_current_caps (srcpad));
+ caps = gst_caps_new_empty_simple ("application/x-gdp");
+ gst_check_setup_events (mysrcpad, gdpdepay, caps, GST_FORMAT_BYTES);
+ gst_caps_unref (caps);
+
/* create a streamheader buffer and the caps containing it */
caps = gst_caps_from_string ("application/x-gst-test-streamheader");
structure = gst_caps_get_structure (caps, 0);
GstCaps *caps;
GstElement *gdppay;
GstBuffer *inbuffer, *outbuffer;
- GstSegment segment;
- GstEvent *event;
gchar *caps_string;
gint length;
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- GST_DEBUG ("new segment");
- gst_segment_init (&segment, GST_FORMAT_TIME);
- segment.stop = GST_SECOND;
- event = gst_event_new_segment (&segment);
- fail_unless (gst_pad_push_event (mysrcpad, event));
-
/* no buffer should be pushed yet, waiting for caps */
fail_unless_equals_int (g_list_length (buffers), 0);
GST_DEBUG ("first buffer");
inbuffer = gst_buffer_new_and_alloc (4);
caps = gst_caps_from_string (AUDIO_CAPS_STRING);
- gst_pad_set_caps (mysrcpad, caps);
+ gst_check_setup_events (mysrcpad, gdppay, caps, GST_FORMAT_TIME);
caps_string = gst_caps_to_string (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
GstCaps *caps, *sinkcaps;
GstElement *gdppay;
GstBuffer *inbuffer, *outbuffer, *shbuffer;
- GstSegment segment;
- GstEvent *event;
gchar *caps_string;
gint length;
GstStructure *structure;
const GValue *sh;
GArray *shbuffers;
-
gdppay = setup_gdppay_streamheader ();
fail_unless (gst_element_set_state (gdppay,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- GST_DEBUG ("new segment");
- gst_segment_init (&segment, GST_FORMAT_TIME);
- segment.stop = GST_SECOND;
- event = gst_event_new_segment (&segment);
- fail_unless (gst_pad_push_event (myshsrcpad, event));
-
/* no buffer should be pushed yet, still waiting for caps */
fail_unless_equals_int (g_list_length (buffers), 0);
g_value_unset (&array);
caps_string = gst_caps_to_string (caps);
- gst_pad_set_caps (myshsrcpad, caps);
+ gst_check_setup_events (myshsrcpad, gdppay, caps, GST_FORMAT_TIME);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
/* pushing gives away my reference */
GST_DEBUG ("first buffer");
inbuffer = gst_buffer_new_and_alloc (4);
caps = gst_caps_from_string (AUDIO_CAPS_STRING);
- gst_pad_set_caps (mysrcpad, caps);
+ gst_check_setup_events (mysrcpad, gdppay, caps, GST_FORMAT_TIME);
gst_caps_unref (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
GstCaps *caps;
GstElement *gdppay;
GstBuffer *inbuffer, *outbuffer;
- GstSegment segment;
- GstEvent *event;
gchar *caps_string;
gint length;
GstMapInfo map;
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
"could not set to playing");
- GST_DEBUG ("new segment");
- gst_segment_init (&segment, GST_FORMAT_TIME);
- event = gst_event_new_segment (&segment);
- fail_unless (gst_pad_push_event (mysrcpad, event));
-
/* no buffer should be pushed yet, waiting for caps */
fail_unless_equals_int (g_list_length (buffers), 0);
GST_DEBUG ("first buffer");
inbuffer = gst_buffer_new_and_alloc (4);
caps = gst_caps_from_string (AUDIO_CAPS_STRING);
- gst_pad_set_caps (mysrcpad, caps);
+ gst_check_setup_events (mysrcpad, gdppay, caps, GST_FORMAT_TIME);
caps_string = gst_caps_to_string (caps);
ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);