Not all outgoing buffers are caught while using data probes
Submitted by Vavooon
Link to original bug (#795437)
Description
When I attach data probe to srcpad of rtph264pay
element it doesn't catch all buffer the element sends.
I'm adding a probe with
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER, (GstPadProbeCallback) cb_have_data, &m_latencyInfo, NULL);
and then writing down buffer info:
static GstPadProbeReturn
cb_have_data (GstPad *pad,
GstPadProbeInfo *info,
gpointer user_data) {
GstStructure *stats;
guint mtu, seqnum, timestamp;
gint seqnumOffset;
g_object_get (G_OBJECT (element), "stats", &stats, NULL);
g_object_get (G_OBJECT (element), "mtu", &mtu, NULL);
g_object_get (G_OBJECT (element), "seqnum", &seqnum, NULL);
g_object_get (G_OBJECT (element), "seqnum-offset", &seqnumOffset, NULL);&seqnum);
gst_structure_get_uint(stats, "timestamp", ×tamp);
log_debug("seqnum: % " PRIu32 " seqnum-offset: %" PRId32 " ts: %" PRIu32 " mtu: %" PRIu32 " size: %" PRId32,
seqnum, seqnumOffset, timestamp, mtu, gst_buffer_get_size(buffer));
}
With default MTU value 1400 it shows only small amount of sent buffers (or packets):
seqnum: 0 seqnum-offset: 0 ts: 2467070291 mtu: 1400 size: 14
seqnum: 1 seqnum-offset: 0 ts: 2467070291 mtu: 1400 size: 23
seqnum: 2 seqnum-offset: 0 ts: 2467070291 mtu: 1400 size: 16
seqnum: 163 seqnum-offset: 0 ts: 2467070291 mtu: 1400 size: 14
seqnum: 164 seqnum-offset: 0 ts: 2467070291 mtu: 1400 size: 23
seqnum: 165 seqnum-offset: 0 ts: 2467070291 mtu: 1400 size: 16
seqnum: 326 seqnum-offset: 0 ts: 2467160291 mtu: 1400 size: 14
seqnum: 327 seqnum-offset: 0 ts: 2467160291 mtu: 1400 size: 23
seqnum: 328 seqnum-offset: 0 ts: 2467160291 mtu: 1400 size: 16
seqnum: 489 seqnum-offset: 0 ts: 2467250291 mtu: 1400 size: 14
seqnum: 490 seqnum-offset: 0 ts: 2467250291 mtu: 1400 size: 23
seqnum: 491 seqnum-offset: 0 ts: 2467250291 mtu: 1400 size: 16
seqnum: 652 seqnum-offset: 0 ts: 2467340291 mtu: 1400 size: 14
seqnum: 653 seqnum-offset: 0 ts: 2467340291 mtu: 1400 size: 23
seqnum: 654 seqnum-offset: 0 ts: 2467340291 mtu: 1400 size: 16
seqnum: 815 seqnum-offset: 0 ts: 2467430291 mtu: 1400 size: 14
and doesn't show main packets with encoded video, only SPS/PPS ones (probably).
However all packets are displayed when I set MTU to value bigger than max packet size it produces:
seqnum: 0 seqnum-offset: 0 ts: 154585161 mtu: 957712 size: 14
seqnum: 1 seqnum-offset: 0 ts: 154585161 mtu: 957712 size: 23
seqnum: 2 seqnum-offset: 0 ts: 154585161 mtu: 957712 size: 16
seqnum: 3 seqnum-offset: 0 ts: 154585161 mtu: 957712 size: 220525
seqnum: 4 seqnum-offset: 0 ts: 154585161 mtu: 957712 size: 14
seqnum: 5 seqnum-offset: 0 ts: 154585161 mtu: 957712 size: 23
seqnum: 6 seqnum-offset: 0 ts: 154585161 mtu: 957712 size: 16
seqnum: 7 seqnum-offset: 0 ts: 154585161 mtu: 957712 size: 220784
seqnum: 8 seqnum-offset: 0 ts: 154675161 mtu: 957712 size: 14
seqnum: 9 seqnum-offset: 0 ts: 154675161 mtu: 957712 size: 23
seqnum: 10 seqnum-offset: 0 ts: 154675161 mtu: 957712 size: 16
seqnum: 11 seqnum-offset: 0 ts: 154675161 mtu: 957712 size: 220781
seqnum: 12 seqnum-offset: 0 ts: 154765161 mtu: 957712 size: 14
seqnum: 13 seqnum-offset: 0 ts: 154765161 mtu: 957712 size: 23
seqnum: 14 seqnum-offset: 0 ts: 154765161 mtu: 957712 size: 16
seqnum: 15 seqnum-offset: 0 ts: 154765161 mtu: 957712 size: 220575
seqnum: 16 seqnum-offset: 0 ts: 154855161 mtu: 957712 size: 14
Version: 1.14.0