You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.9 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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. // Functions from PipeWire used in capturer code.
  6. //------------------------------------------------
  7. // core.h
  8. void pw_core_destroy(pw_core *core);
  9. pw_type *pw_core_get_type(pw_core *core);
  10. pw_core * pw_core_new(pw_loop *main_loop, pw_properties *props);
  11. // loop.h
  12. void pw_loop_destroy(pw_loop *loop);
  13. pw_loop * pw_loop_new(pw_properties *properties);
  14. // pipewire.h
  15. void pw_init(int *argc, char **argv[]);
  16. // properties.h
  17. pw_properties * pw_properties_new_string(const char *args);
  18. // remote.h
  19. void pw_remote_add_listener(pw_remote *remote, spa_hook *listener, const pw_remote_events *events, void *data);
  20. int pw_remote_connect_fd(pw_remote *remote, int fd);
  21. void pw_remote_destroy(pw_remote *remote);
  22. pw_remote * pw_remote_new(pw_core *core, pw_properties *properties, size_t user_data_size);
  23. // stream.h
  24. void pw_stream_add_listener(pw_stream *stream, spa_hook *listener, const pw_stream_events *events, void *data);
  25. int 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);
  26. pw_buffer *pw_stream_dequeue_buffer(pw_stream *stream);
  27. void pw_stream_destroy(pw_stream *stream);
  28. void pw_stream_finish_format(pw_stream *stream, int res, const spa_pod **params, uint32_t n_params);
  29. pw_stream * pw_stream_new(pw_remote *remote, const char *name, pw_properties *props);
  30. int pw_stream_queue_buffer(pw_stream *stream, pw_buffer *buffer);
  31. int pw_stream_set_active(pw_stream *stream, bool active);
  32. // thread-loop.h
  33. void pw_thread_loop_destroy(pw_thread_loop *loop);
  34. pw_thread_loop * pw_thread_loop_new(pw_loop *loop, const char *name);
  35. int pw_thread_loop_start(pw_thread_loop *loop);
  36. void pw_thread_loop_stop(pw_thread_loop *loop);