Commit graph

1111 commits

Author SHA1 Message Date
Wim Taymans
36d883b8c8 version: add version file 2018-07-17 10:31:17 +02:00
Wim Taymans
8b919e89bd video-src: let stream map buffers 2018-07-12 11:10:59 +02:00
Wim Taymans
18bfa9ae6e stream: add empty new_simple 2018-07-12 11:08:07 +02:00
Wim Taymans
c362b1ccc5 stream: implement MAP_BUFFERS
video-play let the stream map our buffers
2018-07-12 11:05:53 +02:00
Wim Taymans
a2d2d75a25 remote: call disconnect to make sure we free all memory 2018-07-12 11:05:31 +02:00
Wim Taymans
d6f40cefa6 examples: improve examples 2018-07-12 10:02:42 +02:00
Wim Taymans
b9171b5e57 node: add Media/Category/Role properties 2018-07-12 09:46:30 +02:00
Wim Taymans
bcddac6e2b stream: schedule process from main thread when asked
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.
2018-07-11 17:56:36 +02:00
Wim Taymans
67e567b9c7 stream: API break
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
2018-07-08 14:57:11 +02:00
Wim Taymans
4574adcd2e clean up listeners 2018-06-15 13:12:10 +02:00
Wim Taymans
1e54d9e00b hook: make safer
Also protect against removal of the next hook by using a cursor.
2018-06-15 13:11:00 +02:00
Wim Taymans
85f81ab4e2 config: fail when something fails 2018-06-15 13:10:27 +02:00
Wim Taymans
70bdb72857 loop: add back the destroy loop
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.
2018-06-15 13:06:59 +02:00
Wim Taymans
c42d495771 loop: blocking wait
Release the locks before waiting.
2018-06-15 13:06:13 +02:00
Wim Taymans
d619b77425 monitor: safely remove pending requests 2018-06-15 13:05:16 +02:00
Wim Taymans
c208511f53 proxy: reuse id when server removed it
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.
2018-06-15 13:01:08 +02:00
Wim Taymans
d1e2f69324 connection: reset number of fds 2018-06-15 12:59:08 +02:00
Giovanni Campagna
07f12c9713 v4l2: fix enumerating frame interval for continuous/step-wise devices
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
2018-04-03 16:28:23 +02:00
Eike Rathke
871dd2743b __STDC_VERSION__ may be undefined
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.
2018-04-03 16:27:58 +02:00
Philipp Zabel
e38cba4e13 v4l2: check device caps
If V4L2_CAP_DEVICE_CAPS is set, device_caps must be checked for the
V4L2_CAP_VIDEO_CAPTURE flag instead of capabilities.
2018-04-03 16:27:43 +02:00
Wim Taymans
187b6d4bf9 alsa: update the offset after each copy 2018-03-14 16:03:58 +01:00
Wim Taymans
8cadcd7f56 hook: return number of hooks called
Do finish_format ourselved when nobody was listening for the
format change.
2018-03-14 16:03:33 +01:00
Wim Taymans
fb7a51c6e7 client-node: fix mem_offset of io areas 2018-03-14 16:00:04 +01:00
Wim Taymans
6d569b132f control: safely iterate the list, unlink modifies the list 2018-03-14 15:56:24 +01:00
Wim Taymans
1b2e73de0c node: export method to update ports 2018-03-14 15:55:35 +01:00
Wim Taymans
2660b5c4f5 export-source: add float format 2018-03-14 15:54:57 +01:00
Wim Taymans
2ed627f3b1 list: remove stray ; 2018-03-14 15:15:13 +01:00
Wim Taymans
6cb35bf23e link: remove unused field 2018-03-14 15:14:30 +01:00
Wim Taymans
d655d9e0bf export-sink: don't block for render
Pass the buffer to the render function in the main thread but don't
block the data thread
2018-03-14 14:54:36 +01:00
Wim Taymans
153bf51ef1 client-node: safely remove source
Remove the source from the data_loop with invoke to make sure it
really is removed before we destroy the node.

Based on patch by David Svensson Fors <davidsf at axis.com>
2018-03-14 14:52:22 +01:00
Wim Taymans
638916e065 loop: remove the destroy_list
Don't use a destroy_list anymore, it's not safe anyway. Instead require
that sources be removed with (a blocking) invoke. Make sure we don't
dispatch sources that were removed from the loop.
2018-03-14 14:51:36 +01:00
Wim Taymans
992f20f805 protocol-native: debug connection after remap 2018-03-01 18:31:56 +01:00
Wim Taymans
ea182ba194 client-node: reference memory with id
Reference the memory with id because it could be relocated.
2018-03-01 18:30:39 +01:00
David Svensson Fors
6365ea18d9 module-node-factory: remove destroyed node from node list 2018-03-01 17:43:19 +01:00
Wim Taymans
135a0a18d8 client-node: track memory for client
Keep track of the memory we sent to the client to only send memory
once and choose better memid values.
2018-03-01 14:46:49 +01:00
Wim Taymans
059571cec0 remote: clear mem id
Clear the memid so that find_mem can't find old memory anymore.
2018-03-01 13:08:45 +01:00
Wim Taymans
e9685c794f remote: handle buffer errors 2018-03-01 12:39:33 +01:00
Wim Taymans
7bc9230a79 client-node: proxy -> node 2018-03-01 12:13:00 +01:00
Wim Taymans
a48761503c remote: ignore duplicate mem
Ignore if we receive the same memid multiple times
2018-03-01 11:45:42 +01:00
Wim Taymans
53ee07c901 link: generate unique mix ids
Generate a per link id for the mixer input of the ports.
2018-03-01 09:30:42 +01:00
Wim Taymans
8e2ceb773e Improve some debug 2018-03-01 09:01:52 +01:00
Wim Taymans
b445d1b12e Add some NEWS 2018-02-27 14:00:19 +01:00
Wim Taymans
62f113dbba Release 0.1.9 2018-02-27 13:34:22 +01:00
Wim Taymans
ebac77f4e4 conf: add some commented out modules
The link-factory allows the client to create links between ports.
The audio-dsp module creates dsp ports (float32, mono) for each
audio sink and source.
2018-02-27 12:53:05 +01:00
Wim Taymans
1ecf982504 link: improve allocation
Always move the allocated buffers to the output port and reuse them
from there if possible.
2018-02-27 12:51:25 +01:00
Wim Taymans
241a7bc7d9 mem: add some debug 2018-02-27 12:50:47 +01:00
Wim Taymans
b91a2a4207 link-factory: don't leak properties 2018-02-27 12:49:22 +01:00
Wim Taymans
28779b8e25 port: move mix_node to private.h
This will make it easier to override the implementation later
2018-02-26 17:20:27 +01:00
Wim Taymans
13fcaf74e6 link: improve allocation
Make a structure to track allocation of buffers on ports.
Handle more allocation failures.
Update port status immediately when clearing format
2018-02-26 17:05:30 +01:00
Wim Taymans
b8eccc3648 port: free resources 2018-02-26 16:49:38 +01:00