mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 16:18:16 +00:00
rtspsrc: factor out the connections
Keep a global connection for aggregate control but also keep stream connections for non-aggregate control. Add some helper methods to connect/close/flush the connections.
This commit is contained in:
parent
ddc214d322
commit
966ced2208
2 changed files with 398 additions and 215 deletions
File diff suppressed because it is too large
Load diff
|
@ -83,6 +83,16 @@ typedef struct _GstRTSPSrcClass GstRTSPSrcClass;
|
|||
#define GST_RTSP_CONN_LOCK(rtsp) (g_static_rec_mutex_lock (GST_RTSP_CONN_GET_LOCK(rtsp)))
|
||||
#define GST_RTSP_CONN_UNLOCK(rtsp) (g_static_rec_mutex_unlock (GST_RTSP_CONN_GET_LOCK(rtsp)))
|
||||
|
||||
typedef struct _GstRTSPConnInfo GstRTSPConnInfo;
|
||||
|
||||
struct _GstRTSPConnInfo {
|
||||
gchar *location;
|
||||
GstRTSPUrl *url;
|
||||
gchar *url_str;
|
||||
GstRTSPConnection *connection;
|
||||
gboolean connected;
|
||||
};
|
||||
|
||||
typedef struct _GstRTSPStream GstRTSPStream;
|
||||
|
||||
struct _GstRTSPStream {
|
||||
|
@ -121,12 +131,13 @@ struct _GstRTSPStream {
|
|||
gboolean container;
|
||||
/* original control url */
|
||||
gchar *control_url;
|
||||
/* fully qualified control url */
|
||||
gchar *setup_url;
|
||||
guint32 ssrc;
|
||||
guint32 seqbase;
|
||||
guint64 timebase;
|
||||
|
||||
/* per stream connection */
|
||||
GstRTSPConnInfo conninfo;
|
||||
|
||||
/* bandwidth */
|
||||
guint as_bandwidth;
|
||||
guint rs_bandwidth;
|
||||
|
@ -176,15 +187,13 @@ struct _GstRTSPSrc {
|
|||
/* mutex for protecting the connection */
|
||||
GStaticRecMutex *conn_rec_lock;
|
||||
|
||||
GstSDPMessage *sdp;
|
||||
gint numstreams;
|
||||
GList *streams;
|
||||
GstStructure *props;
|
||||
gboolean need_activate;
|
||||
|
||||
/* properties */
|
||||
gchar *location;
|
||||
gchar *req_location; /* Sanitised URL to use in network requests */
|
||||
GstRTSPUrl *url;
|
||||
GstRTSPLowerTrans protocols;
|
||||
gboolean debug;
|
||||
guint retry;
|
||||
|
@ -222,8 +231,7 @@ struct _GstRTSPSrc {
|
|||
gulong session_sig_id;
|
||||
gulong session_ptmap_id;
|
||||
|
||||
GstRTSPConnection *connection;
|
||||
gboolean connected;
|
||||
GstRTSPConnInfo conninfo;
|
||||
|
||||
/* a list of RTSP extensions as GstElement */
|
||||
GstRTSPExtensionList *extensions;
|
||||
|
|
Loading…
Reference in a new issue