session: place SSRC in Retransmission event

This commit is contained in:
Wim Taymans 2014-01-02 14:46:11 +01:00
parent 5f360f3b13
commit 03e4a180da
3 changed files with 8 additions and 6 deletions

View file

@ -273,7 +273,7 @@ static void gst_rtp_session_request_key_unit (RTPSession * sess,
static GstClockTime gst_rtp_session_request_time (RTPSession * session, static GstClockTime gst_rtp_session_request_time (RTPSession * session,
gpointer user_data); gpointer user_data);
static void gst_rtp_session_notify_nack (RTPSession * sess, static void gst_rtp_session_notify_nack (RTPSession * sess,
guint16 seqnum, guint16 blp, gpointer user_data); guint16 seqnum, guint16 blp, guint32 ssrc, gpointer user_data);
static RTPSessionCallbacks callbacks = { static RTPSessionCallbacks callbacks = {
gst_rtp_session_process_rtp, gst_rtp_session_process_rtp,
@ -2419,7 +2419,7 @@ gst_rtp_session_request_time (RTPSession * session, gpointer user_data)
static void static void
gst_rtp_session_notify_nack (RTPSession * sess, guint16 seqnum, gst_rtp_session_notify_nack (RTPSession * sess, guint16 seqnum,
guint16 blp, gpointer user_data) guint16 blp, guint32 ssrc, gpointer user_data)
{ {
GstRtpSession *rtpsession = GST_RTP_SESSION (user_data); GstRtpSession *rtpsession = GST_RTP_SESSION (user_data);
GstEvent *event; GstEvent *event;
@ -2434,7 +2434,8 @@ gst_rtp_session_notify_nack (RTPSession * sess, guint16 seqnum,
while (TRUE) { while (TRUE) {
event = gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, event = gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
gst_structure_new ("GstRTPRetransmissionRequest", gst_structure_new ("GstRTPRetransmissionRequest",
"seqnum", G_TYPE_UINT, (guint) seqnum, NULL)); "seqnum", G_TYPE_UINT, (guint) seqnum,
"ssrc", G_TYPE_UINT, (guint) ssrc, NULL));
gst_pad_push_event (send_rtp_sink, event); gst_pad_push_event (send_rtp_sink, event);
if (blp == 0) if (blp == 0)

View file

@ -2368,10 +2368,10 @@ rtp_session_process_nack (RTPSession * sess, guint32 sender_ssrc,
seqnum = GST_READ_UINT16_BE (fci_data); seqnum = GST_READ_UINT16_BE (fci_data);
blp = GST_READ_UINT16_BE (fci_data + 2); blp = GST_READ_UINT16_BE (fci_data + 2);
GST_DEBUG ("NACK #%u, blp %04x", seqnum, blp); GST_DEBUG ("NACK #%u, blp %04x, SSRC 0x%08x", seqnum, blp, media_ssrc);
RTP_SESSION_UNLOCK (sess); RTP_SESSION_UNLOCK (sess);
sess->callbacks.notify_nack (sess, seqnum, blp, sess->callbacks.notify_nack (sess, seqnum, blp, media_ssrc,
sess->notify_nack_user_data); sess->notify_nack_user_data);
RTP_SESSION_LOCK (sess); RTP_SESSION_LOCK (sess);

View file

@ -147,12 +147,13 @@ typedef GstClockTime (*RTPSessionRequestTime) (RTPSession *sess,
* @sess: an #RTPSession * @sess: an #RTPSession
* @seqnum: the missing seqnum * @seqnum: the missing seqnum
* @blp: other missing seqnums * @blp: other missing seqnums
* @ssrc: SSRC of requested stream
* @user_data: user data specified when registering * @user_data: user data specified when registering
* *
* Notifies of NACKed frames. * Notifies of NACKed frames.
*/ */
typedef void (*RTPSessionNotifyNACK) (RTPSession *sess, typedef void (*RTPSessionNotifyNACK) (RTPSession *sess,
guint16 seqnum, guint16 blp, gpointer user_data); guint16 seqnum, guint16 blp, guint32 ssrc, gpointer user_data);
/** /**
* RTPSessionCallbacks: * RTPSessionCallbacks: