mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
fix sign confusion
This commit is contained in:
parent
74e5f9fbcf
commit
e918f9f77c
60 changed files with 164 additions and 146 deletions
|
|
@ -58,7 +58,7 @@ struct impl {
|
|||
struct udev_monitor *umonitor;
|
||||
|
||||
uint32_t cards[MAX_CARDS];
|
||||
int n_cards;
|
||||
uint32_t n_cards;
|
||||
|
||||
struct spa_source source;
|
||||
};
|
||||
|
|
@ -204,7 +204,7 @@ static int fill_item(struct impl *this, struct udev_device *dev,
|
|||
static int need_notify(struct impl *this, struct udev_device *dev, uint32_t id, bool enumerated)
|
||||
{
|
||||
const char *str;
|
||||
int idx, i, found = -1;
|
||||
uint32_t idx, i, found = SPA_ID_INVALID;
|
||||
|
||||
if (udev_device_get_property_value(dev, "PULSE_IGNORE"))
|
||||
return 0;
|
||||
|
|
@ -226,7 +226,7 @@ static int need_notify(struct impl *this, struct udev_device *dev, uint32_t id,
|
|||
|
||||
switch (id) {
|
||||
case SPA_MONITOR_EVENT_Added:
|
||||
if (found != -1)
|
||||
if (found != SPA_ID_INVALID)
|
||||
return 0;
|
||||
if (this->n_cards >= MAX_CARDS)
|
||||
return 0;
|
||||
|
|
@ -237,14 +237,14 @@ static int need_notify(struct impl *this, struct udev_device *dev, uint32_t id,
|
|||
break;
|
||||
|
||||
case SPA_MONITOR_EVENT_Changed:
|
||||
if (found == -1)
|
||||
if (found == SPA_ID_INVALID)
|
||||
return 0;
|
||||
if ((str = udev_device_get_property_value(dev, "SOUND_INITIALIZED")) == NULL)
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case SPA_MONITOR_EVENT_Removed:
|
||||
if (found == -1)
|
||||
if (found == SPA_ID_INVALID)
|
||||
return 0;
|
||||
this->cards[found] = this->cards[--this->n_cards];
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -538,7 +538,7 @@ impl_node_port_use_buffers(struct spa_node *node,
|
|||
uint32_t port_id, struct spa_buffer **buffers, uint32_t n_buffers)
|
||||
{
|
||||
struct state *this;
|
||||
int i;
|
||||
uint32_t i;
|
||||
|
||||
spa_return_val_if_fail(node != NULL, -EINVAL);
|
||||
|
||||
|
|
|
|||
|
|
@ -541,7 +541,7 @@ impl_node_port_use_buffers(struct spa_node *node,
|
|||
{
|
||||
struct state *this;
|
||||
int res;
|
||||
int i;
|
||||
uint32_t i;
|
||||
|
||||
spa_return_val_if_fail(node != NULL, -EINVAL);
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ static const struct format_info format_info[] = {
|
|||
|
||||
static snd_pcm_format_t spa_format_to_alsa(uint32_t format)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < SPA_N_ELEMENTS(format_info); i++) {
|
||||
if (format_info[i].spa_format == format)
|
||||
|
|
@ -174,7 +174,7 @@ static void sanitize_map(snd_pcm_chmap_t* map)
|
|||
{
|
||||
uint64_t mask = 0, p, dup = 0;
|
||||
const struct def_mask *def;
|
||||
int i, j, pos;
|
||||
uint32_t i, j, pos;
|
||||
|
||||
for (i = 0; i < map->channels; i++) {
|
||||
if (map->pos[i] < 0 || map->pos[i] > SND_CHMAP_LAST)
|
||||
|
|
@ -227,7 +227,8 @@ spa_alsa_enum_format(struct state *state, uint32_t *index,
|
|||
snd_pcm_format_mask_t *fmask;
|
||||
snd_pcm_access_mask_t *amask;
|
||||
snd_pcm_chmap_query_t **maps;
|
||||
int err, i, j, dir;
|
||||
size_t i, j;
|
||||
int err, dir;
|
||||
unsigned int min, max;
|
||||
uint8_t buffer[4096];
|
||||
struct spa_pod_builder b = { 0 };
|
||||
|
|
@ -324,7 +325,7 @@ spa_alsa_enum_format(struct state *state, uint32_t *index,
|
|||
spa_pod_builder_prop(&b, SPA_FORMAT_AUDIO_position, 0);
|
||||
spa_pod_builder_push_array(&b);
|
||||
for (j = 0; j < map->channels; j++) {
|
||||
spa_log_debug(state->log, "position %d %d", j, map->pos[j]);
|
||||
spa_log_debug(state->log, "position %zd %d", j, map->pos[j]);
|
||||
channel = chmap_position_to_channel(map->pos[j]);
|
||||
spa_pod_builder_id(&b, channel);
|
||||
}
|
||||
|
|
@ -943,7 +944,7 @@ next:
|
|||
|
||||
static void reset_buffers(struct state *this)
|
||||
{
|
||||
int i;
|
||||
uint32_t i;
|
||||
|
||||
spa_list_init(&this->free);
|
||||
spa_list_init(&this->ready);
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ extern "C" {
|
|||
#include <spa/param/param.h>
|
||||
#include <spa/param/audio/format-utils.h>
|
||||
|
||||
#define DEFAULT_RATE 48000
|
||||
#define DEFAULT_CHANNELS 2
|
||||
#define DEFAULT_RATE 48000u
|
||||
#define DEFAULT_CHANNELS 2u
|
||||
|
||||
struct props {
|
||||
char device[64];
|
||||
|
|
@ -127,7 +127,7 @@ struct state {
|
|||
int timerfd;
|
||||
bool alsa_started;
|
||||
bool slaved;
|
||||
int threshold;
|
||||
uint32_t threshold;
|
||||
|
||||
snd_htimestamp_t now;
|
||||
int64_t sample_count;
|
||||
|
|
|
|||
|
|
@ -453,6 +453,9 @@ typedef void (*channelmix_func_t) (void *data, int n_dst, void *dst[n_dst],
|
|||
void *matrix, float v, int n_bytes);
|
||||
|
||||
|
||||
#define ANY ((uint32_t)-1)
|
||||
#define EQ ((uint32_t)-2)
|
||||
|
||||
static const struct channelmix_info {
|
||||
uint32_t src_chan;
|
||||
uint64_t src_mask;
|
||||
|
|
@ -467,11 +470,11 @@ static const struct channelmix_info {
|
|||
#if defined (__SSE__)
|
||||
{ 2, MASK_MONO, 2, MASK_MONO, channelmix_copy_sse, FEATURE_SSE },
|
||||
{ 2, MASK_STEREO, 2, MASK_STEREO, channelmix_copy_sse, FEATURE_SSE },
|
||||
{ -2, 0, -2, 0, channelmix_copy_sse, FEATURE_SSE },
|
||||
{ EQ, 0, EQ, 0, channelmix_copy_sse, FEATURE_SSE },
|
||||
#endif
|
||||
{ 2, MASK_MONO, 2, MASK_MONO, channelmix_copy, 0 },
|
||||
{ 2, MASK_STEREO, 2, MASK_STEREO, channelmix_copy, 0 },
|
||||
{ -2, 0, -2, 0, channelmix_copy, 0 },
|
||||
{ EQ, 0, EQ, 0, channelmix_copy, 0 },
|
||||
|
||||
{ 1, MASK_MONO, 2, MASK_STEREO, channelmix_f32_1_2, 0 },
|
||||
{ 2, MASK_STEREO, 1, MASK_MONO, channelmix_f32_2_1, 0 },
|
||||
|
|
@ -501,17 +504,17 @@ static const struct channelmix_info {
|
|||
{ 8, MASK_7_1, 4, MASK_QUAD, channelmix_f32_7p1_4, 0 },
|
||||
{ 8, MASK_7_1, 4, MASK_3_1, channelmix_f32_7p1_3p1, 0 },
|
||||
|
||||
{ -1, 0, -1, 0, channelmix_f32_n_m, 0 },
|
||||
{ ANY, 0, ANY, 0, channelmix_f32_n_m, 0 },
|
||||
};
|
||||
|
||||
#define MATCH_CHAN(a,b) ((a) == -1 || (a) == (b))
|
||||
#define MATCH_CHAN(a,b) ((a) == ANY || (a) == (b))
|
||||
#define MATCH_FEATURES(a,b) ((a) == 0 || ((a) & (b)) != 0)
|
||||
#define MATCH_MASK(a,b) ((a) == 0 || ((a) & (b)) == (b))
|
||||
|
||||
static const struct channelmix_info *find_channelmix_info(uint32_t src_chan, uint64_t src_mask,
|
||||
uint32_t dst_chan, uint64_t dst_mask, uint32_t features)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < SPA_N_ELEMENTS(channelmix_table); i++) {
|
||||
if (!MATCH_FEATURES(channelmix_table[i].features, features))
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ static int make_matrix(struct impl *this,
|
|||
{
|
||||
float matrix[NUM_CHAN][NUM_CHAN] = {{ 0.0f }};
|
||||
uint64_t unassigned;
|
||||
int i, j, matrix_encoding = MATRIX_NORMAL, c;
|
||||
uint32_t i, j, matrix_encoding = MATRIX_NORMAL, c;
|
||||
float clev = SQRT1_2;
|
||||
float slev = SQRT1_2;
|
||||
float llev = 0.5f;
|
||||
|
|
@ -379,10 +379,9 @@ static int setup_convert(struct impl *this,
|
|||
const struct spa_audio_info *info)
|
||||
{
|
||||
const struct spa_audio_info *src_info, *dst_info;
|
||||
uint32_t src_chan, dst_chan;
|
||||
uint32_t i, src_chan, dst_chan;
|
||||
const struct channelmix_info *chanmix_info;
|
||||
uint64_t src_mask, dst_mask;
|
||||
int i;
|
||||
|
||||
if (direction == SPA_DIRECTION_INPUT) {
|
||||
src_info = info;
|
||||
|
|
@ -1142,7 +1141,7 @@ static int impl_node_process(struct spa_node *node)
|
|||
sbuf = &inport->buffers[inio->buffer_id];
|
||||
|
||||
{
|
||||
int i, n_bytes;
|
||||
uint32_t i, n_bytes;
|
||||
struct spa_buffer *sb = sbuf->outbuf, *db = dbuf->outbuf;
|
||||
uint32_t n_src_datas = sb->n_datas;
|
||||
uint32_t n_dst_datas = db->n_datas;
|
||||
|
|
|
|||
|
|
@ -759,7 +759,7 @@ static const struct conv_info {
|
|||
|
||||
static const struct conv_info *find_conv_info(uint32_t src_fmt, uint32_t dst_fmt, uint32_t features)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < SPA_N_ELEMENTS(conv_table); i++) {
|
||||
if (conv_table[i].src_fmt == src_fmt &&
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ static int setup_convert(struct impl *this)
|
|||
struct spa_audio_info informat, outformat;
|
||||
struct port *inport, *outport;
|
||||
const struct conv_info *conv;
|
||||
int i, j;
|
||||
uint32_t i, j;
|
||||
|
||||
inport = GET_IN_PORT(this, 0);
|
||||
outport = GET_OUT_PORT(this, 0);
|
||||
|
|
@ -809,9 +809,9 @@ static int impl_node_process(struct spa_node *node)
|
|||
struct spa_buffer *inb, *outb;
|
||||
const void **src_datas;
|
||||
void **dst_datas;
|
||||
uint32_t n_src_datas, n_dst_datas;
|
||||
int i, res = 0, n_samples = 0, maxsize;
|
||||
int size = 0;
|
||||
uint32_t i, n_src_datas, n_dst_datas;
|
||||
int res = 0;
|
||||
uint32_t n_samples, size, maxsize;
|
||||
|
||||
spa_return_val_if_fail(node != NULL, -EINVAL);
|
||||
|
||||
|
|
@ -850,7 +850,7 @@ static int impl_node_process(struct spa_node *node)
|
|||
n_src_datas = inb->n_datas;
|
||||
src_datas = alloca(sizeof(void*) * n_src_datas);
|
||||
|
||||
size = INT_MAX;
|
||||
size = UINT32_MAX;
|
||||
for (i = 0; i < n_src_datas; i++) {
|
||||
size = SPA_MIN(size, inb->datas[0].chunk->size);
|
||||
src_datas[i] = SPA_MEMBER(inb->datas[i].data, inb->datas[i].chunk->offset, void);
|
||||
|
|
|
|||
|
|
@ -87,10 +87,10 @@ struct impl {
|
|||
const struct spa_node_callbacks *callbacks;
|
||||
void *user_data;
|
||||
|
||||
int port_count;
|
||||
uint32_t port_count;
|
||||
struct port in_ports[MAX_PORTS];
|
||||
struct port out_ports[MAX_PORTS + 1];
|
||||
int monitor_count;
|
||||
uint32_t monitor_count;
|
||||
|
||||
bool started;
|
||||
uint32_t cpu_flags;
|
||||
|
|
@ -205,7 +205,7 @@ static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flag
|
|||
struct spa_audio_info info = { 0, };
|
||||
struct port *port;
|
||||
struct spa_pod *format;
|
||||
int i;
|
||||
uint32_t i;
|
||||
|
||||
if (spa_pod_object_parse(param,
|
||||
":", SPA_PARAM_PROFILE_format, "P", &format,
|
||||
|
|
@ -330,7 +330,7 @@ impl_node_get_port_ids(struct spa_node *node,
|
|||
uint32_t n_output_ids)
|
||||
{
|
||||
struct impl *this;
|
||||
int i;
|
||||
uint32_t i;
|
||||
|
||||
spa_return_val_if_fail(node != NULL, -EINVAL);
|
||||
|
||||
|
|
@ -923,12 +923,13 @@ static int impl_node_process(struct spa_node *node)
|
|||
struct impl *this;
|
||||
struct port *outport;
|
||||
struct spa_io_buffers *outio;
|
||||
int i, maxsize, res = 0, n_samples;
|
||||
uint32_t i, maxsize, n_samples;
|
||||
struct spa_data *sd, *dd;
|
||||
struct buffer *sbuf, *dbuf;
|
||||
uint32_t n_src_datas, n_dst_datas;
|
||||
const void **src_datas;
|
||||
void **dst_datas;
|
||||
int res = 0;
|
||||
|
||||
spa_return_val_if_fail(node != NULL, -EINVAL);
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ static void impl_peaks_process_sse(struct resample *r, int channel,
|
|||
{
|
||||
struct peaks_data *pd = r->data;
|
||||
float *s = src, *d = dst, m;
|
||||
int i, o, end, chunk, unrolled;
|
||||
uint32_t i, o, end, chunk, unrolled;
|
||||
__m128 in, max, mask = _mm_set_ps1(-0.0f);
|
||||
|
||||
o = i = 0;
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@
|
|||
#include <math.h>
|
||||
|
||||
struct peaks_data {
|
||||
unsigned o_count;
|
||||
unsigned i_count;
|
||||
uint32_t o_count;
|
||||
uint32_t i_count;
|
||||
float max_f[0];
|
||||
};
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ static void impl_peaks_process(struct resample *r, int channel,
|
|||
{
|
||||
struct peaks_data *pd = r->data;
|
||||
float *s = src, *d = dst, m;
|
||||
int i, o, end, chunk;
|
||||
uint32_t i, o, end, chunk;
|
||||
|
||||
o = i = 0;
|
||||
m = pd->max_f[channel];
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ struct impl {
|
|||
|
||||
struct port in_ports[1];
|
||||
struct port out_ports[MAX_PORTS];
|
||||
int port_count;
|
||||
uint32_t port_count;
|
||||
|
||||
bool started;
|
||||
uint32_t cpu_flags;
|
||||
|
|
@ -199,7 +199,7 @@ static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flag
|
|||
struct port *port;
|
||||
struct spa_audio_info info = { 0, };
|
||||
struct spa_pod *format;
|
||||
int i;
|
||||
uint32_t i;
|
||||
|
||||
if (spa_pod_object_parse(param,
|
||||
":", SPA_PARAM_PROFILE_format, "P", &format,
|
||||
|
|
@ -317,7 +317,7 @@ impl_node_get_port_ids(struct spa_node *node,
|
|||
uint32_t n_output_ids)
|
||||
{
|
||||
struct impl *this;
|
||||
int i;
|
||||
uint32_t i;
|
||||
|
||||
spa_return_val_if_fail(node != NULL, -EINVAL);
|
||||
|
||||
|
|
@ -841,12 +841,13 @@ static int impl_node_process(struct spa_node *node)
|
|||
struct impl *this;
|
||||
struct port *inport;
|
||||
struct spa_io_buffers *inio;
|
||||
int i, j, maxsize, res = 0, n_samples;
|
||||
uint32_t i, j, maxsize, n_samples;
|
||||
struct spa_data *sd, *dd;
|
||||
struct buffer *sbuf, *dbuf;
|
||||
uint32_t n_src_datas, n_dst_datas;
|
||||
const void **src_datas;
|
||||
void **dst_datas;
|
||||
int res = 0;
|
||||
|
||||
spa_return_val_if_fail(node != NULL, -EINVAL);
|
||||
|
||||
|
|
@ -997,7 +998,7 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
{
|
||||
struct impl *this;
|
||||
struct port *port;
|
||||
int i;
|
||||
uint32_t i;
|
||||
|
||||
spa_return_val_if_fail(factory != NULL, -EINVAL);
|
||||
spa_return_val_if_fail(handle != NULL, -EINVAL);
|
||||
|
|
|
|||
|
|
@ -122,11 +122,11 @@ struct impl {
|
|||
uint64_t last_error;
|
||||
|
||||
struct timespec now;
|
||||
int64_t start_time;
|
||||
int64_t sample_count;
|
||||
int64_t sample_time;
|
||||
int64_t last_ticks;
|
||||
int64_t last_monotonic;
|
||||
uint64_t start_time;
|
||||
uint64_t sample_count;
|
||||
uint64_t sample_time;
|
||||
uint64_t last_ticks;
|
||||
uint64_t last_monotonic;
|
||||
|
||||
uint64_t underrun;
|
||||
};
|
||||
|
|
@ -457,7 +457,8 @@ static int increase_bitpool(struct impl *this)
|
|||
|
||||
static int flush_data(struct impl *this, uint64_t now_time)
|
||||
{
|
||||
uint32_t total_frames, written;
|
||||
int written;
|
||||
uint32_t total_frames;
|
||||
uint64_t elapsed;
|
||||
int64_t queued;
|
||||
struct itimerspec ts;
|
||||
|
|
@ -465,7 +466,7 @@ static int flush_data(struct impl *this, uint64_t now_time)
|
|||
total_frames = 0;
|
||||
while (!spa_list_is_empty(&this->ready)) {
|
||||
uint8_t *src;
|
||||
int n_bytes, n_frames;
|
||||
uint32_t n_bytes, n_frames;
|
||||
struct buffer *b;
|
||||
struct spa_data *d;
|
||||
uint32_t index, offs, avail, l0, l1;
|
||||
|
|
@ -1150,7 +1151,7 @@ impl_node_port_use_buffers(struct spa_node *node,
|
|||
uint32_t port_id, struct spa_buffer **buffers, uint32_t n_buffers)
|
||||
{
|
||||
struct impl *this;
|
||||
int i;
|
||||
uint32_t i;
|
||||
|
||||
spa_return_val_if_fail(node != NULL, -EINVAL);
|
||||
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ static uint8_t a2dp_default_bitpool(struct spa_bt_monitor *monitor, uint8_t freq
|
|||
return 53;
|
||||
}
|
||||
|
||||
static int select_configuration_sbc(struct spa_bt_monitor *monitor, void *capabilities, int size, void *config)
|
||||
static int select_configuration_sbc(struct spa_bt_monitor *monitor, void *capabilities, size_t size, void *config)
|
||||
{
|
||||
a2dp_sbc_t *cap, conf;
|
||||
int bitpool;
|
||||
|
|
@ -238,7 +238,7 @@ static int select_configuration_sbc(struct spa_bt_monitor *monitor, void *capabi
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int select_configuration_aac(struct spa_bt_monitor *monitor, void *capabilities, int size, void *config)
|
||||
static int select_configuration_aac(struct spa_bt_monitor *monitor, void *capabilities, size_t size, void *config)
|
||||
{
|
||||
a2dp_aac_t *cap, conf;
|
||||
int freq;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#define MAX_FACTORIES 16
|
||||
|
||||
static const struct spa_handle_factory *factories[MAX_FACTORIES];
|
||||
static int n_factories;
|
||||
static uint32_t n_factories;
|
||||
|
||||
int spa_handle_factory_register(const struct spa_handle_factory *factory)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ static void on_trace_event(struct spa_source *source)
|
|||
fprintf(impl->file, "failed to read event fd: %s", strerror(errno));
|
||||
|
||||
while ((avail = spa_ringbuffer_get_read_index(&impl->trace_rb, &index)) > 0) {
|
||||
uint32_t offset, first;
|
||||
int32_t offset, first;
|
||||
|
||||
if (avail > TRACE_BUFFER) {
|
||||
index += avail - TRACE_BUFFER;
|
||||
|
|
|
|||
|
|
@ -198,8 +198,8 @@ loop_invoke(struct spa_loop *loop,
|
|||
if (in_thread) {
|
||||
res = func(loop, false, seq, data, size, user_data);
|
||||
} else {
|
||||
int32_t filled, avail;
|
||||
uint32_t idx, offset, l0;
|
||||
int32_t filled;
|
||||
uint32_t avail, idx, offset, l0;
|
||||
|
||||
filled = spa_ringbuffer_get_write_index(&impl->buffer, &idx);
|
||||
if (filled < 0 || filled > DATAS_SIZE) {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#define MAX_FACTORIES 16
|
||||
|
||||
static const struct spa_handle_factory *factories[MAX_FACTORIES];
|
||||
static int n_factories;
|
||||
static uint32_t n_factories;
|
||||
|
||||
int spa_handle_factory_register(const struct spa_handle_factory *factory)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ static int spa_v4l2_clear_buffers(struct impl *this)
|
|||
{
|
||||
struct port *port = &this->out_ports[0];
|
||||
struct v4l2_requestbuffers reqbuf;
|
||||
int i;
|
||||
uint32_t i;
|
||||
|
||||
if (port->n_buffers == 0)
|
||||
return 0;
|
||||
|
|
@ -354,7 +354,7 @@ static const struct format_info format_info[] = {
|
|||
|
||||
static const struct format_info *fourcc_to_format_info(uint32_t fourcc)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < SPA_N_ELEMENTS(format_info); i++) {
|
||||
if (format_info[i].fourcc == fourcc)
|
||||
|
|
@ -381,7 +381,7 @@ static const struct format_info *find_format_info_by_media_type(uint32_t type,
|
|||
uint32_t format,
|
||||
int startidx)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = startidx; i < SPA_N_ELEMENTS(format_info); i++) {
|
||||
if ((format_info[i].media_type == type) &&
|
||||
|
|
@ -1214,7 +1214,7 @@ static int spa_v4l2_use_buffers(struct impl *this, struct spa_buffer **buffers,
|
|||
struct port *port = &this->out_ports[0];
|
||||
struct spa_v4l2_device *dev = &port->dev;
|
||||
struct v4l2_requestbuffers reqbuf;
|
||||
int i;
|
||||
unsigned int i;
|
||||
struct spa_data *d;
|
||||
|
||||
if (n_buffers > 0) {
|
||||
|
|
@ -1311,7 +1311,7 @@ mmap_init(struct impl *this,
|
|||
struct port *port = &this->out_ports[0];
|
||||
struct spa_v4l2_device *dev = &port->dev;
|
||||
struct v4l2_requestbuffers reqbuf;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
port->memtype = V4L2_MEMORY_MMAP;
|
||||
|
||||
|
|
@ -1490,7 +1490,7 @@ static int spa_v4l2_stream_off(struct impl *this)
|
|||
struct port *port = &this->out_ports[0];
|
||||
struct spa_v4l2_device *dev = &port->dev;
|
||||
enum v4l2_buf_type type;
|
||||
int i;
|
||||
uint32_t i;
|
||||
|
||||
if (dev->fd == -1)
|
||||
return -EIO;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue