From 8a822e70be69a3c54bcea2e68a050a0c5a871142 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 7 Mar 2008 15:48:51 +0000 Subject: [PATCH] gst/: Remove GstPollMode from gstpoll constructor. Original commit message from CVS: * gst-libs/gst/rtsp/gstrtspconnection.c: (gst_rtsp_connection_create): * gst/tcp/gstmultifdsink.c: (gst_fdset_mode_get_type), (gst_multi_fd_sink_class_init), (gst_multi_fd_sink_start): * gst/tcp/gstmultifdsink.h: * gst/tcp/gsttcpclientsrc.c: (gst_tcp_client_src_start): * gst/tcp/gsttcpserversrc.c: (gst_tcp_server_src_start): Remove GstPollMode from gstpoll constructor. --- ChangeLog | 11 +++++++++++ common | 2 +- gst-libs/gst/rtsp/gstrtspconnection.c | 2 +- gst/tcp/gstmultifdsink.c | 27 ++++++++++++++++++++++++--- gst/tcp/gstmultifdsink.h | 2 +- gst/tcp/gsttcpclientsrc.c | 2 +- gst/tcp/gsttcpserversrc.c | 2 +- 7 files changed, 40 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 52c79e2..3cb69ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-03-07 Wim Taymans + + * gst-libs/gst/rtsp/gstrtspconnection.c: + (gst_rtsp_connection_create): + * gst/tcp/gstmultifdsink.c: (gst_fdset_mode_get_type), + (gst_multi_fd_sink_class_init), (gst_multi_fd_sink_start): + * gst/tcp/gstmultifdsink.h: + * gst/tcp/gsttcpclientsrc.c: (gst_tcp_client_src_start): + * gst/tcp/gsttcpserversrc.c: (gst_tcp_server_src_start): + Remove GstPollMode from gstpoll constructor. + 2008-03-04 Jan Schmidt * configure.ac: diff --git a/common b/common index 081a00a..e02bd43 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 081a00a5e25d069b15bb7f6092c8f951462cd8eb +Subproject commit e02bd43fe6b9e45536eccbf5b7a5f9eae62030fd diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index c2a2f0d..759d4fe 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -139,7 +139,7 @@ gst_rtsp_connection_create (GstRTSPUrl * url, GstRTSPConnection ** conn) newconn = g_new0 (GstRTSPConnection, 1); - if ((newconn->fdset = gst_poll_new (GST_POLL_MODE_AUTO, TRUE)) == NULL) + if ((newconn->fdset = gst_poll_new (TRUE)) == NULL) goto no_fdset; newconn->url = url; diff --git a/gst/tcp/gstmultifdsink.c b/gst/tcp/gstmultifdsink.c index 6f6a092..e918866 100644 --- a/gst/tcp/gstmultifdsink.c +++ b/gst/tcp/gstmultifdsink.c @@ -167,9 +167,10 @@ enum LAST_SIGNAL }; + /* this is really arbitrarily chosen */ #define DEFAULT_PROTOCOL GST_TCP_PROTOCOL_NONE -#define DEFAULT_MODE GST_POLL_MODE_AUTO +#define DEFAULT_MODE 1 #define DEFAULT_BUFFERS_MAX -1 #define DEFAULT_BUFFERS_SOFT_MAX -1 #define DEFAULT_TIME_MIN -1 @@ -215,6 +216,26 @@ enum PROP_BURST_VALUE, }; +/* For backward compat, we can't really select the poll mode anymore with + * GstPoll. */ +#define GST_TYPE_FDSET_MODE (gst_fdset_mode_get_type()) +static GType +gst_fdset_mode_get_type (void) +{ + static GType fdset_mode_type = 0; + static const GEnumValue fdset_mode[] = { + {0, "Select", "select"}, + {1, "Poll", "poll"}, + {2, "EPoll", "epoll"}, + {0, NULL, NULL}, + }; + + if (!fdset_mode_type) { + fdset_mode_type = g_enum_register_static ("GstFDSetMode", fdset_mode); + } + return fdset_mode_type; +} + #define GST_TYPE_RECOVER_POLICY (gst_recover_policy_get_type()) static GType gst_recover_policy_get_type (void) @@ -361,7 +382,7 @@ gst_multi_fd_sink_class_init (GstMultiFdSinkClass * klass) GST_TYPE_TCP_PROTOCOL, DEFAULT_PROTOCOL, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, PROP_MODE, g_param_spec_enum ("mode", "Mode", - "The mode for selecting activity on the fds", GST_TYPE_POLL_MODE, + "The mode for selecting activity on the fds", GST_TYPE_FDSET_MODE, DEFAULT_MODE, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, PROP_BUFFERS_MAX, @@ -2630,7 +2651,7 @@ gst_multi_fd_sink_start (GstBaseSink * bsink) fclass = GST_MULTI_FD_SINK_GET_CLASS (this); GST_INFO_OBJECT (this, "starting in mode %d", this->mode); - if ((this->fdset = gst_poll_new (this->mode, TRUE)) == NULL) + if ((this->fdset = gst_poll_new (TRUE)) == NULL) goto socket_pair; this->streamheader = NULL; diff --git a/gst/tcp/gstmultifdsink.h b/gst/tcp/gstmultifdsink.h index a4f557e..c8352d7 100644 --- a/gst/tcp/gstmultifdsink.h +++ b/gst/tcp/gstmultifdsink.h @@ -200,7 +200,7 @@ struct _GstMultiFdSink { GHashTable *fd_hash; /* index on fd to client */ guint clients_cookie; /* Cookie to detect changes to the clients list */ - GstPollMode mode; + gint mode; GstPoll *fdset; GSList *streamheader; /* GSList of GstBuffers to use as streamheader */ diff --git a/gst/tcp/gsttcpclientsrc.c b/gst/tcp/gsttcpclientsrc.c index 89a3a24..df516b3 100644 --- a/gst/tcp/gsttcpclientsrc.c +++ b/gst/tcp/gsttcpclientsrc.c @@ -302,7 +302,7 @@ gst_tcp_client_src_start (GstBaseSrc * bsrc) gchar *ip; GstTCPClientSrc *src = GST_TCP_CLIENT_SRC (bsrc); - if ((src->fdset = gst_poll_new (GST_POLL_MODE_AUTO, TRUE)) == NULL) + if ((src->fdset = gst_poll_new (TRUE)) == NULL) goto socket_pair; /* create receiving client socket */ diff --git a/gst/tcp/gsttcpserversrc.c b/gst/tcp/gsttcpserversrc.c index 329a04b..3e360c2 100644 --- a/gst/tcp/gsttcpserversrc.c +++ b/gst/tcp/gsttcpserversrc.c @@ -386,7 +386,7 @@ gst_tcp_server_src_start (GstBaseSrc * bsrc) goto listen_error; /* create an fdset to keep track of our file descriptors */ - if ((src->fdset = gst_poll_new (GST_POLL_MODE_AUTO, TRUE)) == NULL) + if ((src->fdset = gst_poll_new (TRUE)) == NULL) goto socket_pair; gst_poll_add_fd (src->fdset, &src->server_sock_fd); -- 2.7.4