design: MT-refcounting: fix missing markup, improve formatting and other fixes
This commit is contained in:
parent
979d92d458
commit
df5be8ff92
@ -101,7 +101,7 @@ object.
|
|||||||
All readers and writers acquire the lock before accessing the object. Only one
|
All readers and writers acquire the lock before accessing the object. Only one
|
||||||
thread is allowed access the protected structures at a time.
|
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`.
|
`GstElement`, `GstPad`.
|
||||||
|
|
||||||
Object locking can be done with recursive locks or regular mutexes. Object
|
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
|
### 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
|
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.
|
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
|
holding the object lock. All properties should only be accessed with their
|
||||||
corresponding macros. The public object properties are marked in the .h files
|
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
|
with /*< public >*/. The public properties that require a lock to be held are
|
||||||
marked with `/*< public >*/` `/* with <lock_type> */`, where `<lock_type>` can be
|
marked with `/*< public >*/` `/* with <lock_type> */`, where `<lock_type>` can
|
||||||
`LOCK` or `STATE_LOCK` or any other lock to mark the type(s) of lock to be
|
be `LOCK` or `STATE_LOCK` or any other lock to mark the type(s) of lock to be
|
||||||
held.
|
held.
|
||||||
|
|
||||||
**Example**:
|
**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
|
section marked as public and requiring the LOCK to be held. There exists
|
||||||
also a macro to access the property.
|
also a macro to access the property.
|
||||||
|
|
||||||
```
|
``` c
|
||||||
struct _GstRealPad {
|
struct _GstRealPad {
|
||||||
...
|
...
|
||||||
/*< public >*/ /* with LOCK */
|
/*< 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:
|
Accessing the property is therefore allowed with the following code example:
|
||||||
|
|
||||||
```
|
``` c
|
||||||
GST_OBJECT_LOCK (pad);
|
GST_OBJECT_LOCK (pad);
|
||||||
direction = GST_RPAD_DIRECTION (pad);
|
direction = GST_RPAD_DIRECTION (pad);
|
||||||
GST_OBJECT_UNLOCK (pad);
|
GST_OBJECT_UNLOCK (pad);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user