From 1989b502da47c5bfc8a5d7147173bc7a8b48d95b Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 14 Oct 2004 11:28:21 +0000 Subject: [PATCH] gst/tcp/gstmultifdsink.c: Turn warnings into info. Original commit message from CVS: * gst/tcp/gstmultifdsink.c: (gst_multifdsink_add), (gst_multifdsink_remove), (gst_multifdsink_remove_client_link), (is_sync_frame), (gst_multifdsink_new_client), (gst_multifdsink_handle_client_write), (gst_multifdsink_recover_client), (gst_multifdsink_queue_buffer), (gst_multifdsink_handle_clients), (gst_multifdsink_change_state): Turn warnings into info. Don't allow a state change in the streaming thread. --- ChangeLog | 11 +++++++++++ gst/tcp/gstmultifdsink.c | 9 +++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 843323ab21..dced8fe586 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2004-10-14 Wim Taymans + + * gst/tcp/gstmultifdsink.c: (gst_multifdsink_add), + (gst_multifdsink_remove), (gst_multifdsink_remove_client_link), + (is_sync_frame), (gst_multifdsink_new_client), + (gst_multifdsink_handle_client_write), + (gst_multifdsink_recover_client), (gst_multifdsink_queue_buffer), + (gst_multifdsink_handle_clients), (gst_multifdsink_change_state): + Turn warnings into info. + Don't allow a state change in the streaming thread. + 2004-10-14 Thomas Vander Stichele * ext/vorbis/oggvorbisenc.c: diff --git a/gst/tcp/gstmultifdsink.c b/gst/tcp/gstmultifdsink.c index 987f84b8d8..87dc253516 100644 --- a/gst/tcp/gstmultifdsink.c +++ b/gst/tcp/gstmultifdsink.c @@ -1096,10 +1096,10 @@ gst_multifdsink_queue_buffer (GstMultiFdSink * sink, GstBuffer * buf) if (newpos != client->bufpos) { client->bufpos = newpos; client->discont = TRUE; - GST_WARNING_OBJECT (sink, "client %p with fd %d position reset to %d", + GST_INFO_OBJECT (sink, "client %p with fd %d position reset to %d", client, client->fd.fd, client->bufpos); } else { - GST_WARNING_OBJECT (sink, + GST_INFO_OBJECT (sink, "client %p with fd %d not recovering position", client, client->fd.fd); } @@ -1216,6 +1216,7 @@ gst_multifdsink_handle_clients (GstMultiFdSink * sink) /* interrupted system call, just redo the select */ try_again = TRUE; } else { + /* this is quite bad... */ GST_ELEMENT_ERROR (sink, RESOURCE, READ, (NULL), ("select failed: %s", g_strerror (errno))); return; @@ -1553,6 +1554,10 @@ gst_multifdsink_change_state (GstElement * element) g_return_val_if_fail (GST_IS_MULTIFDSINK (element), GST_STATE_FAILURE); sink = GST_MULTIFDSINK (element); + /* we disallow changing the state from the streaming thread */ + if (g_thread_self () == sink->thread) + return GST_STATE_FAILURE; + switch (GST_STATE_TRANSITION (element)) { case GST_STATE_NULL_TO_READY: if (!GST_FLAG_IS_SET (sink, GST_MULTIFDSINK_OPEN)) {