jack1 codebase
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.

94 lines
2.6KB

  1. #ifndef __jack_libjack_local_h__
  2. #define __jack_libjack_local_h__
  3. /* Client data structure, in the client address space. */
  4. struct _jack_client {
  5. jack_control_t *engine;
  6. jack_client_control_t *control;
  7. jack_shm_info_t engine_shm;
  8. jack_shm_info_t control_shm;
  9. struct pollfd* pollfd;
  10. int pollmax;
  11. int graph_next_fd;
  12. int request_fd;
  13. int upstream_is_jackd;
  14. /* these two are copied from the engine when the
  15. * client is created.
  16. */
  17. jack_port_type_id_t n_port_types;
  18. jack_shm_info_t* port_segment;
  19. JSList *ports;
  20. JSList *ports_ext;
  21. pthread_t thread;
  22. char fifo_prefix[PATH_MAX+1];
  23. void (*on_shutdown)(void *arg);
  24. void *on_shutdown_arg;
  25. void (*on_info_shutdown)(int, const char*, void *arg);
  26. void *on_info_shutdown_arg;
  27. char thread_ok : 1;
  28. char first_active : 1;
  29. pthread_t thread_id;
  30. char name[JACK_CLIENT_NAME_SIZE];
  31. #ifdef JACK_USE_MACH_THREADS
  32. /* specific ressources for server/client real-time thread communication */
  33. mach_port_t clienttask, bp, serverport, replyport;
  34. trivial_message message;
  35. pthread_t process_thread;
  36. char rt_thread_ok : 1;
  37. #endif
  38. /* callbacks
  39. */
  40. JackProcessCallback process;
  41. void *process_arg;
  42. JackThreadInitCallback thread_init;
  43. void *thread_init_arg;
  44. JackBufferSizeCallback bufsize;
  45. void *bufsize_arg;
  46. JackSampleRateCallback srate;
  47. void *srate_arg;
  48. JackPortRegistrationCallback port_register;
  49. void *port_register_arg;
  50. JackPortConnectCallback port_connect;
  51. void *port_connect_arg;
  52. JackGraphOrderCallback graph_order;
  53. void *graph_order_arg;
  54. JackXRunCallback xrun;
  55. void *xrun_arg;
  56. JackSyncCallback sync_cb;
  57. void *sync_arg;
  58. JackTimebaseCallback timebase_cb;
  59. void *timebase_arg;
  60. JackFreewheelCallback freewheel_cb;
  61. void *freewheel_arg;
  62. JackClientRegistrationCallback client_register;
  63. void *client_register_arg;
  64. JackThreadCallback thread_cb;
  65. void *thread_cb_arg;
  66. /* external clients: set by libjack
  67. * internal clients: set by engine */
  68. int (*deliver_request)(void*, jack_request_t*); /* JOQ: 64/32 bug! */
  69. void *deliver_arg;
  70. };
  71. extern int jack_client_deliver_request (const jack_client_t *client,
  72. jack_request_t *req);
  73. extern jack_port_t *jack_port_new (const jack_client_t *client,
  74. jack_port_id_t port_id,
  75. jack_control_t *control);
  76. extern void *jack_zero_filled_buffer;
  77. extern void jack_set_clock_source (jack_timer_type_t);
  78. #endif /* __jack_libjack_local_h__ */