media: disconnect from signal handlers in unprepare()
[platform/upstream/gstreamer.git] / gst / rtsp-server / rtsp-stream.h
index 29a813b..ba3bf40 100644 (file)
@@ -13,8 +13,8 @@
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 #include <gst/gst.h>
@@ -38,76 +38,21 @@ G_BEGIN_DECLS
 
 typedef struct _GstRTSPStream GstRTSPStream;
 typedef struct _GstRTSPStreamClass GstRTSPStreamClass;
+typedef struct _GstRTSPStreamPrivate GstRTSPStreamPrivate;
 
 #include "rtsp-stream-transport.h"
+#include "rtsp-address-pool.h"
 
 /**
  * GstRTSPStream:
  * @parent: the parent instance
- * @idx: the stream index
- * @srcpad: the srcpad of the stream
- * @payloader: the payloader of the format
- * @is_ipv6: should this stream be IPv6
- * @buffer_size: the UDP buffer size
- * @is_joined: if the stream is joined in a bin
- * @recv_rtp_sink: sinkpad for RTP buffers
- * @recv_rtcp_sink: sinkpad for RTCP buffers
- * @send_rtp_src: srcpad for RTP buffers
- * @send_rtcp_src: srcpad for RTCP buffers
- * @udpsrc: the udp source elements for RTP/RTCP
- * @udpsink: the udp sink elements for RTP/RTCP
- * @appsrc: the app source elements for RTP/RTCP
- * @appsink: the app sink elements for RTP/RTCP
- * @server_port: the server ports for this stream
- * @caps_sig: the signal id for detecting caps
- * @caps: the caps of the stream
- * @n_active: the number of active transports in @transports
- * @tranports: list of #GstStreamTransport being streamed to
  *
- * The definition of a media stream. The streams are identified by @id.
+ * The definition of a media stream.
  */
 struct _GstRTSPStream {
   GObject       parent;
 
-  guint         idx;
-  GstPad       *srcpad;
-  GstElement   *payloader;
-  gboolean      is_ipv6;
-  guint         buffer_size;
-  gboolean      is_joined;
-
-  /* pads on the rtpbin */
-  GstPad       *recv_rtcp_sink;
-  GstPad       *recv_rtp_sink;
-  GstPad       *send_rtp_sink;
-  GstPad       *send_rtp_src;
-  GstPad       *send_rtcp_src;
-
-  /* the RTPSession object */
-  GObject      *session;
-
-  /* sinks used for sending and receiving RTP and RTCP, they share
-   * sockets */
-  GstElement   *udpsrc[2];
-  GstElement   *udpsink[2];
-  /* for TCP transport */
-  GstElement   *appsrc[2];
-  GstElement   *appqueue[2];
-  GstElement   *appsink[2];
-
-  GstElement   *tee[2];
-  GstElement   *selector[2];
-
-  /* server ports for sending/receiving */
-  GstRTSPRange  server_port;
-
-  /* the caps of the stream */
-  gulong        caps_sig;
-  GstCaps      *caps;
-
-  /* transports we stream to */
-  guint         n_active;
-  GList        *transports;
+  GstRTSPStreamPrivate *priv;
 };
 
 struct _GstRTSPStreamClass {
@@ -118,14 +63,37 @@ GType             gst_rtsp_stream_get_type         (void);
 
 GstRTSPStream *   gst_rtsp_stream_new              (guint idx, GstElement *payloader,
                                                     GstPad *srcpad);
+guint             gst_rtsp_stream_get_index        (GstRTSPStream *stream);
 
-gboolean          gst_rtsp_stream_join_bin         (GstRTSPStream * stream,
-                                                    GstBin *bin, GstElement *rtpbin);
-gboolean          gst_rtsp_stream_leave_bin        (GstRTSPStream * stream,
+void              gst_rtsp_stream_set_mtu          (GstRTSPStream *stream, guint mtu);
+guint             gst_rtsp_stream_get_mtu          (GstRTSPStream *stream);
+
+void              gst_rtsp_stream_set_address_pool (GstRTSPStream *stream, GstRTSPAddressPool *pool);
+GstRTSPAddressPool *
+                  gst_rtsp_stream_get_address_pool (GstRTSPStream *stream);
+
+GstRTSPAddress *  gst_rtsp_stream_get_address      (GstRTSPStream *stream);
+
+GstRTSPAddress *  gst_rtsp_stream_reserve_address  (GstRTSPStream *stream,
+                                                    const gchar * address,
+                                                    guint port,
+                                                    guint n_ports,
+                                                    guint ttl);
+
+gboolean          gst_rtsp_stream_join_bin         (GstRTSPStream *stream,
+                                                    GstBin *bin, GstElement *rtpbin,
+                                                    GstState state);
+gboolean          gst_rtsp_stream_leave_bin        (GstRTSPStream *stream,
                                                     GstBin *bin, GstElement *rtpbin);
 
-gboolean          gst_rtsp_stream_get_rtpinfo      (GstRTSPStream * stream,
-                                                    guint *rtptime, guint * seq);
+void              gst_rtsp_stream_get_server_port  (GstRTSPStream *stream,
+                                                    GstRTSPRange *server_port);
+void              gst_rtsp_stream_get_ssrc         (GstRTSPStream *stream,
+                                                    guint *ssrc);
+
+gboolean          gst_rtsp_stream_get_rtpinfo      (GstRTSPStream *stream,
+                                                    guint *rtptime, guint *seq);
+GstCaps *         gst_rtsp_stream_get_caps         (GstRTSPStream *stream);
 
 GstFlowReturn     gst_rtsp_stream_recv_rtp         (GstRTSPStream *stream,
                                                     GstBuffer *buffer);