mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
design: MT-refcounting: fix missing markup, improve formatting and other fixes
This commit is contained in:
parent
979d92d458
commit
df5be8ff92
1 changed files with 65 additions and 65 deletions
|
@ -101,7 +101,7 @@ object.
|
|||
All readers and writers acquire the lock before accessing the object. Only one
|
||||
thread is allowed access the protected structures at a time.
|
||||
|
||||
Object locking is used for all objects extending from GstObject such as
|
||||
Object locking is used for all objects extending from `GstObject` such as
|
||||
`GstElement`, `GstPad`.
|
||||
|
||||
Object locking can be done with recursive locks or regular mutexes. Object
|
||||
|
@ -153,7 +153,7 @@ not extend from the base `GstObject` class these macros can be different.
|
|||
|
||||
### refcounting
|
||||
|
||||
All new objects created have the FLOATING flag set. This means that the object
|
||||
All new objects created have the `FLOATING` flag set. This means that the object
|
||||
is not owned or managed yet by anybody other than the one holding a reference
|
||||
to the object. The object in this state has a reference count of 1.
|
||||
|
||||
|
@ -211,8 +211,8 @@ object. Two types of properties might exist: accessible with or without
|
|||
holding the object lock. All properties should only be accessed with their
|
||||
corresponding macros. The public object properties are marked in the .h files
|
||||
with /*< public >*/. The public properties that require a lock to be held are
|
||||
marked with `/*< public >*/` `/* with <lock_type> */`, where `<lock_type>` can be
|
||||
`LOCK` or `STATE_LOCK` or any other lock to mark the type(s) of lock to be
|
||||
marked with `/*< public >*/` `/* with <lock_type> */`, where `<lock_type>` can
|
||||
be `LOCK` or `STATE_LOCK` or any other lock to mark the type(s) of lock to be
|
||||
held.
|
||||
|
||||
**Example**:
|
||||
|
@ -221,7 +221,7 @@ in `GstPad` there is a public property `direction`. It can be found in the
|
|||
section marked as public and requiring the LOCK to be held. There exists
|
||||
also a macro to access the property.
|
||||
|
||||
```
|
||||
``` c
|
||||
struct _GstRealPad {
|
||||
...
|
||||
/*< public >*/ /* with LOCK */
|
||||
|
@ -235,7 +235,7 @@ also a macro to access the property.
|
|||
|
||||
Accessing the property is therefore allowed with the following code example:
|
||||
|
||||
```
|
||||
``` c
|
||||
GST_OBJECT_LOCK (pad);
|
||||
direction = GST_RPAD_DIRECTION (pad);
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
|
|
Loading…
Reference in a new issue