1// Copyright 2018 The WebRTC project authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5//------------------------------------------------ 6// Functions from PipeWire used in capturer code. 7//------------------------------------------------ 8 9// core.h 10void pw_core_destroy(pw_core *core); 11pw_type *pw_core_get_type(pw_core *core); 12pw_core * pw_core_new(pw_loop *main_loop, pw_properties *props); 13 14// loop.h 15void pw_loop_destroy(pw_loop *loop); 16pw_loop * pw_loop_new(pw_properties *properties); 17 18// pipewire.h 19void pw_init(int *argc, char **argv[]); 20 21// properties.h 22pw_properties * pw_properties_new_string(const char *args); 23 24// remote.h 25void pw_remote_add_listener(pw_remote *remote, spa_hook *listener, const pw_remote_events *events, void *data); 26int pw_remote_connect_fd(pw_remote *remote, int fd); 27void pw_remote_destroy(pw_remote *remote); 28pw_remote * pw_remote_new(pw_core *core, pw_properties *properties, size_t user_data_size); 29 30// stream.h 31void pw_stream_add_listener(pw_stream *stream, spa_hook *listener, const pw_stream_events *events, void *data); 32int pw_stream_connect(pw_stream *stream, enum pw_direction direction, const char *port_path, enum pw_stream_flags flags, const spa_pod **params, uint32_t n_params); 33pw_buffer *pw_stream_dequeue_buffer(pw_stream *stream); 34void pw_stream_destroy(pw_stream *stream); 35void pw_stream_finish_format(pw_stream *stream, int res, const spa_pod **params, uint32_t n_params); 36pw_stream * pw_stream_new(pw_remote *remote, const char *name, pw_properties *props); 37int pw_stream_queue_buffer(pw_stream *stream, pw_buffer *buffer); 38int pw_stream_set_active(pw_stream *stream, bool active); 39 40// thread-loop.h 41void pw_thread_loop_destroy(pw_thread_loop *loop); 42pw_thread_loop * pw_thread_loop_new(pw_loop *loop, const char *name); 43int pw_thread_loop_start(pw_thread_loop *loop); 44void pw_thread_loop_stop(pw_thread_loop *loop); 45