From c7d40b0a25b0d7731c89fca6029126a415976c5c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 9 Jan 2008 12:19:31 +0000 Subject: [PATCH] gst/gstbuffer.c: Update some comments. Original commit message from CVS: * gst/gstbuffer.c: Update some comments. * tools/gst-inspect.c: (print_element_properties_info): Improve printing of flags. --- ChangeLog | 8 ++++++++ gst/gstbuffer.c | 12 ++++++------ tools/gst-inspect.c | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index b8996eab68..1bcf4f2243 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-01-09 Wim Taymans + + * gst/gstbuffer.c: + Update some comments. + + * tools/gst-inspect.c: (print_element_properties_info): + Improve printing of flags. + 2008-01-08 Tim-Philipp Müller * libs/gst/base/gstbasetransform.c: diff --git a/gst/gstbuffer.c b/gst/gstbuffer.c index cf26d77c04..30e92ebefe 100644 --- a/gst/gstbuffer.c +++ b/gst/gstbuffer.c @@ -380,8 +380,9 @@ gst_buffer_try_new_and_alloc (guint size) * Returns: a reference to the #GstCaps. unref after usage. * Returns NULL if there were no caps on this buffer. */ -/* FIXME can we make this threadsafe without a lock on the buffer? - * We can use compare and swap and atomic reads. */ +/* this is not made atomic because if the buffer were reffed from multiple + * threads, it would have a refcount > 2 and thus be immutable. + */ GstCaps * gst_buffer_get_caps (GstBuffer * buffer) { @@ -406,10 +407,9 @@ gst_buffer_get_caps (GstBuffer * buffer) * be increased and any previous caps on the buffer will be * unreffed. */ -/* FIXME can we make this threadsafe without a lock on the buffer? - * We can use compare and swap and atomic reads. Another idea is to - * not attach the caps to the buffer but use an event to signal a caps - * change. */ +/* this is not made atomic because if the buffer were reffed from multiple + * threads, it would have a refcount > 2 and thus be immutable. + */ void gst_buffer_set_caps (GstBuffer * buffer, GstCaps * caps) { diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index b4cbd989dc..7712225d27 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -511,7 +511,7 @@ print_element_properties_info (GstElement * element) } n_print - ("%-23.23s Flags \"%s\" Default: %d, \"%s\" Current: %d, \"%s\"", + ("%-23.23s Flags \"%s\" Default: 0x%08x, \"%s\" Current: 0x%08x, \"%s\"", "", g_type_name (G_VALUE_TYPE (&value)), pflags->default_value, (def_flags ? def_flags->str : "(none)"), flags_value, (cur_flags ? cur_flags->str : "(none)"));