summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2008-03-07 15:48:51 +0000
committerWim Taymans <wim.taymans@gmail.com>2008-03-07 15:48:51 +0000
commit8a822e70be69a3c54bcea2e68a050a0c5a871142 (patch)
treec3549945b2878843c3a35e2c97e3ea713c8b7dfc
parentddcd9a65744fbf7bab35349f9e3adb47bb77b729 (diff)
downloadgstreamer-plugins-base-8a822e70be69a3c54bcea2e68a050a0c5a871142.tar.gz
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.
-rw-r--r--ChangeLog11
m---------common0
-rw-r--r--gst-libs/gst/rtsp/gstrtspconnection.c2
-rw-r--r--gst/tcp/gstmultifdsink.c27
-rw-r--r--gst/tcp/gstmultifdsink.h2
-rw-r--r--gst/tcp/gsttcpclientsrc.c2
-rw-r--r--gst/tcp/gsttcpserversrc.c2
7 files changed, 39 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 52c79e2c1..3cb69ac8d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-03-07 Wim Taymans <wim.taymans@collabora.co.uk>
+
+ * 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 <jan.schmidt@sun.com>
* configure.ac:
diff --git a/common b/common
-Subproject 081a00a5e25d069b15bb7f6092c8f951462cd8e
+Subproject e02bd43fe6b9e45536eccbf5b7a5f9eae62030f
diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c
index c2a2f0d7e..759d4fefa 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 6f6a09216..e91886626 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 a4f557eaf..c8352d7e5 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 89a3a24d8..df516b3cb 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 329a04b0f..3e360c207 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);