return sizeof (RtpUlpFecHeader) + fec_level_hdr_get_size (fec_mask_long);
}
+#define ONE_64BIT G_GUINT64_CONSTANT(1)
+
guint64
rtp_ulpfec_packet_mask_from_seqnum (guint16 seq,
guint16 fec_seq_base, gboolean fec_mask_long)
{
gint seq_delta = gst_rtp_buffer_compare_seqnum (fec_seq_base, seq);
if (seq_delta >= 0
- && seq_delta <= RTP_ULPFEC_SEQ_BASE_OFFSET_MAX (fec_mask_long))
- return 1ULL << (RTP_ULPFEC_SEQ_BASE_OFFSET_MAX (TRUE) - seq_delta);
+ && seq_delta <= RTP_ULPFEC_SEQ_BASE_OFFSET_MAX (fec_mask_long)) {
+ return ONE_64BIT << (RTP_ULPFEC_SEQ_BASE_OFFSET_MAX (TRUE) - seq_delta);
+ }
return 0;
}
* @info: #RtpUlpFecMapInfo
*
* Unmap @info previously mapped with rtp_ulpfec_map_info_map() and unrefs the
- * buffer. For convinience can even be called even if rtp_ulpfec_map_info_map
+ * buffer. For convenience can even be called even if rtp_ulpfec_map_info_map
* returned FALSE
**/
void
}
}
+#ifndef GST_DISABLE_GST_DEBUG
void
rtp_ulpfec_log_rtppacket (GstDebugCategory * cat, GstDebugLevel level,
gpointer object, const gchar * name, GstRTPBuffer * rtp)
gst_rtp_buffer_get_packet_len (rtp) - MIN_RTP_HEADER_LEN,
gst_rtp_buffer_get_payload_len (rtp));
}
+#endif /* GST_DISABLE_GST_DEBUG */
+#ifndef GST_DISABLE_GST_DEBUG
void
rtp_ulpfec_log_fec_packet (GstDebugCategory * cat, GstDebugLevel level,
gpointer object, GstRTPBuffer * fecrtp)
fec_level_hdr = fec_hdr_get_level_hdr (fec_hdr);
GST_CAT_LEVEL_LOG (cat, level, object,
- "%-22s: protection_len=%u mask=0x%012lx",
+ "%-22s: protection_len=%u mask=0x%012" G_GINT64_MODIFIER "x",
"fec level header",
g_ntohs (fec_level_hdr->protection_len),
fec_level_hdr_get_mask (fec_level_hdr, fec_hdr->L));
}
+#endif /* GST_DISABLE_GST_DEBUG */