* Chain list function for testing buffer lists
*/
static GstFlowReturn
-rtp_pipeline_chain_list (GstPad * pad, GstBufferList * list)
+rtp_pipeline_chain_list (GstPad * pad, GstObject * parent, GstBufferList * list)
{
- GstBufferListIterator *it;
+ guint i, len;
fail_if (!list);
- it = gst_buffer_list_iterate (list);
-
/*
* Count the size of the payload in the buffer list.
*/
+ len = gst_buffer_list_length (list);
/* Loop through all groups */
- while (gst_buffer_list_iterator_next_group (it)) {
+ for (i = 0; i < len; i++) {
GstBuffer *paybuf;
- /* Skip the first buffer in the group, its the RTP header */
- fail_if (!gst_buffer_list_iterator_next (it));
-
+ /* FIXME need to discard RTP header */
+ paybuf = gst_buffer_list_get (list, i);
/* Loop through all payload buffers in the current group */
- while ((paybuf = gst_buffer_list_iterator_next (it))) {
- chain_list_bytes_received += GST_BUFFER_SIZE (paybuf);
- }
+ chain_list_bytes_received += gst_buffer_get_size (paybuf);
}
-
- gst_buffer_list_iterator_free (it);
gst_buffer_list_unref (list);
return GST_FLOW_OK;
for (j = 0; j < p->frame_count; j++) {
GstBuffer *buf;
- buf = gst_buffer_new ();
- GST_BUFFER_DATA (buf) = (guint8 *) data;
- GST_BUFFER_SIZE (buf) = p->frame_data_size;
- GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_READONLY);
+ buf =
+ gst_buffer_new_wrapped_full ((guint8 *) data, NULL, 0,
+ p->frame_data_size);
g_signal_emit_by_name (p->appsrc, "push-buffer", buf, &flow_ret);
fail_unless_equals_int (flow_ret, GST_FLOW_OK);
{
rtp_pipeline_test (rtp_L16_frame_data, rtp_L16_frame_data_size,
rtp_L16_frame_count,
- "audio/x-raw-int,endianess=4321,signed=true,width=16,depth=16,rate=1,channels=1",
+ "audio/x-raw,format=S16_BE,rate=1,channels=1",
"rtpL16pay", "rtpL16depay", 0, 0, FALSE);
}