GstFlowReturn flow_ret;
GstMapInfo map;
+ GST_DEBUG_OBJECT (self, "Processing received buffer %" GST_PTR_FORMAT, buf);
+
if (!gst_buffer_map (buf, &map, GST_MAP_READ)) {
- GST_WARNING_OBJECT (self, "Could not map GstBuffer");
+ GST_ERROR_OBJECT (self, "Could not map GstBuffer");
gst_buffer_unref (buf);
return GST_FLOW_ERROR;
}
GstFlowReturn flow_ret;
buffer = GST_BUFFER (item->object);
+ GST_DEBUG_OBJECT (pad, "Forwarding buffer %" GST_PTR_FORMAT, buffer);
flow_ret = gst_pad_push (pad, buffer);
item->object = NULL;
gchar *pad_name;
GstPad *srcpad;
+ GST_DEBUG_OBJECT (self, "Stream %u reset", stream_id);
+
pad_name = g_strdup_printf ("src_%hu", stream_id);
srcpad = gst_element_get_static_pad (GST_ELEMENT (self), pad_name);
g_free (pad_name);
src_pad = get_pad_for_stream_id (self, stream_id);
g_assert (src_pad);
+ GST_DEBUG_OBJECT (src_pad,
+ "Received incoming packet of size %" G_GSIZE_FORMAT
+ " with stream id %u ppid %u", length, stream_id, ppid);
+
sctpdec_pad = GST_SCTP_DEC_PAD (src_pad);
gstbuf =
gst_buffer_new_wrapped_full (0, buf, length, 0, length, buf,
if (gst_data_queue_pop (self->outbound_sctp_packet_queue, &item)) {
GstBuffer *buffer = GST_BUFFER (item->object);
+ GST_DEBUG_OBJECT (self, "Forwarding buffer %" GST_PTR_FORMAT, buffer);
+
flow_ret = gst_pad_push (self->src_pad, buffer);
item->object = NULL;
}
}
+ GST_DEBUG_OBJECT (pad,
+ "Sending buffer %" GST_PTR_FORMAT
+ " with ppid %u ordered %d pr %d pr_param %u", buffer, ppid, ordered, pr,
+ pr_param);
+
if (!gst_buffer_map (buffer, &map, GST_MAP_READ)) {
- g_warning ("Could not map GstBuffer");
+ GST_ERROR_OBJECT (pad, "Could not map GstBuffer");
goto error;
}
} else if (bytes_sent < length && !sctpenc_pad->flushing) {
gint64 end_time = g_get_monotonic_time () + BUFFER_FULL_SLEEP_TIME;
+ GST_TRACE_OBJECT (pad, "Sent only %u of %u remaining bytes, waiting",
+ bytes_sent, length);
+
sctpenc_pad->bytes_sent += bytes_sent;
data += bytes_sent;
length -= bytes_sent;
g_queue_remove (&self->pending_pads, sctpenc_pad);
GST_OBJECT_UNLOCK (self);
} else if (bytes_sent == length) {
+ GST_DEBUG_OBJECT (pad, "Successfully sent buffer");
sctpenc_pad->bytes_sent += bytes_sent;
break;
}
GstCaps *caps;
gst_event_parse_caps (event, &caps);
+ GST_DEBUG_OBJECT (pad, "Received new caps %" GST_PTR_FORMAT, caps);
get_config_from_caps (caps, &sctpenc_pad->ordered,
&sctpenc_pad->reliability, &sctpenc_pad->reliability_param, &new_ppid,
&is_new_ppid);
gint state;
g_object_get (sctp_association, "state", &state, NULL);
+
+ GST_DEBUG_OBJECT (self, "Association state changed to %d", state);
+
switch (state) {
case GST_SCTP_ASSOCIATION_STATE_NEW:
break;
GList *pending_pads, *l;
GstSctpEncPad *sctpenc_pad;
+ GST_DEBUG_OBJECT (self, "Received output packet of size %" G_GSIZE_FORMAT,
+ length);
+
gstbuf = gst_buffer_new_wrapped (g_memdup (buf, length), length);
item = g_new0 (GstDataQueueItem, 1);