mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-14 08:56:37 -05:00
cleaup up the result codes
This commit is contained in:
parent
caaeaff223
commit
dda28b1589
10 changed files with 63 additions and 68 deletions
|
|
@ -206,7 +206,7 @@ static inline int spa_pod_parser_getv(struct spa_pod_parser *parser,
|
||||||
switch (*format) {
|
switch (*format) {
|
||||||
case '<':
|
case '<':
|
||||||
if (pod == NULL || SPA_POD_TYPE(pod) != SPA_POD_TYPE_OBJECT)
|
if (pod == NULL || SPA_POD_TYPE(pod) != SPA_POD_TYPE_OBJECT)
|
||||||
return SPA_RESULT_ERROR;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
if (++parser->depth >= SPA_POD_MAX_DEPTH)
|
if (++parser->depth >= SPA_POD_MAX_DEPTH)
|
||||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||||
|
|
||||||
|
|
@ -215,7 +215,7 @@ static inline int spa_pod_parser_getv(struct spa_pod_parser *parser,
|
||||||
goto read_pod;
|
goto read_pod;
|
||||||
case '[':
|
case '[':
|
||||||
if (pod == NULL || SPA_POD_TYPE(pod) != SPA_POD_TYPE_STRUCT)
|
if (pod == NULL || SPA_POD_TYPE(pod) != SPA_POD_TYPE_STRUCT)
|
||||||
return SPA_RESULT_ERROR;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
if (++parser->depth >= SPA_POD_MAX_DEPTH)
|
if (++parser->depth >= SPA_POD_MAX_DEPTH)
|
||||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||||
|
|
||||||
|
|
@ -224,7 +224,7 @@ static inline int spa_pod_parser_getv(struct spa_pod_parser *parser,
|
||||||
goto read_pod;
|
goto read_pod;
|
||||||
case ']': case '>':
|
case ']': case '>':
|
||||||
if (current != NULL)
|
if (current != NULL)
|
||||||
return SPA_RESULT_ERROR;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
if (--parser->depth < 0)
|
if (--parser->depth < 0)
|
||||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@
|
||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __SPA_DEFS_H__
|
#ifndef __SPA_UTILS_DEFS_H__
|
||||||
#define __SPA_DEFS_H__
|
#define __SPA_UTILS_DEFS_H__
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
@ -36,45 +36,40 @@ enum spa_result {
|
||||||
SPA_RESULT_OK = 0,
|
SPA_RESULT_OK = 0,
|
||||||
SPA_RESULT_ERROR = -1,
|
SPA_RESULT_ERROR = -1,
|
||||||
SPA_RESULT_ERRNO = -2,
|
SPA_RESULT_ERRNO = -2,
|
||||||
SPA_RESULT_INACTIVE = -3,
|
SPA_RESULT_NOT_FOUND = -3,
|
||||||
SPA_RESULT_NO_FORMAT = -4,
|
SPA_RESULT_BUSY = -4,
|
||||||
SPA_RESULT_INVALID_COMMAND = -5,
|
SPA_RESULT_NO_MEMORY = -5,
|
||||||
SPA_RESULT_INVALID_PORT = -6,
|
SPA_RESULT_NO_PERMISSION = -6,
|
||||||
SPA_RESULT_HAVE_BUFFER = -7,
|
SPA_RESULT_INVALID_ARGUMENTS = -7,
|
||||||
SPA_RESULT_NEED_BUFFER = -8,
|
SPA_RESULT_NOT_IMPLEMENTED = -8,
|
||||||
SPA_RESULT_PORTS_CHANGED = -9,
|
SPA_RESULT_UNKNOWN_INTERFACE = -9,
|
||||||
SPA_RESULT_FORMAT_CHANGED = -10,
|
SPA_RESULT_UNEXPECTED = -10,
|
||||||
SPA_RESULT_PROPERTIES_CHANGED = -11,
|
SPA_RESULT_INCOMPATIBLE = -11,
|
||||||
SPA_RESULT_NOT_IMPLEMENTED = -12,
|
SPA_RESULT_INCOMPATIBLE_VERSION = -12,
|
||||||
SPA_RESULT_INVALID_PROPERTY_INDEX = -13,
|
SPA_RESULT_INCOMPLETE = -13,
|
||||||
SPA_RESULT_PROPERTY_UNSET = -14,
|
SPA_RESULT_ENUM_END = -14,
|
||||||
SPA_RESULT_ENUM_END = -15,
|
|
||||||
SPA_RESULT_WRONG_PROPERTY_TYPE = -16,
|
SPA_RESULT_INACTIVE = -15,
|
||||||
SPA_RESULT_WRONG_PROPERTY_SIZE = -17,
|
SPA_RESULT_INVALID_COMMAND = -16,
|
||||||
SPA_RESULT_INVALID_MEDIA_TYPE = -18,
|
|
||||||
SPA_RESULT_INVALID_FORMAT_PROPERTIES = -19,
|
SPA_RESULT_INVALID_PORT = -17,
|
||||||
SPA_RESULT_FORMAT_INCOMPLETE = -20,
|
SPA_RESULT_INVALID_DIRECTION = -18,
|
||||||
SPA_RESULT_INVALID_ARGUMENTS = -21,
|
SPA_RESULT_PORTS_CHANGED = -19,
|
||||||
SPA_RESULT_UNKNOWN_INTERFACE = -22,
|
SPA_RESULT_TOO_MANY_PORTS = -20,
|
||||||
SPA_RESULT_INVALID_DIRECTION = -23,
|
|
||||||
SPA_RESULT_TOO_MANY_PORTS = -24,
|
SPA_RESULT_PARAM_CHANGED = -21,
|
||||||
SPA_RESULT_INVALID_PROPERTY_ACCESS = -25,
|
SPA_RESULT_PARAM_UNSET = -22,
|
||||||
SPA_RESULT_UNEXPECTED = -26,
|
SPA_RESULT_UNKNOWN_PARAM = -23,
|
||||||
SPA_RESULT_NO_BUFFERS = -27,
|
|
||||||
SPA_RESULT_INVALID_BUFFER_ID = -28,
|
SPA_RESULT_NO_FORMAT = -24,
|
||||||
SPA_RESULT_WRONG_STATE = -29,
|
SPA_RESULT_FORMAT_CHANGED = -25,
|
||||||
SPA_RESULT_ASYNC_BUSY = -30,
|
SPA_RESULT_INVALID_MEDIA_TYPE = -26,
|
||||||
SPA_RESULT_INVALID_OBJECT_ID = -31,
|
|
||||||
SPA_RESULT_NO_MEMORY = -32,
|
SPA_RESULT_INVALID_BUFFER_ID = -27,
|
||||||
SPA_RESULT_NO_PERMISSION = -33,
|
SPA_RESULT_NO_BUFFERS = -28,
|
||||||
SPA_RESULT_SKIPPED = -34,
|
SPA_RESULT_OUT_OF_BUFFERS = -29,
|
||||||
SPA_RESULT_OUT_OF_BUFFERS = -35,
|
SPA_RESULT_HAVE_BUFFER = -30,
|
||||||
SPA_RESULT_INCOMPATIBLE_PROPS = -36,
|
SPA_RESULT_NEED_BUFFER = -31,
|
||||||
SPA_RESULT_INCOMPATIBLE_VERSION = -37,
|
|
||||||
SPA_RESULT_NOT_FOUND = -38,
|
|
||||||
SPA_RESULT_BUSY = -39,
|
|
||||||
SPA_RESULT_UNKNOWN_PARAM = -40,
|
|
||||||
SPA_RESULT_PARAM_INCOMPLETE = -41,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SPA_ASYNC_BIT (1 << 30)
|
#define SPA_ASYNC_BIT (1 << 30)
|
||||||
|
|
@ -193,4 +188,4 @@ struct spa_fraction {
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __SPA_DEFS_H__ */
|
#endif /* __SPA_UTILS_DEFS_H__ */
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ filter_prop(struct spa_pod_builder *b,
|
||||||
|
|
||||||
/* incompatible property types */
|
/* incompatible property types */
|
||||||
if (p1->body.value.type != p2->body.value.type)
|
if (p1->body.value.type != p2->body.value.type)
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
|
|
||||||
rt1 = p1->body.flags & SPA_POD_PROP_RANGE_MASK;
|
rt1 = p1->body.flags & SPA_POD_PROP_RANGE_MASK;
|
||||||
rt2 = p2->body.flags & SPA_POD_PROP_RANGE_MASK;
|
rt2 = p2->body.flags & SPA_POD_PROP_RANGE_MASK;
|
||||||
|
|
@ -192,7 +192,7 @@ filter_prop(struct spa_pod_builder *b,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (n_copied == 0)
|
if (n_copied == 0)
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
np->body.flags |= SPA_POD_PROP_RANGE_ENUM | SPA_POD_PROP_FLAG_UNSET;
|
np->body.flags |= SPA_POD_PROP_RANGE_ENUM | SPA_POD_PROP_FLAG_UNSET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -209,7 +209,7 @@ filter_prop(struct spa_pod_builder *b,
|
||||||
n_copied++;
|
n_copied++;
|
||||||
}
|
}
|
||||||
if (n_copied == 0)
|
if (n_copied == 0)
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
np->body.flags |= SPA_POD_PROP_RANGE_ENUM | SPA_POD_PROP_FLAG_UNSET;
|
np->body.flags |= SPA_POD_PROP_RANGE_ENUM | SPA_POD_PROP_FLAG_UNSET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -231,7 +231,7 @@ filter_prop(struct spa_pod_builder *b,
|
||||||
n_copied++;
|
n_copied++;
|
||||||
}
|
}
|
||||||
if (n_copied == 0)
|
if (n_copied == 0)
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
np->body.flags |= SPA_POD_PROP_RANGE_ENUM | SPA_POD_PROP_FLAG_UNSET;
|
np->body.flags |= SPA_POD_PROP_RANGE_ENUM | SPA_POD_PROP_FLAG_UNSET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -313,7 +313,7 @@ int pod_filter(struct spa_pod_builder *b,
|
||||||
case SPA_POD_TYPE_STRUCT:
|
case SPA_POD_TYPE_STRUCT:
|
||||||
if (pf != NULL) {
|
if (pf != NULL) {
|
||||||
if (SPA_POD_TYPE(pf) != SPA_POD_TYPE_STRUCT)
|
if (SPA_POD_TYPE(pf) != SPA_POD_TYPE_STRUCT)
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
|
|
||||||
pc = SPA_POD_CONTENTS(struct spa_pod_struct, pp);
|
pc = SPA_POD_CONTENTS(struct spa_pod_struct, pp);
|
||||||
pcs = SPA_POD_CONTENTS_SIZE(struct spa_pod_struct, pp);
|
pcs = SPA_POD_CONTENTS_SIZE(struct spa_pod_struct, pp);
|
||||||
|
|
@ -334,7 +334,7 @@ int pod_filter(struct spa_pod_builder *b,
|
||||||
p1 = (struct spa_pod_object *) pp;
|
p1 = (struct spa_pod_object *) pp;
|
||||||
|
|
||||||
if (SPA_POD_TYPE(pf) != SPA_POD_TYPE_OBJECT)
|
if (SPA_POD_TYPE(pf) != SPA_POD_TYPE_OBJECT)
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
|
|
||||||
pc = SPA_POD_CONTENTS(struct spa_pod_object, pp);
|
pc = SPA_POD_CONTENTS(struct spa_pod_object, pp);
|
||||||
pcs = SPA_POD_CONTENTS_SIZE(struct spa_pod_object, pp);
|
pcs = SPA_POD_CONTENTS_SIZE(struct spa_pod_object, pp);
|
||||||
|
|
@ -365,9 +365,9 @@ int pod_filter(struct spa_pod_builder *b,
|
||||||
default:
|
default:
|
||||||
if (pf != NULL) {
|
if (pf != NULL) {
|
||||||
if (SPA_POD_SIZE(pp) != SPA_POD_SIZE(pf))
|
if (SPA_POD_SIZE(pp) != SPA_POD_SIZE(pf))
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
if (memcmp(pp, pf, SPA_POD_SIZE(pp)) != 0)
|
if (memcmp(pp, pf, SPA_POD_SIZE(pp)) != 0)
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
do_advance = true;
|
do_advance = true;
|
||||||
}
|
}
|
||||||
do_copy = true;
|
do_copy = true;
|
||||||
|
|
@ -424,12 +424,12 @@ int pod_compare(const struct spa_pod *pod1,
|
||||||
uint32_t p1cs, p2cs;
|
uint32_t p1cs, p2cs;
|
||||||
|
|
||||||
if (p2 == NULL)
|
if (p2 == NULL)
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
|
|
||||||
switch (SPA_POD_TYPE(p1)) {
|
switch (SPA_POD_TYPE(p1)) {
|
||||||
case SPA_POD_TYPE_STRUCT:
|
case SPA_POD_TYPE_STRUCT:
|
||||||
if (SPA_POD_TYPE(p2) != SPA_POD_TYPE_STRUCT)
|
if (SPA_POD_TYPE(p2) != SPA_POD_TYPE_STRUCT)
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
|
|
||||||
p1c = SPA_POD_CONTENTS(struct spa_pod_struct, p1);
|
p1c = SPA_POD_CONTENTS(struct spa_pod_struct, p1);
|
||||||
p1cs = SPA_POD_CONTENTS_SIZE(struct spa_pod_struct, p1);
|
p1cs = SPA_POD_CONTENTS_SIZE(struct spa_pod_struct, p1);
|
||||||
|
|
@ -440,7 +440,7 @@ int pod_compare(const struct spa_pod *pod1,
|
||||||
break;
|
break;
|
||||||
case SPA_POD_TYPE_OBJECT:
|
case SPA_POD_TYPE_OBJECT:
|
||||||
if (SPA_POD_TYPE(p2) != SPA_POD_TYPE_OBJECT)
|
if (SPA_POD_TYPE(p2) != SPA_POD_TYPE_OBJECT)
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
|
|
||||||
p1c = SPA_POD_CONTENTS(struct spa_pod_object, p1);
|
p1c = SPA_POD_CONTENTS(struct spa_pod_object, p1);
|
||||||
p1cs = SPA_POD_CONTENTS_SIZE(struct spa_pod_object, p1);
|
p1cs = SPA_POD_CONTENTS_SIZE(struct spa_pod_object, p1);
|
||||||
|
|
@ -457,15 +457,15 @@ int pod_compare(const struct spa_pod *pod1,
|
||||||
pr2 = find_prop(pod2, pod2_size, pr1->body.key);
|
pr2 = find_prop(pod2, pod2_size, pr1->body.key);
|
||||||
|
|
||||||
if (pr2 == NULL)
|
if (pr2 == NULL)
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
|
|
||||||
/* incompatible property types */
|
/* incompatible property types */
|
||||||
if (pr1->body.value.type != pr2->body.value.type)
|
if (pr1->body.value.type != pr2->body.value.type)
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
|
|
||||||
if (pr1->body.flags & SPA_POD_PROP_FLAG_UNSET ||
|
if (pr1->body.flags & SPA_POD_PROP_FLAG_UNSET ||
|
||||||
pr2->body.flags & SPA_POD_PROP_FLAG_UNSET)
|
pr2->body.flags & SPA_POD_PROP_FLAG_UNSET)
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
|
|
||||||
a1 = SPA_MEMBER(pr1, sizeof(struct spa_pod_prop), void);
|
a1 = SPA_MEMBER(pr1, sizeof(struct spa_pod_prop), void);
|
||||||
a2 = SPA_MEMBER(pr2, sizeof(struct spa_pod_prop), void);
|
a2 = SPA_MEMBER(pr2, sizeof(struct spa_pod_prop), void);
|
||||||
|
|
@ -475,7 +475,7 @@ int pod_compare(const struct spa_pod *pod1,
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
if (SPA_POD_TYPE(p1) != SPA_POD_TYPE(p2))
|
if (SPA_POD_TYPE(p1) != SPA_POD_TYPE(p2))
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
|
|
||||||
res = compare_value(SPA_POD_TYPE(p1), SPA_POD_BODY(p1), SPA_POD_BODY(p2));
|
res = compare_value(SPA_POD_TYPE(p1), SPA_POD_BODY(p1), SPA_POD_BODY(p2));
|
||||||
do_advance = true;
|
do_advance = true;
|
||||||
|
|
@ -493,7 +493,7 @@ int pod_compare(const struct spa_pod *pod1,
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
if (p2 != NULL)
|
if (p2 != NULL)
|
||||||
return SPA_RESULT_INCOMPATIBLE_PROPS;
|
return SPA_RESULT_INCOMPATIBLE;
|
||||||
|
|
||||||
return SPA_RESULT_OK;
|
return SPA_RESULT_OK;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -582,7 +582,7 @@ static int impl_node_process_input(struct spa_node *node)
|
||||||
|
|
||||||
this = SPA_CONTAINER_OF(node, struct state, node);
|
this = SPA_CONTAINER_OF(node, struct state, node);
|
||||||
input = this->io;
|
input = this->io;
|
||||||
spa_return_val_if_fail(input != NULL, SPA_RESULT_WRONG_STATE);
|
spa_return_val_if_fail(input != NULL, SPA_RESULT_UNEXPECTED);
|
||||||
|
|
||||||
if (input->status == SPA_RESULT_HAVE_BUFFER && input->buffer_id < this->n_buffers) {
|
if (input->status == SPA_RESULT_HAVE_BUFFER && input->buffer_id < this->n_buffers) {
|
||||||
struct buffer *b = &this->buffers[input->buffer_id];
|
struct buffer *b = &this->buffers[input->buffer_id];
|
||||||
|
|
|
||||||
|
|
@ -625,7 +625,7 @@ static int impl_node_process_output(struct spa_node *node)
|
||||||
|
|
||||||
this = SPA_CONTAINER_OF(node, struct state, node);
|
this = SPA_CONTAINER_OF(node, struct state, node);
|
||||||
io = this->io;
|
io = this->io;
|
||||||
spa_return_val_if_fail(io != NULL, SPA_RESULT_WRONG_STATE);
|
spa_return_val_if_fail(io != NULL, SPA_RESULT_UNEXPECTED);
|
||||||
|
|
||||||
if (io->status == SPA_RESULT_HAVE_BUFFER)
|
if (io->status == SPA_RESULT_HAVE_BUFFER)
|
||||||
return SPA_RESULT_HAVE_BUFFER;
|
return SPA_RESULT_HAVE_BUFFER;
|
||||||
|
|
|
||||||
|
|
@ -895,7 +895,7 @@ static int impl_node_process_output(struct spa_node *node)
|
||||||
|
|
||||||
this = SPA_CONTAINER_OF(node, struct impl, node);
|
this = SPA_CONTAINER_OF(node, struct impl, node);
|
||||||
io = this->io;
|
io = this->io;
|
||||||
spa_return_val_if_fail(io != NULL, SPA_RESULT_WRONG_STATE);
|
spa_return_val_if_fail(io != NULL, SPA_RESULT_UNEXPECTED);
|
||||||
|
|
||||||
if (io->status == SPA_RESULT_HAVE_BUFFER)
|
if (io->status == SPA_RESULT_HAVE_BUFFER)
|
||||||
return SPA_RESULT_HAVE_BUFFER;
|
return SPA_RESULT_HAVE_BUFFER;
|
||||||
|
|
|
||||||
|
|
@ -702,7 +702,7 @@ static int impl_node_process_input(struct spa_node *node)
|
||||||
|
|
||||||
this = SPA_CONTAINER_OF(node, struct impl, node);
|
this = SPA_CONTAINER_OF(node, struct impl, node);
|
||||||
input = this->io;
|
input = this->io;
|
||||||
spa_return_val_if_fail(input != NULL, SPA_RESULT_WRONG_STATE);
|
spa_return_val_if_fail(input != NULL, SPA_RESULT_UNEXPECTED);
|
||||||
|
|
||||||
if (input->status == SPA_RESULT_HAVE_BUFFER && input->buffer_id < this->n_buffers) {
|
if (input->status == SPA_RESULT_HAVE_BUFFER && input->buffer_id < this->n_buffers) {
|
||||||
struct buffer *b = &this->buffers[input->buffer_id];
|
struct buffer *b = &this->buffers[input->buffer_id];
|
||||||
|
|
|
||||||
|
|
@ -751,7 +751,7 @@ static int impl_node_process_output(struct spa_node *node)
|
||||||
|
|
||||||
this = SPA_CONTAINER_OF(node, struct impl, node);
|
this = SPA_CONTAINER_OF(node, struct impl, node);
|
||||||
io = this->io;
|
io = this->io;
|
||||||
spa_return_val_if_fail(io != NULL, SPA_RESULT_WRONG_STATE);
|
spa_return_val_if_fail(io != NULL, SPA_RESULT_UNEXPECTED);
|
||||||
|
|
||||||
if (io->status == SPA_RESULT_HAVE_BUFFER)
|
if (io->status == SPA_RESULT_HAVE_BUFFER)
|
||||||
return SPA_RESULT_HAVE_BUFFER;
|
return SPA_RESULT_HAVE_BUFFER;
|
||||||
|
|
|
||||||
|
|
@ -838,7 +838,7 @@ static int impl_node_process_output(struct spa_node *node)
|
||||||
|
|
||||||
port = &this->out_ports[0];
|
port = &this->out_ports[0];
|
||||||
io = port->io;
|
io = port->io;
|
||||||
spa_return_val_if_fail(io != NULL, SPA_RESULT_WRONG_STATE);
|
spa_return_val_if_fail(io != NULL, SPA_RESULT_UNEXPECTED);
|
||||||
|
|
||||||
if (io->status == SPA_RESULT_HAVE_BUFFER)
|
if (io->status == SPA_RESULT_HAVE_BUFFER)
|
||||||
return SPA_RESULT_HAVE_BUFFER;
|
return SPA_RESULT_HAVE_BUFFER;
|
||||||
|
|
|
||||||
|
|
@ -821,7 +821,7 @@ static int impl_node_process_output(struct spa_node *node)
|
||||||
|
|
||||||
this = SPA_CONTAINER_OF(node, struct impl, node);
|
this = SPA_CONTAINER_OF(node, struct impl, node);
|
||||||
io = this->io;
|
io = this->io;
|
||||||
spa_return_val_if_fail(io != NULL, SPA_RESULT_WRONG_STATE);
|
spa_return_val_if_fail(io != NULL, SPA_RESULT_UNEXPECTED);
|
||||||
|
|
||||||
if (io->status == SPA_RESULT_HAVE_BUFFER)
|
if (io->status == SPA_RESULT_HAVE_BUFFER)
|
||||||
return SPA_RESULT_HAVE_BUFFER;
|
return SPA_RESULT_HAVE_BUFFER;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue