mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
docs: design: negotiation: Fix indentation in pseudo-code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2120>
This commit is contained in:
parent
0813efc821
commit
8a55dd9233
1 changed files with 9 additions and 9 deletions
|
@ -113,16 +113,16 @@ push buffer |---------------->| Process buffer of type A
|
||||||
One possible implementation in pseudo code:
|
One possible implementation in pseudo code:
|
||||||
|
|
||||||
```
|
```
|
||||||
[element wants to create a buffer]
|
[element wants to create a buffer]
|
||||||
if not format
|
if not format
|
||||||
# see what we can do
|
# see what we can do
|
||||||
ourcaps = gst_pad_query_caps (srcpad)
|
ourcaps = gst_pad_query_caps (srcpad)
|
||||||
# see what the peer can do filtered against our caps
|
# see what the peer can do filtered against our caps
|
||||||
candidates = gst_pad_peer_query_caps (srcpad, ourcaps)
|
candidates = gst_pad_peer_query_caps (srcpad, ourcaps)
|
||||||
|
|
||||||
foreach candidate in candidates
|
foreach candidate in candidates
|
||||||
# make sure the caps is fixed
|
# make sure the caps is fixed
|
||||||
fixedcaps = gst_pad_fixate_caps (srcpad, candidate)
|
fixedcaps = gst_pad_fixate_caps (srcpad, candidate)
|
||||||
|
|
||||||
# see if the peer accepts it
|
# see if the peer accepts it
|
||||||
if gst_pad_peer_accept_caps (srcpad, fixedcaps)
|
if gst_pad_peer_accept_caps (srcpad, fixedcaps)
|
||||||
|
|
Loading…
Reference in a new issue