mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
add defines for max buffer size
This commit is contained in:
parent
f30b4bf506
commit
81fc595e3d
5 changed files with 11 additions and 8 deletions
|
|
@ -151,8 +151,8 @@ struct impl {
|
||||||
|
|
||||||
#define CHECK_PORT(this,d,p) ((d) == SPA_DIRECTION_INPUT && (p) == 0)
|
#define CHECK_PORT(this,d,p) ((d) == SPA_DIRECTION_INPUT && (p) == 0)
|
||||||
|
|
||||||
static const uint32_t default_min_latency = 128;
|
static const uint32_t default_min_latency = MIN_LATENCY;
|
||||||
static const uint32_t default_max_latency = 1024;
|
static const uint32_t default_max_latency = MAX_LATENCY;
|
||||||
|
|
||||||
static void reset_props(struct props *props)
|
static void reset_props(struct props *props)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -127,8 +127,8 @@ struct impl {
|
||||||
|
|
||||||
#define CHECK_PORT(this,d,p) ((d) == SPA_DIRECTION_OUTPUT && (p) == 0)
|
#define CHECK_PORT(this,d,p) ((d) == SPA_DIRECTION_OUTPUT && (p) == 0)
|
||||||
|
|
||||||
static const uint32_t default_min_latency = 128;
|
static const uint32_t default_min_latency = MIN_LATENCY;
|
||||||
static const uint32_t default_max_latency = 1024;
|
static const uint32_t default_max_latency = MAX_LATENCY;
|
||||||
|
|
||||||
static void reset_props(struct props *props)
|
static void reset_props(struct props *props)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,8 @@ extern "C" {
|
||||||
#define BLUEZ_MEDIA_ENDPOINT_INTERFACE BLUEZ_SERVICE ".MediaEndpoint1"
|
#define BLUEZ_MEDIA_ENDPOINT_INTERFACE BLUEZ_SERVICE ".MediaEndpoint1"
|
||||||
#define BLUEZ_MEDIA_TRANSPORT_INTERFACE BLUEZ_SERVICE ".MediaTransport1"
|
#define BLUEZ_MEDIA_TRANSPORT_INTERFACE BLUEZ_SERVICE ".MediaTransport1"
|
||||||
|
|
||||||
|
#define MIN_LATENCY 128
|
||||||
|
#define MAX_LATENCY 1024
|
||||||
|
|
||||||
#define ENDPOINT_INTROSPECT_XML \
|
#define ENDPOINT_INTROSPECT_XML \
|
||||||
DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
|
DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
|
||||||
|
|
|
||||||
|
|
@ -134,8 +134,8 @@ struct impl {
|
||||||
|
|
||||||
#define CHECK_PORT(this,d,p) ((d) == SPA_DIRECTION_INPUT && (p) == 0)
|
#define CHECK_PORT(this,d,p) ((d) == SPA_DIRECTION_INPUT && (p) == 0)
|
||||||
|
|
||||||
static const uint32_t default_min_latency = 128;
|
static const uint32_t default_min_latency = MIN_LATENCY;
|
||||||
static const uint32_t default_max_latency = 1024;
|
static const uint32_t default_max_latency = MAX_LATENCY;
|
||||||
|
|
||||||
static void reset_props(struct props *props)
|
static void reset_props(struct props *props)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ static void reset_props(struct props *props)
|
||||||
props->mute = DEFAULT_MUTE;
|
props->mute = DEFAULT_MUTE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define MAX_SAMPLES 1024
|
||||||
#define MAX_BUFFERS 16
|
#define MAX_BUFFERS 16
|
||||||
|
|
||||||
struct buffer {
|
struct buffer {
|
||||||
|
|
@ -381,9 +382,9 @@ impl_node_port_enum_params(void *object, int seq,
|
||||||
SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(2, 1, MAX_BUFFERS),
|
SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(2, 1, MAX_BUFFERS),
|
||||||
SPA_PARAM_BUFFERS_blocks, SPA_POD_Int(1),
|
SPA_PARAM_BUFFERS_blocks, SPA_POD_Int(1),
|
||||||
SPA_PARAM_BUFFERS_size, SPA_POD_CHOICE_RANGE_Int(
|
SPA_PARAM_BUFFERS_size, SPA_POD_CHOICE_RANGE_Int(
|
||||||
1024 * this->bpf,
|
MAX_SAMPLES * this->bpf,
|
||||||
16 * this->bpf,
|
16 * this->bpf,
|
||||||
INT32_MAX / this->bpf),
|
INT32_MAX),
|
||||||
SPA_PARAM_BUFFERS_stride, SPA_POD_Int(0),
|
SPA_PARAM_BUFFERS_stride, SPA_POD_Int(0),
|
||||||
SPA_PARAM_BUFFERS_align, SPA_POD_Int(16));
|
SPA_PARAM_BUFFERS_align, SPA_POD_Int(16));
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue