stream-transport: add keep-alive method

This commit is contained in:
Wim Taymans 2012-11-12 17:11:18 +01:00
parent 75473fc88d
commit c7d20e5603
3 changed files with 18 additions and 5 deletions

View file

@ -216,3 +216,16 @@ gst_rtsp_stream_transport_send_rtcp (GstRTSPStreamTransport * trans,
return res;
}
/**
* gst_rtsp_stream_transport_keep_alive:
* @trans: a #GstRTSPStreamTransport
*
* Signal the installed keep_alive callback for @trans.
*/
void
gst_rtsp_stream_transport_keep_alive (GstRTSPStreamTransport * trans)
{
if (trans->keep_alive)
trans->keep_alive (trans->ka_user_data);
}

View file

@ -110,6 +110,8 @@ gboolean gst_rtsp_stream_transport_send_rtp (GstRTSPStreamT
gboolean gst_rtsp_stream_transport_send_rtcp (GstRTSPStreamTransport *trans,
GstBuffer *buffer);
void gst_rtsp_stream_transport_keep_alive (GstRTSPStreamTransport *trans);
G_END_DECLS
#endif /* __GST_RTSP_STREAM_TRANSPORT_H__ */

View file

@ -455,12 +455,10 @@ on_ssrc_active (GObject * session, GObject * source, GstRTSPStream * stream)
trans = check_transport (source, stream);
if (trans)
if (trans) {
GST_INFO ("%p: source %p in transport %p is active", stream, source, trans);
if (trans && trans->keep_alive)
trans->keep_alive (trans->ka_user_data);
gst_rtsp_stream_transport_keep_alive (trans);
}
#ifdef DUMP_STATS
{
GstStructure *stats;