plugins/elements/: Don't reset GstPollFDs, this is not necessary at all.

Original commit message from CVS:
* plugins/elements/gstfdsink.c: (gst_fd_sink_update_fd):
* plugins/elements/gstfdsrc.c: (gst_fd_src_update_fd):
Don't reset GstPollFDs, this is not necessary at all.
* tests/check/gst/gstpoll.c: (test_poll_wait), (GST_START_TEST),
(delayed_restart), (delayed_control):
Use GST_POLL_FD_INIT.
This commit is contained in:
Sebastian Dröge 2008-02-29 12:05:55 +00:00
parent a7bc443923
commit c483eb5489
4 changed files with 17 additions and 13 deletions

View file

@ -1,3 +1,13 @@
2008-02-29 Sebastian Dröge <slomo@circular-chaos.org>
* plugins/elements/gstfdsink.c: (gst_fd_sink_update_fd):
* plugins/elements/gstfdsrc.c: (gst_fd_src_update_fd):
Don't reset GstPollFDs, this is not necessary at all.
* tests/check/gst/gstpoll.c: (test_poll_wait), (GST_START_TEST),
(delayed_restart), (delayed_control):
Use GST_POLL_FD_INIT.
2008-02-29 Wim Taymans <wim.taymans@collabora.co.uk> 2008-02-29 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/gstpoll.c: (gst_poll_fd_init): * gst/gstpoll.c: (gst_poll_fd_init):

View file

@ -429,9 +429,6 @@ gst_fd_sink_update_fd (GstFdSink * fdsink, int new_fd)
fd.fd = fdsink->fd; fd.fd = fdsink->fd;
gst_poll_remove_fd (fdsink->fdset, &fd); gst_poll_remove_fd (fdsink->fdset, &fd);
/* Reset the GstPollFD */
gst_poll_fd_init (&fd);
fd.fd = new_fd; fd.fd = new_fd;
gst_poll_add_fd (fdsink->fdset, &fd); gst_poll_add_fd (fdsink->fdset, &fd);
gst_poll_fd_ctl_write (fdsink->fdset, &fd, TRUE); gst_poll_fd_ctl_write (fdsink->fdset, &fd, TRUE);

View file

@ -185,9 +185,6 @@ gst_fd_src_update_fd (GstFdSrc * src)
gst_poll_remove_fd (src->fdset, &fd); gst_poll_remove_fd (src->fdset, &fd);
} }
/* Reset the GstPollFD */
gst_poll_fd_init (&fd);
fd.fd = src->new_fd; fd.fd = src->new_fd;
gst_poll_add_fd (src->fdset, &fd); gst_poll_add_fd (src->fdset, &fd);
gst_poll_fd_ctl_read (src->fdset, &fd, TRUE); gst_poll_fd_ctl_read (src->fdset, &fd, TRUE);

View file

@ -34,8 +34,8 @@ static void
test_poll_wait (GstPollMode mode) test_poll_wait (GstPollMode mode)
{ {
GstPoll *set; GstPoll *set;
GstPollFD rfd = { 0, }; GstPollFD rfd = GST_POLL_FD_INIT;
GstPollFD wfd = { 0, }; GstPollFD wfd = GST_POLL_FD_INIT;
gint socks[2]; gint socks[2];
guchar c = 'A'; guchar c = 'A';
@ -100,7 +100,7 @@ test_poll_wait (GstPollMode mode)
GST_START_TEST (test_poll_basic) GST_START_TEST (test_poll_basic)
{ {
GstPoll *set; GstPoll *set;
GstPollFD fd = { 0, }; GstPollFD fd = GST_POLL_FD_INIT;
fd.fd = 1; fd.fd = 1;
@ -180,7 +180,7 @@ static gpointer
delayed_restart (gpointer data) delayed_restart (gpointer data)
{ {
GstPoll *set = data; GstPoll *set = data;
GstPollFD fd = { 0, }; GstPollFD fd = GST_POLL_FD_INIT;
fd.fd = 1; fd.fd = 1;
@ -198,7 +198,7 @@ delayed_restart (gpointer data)
GST_START_TEST (test_poll_wait_restart) GST_START_TEST (test_poll_wait_restart)
{ {
GstPoll *set; GstPoll *set;
GstPollFD fd = { 0, }; GstPollFD fd = GST_POLL_FD_INIT;
fd.fd = 1; fd.fd = 1;
@ -268,7 +268,7 @@ static gpointer
delayed_control (gpointer data) delayed_control (gpointer data)
{ {
GstPoll *set = data; GstPoll *set = data;
GstPollFD fd = { 0, }; GstPollFD fd = GST_POLL_FD_INIT;
fd.fd = 1; fd.fd = 1;
@ -294,7 +294,7 @@ delayed_control (gpointer data)
GST_START_TEST (test_poll_controllable) GST_START_TEST (test_poll_controllable)
{ {
GstPoll *set; GstPoll *set;
GstPollFD fd = { 0, }; GstPollFD fd = GST_POLL_FD_INIT;
fd.fd = 1; fd.fd = 1;