Register buffer_lock as a global output
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
#include "device/device.h"
|
||||
#include "device/buffer.h"
|
||||
#include "device/buffer_list.h"
|
||||
#include "device/buffer_lock.h"
|
||||
#include "util/opts/log.h"
|
||||
#include "util/opts/fourcc.h"
|
||||
|
||||
@ -34,6 +35,10 @@ int _build_fds(link_t *all_links, struct pollfd *fds, link_t **links, buffer_lis
|
||||
paused = false;
|
||||
}
|
||||
|
||||
if (link->callbacks.buf_lock && buffer_lock_needs_buffer(link->callbacks.buf_lock)) {
|
||||
paused = false;
|
||||
}
|
||||
|
||||
for (int j = 0; link->sinks[j]; j++) {
|
||||
buffer_list_t *sink = link->sinks[j];
|
||||
|
||||
@ -107,6 +112,10 @@ int links_enqueue_from_source(buffer_list_t *buf_list, link_t *link)
|
||||
link->callbacks.on_buffer(buf);
|
||||
}
|
||||
|
||||
if (link->callbacks.buf_lock) {
|
||||
buffer_lock_capture(link->callbacks.buf_lock, buf);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
@ -296,10 +305,10 @@ void links_dump(link_t *all_links)
|
||||
links_dump_buf_list(line, link->sinks[j]);
|
||||
}
|
||||
|
||||
if (link->callbacks.callback_name) {
|
||||
if (link->callbacks.name) {
|
||||
if (link->sinks[0])
|
||||
strcat(line, ", ");
|
||||
strcat(line, link->callbacks.callback_name);
|
||||
strcat(line, link->callbacks.name);
|
||||
}
|
||||
strcat(line, "]");
|
||||
|
||||
|
Reference in New Issue
Block a user