Pass the minimum required version to the hook emission and only call
events when the handler is recent enough.
Add some macros to make event emission easier to read.
Use 2 lockfree queues so that we can queue and dequeue from different
threads.
Call the process function from the main thread when requested
Rework the data push and pull logic to go through the queues
Update the examples for this new feature, video-play does not need
to schedule the process in the main thread anymore and block for it
to complete, this avoid a deadlock between the data and mainloop when
shutting down.
Add pw_buffer
Add queue/dequeue methods, remove old methods
Add get and set for properties
Update gst elements and examples
Update the API to work branch which is more future proof
We need to keep the sources around until all sources are dispatched. If
not: source A and B are active after poll, A is dispatched first and
removes B, when B is then dispatched, the memory is gone. We don't
free the source but simply mark the fd invalid and move it do a
destroy list. After all sources are dispatched we destroy.
This is safe because removing a source is either done from the poll
context (with invoke) or when holding the right locks.
When we destroy the proxy, just clear the id. We then remove the id
completely when the server sends a remove_id request. This avoid
reusing the proxy id before the server has finished with it.
A device that supports continuous/step-wise frame interval will
report the correct frame intervals for index 0 and EINVAL for
every other index.
(https://linuxtv.org/downloads/v4l-dvb-apis/uapi/v4l/vidioc-enum-frameintervals.html)
Previously, the code would exit from the loop after successfully
reading index 0, without marking that the iteration of frame
interval completed. Therefore, the next time the function was
called the same frame intervals would be read, instead of advancing
to the next frame size or format type.
Instead, mark that we need to try and read the next format size.
Fixes#56
Clang++ (and g++) don't define __STDC_VERSION__ which results in
include/spa/support/log.h:101:5: error: '__STDC_VERSION__' is not defined, evaluates to 0 [-Werror,-Wundef]
#if __STDC_VERSION__ >= 199901L
include/pipewire/log.h:64:5: error: '__STDC_VERSION__' is not defined, evaluates to 0 [-Werror,-Wundef]
#if __STDC_VERSION__ >= 199901L
so check if __STDC_VERSION__ is defined before comparing.
Also, include/feature.h additionally defines __USE_ISOC99 (and
__USE_ISOC11 for C11 extension), so check these as well.