diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2005-03-08 14:38:06 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2005-03-08 14:38:06 +0000 |
commit | b338085a29fb43e3c56d035060dcaf680aca22b1 (patch) | |
tree | 077dade03178f3f562cf233dc85758229a0d56bf /docs/design/part-MT-refcounting.txt | |
parent | f3aa2d7c52ff76742b4f88608b95f90e3ada2e82 (diff) |
Docs updates, clean up some headers.
Original commit message from CVS:
* docs/design/part-MT-refcounting.txt:
* docs/design/part-conventions.txt:
* docs/design/part-gstobject.txt:
* docs/design/part-relations.txt:
* docs/design/part-standards.txt:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_add),
(gst_bin_remove_func), (gst_bin_remove), (gst_bin_iterate_recurse),
(gst_bin_get_by_name), (gst_bin_get_by_interface),
(gst_bin_iterate_all_by_interface):
* gst/gstbuffer.h:
* gst/gstclock.h:
* gst/gstelement.c: (gst_element_class_init),
(gst_element_change_state), (gst_element_set_loop_function):
* gst/gstelement.h:
* gst/gstiterator.c:
* gst/gstobject.c: (gst_object_class_init), (gst_object_ref),
(gst_object_unref), (gst_object_sink), (gst_object_dispose),
(gst_object_dispatch_properties_changed), (gst_object_set_name),
(gst_object_set_parent), (gst_object_unparent),
(gst_object_check_uniqueness):
* gst/gstobject.h:
Docs updates, clean up some headers.
Free iterators in GstBin.
GstObject is now looking good.
Diffstat (limited to 'docs/design/part-MT-refcounting.txt')
-rw-r--r-- | docs/design/part-MT-refcounting.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/design/part-MT-refcounting.txt b/docs/design/part-MT-refcounting.txt index e3b1e2ebd7..3d45064ec1 100644 --- a/docs/design/part-MT-refcounting.txt +++ b/docs/design/part-MT-refcounting.txt @@ -260,6 +260,16 @@ Objects anymore of the pad. If you need to be sure it is, you need to extend the critical section to include the operations on the peer. + The following code is equivalent to the above but with using the functions + to access object properties. + + peer = gst_pad_get_parent (pad); + if (peer) { + ... use peer ... + + gst_object_unref (GST_OBJECT (peer)); + } + Example: Accessing the name of an object makes a copy of the name. The caller of the @@ -271,6 +281,14 @@ Objects ... use name ... g_free (name); + + or: + + name = gst_object_get_name (object); + + ... use name ... + + g_free (name); * Accessor methods |