play: Improve documentation header

If the application relies on GstPlaySignalAdapter, no special clean-up is
required.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5643>
This commit is contained in:
Philippe Normand 2023-11-12 11:07:37 +00:00
parent 050e7f4831
commit 99fa06e73f
2 changed files with 16 additions and 6 deletions

View file

@ -315,9 +315,14 @@ An example player is available in gst-examples/playback/player/gst-play/.
Internally the GstPlay makes use of the `playbin` element. `playbin3` can be
selected if the `GST_PLAY_USE_PLAYBIN3=1` environment variable has been set.
**Important note**: In order to prevent the GstPlay object from leaking, its
GstBus should be set to flushing state before any attempt to drop the last
reference of the GstPlay object. An example in C:
**Important note**: If your application relies on the GstBus to get
notifications from GstPlay, you need to add some explicit clean-up code in
order to prevent the GstPlay object from leaking. See below for the details.
If you use the GstPlaySignalAdapter, no special clean-up is required.
When the GstPlaySignalAdapter is not used, the GstBus owned by GstPlay should
be set to flushing state before any attempt to drop the last reference of the
GstPlay object. An example in C:
```c
...

View file

@ -37,9 +37,14 @@
* Internally the GstPlay makes use of the `playbin` element. `playbin3` can be
* selected if the `GST_PLAY_USE_PLAYBIN3=1` environment variable has been set.
*
* **Important note**: In order to prevent the GstPlay object from leaking, its
* GstBus should be set to flushing state before any attempt to drop the last
* reference of the GstPlay object. An example in C:
* **Important note**: If your application relies on the GstBus to get
* notifications from GstPlay, you need to add some explicit clean-up code in
* order to prevent the GstPlay object from leaking. See below for the details.
* If you use the GstPlaySignalAdapter, no special clean-up is required.
*
* When the GstPlaySignalAdapter is not used, the GstBus owned by GstPlay should
* be set to flushing state before any attempt to drop the last reference of the
* GstPlay object. An example in C:
*
* ```c
* ...