diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-04-27 15:09:12 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-04-27 15:09:12 +0000 |
commit | a468f02d2aeabcf7e31d9e4cf576ab3474e8a1f7 (patch) | |
tree | 05189a20db17aeeace5ceeae55977bceeaf46667 /gst/rtpmanager/rtpstats.h | |
parent | e72bd2abf931cb60b32ae8f0e8e702e6fdbc1500 (diff) | |
download | gst-plugins-bad-a468f02d2aeabcf7e31d9e4cf576ab3474e8a1f7.tar.gz gst-plugins-bad-a468f02d2aeabcf7e31d9e4cf576ab3474e8a1f7.tar.bz2 gst-plugins-bad-a468f02d2aeabcf7e31d9e4cf576ab3474e8a1f7.zip |
gst/rtpmanager/gstrtpsession.c: Move reconsideration code to the rtpsession object.
Original commit message from CVS:
* gst/rtpmanager/gstrtpsession.c: (rtcp_thread),
(gst_rtp_session_send_rtcp), (gst_rtp_session_reconsider):
Move reconsideration code to the rtpsession object.
Simplify timout handling and add reconsideration.
* gst/rtpmanager/rtpsession.c: (rtp_session_class_init),
(rtp_session_init), (rtp_session_finalize), (on_bye_ssrc),
(on_bye_timeout), (on_timeout), (rtp_session_set_callbacks),
(obtain_source), (rtp_session_create_source),
(update_arrival_stats), (rtp_session_process_rtp),
(rtp_session_process_sr), (rtp_session_process_rr),
(rtp_session_process_bye), (rtp_session_process_rtcp),
(calculate_rtcp_interval), (rtp_session_send_bye),
(rtp_session_next_timeout), (session_start_rtcp),
(session_report_blocks), (session_cleanup), (session_sdes),
(session_bye), (is_rtcp_time), (rtp_session_on_timeout):
* gst/rtpmanager/rtpsession.h:
Handle timeout of inactive sources and senders.
Implement BYE scheduling.
* gst/rtpmanager/rtpsource.c: (calculate_jitter),
(rtp_source_process_sr), (rtp_source_get_last_sr),
(rtp_source_get_last_rb):
* gst/rtpmanager/rtpsource.h:
Add members to check for timeouts.
* gst/rtpmanager/rtpstats.c: (rtp_stats_init_defaults),
(rtp_stats_calculate_rtcp_interval), (rtp_stats_add_rtcp_jitter),
(rtp_stats_calculate_bye_interval):
* gst/rtpmanager/rtpstats.h:
Use RFC algorithm for calculating the reporting interval.
Diffstat (limited to 'gst/rtpmanager/rtpstats.h')
-rw-r--r-- | gst/rtpmanager/rtpstats.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/gst/rtpmanager/rtpstats.h b/gst/rtpmanager/rtpstats.h index e8ea9816..0ee1ed1e 100644 --- a/gst/rtpmanager/rtpstats.h +++ b/gst/rtpmanager/rtpstats.h @@ -134,7 +134,7 @@ typedef struct { * a network partition. */ #define RTP_STATS_MIN_INTERVAL 5.0 - /* +/* * Fraction of the RTCP bandwidth to be shared among active * senders. (This fraction was chosen so that in a typical * session with one or two active senders, the computed report @@ -145,6 +145,12 @@ typedef struct { #define RTP_STATS_SENDER_FRACTION (0.25) #define RTP_STATS_RECEIVER_FRACTION (1.0 - RTP_STATS_SENDER_FRACTION) +/* + * When receiving a BYE from a source, remove the source fomr the database + * after this timeout. + */ +#define RTP_STATS_BYE_TIMEOUT (2 * GST_SECOND) + /** * RTPSessionStats: * @@ -156,16 +162,17 @@ typedef struct { gdouble receiver_fraction; gdouble rtcp_bandwidth; gdouble min_interval; + GstClockTime bye_timeout; guint sender_sources; guint active_sources; guint avg_rtcp_packet_size; - guint avg_bye_packet_size; - gboolean sent_rtcp; + guint bye_members; } RTPSessionStats; void rtp_stats_init_defaults (RTPSessionStats *stats); -gdouble rtp_stats_calculate_rtcp_interval (RTPSessionStats *stats, gboolean sender); -gdouble rtp_stats_add_rtcp_jitter (RTPSessionStats *stats, gdouble interval); +GstClockTime rtp_stats_calculate_rtcp_interval (RTPSessionStats *stats, gboolean sender, gboolean first); +GstClockTime rtp_stats_add_rtcp_jitter (RTPSessionStats *stats, GstClockTime interval); +GstClockTime rtp_stats_calculate_bye_interval (RTPSessionStats *stats); #endif /* __RTP_STATS_H__ */ |