Commit fb09098
linux-pipewire: Ensure the release point is always signaled
Since video rendering happens on a separate thread from PipeWire buffer
ingestion, it may happen that two buffers are ingested in quick
succession without the rendering thread ever getting to them. Since,
prior to this commit, the release sync point is only "primed" (set to
signal in the future) only on the video rendering thread, this results
in the buffer being returned to PipeWire's pool without anything ever
signaling the release point, effectively blocking it from ever getting
reused in the future. This quickly clogs up the buffer pool and leaves
only one buffer to circulate between the screencast source and OBS.
This commit adds a flag tracking whether the release point had been
primed. If, when ingesting a new PW buffer, the old buffer's release
point hadn't been primed, that means the video rendering thread never
got to that buffer, so the release point is immediately signaled,
marking the buffer reusable by the screencast source.1 parent a7de3f4 commit fb09098
1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| |||
766 | 767 | | |
767 | 768 | | |
768 | 769 | | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
769 | 778 | | |
770 | 779 | | |
771 | 780 | | |
| |||
779 | 788 | | |
780 | 789 | | |
781 | 790 | | |
| 791 | + | |
782 | 792 | | |
783 | 793 | | |
784 | 794 | | |
| |||
1384 | 1394 | | |
1385 | 1395 | | |
1386 | 1396 | | |
| 1397 | + | |
1387 | 1398 | | |
1388 | 1399 | | |
1389 | 1400 | | |
| |||
0 commit comments