gst/rtpmanager/gstrtpbin.*: Add signal to notify listeners when a sender becomes...
[platform/upstream/gst-plugins-good.git] / gst / rtpmanager / rtpsession.h
index e14e2da..dd3fbc1 100644 (file)
@@ -72,6 +72,7 @@ typedef GstFlowReturn (*RTPSessionSendRTP) (RTPSession *sess, RTPSource *src, Gs
  * @sess: an #RTPSession
  * @src: the #RTPSource
  * @buffer: the RTCP buffer ready for sending
+ * @eos: if an EOS event should be pushed
  * @user_data: user data specified when registering
  *
  * This callback will be called when @sess has @buffer ready for sending to
@@ -79,7 +80,8 @@ typedef GstFlowReturn (*RTPSessionSendRTP) (RTPSession *sess, RTPSource *src, Gs
  *
  * Returns: a #GstFlowReturn.
  */
-typedef GstFlowReturn (*RTPSessionSendRTCP) (RTPSession *sess, RTPSource *src, GstBuffer *buffer, gpointer user_data);
+typedef GstFlowReturn (*RTPSessionSendRTCP) (RTPSession *sess, RTPSource *src, GstBuffer *buffer, 
+    gboolean eos, gpointer user_data);
 
 /**
  * RTPSessionSyncRTCP:
@@ -205,9 +207,6 @@ struct _RTPSession {
 
   GList         *conflicting_addresses;
   gboolean      change_ssrc;
-
-  /* for mapping clock time to NTP time */
-  GstClockTime  base_time;
 };
 
 /**
@@ -229,6 +228,7 @@ struct _RTPSessionClass {
   void (*on_bye_ssrc)       (RTPSession *sess, RTPSource *source);
   void (*on_bye_timeout)    (RTPSession *sess, RTPSource *source);
   void (*on_timeout)        (RTPSession *sess, RTPSource *source);
+  void (*on_sender_timeout) (RTPSession *sess, RTPSource *source);
 };
 
 GType rtp_session_get_type (void);
@@ -267,6 +267,10 @@ gchar*          rtp_session_get_sdes_string        (RTPSession *sess, GstRTCPSDE
 
 /* handling sources */
 RTPSource*      rtp_session_get_internal_source    (RTPSession *sess);
+
+void            rtp_session_set_internal_ssrc      (RTPSession *sess, guint32 ssrc);
+guint32         rtp_session_get_internal_ssrc      (RTPSession *sess);
+
 gboolean        rtp_session_add_source             (RTPSession *sess, RTPSource *src);
 guint           rtp_session_get_num_sources        (RTPSession *sess);
 guint           rtp_session_get_num_active_sources (RTPSession *sess);
@@ -275,17 +279,17 @@ RTPSource*      rtp_session_get_source_by_cname    (RTPSession *sess, const gcha
 RTPSource*      rtp_session_create_source          (RTPSession *sess);
 
 /* processing packets from receivers */
-GstFlowReturn   rtp_session_process_rtp            (RTPSession *sess, GstBuffer *buffer, guint64 ntpnstime);
-GstFlowReturn   rtp_session_process_rtcp           (RTPSession *sess, GstBuffer *buffer);
+GstFlowReturn   rtp_session_process_rtp            (RTPSession *sess, GstBuffer *buffer, GstClockTime current_time, guint64 ntpnstime);
+GstFlowReturn   rtp_session_process_rtcp           (RTPSession *sess, GstBuffer *buffer, GstClockTime current_time);
 
 /* processing packets for sending */
-GstFlowReturn   rtp_session_send_rtp               (RTPSession *sess, GstBuffer *buffer, guint64 ntpnstime);
+GstFlowReturn   rtp_session_send_rtp               (RTPSession *sess, GstBuffer *buffer, GstClockTime current_time, guint64 ntpnstime);
 
 /* stopping the session */
-GstFlowReturn   rtp_session_send_bye               (RTPSession *sess, const gchar *reason);
+GstFlowReturn   rtp_session_send_bye               (RTPSession *sess, const gchar *reason, GstClockTime current_time);
 
 /* get interval for next RTCP interval */
-GstClockTime    rtp_session_next_timeout           (RTPSession *sess, GstClockTime time);
-GstFlowReturn   rtp_session_on_timeout             (RTPSession *sess, GstClockTime time, guint64 ntpnstime);
+GstClockTime    rtp_session_next_timeout           (RTPSession *sess, GstClockTime current_time);
+GstFlowReturn   rtp_session_on_timeout             (RTPSession *sess, GstClockTime current_time, guint64 ntpnstime);
 
 #endif /* __RTP_SESSION_H__ */