mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
stream-transport: add keep-alive method
This commit is contained in:
parent
75473fc88d
commit
c7d20e5603
3 changed files with 18 additions and 5 deletions
|
@ -216,3 +216,16 @@ gst_rtsp_stream_transport_send_rtcp (GstRTSPStreamTransport * trans,
|
||||||
|
|
||||||
return res;
|
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);
|
||||||
|
}
|
||||||
|
|
|
@ -110,6 +110,8 @@ gboolean gst_rtsp_stream_transport_send_rtp (GstRTSPStreamT
|
||||||
gboolean gst_rtsp_stream_transport_send_rtcp (GstRTSPStreamTransport *trans,
|
gboolean gst_rtsp_stream_transport_send_rtcp (GstRTSPStreamTransport *trans,
|
||||||
GstBuffer *buffer);
|
GstBuffer *buffer);
|
||||||
|
|
||||||
|
void gst_rtsp_stream_transport_keep_alive (GstRTSPStreamTransport *trans);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_RTSP_STREAM_TRANSPORT_H__ */
|
#endif /* __GST_RTSP_STREAM_TRANSPORT_H__ */
|
||||||
|
|
|
@ -455,12 +455,10 @@ on_ssrc_active (GObject * session, GObject * source, GstRTSPStream * stream)
|
||||||
|
|
||||||
trans = check_transport (source, stream);
|
trans = check_transport (source, stream);
|
||||||
|
|
||||||
if (trans)
|
if (trans) {
|
||||||
GST_INFO ("%p: source %p in transport %p is active", stream, source, trans);
|
GST_INFO ("%p: source %p in transport %p is active", stream, source, trans);
|
||||||
|
gst_rtsp_stream_transport_keep_alive (trans);
|
||||||
if (trans && trans->keep_alive)
|
}
|
||||||
trans->keep_alive (trans->ka_user_data);
|
|
||||||
|
|
||||||
#ifdef DUMP_STATS
|
#ifdef DUMP_STATS
|
||||||
{
|
{
|
||||||
GstStructure *stats;
|
GstStructure *stats;
|
||||||
|
|
Loading…
Reference in a new issue