Merge branch 'upstream/1.16' into tizen_gst_1.16.2
[platform/upstream/gst-plugins-good.git] / gst / rtsp / gstrtspsrc.h
index 0c8bccd..f1b6d9c 100644 (file)
@@ -159,6 +159,7 @@ struct _GstRTSPStream {
   gboolean      eos;
   gboolean      discont;
   gboolean      need_caps;
+  gboolean      waiting_setup_response;
 
   /* for interleaved mode */
   guint8        channel[2];
@@ -174,8 +175,8 @@ struct _GstRTSPStream {
   GstElement   *udpsink[2];
   GstPad       *rtcppad;
 
-  /* fakesrc for sending dummy data */
-  GstElement   *fakesrc;
+  /* fakesrc for sending dummy data or appsrc for sending backchannel data */
+  GstElement   *rtpsrc;
 
   /* state */
   guint         port;
@@ -212,11 +213,29 @@ struct _GstRTSPStream {
   gchar        *destination;
   gboolean      is_multicast;
   guint         ttl;
+  gboolean      is_backchannel;
+
+  /* A unique and stable id we will use for the stream start event */
+  gchar *stream_id;
 
   GstStructure     *rtx_pt_map;
+
+  guint32       segment_seqnum[2];
 };
 
 /**
+ * GstRTSPSrcTimeoutCause:
+ * @GST_RTSP_SRC_TIMEOUT_CAUSE_RTCP: timeout triggered by RTCP
+ *
+ * Different causes to why the rtspsrc generated the GstRTSPSrcTimeout
+ * message.
+ */
+typedef enum
+{
+  GST_RTSP_SRC_TIMEOUT_CAUSE_RTCP
+} GstRTSPSrcTimeoutCause;
+
+/**
  * GstRTSPNatMethod:
  * @GST_RTSP_NAT_NONE: none
  * @GST_RTSP_NAT_DUMMY: send dummy packets
@@ -229,6 +248,7 @@ typedef enum
   GST_RTSP_NAT_DUMMY
 } GstRTSPNatMethod;
 
+
 struct _GstRTSPSrc {
   GstBin           parent;
 
@@ -247,6 +267,7 @@ struct _GstRTSPSrc {
   /* UDP mode loop */
   gint             pending_cmd;
   gint             busy_cmd;
+  GCond            cmd_cond;
   gboolean         ignore_timeout;
   gboolean         open_error;
 
@@ -299,6 +320,11 @@ struct _GstRTSPSrc {
   gchar            *user_agent;
   GstClockTime      max_rtcp_rtp_time_diff;
   gboolean          rfc7273_sync;
+  guint64           max_ts_offset_adjustment;
+  gint64            max_ts_offset;
+  gboolean          max_ts_offset_is_set;
+  gint              backchannel;
+  GstClockTime      teardown_timeout;
 
   /* state */
   GstRTSPState       state;
@@ -315,7 +341,15 @@ struct _GstRTSPSrc {
   /* supported methods */
   gint               methods;
 
-  gboolean           seekable;
+  /* seekability
+   * -1.0 : Stream is not seekable
+   *  0.0 : seekable only to the beginning
+   * G_MAXFLOAT : Any value is possible
+   *
+   * Any other positive value indicates the longest duration
+   * between any two random access points
+   *  */
+  gfloat             seekable;
   GstClockTime       last_pos;
 
   /* session management */
@@ -335,18 +369,30 @@ struct _GstRTSPSrc {
 
   GstRTSPConnInfo  conninfo;
 
+  /* SET/GET PARAMETER requests queue */
+  GQueue set_get_param_q;
+
   /* a list of RTSP extensions as GstElement */
   GstRTSPExtensionList  *extensions;
 
+  GstRTSPVersion default_version;
+  GstRTSPVersion version;
+
 #ifdef TIZEN_FEATURE_RTSP_MODIFICATION
   GCond open_end;
   GMutex pause_lock;
   guint64 start_position;
-#endif
+#endif  
 };
 
 struct _GstRTSPSrcClass {
   GstBinClass parent_class;
+
+ /* action signals */
+  gboolean (*get_parameter) (GstRTSPSrc *rtsp, const gchar *parameter, const gchar *content_type, GstPromise *promise);
+  gboolean (*get_parameters) (GstRTSPSrc *rtsp, gchar **parameters, const gchar *content_type, GstPromise *promise);
+  gboolean (*set_parameter) (GstRTSPSrc *rtsp, const gchar *name, const gchar *value, const gchar *content_type, GstPromise *promise);
+  GstFlowReturn (*push_backchannel_buffer) (GstRTSPSrc *src, guint id, GstSample *sample);
 };
 
 GType gst_rtspsrc_get_type(void);