Commit graph

669 commits

Author SHA1 Message Date
Wim Taymans
1f250046a3 plugins: fix compilation of optional plugins 2019-06-03 16:08:42 +02:00
Wim Taymans
1d1f035e78 monitor: return factory_name in the object_info
Pass a factory_name in the object_info of monitor and device.
Restructure the factory name to mean something functionaly. With
the factory to library mapping this then means that the implementation
of certain factories can be configured in the config file.
2019-05-31 15:06:44 +02:00
Wim Taymans
acd797d780 add device.api property 2019-05-30 16:59:30 +02:00
Wim Taymans
11393ce9dd bluez: add api to properties 2019-05-30 16:09:56 +02:00
Wim Taymans
c8cbb7e322 bluez5: improve debug 2019-05-30 13:01:15 +02:00
Wim Taymans
9785d99821 monitor: Remove monitor event
Remove the monitor event and emit events with structures like we do
for the devices.
2019-05-30 12:51:12 +02:00
Wim Taymans
4754335d31 alsa: activate On profile 2019-05-28 14:13:41 +02:00
Wim Taymans
bf677d55da spa: implement node sync 2019-05-28 14:01:18 +02:00
Wim Taymans
9420497dd9 alsa: profile 0 is Off 2019-05-28 14:00:31 +02:00
Wim Taymans
857b2a0cfb spa: add result type
We need this to know the type of result, especially when serializing.
2019-05-28 13:59:48 +02:00
Wim Taymans
c44d655516 v4l2: use 32 buffers max
We don't yet probe the number of available buffers and so we might claim
to support 64 buffers but then fail to allocate that many buffers in
_use_buffers().
2019-05-27 15:35:20 +02:00
Wim Taymans
a680f434d2 port: use right properties
Use format.dsp as a key to mark the dsp format on a port
Use audio.channel as the key to set the audio channel on a port
2019-05-24 16:14:19 +02:00
Wim Taymans
7bb6515800 loop: cleanups 2019-05-23 15:11:49 +02:00
Wim Taymans
ff946e3d4b interface: add an interface struct
The interface struct has the type,version and methods of the
interface.
Make spa interfaces extend from spa_interface and make a
separate structure for the methods.
Pass a generic void* as the first argument of methods, like
we don in PipeWire.
Bundle the methods + implementation in a versioned inteface
and use that to invoke methods. This way we can do version
checks on the methods.
Make resource and proxy interfaces that we can can call. We
can then make the core interfaces independent on proxy/resource and
hide them in the lower layers.
Add add_listener method to methods of core interfaces, just
like SPA.
2019-05-23 12:59:24 +02:00
Wim Taymans
eb6481efb3 fmtconvert: also return all formats when not negotiated
Also return all possible formats if the other port was not
negotiated.
2019-05-23 10:27:54 +02:00
Wim Taymans
78fbcca660 alsa: handle alsa-lib 1.1.9
alsa-lib 1.1.9 removed /usr/include/alsa from the include path, we
must include <alsa/asoundlib.h>
2019-05-23 10:15:49 +02:00
Wim Taymans
a564d9f3f1 Move implementation helpers to utils 2019-05-20 10:14:00 +02:00
Wim Taymans
51e900c9d3 Remove libv4l2 dependency
It's not used anywhere right now.
2019-05-17 12:41:57 +02:00
Wim Taymans
3cb400bb61 audioconvert: don't use range
Use the spa_io_position->size to decide how many samples to output
from the resampler.
2019-05-17 10:31:20 +02:00
Wim Taymans
4ae771ccc1 a2dp: also acquire when the state is pending 2019-05-16 16:43:35 +02:00
Wim Taymans
e009fead09 io: remove unused range 2019-05-16 16:42:49 +02:00
Wim Taymans
6cfddde39c bluez: fix a2dp source
Actually compile the codec config and declare the config as extern
or else it's just all 0.
Only acquire the transport when ACTIVE.
Implement transport state_change signal and acquire the transport
when going to pending/active.
Try to acquire the transport before we expose the device if we
can.
Force device expose when we get the device ServicesResolved=1 property
update.
Free transport when the rfcomm is closed.
Implement various DBus signals to detect dynamic property updates.
2019-05-16 13:18:45 +02:00
Wim Taymans
c348790ca1 map: handle more error cases 2019-05-15 15:19:25 +02:00
Wim Taymans
448c1937ad hook: separate spa_callbacks from the hook
Make a spa_callbacks with just the functions and data and use this
in the hook and objects.
2019-05-15 12:17:52 +02:00
Wim Taymans
6ee192dff5 hooks: use hook to implement the callbacks
This way we get the version check implemented and save some
code.
2019-05-15 11:19:23 +02:00
Wim Taymans
a78617c6a8 a2dp: cleanups 2019-05-15 10:20:28 +02:00
Wim Taymans
f6ace8a000 a2dp: add events and implementation
Use hooks for the implementation of the transport
Add events to the transport
Handle the destroy event of the transport to release the reference
in source and sink.
2019-05-14 18:10:18 +02:00
Wim Taymans
5858c992ef audioconvert: improve debug 2019-05-14 18:05:51 +02:00
Julian Bouzas
674f3e197e bluez5: add a2dp-source plugin 2019-05-14 13:02:55 +02:00
Wim Taymans
a70fd80c2d fmtconvert: fix format enumeration
Rework the format enumeration so that it also return the other
rate/channels, even when using a canonical format.
2019-05-10 11:39:51 +02:00
Wim Taymans
1a7fcaf9c6 Fix cleanup 2019-05-10 11:15:48 +02:00
Wim Taymans
41ab051b68 fmtconvert: fix format enumeration
Even if the other pad is already negotiated, we can convert all
formats to F32.
2019-05-09 09:35:03 +02:00
Wim Taymans
b01858931c v4l2: add camera media.role 2019-04-30 15:42:17 +02:00
Wim Taymans
636c02d38b audioconvert: fix native variable rate resampler 2019-04-30 15:14:05 +02:00
Wim Taymans
5ac383e7f7 alsa: improve capture slave resync
When we underrun, send out a buffer of 0 samples and catch up next
time.
Detect discont in the master and resync.
2019-04-29 10:00:42 +02:00
Wim Taymans
b43844e7c6 alsa: improve capture resync
Make sure we capture enough data even when the ringbuffer wraps
around.
Use the clock nsec to get timing, we don't need to get the new time.
Improve sync in capture.
2019-04-26 15:48:21 +02:00
Wim Taymans
317fd9fac5 alsa: handle quantum changes 2019-04-25 16:15:52 +02:00
Wim Taymans
cd779a1c93 splitter: disable passthrough in more cases
Also disable passthrough when we first negotiate output format/buffers
and passthrough is not possible because the output buffer does not
have the dynamic data flag set..
2019-04-25 12:54:03 +02:00
Wim Taymans
d8f39a7c02 alsa: improve clock slaving for source 2019-04-25 12:53:23 +02:00
Wim Taymans
24f6fc2a34 alsa: handle master/slave changes 2019-04-24 15:38:06 +02:00
Wim Taymans
f2cdba1929 a2dp: handle slaving 2019-04-24 12:41:16 +02:00
Wim Taymans
bc85837e26 alsa: small cleanup 2019-04-24 12:40:58 +02:00
Wim Taymans
2912d2506f audioconvert: improve resampler
Also emit port info the the merger monitor ports.
Proxy params and buffers to the right monitor ports.
fmtconvert does not always have dsp ports
Increase resampler output buffer sizes so that we can up and downsample.
Fix little off by one in native resampler.
Fix passthrough in speex resampler.
2019-04-23 17:34:27 +02:00
Wim Taymans
b7cc9ea102 alsa: improve rate control
Try to match the delay with the target delay. Use the rate to
adjust the timeout period for master or the resampler rate for slaves.
2019-04-23 17:31:29 +02:00
Wim Taymans
715594c6ef alsa: rework source a little in the case of slave
When we are slaved, read as much data as we have available and return
this from process.
2019-04-11 16:44:07 +02:00
Wim Taymans
092a0c660d make bitfields unsigned
Remove driver property from client-node of client-stream.
2019-04-10 17:52:42 +02:00
Wim Taymans
787900e8bf v4l2: map all jpeg formats to video/mjpeg 2019-04-10 17:10:34 +02:00
Wim Taymans
ae3e5787af audioconvert: unroll some loop 2019-04-10 12:53:25 +02:00
Wim Taymans
dc01b294a2 resample: return the number of consumed samples
We need to return the number of consumed samples, even when we don't
start from the first sample in the buffer.
Add some more logging.
2019-04-02 23:06:46 +02:00
Wim Taymans
a44ee31abe alsa: write as much as we can
Always write as much data as we can and don't stop when we written
up to the threshold.
2019-04-02 23:04:09 +02:00