mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
jack: implement statistics
This commit is contained in:
parent
33cac9932c
commit
84071d2cac
3 changed files with 21 additions and 16 deletions
|
|
@ -2,7 +2,6 @@ pipewire_jack_sources = [
|
|||
'pipewire-jack.c',
|
||||
'metadata.c',
|
||||
'ringbuffer.c',
|
||||
'statistics.c',
|
||||
'uuid.c',
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -2246,6 +2246,8 @@ float jack_cpu_load (jack_client_t *client)
|
|||
return res;
|
||||
}
|
||||
|
||||
#include "statistics.c"
|
||||
|
||||
SPA_EXPORT
|
||||
jack_port_t * jack_port_register (jack_client_t *client,
|
||||
const char *port_name,
|
||||
|
|
|
|||
|
|
@ -17,34 +17,38 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include <jack/statistics.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
|
||||
SPA_EXPORT
|
||||
float jack_get_max_delayed_usecs (jack_client_t *client)
|
||||
{
|
||||
pw_log_warn("not implemented");
|
||||
return 0.0f;
|
||||
struct client *c = (struct client *) client;
|
||||
float res = 0.0f;
|
||||
|
||||
if (c->driver_activation)
|
||||
res = (float)c->driver_activation->max_delay / SPA_USEC_PER_SEC;
|
||||
|
||||
pw_log_trace(NAME" %p: max delay %f", client, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
SPA_EXPORT
|
||||
float jack_get_xrun_delayed_usecs (jack_client_t *client)
|
||||
{
|
||||
pw_log_warn("not implemented");
|
||||
return 0.0f;
|
||||
struct client *c = (struct client *) client;
|
||||
float res = 0.0f;
|
||||
|
||||
if (c->driver_activation)
|
||||
res = (float)c->driver_activation->xrun_delay / SPA_USEC_PER_SEC;
|
||||
|
||||
pw_log_trace(NAME" %p: xrun delay %f", client, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
SPA_EXPORT
|
||||
void jack_reset_max_delayed_usecs (jack_client_t *client)
|
||||
{
|
||||
pw_log_warn("not implemented");
|
||||
struct client *c = (struct client *) client;
|
||||
if (c->driver_activation)
|
||||
c->driver_activation->max_delay = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue