diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2013-12-27 10:49:14 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2013-12-27 10:49:14 +0100 |
commit | d2c0bb76d77ef8e3af100856a5b1865902668983 (patch) | |
tree | 27b8a21247cd30dc636389945f642d54ac7cf77c /gst | |
parent | 5445f362fd9ff2817de0772ef503db799a42fc62 (diff) |
Imported Upstream version 1.2.2
Diffstat (limited to 'gst')
-rw-r--r-- | gst/gstbin.c | 3 | ||||
-rw-r--r-- | gst/gstpluginloader.c | 16 | ||||
-rw-r--r-- | gst/gstpoll.c | 18 | ||||
-rw-r--r-- | gst/gstquery.c | 2 | ||||
-rw-r--r-- | gst/gstutils.c | 3 |
5 files changed, 21 insertions, 21 deletions
diff --git a/gst/gstbin.c b/gst/gstbin.c index 4bfd6d5..581b251 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -4086,7 +4086,8 @@ gst_bin_set_context (GstElement * element, GstContext * context) children = gst_bin_iterate_elements (bin); while (gst_iterator_foreach (children, set_context, - context) == GST_ITERATOR_RESYNC); + context) == GST_ITERATOR_RESYNC) + gst_iterator_resync (children); gst_iterator_free (children); } diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c index d33dc69..13a8fd5 100644 --- a/gst/gstpluginloader.c +++ b/gst/gstpluginloader.c @@ -997,27 +997,31 @@ exchange_packets (GstPluginLoader * l) l->tx_buf_write - l->tx_buf_read); if (!l->rx_done) { - if (gst_poll_fd_has_error (l->fdset, &l->fd_r) || - gst_poll_fd_has_closed (l->fdset, &l->fd_r)) { - GST_LOG ("read fd %d closed/errored", l->fd_r.fd); + if (gst_poll_fd_has_error (l->fdset, &l->fd_r)) { + GST_LOG ("read fd %d errored", l->fd_r.fd); goto fail_and_cleanup; } if (gst_poll_fd_can_read (l->fdset, &l->fd_r)) { if (!read_one (l)) goto fail_and_cleanup; + } else if (gst_poll_fd_has_closed (l->fdset, &l->fd_r)) { + GST_LOG ("read fd %d closed", l->fd_r.fd); + goto fail_and_cleanup; } } if (l->tx_buf_read < l->tx_buf_write) { - if (gst_poll_fd_has_error (l->fdset, &l->fd_w) || - gst_poll_fd_has_closed (l->fdset, &l->fd_w)) { - GST_ERROR ("write fd %d closed/errored", l->fd_w.fd); + if (gst_poll_fd_has_error (l->fdset, &l->fd_w)) { + GST_ERROR ("write fd %d errored", l->fd_w.fd); goto fail_and_cleanup; } if (gst_poll_fd_can_write (l->fdset, &l->fd_w)) { if (!write_one (l)) goto fail_and_cleanup; + } else if (gst_poll_fd_has_closed (l->fdset, &l->fd_w)) { + GST_LOG ("write fd %d closed", l->fd_w.fd); + goto fail_and_cleanup; } } } while (l->tx_buf_read < l->tx_buf_write); diff --git a/gst/gstpoll.c b/gst/gstpoll.c index 366f464..03c2a14 100644 --- a/gst/gstpoll.c +++ b/gst/gstpoll.c @@ -1000,8 +1000,6 @@ gst_poll_fd_has_closed (const GstPoll * set, GstPollFD * fd) g_return_val_if_fail (fd != NULL, FALSE); g_return_val_if_fail (fd->fd >= 0, FALSE); - GST_DEBUG ("%p: fd (fd:%d, idx:%d)", set, fd->fd, fd->idx); - g_mutex_lock (&((GstPoll *) set)->lock); idx = find_index (set->active_fds, fd); @@ -1018,9 +1016,10 @@ gst_poll_fd_has_closed (const GstPoll * set, GstPollFD * fd) } else { GST_WARNING ("%p: couldn't find fd !", set); } - g_mutex_unlock (&((GstPoll *) set)->lock); + GST_DEBUG ("%p: fd (fd:%d, idx:%d) %d", set, fd->fd, fd->idx, res); + return res; } @@ -1043,8 +1042,6 @@ gst_poll_fd_has_error (const GstPoll * set, GstPollFD * fd) g_return_val_if_fail (fd != NULL, FALSE); g_return_val_if_fail (fd->fd >= 0, FALSE); - GST_DEBUG ("%p: fd (fd:%d, idx:%d)", set, fd->fd, fd->idx); - g_mutex_lock (&((GstPoll *) set)->lock); idx = find_index (set->active_fds, fd); @@ -1065,9 +1062,10 @@ gst_poll_fd_has_error (const GstPoll * set, GstPollFD * fd) } else { GST_WARNING ("%p: couldn't find fd !", set); } - g_mutex_unlock (&((GstPoll *) set)->lock); + GST_DEBUG ("%p: fd (fd:%d, idx:%d) %d", set, fd->fd, fd->idx, res); + return res; } @@ -1077,8 +1075,6 @@ gst_poll_fd_can_read_unlocked (const GstPoll * set, GstPollFD * fd) gboolean res = FALSE; gint idx; - GST_DEBUG ("%p: fd (fd:%d, idx:%d)", set, fd->fd, fd->idx); - idx = find_index (set->active_fds, fd); if (idx >= 0) { #ifndef G_OS_WIN32 @@ -1093,6 +1089,7 @@ gst_poll_fd_can_read_unlocked (const GstPoll * set, GstPollFD * fd) } else { GST_WARNING ("%p: couldn't find fd !", set); } + GST_DEBUG ("%p: fd (fd:%d, idx:%d) %d", set, fd->fd, fd->idx, res); return res; } @@ -1143,8 +1140,6 @@ gst_poll_fd_can_write (const GstPoll * set, GstPollFD * fd) g_return_val_if_fail (fd != NULL, FALSE); g_return_val_if_fail (fd->fd >= 0, FALSE); - GST_DEBUG ("%p: fd (fd:%d, idx:%d)", set, fd->fd, fd->idx); - g_mutex_lock (&((GstPoll *) set)->lock); idx = find_index (set->active_fds, fd); @@ -1161,9 +1156,10 @@ gst_poll_fd_can_write (const GstPoll * set, GstPollFD * fd) } else { GST_WARNING ("%p: couldn't find fd !", set); } - g_mutex_unlock (&((GstPoll *) set)->lock); + GST_DEBUG ("%p: fd (fd:%d, idx:%d) %d", set, fd->fd, fd->idx, res); + return res; } diff --git a/gst/gstquery.c b/gst/gstquery.c index 4466413..48a9022 100644 --- a/gst/gstquery.c +++ b/gst/gstquery.c @@ -661,7 +661,7 @@ gst_query_parse_segment (GstQuery * query, gdouble * rate, GstFormat * format, /** * gst_query_new_custom: * @type: the query type - * @structure: a structure for the query + * @structure: (allow-none) (transfer full): a structure for the query * * Constructs a new custom query object. Use gst_query_unref() * when done with it. diff --git a/gst/gstutils.c b/gst/gstutils.c index 33f518c..24aa66a 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -2587,7 +2587,6 @@ gst_pad_peer_query_position (GstPad * pad, GstFormat format, gint64 * cur) gboolean ret = FALSE; g_return_val_if_fail (GST_IS_PAD (pad), FALSE); - g_return_val_if_fail (GST_PAD_IS_SINK (pad), FALSE); g_return_val_if_fail (format != GST_FORMAT_UNDEFINED, FALSE); query = gst_query_new_position (format); @@ -3728,7 +3727,7 @@ gst_pad_create_stream_id_printf (GstPad * pad, GstElement * parent, * * Since stream IDs are sorted alphabetically, any numbers in the * stream ID should be printed with a fixed number of characters, - * preceded by 0's, such as by using the format %%03u instead of %%u. + * preceded by 0's, such as by using the format \%03u instead of \%u. * * Returns: A stream-id for @pad. g_free() after usage. */ |