Commit f80444aa authored by Wim Taymans's avatar Wim Taymans

gst/rtsp/: Morph RTPDec into something compatible with RTPBin as a fallback.

Original commit message from CVS:
* gst/rtsp/Makefile.am:
* gst/rtsp/gstrtpdec.c: (find_session_by_id), (create_session),
(free_session), (gst_rtp_dec_base_init), (gst_rtp_dec_class_init),
(gst_rtp_dec_init), (gst_rtp_dec_finalize),
(gst_rtp_dec_query_src), (gst_rtp_dec_chain_rtp),
(gst_rtp_dec_chain_rtcp), (gst_rtp_dec_set_property),
(gst_rtp_dec_get_property), (gst_rtp_dec_provide_clock),
(gst_rtp_dec_change_state), (create_recv_rtp), (create_recv_rtcp),
(create_rtcp), (gst_rtp_dec_request_new_pad),
(gst_rtp_dec_release_pad):
* gst/rtsp/gstrtpdec.h:
* gst/rtsp/gstrtsp.c: (plugin_init):
Morph RTPDec into something compatible with RTPBin as a fallback.
Various other style fixes.
* gst/rtsp/gstrtspsrc.c: (find_stream_by_id),
(find_stream_by_udpsrc), (gst_rtspsrc_stream_free),
(gst_rtspsrc_cleanup), (gst_rtspsrc_media_to_caps),
(new_session_pad), (gst_rtspsrc_stream_configure_transport),
(gst_rtspsrc_activate_streams), (gst_rtspsrc_loop_interleaved),
(gst_rtspsrc_loop_udp), (gst_rtspsrc_setup_auth),
(gst_rtspsrc_handle_message), (gst_rtspsrc_change_state):
* gst/rtsp/gstrtspsrc.h:
Implement RTPBin session manager handling.
Don't try to add empty properties to caps.
Implement fallback session manager, handling.
Don't combine errors from RTCP streams, just ignore them.
* gst/rtsp/rtsptransport.c: (rtsp_transport_get_manager):
* gst/rtsp/rtsptransport.h:
Implement fallback session manager.
Make RTPBin the default one when available.
parent 86b40a1c
2007-04-06 Wim Taymans <wim@fluendo.com>
* gst/rtsp/Makefile.am:
* gst/rtsp/gstrtpdec.c: (find_session_by_id), (create_session),
(free_session), (gst_rtp_dec_base_init), (gst_rtp_dec_class_init),
(gst_rtp_dec_init), (gst_rtp_dec_finalize),
(gst_rtp_dec_query_src), (gst_rtp_dec_chain_rtp),
(gst_rtp_dec_chain_rtcp), (gst_rtp_dec_set_property),
(gst_rtp_dec_get_property), (gst_rtp_dec_provide_clock),
(gst_rtp_dec_change_state), (create_recv_rtp), (create_recv_rtcp),
(create_rtcp), (gst_rtp_dec_request_new_pad),
(gst_rtp_dec_release_pad):
* gst/rtsp/gstrtpdec.h:
* gst/rtsp/gstrtsp.c: (plugin_init):
Morph RTPDec into something compatible with RTPBin as a fallback.
Various other style fixes.
* gst/rtsp/gstrtspsrc.c: (find_stream_by_id),
(find_stream_by_udpsrc), (gst_rtspsrc_stream_free),
(gst_rtspsrc_cleanup), (gst_rtspsrc_media_to_caps),
(new_session_pad), (gst_rtspsrc_stream_configure_transport),
(gst_rtspsrc_activate_streams), (gst_rtspsrc_loop_interleaved),
(gst_rtspsrc_loop_udp), (gst_rtspsrc_setup_auth),
(gst_rtspsrc_handle_message), (gst_rtspsrc_change_state):
* gst/rtsp/gstrtspsrc.h:
Implement RTPBin session manager handling.
Don't try to add empty properties to caps.
Implement fallback session manager, handling.
Don't combine errors from RTCP streams, just ignore them.
* gst/rtsp/rtsptransport.c: (rtsp_transport_get_manager):
* gst/rtsp/rtsptransport.h:
Implement fallback session manager.
Make RTPBin the default one when available.
2007-04-05 Wim Taymans <wim@fluendo.com>
* gst/rtp/gstrtpmp4adepay.c: (gst_rtp_mp4a_depay_class_init),
......
......@@ -11,10 +11,12 @@ libgstrtsp_la_SOURCES = gstrtsp.c gstrtspsrc.c \
sdpmessage.c \
base64.c
libgstrtsp_la_CFLAGS = $(GST_CFLAGS)
libgstrtsp_la_LIBADD = $(GST_LIBS) $(WIN32_LIBS)
libgstrtsp_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
libgstrtsp_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) \
-lgstrtp-@GST_MAJORMINOR@ $(GST_LIBS) $(WIN32_LIBS)
libgstrtsp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
check_PROGRAMS = test
test_SOURCES = test.c rtspdefs.c rtspurl.c rtspconnection.c rtspmessage.c rtsptransport.c sdpmessage.c base64.c
......
This diff is collapsed.
......@@ -40,39 +40,36 @@
* SOFTWARE.
*/
#ifndef __GST_RTPDEC_H__
#define __GST_RTPDEC_H__
#ifndef __GST_RTP_DEC_H__
#define __GST_RTP_DEC_H__
#include <gst/gst.h>
G_BEGIN_DECLS
#define GST_TYPE_RTPDEC (gst_rtpdec_get_type())
#define GST_IS_RTPDEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTPDEC))
#define GST_IS_RTPDEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTPDEC))
#define GST_RTPDEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTPDEC, GstRTPDec))
#define GST_RTPDEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTPDEC, GstRTPDecClass))
#define GST_TYPE_RTP_DEC (gst_rtp_dec_get_type())
#define GST_IS_RTP_DEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_DEC))
#define GST_IS_RTP_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_DEC))
#define GST_RTP_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_DEC, GstRTPDec))
#define GST_RTP_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_DEC, GstRTPDecClass))
typedef struct _GstRTPDec GstRTPDec;
typedef struct _GstRTPDecClass GstRTPDecClass;
typedef struct _GstRTPDecSession GstRTPDecSession;
struct _GstRTPDec {
GstElement element;
GstElement element;
GstPad *sink_rtp;
GstPad *sink_rtcp;
GstPad *src_rtp;
GstPad *src_rtcp;
GSList *sessions;
GstClock *provided_clock;
};
struct _GstRTPDecClass {
GstElementClass parent_class;
};
gboolean gst_rtpdec_plugin_init (GstPlugin * plugin);
GType gst_rtpdec_get_type(void);
GType gst_rtp_dec_get_type(void);
G_END_DECLS
#endif /* __GST_RTPDEC_H__ */
#endif /* __GST_RTP_DEC_H__ */
......@@ -54,7 +54,7 @@ plugin_init (GstPlugin * plugin)
if (!gst_element_register (plugin, "rtspsrc", GST_RANK_NONE,
GST_TYPE_RTSPSRC))
return FALSE;
if (!gst_element_register (plugin, "rtpdec", GST_RANK_NONE, GST_TYPE_RTPDEC))
if (!gst_element_register (plugin, "rtpdec", GST_RANK_NONE, GST_TYPE_RTP_DEC))
return FALSE;
return TRUE;
......
This diff is collapsed.
......@@ -97,9 +97,6 @@ struct _GstRTSPStream {
/* our udp sink back to the server */
GstElement *udpsink;
/* the session manager */
GstElement *sess;
/* state */
gint pt;
gboolean container;
......@@ -149,6 +146,10 @@ struct _GstRTSPSrc {
/* supported methods */
gint methods;
/* session management */
GstElement *session;
gulong session_sig_id;
RTSPConnection *connection;
RTSPExtensionCtx *extension;
......
......@@ -45,19 +45,21 @@
#include "rtsptransport.h"
#define MAX_MANAGERS 2
typedef struct
{
const gchar *name;
const RTSPTransMode mode;
const gchar *gst_mime;
const gchar *manager;
const gchar *manager[MAX_MANAGERS];
} RTSPTransMap;
static const RTSPTransMap transports[] = {
{"rtp", RTSP_TRANS_RTP, "application/x-rtp", "rtpdec"},
{"x-real-rdt", RTSP_TRANS_RDT, "application/x-rdt", NULL},
{"x-pn-tng", RTSP_TRANS_RDT, "application/x-rdt", NULL},
{NULL, RTSP_TRANS_UNKNOWN, NULL, NULL}
{"rtp", RTSP_TRANS_RTP, "application/x-rtp", {"rtpbin", "rtpdec"}},
{"x-real-rdt", RTSP_TRANS_RDT, "application/x-rdt", {NULL, NULL}},
{"x-pn-tng", RTSP_TRANS_RDT, "application/x-rdt", {NULL, NULL}},
{NULL, RTSP_TRANS_UNKNOWN, NULL, {NULL, NULL}}
};
typedef struct
......@@ -135,7 +137,8 @@ rtsp_transport_get_mime (RTSPTransMode trans, const gchar ** mime)
}
RTSPResult
rtsp_transport_get_manager (RTSPTransMode trans, const gchar ** manager)
rtsp_transport_get_manager (RTSPTransMode trans, const gchar ** manager,
guint option)
{
gint i;
......@@ -144,7 +147,11 @@ rtsp_transport_get_manager (RTSPTransMode trans, const gchar ** manager)
for (i = 0; transports[i].name; i++)
if (transports[i].mode == trans)
break;
*manager = transports[i].manager;
if (option < MAX_MANAGERS)
*manager = transports[i].manager[option];
else
*manager = NULL;
return RTSP_OK;
}
......
......@@ -103,7 +103,7 @@ RTSPResult rtsp_transport_init (RTSPTransport *transport);
RTSPResult rtsp_transport_parse (const gchar *str, RTSPTransport *transport);
RTSPResult rtsp_transport_get_mime (RTSPTransMode trans, const gchar **mime);
RTSPResult rtsp_transport_get_manager (RTSPTransMode trans, const gchar **manager);
RTSPResult rtsp_transport_get_manager (RTSPTransMode trans, const gchar **manager, guint option);
RTSPResult rtsp_transport_free (RTSPTransport *transport);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment