mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-08 13:30:08 -05:00
spa: don't use typedef for struct and enum
This commit is contained in:
parent
83964cec87
commit
11f23a3ffa
163 changed files with 6510 additions and 8264 deletions
|
|
@ -83,7 +83,7 @@ static const SpaPropInfo prop_info[] =
|
|||
{ 0, },
|
||||
};
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_get_props (SpaHandle *handle,
|
||||
SpaProps **props)
|
||||
{
|
||||
|
|
@ -98,13 +98,13 @@ spa_libva_dec_node_get_props (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_set_props (SpaHandle *handle,
|
||||
const SpaProps *props)
|
||||
{
|
||||
SpaLibvaDec *this = (SpaLibvaDec *) handle;
|
||||
SpaLibvaDecProps *p = &this->props[1];
|
||||
SpaResult res;
|
||||
int res;
|
||||
|
||||
if (handle == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -119,7 +119,7 @@ spa_libva_dec_node_set_props (SpaHandle *handle,
|
|||
return res;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_send_command (SpaHandle *handle,
|
||||
SpaCommand *command)
|
||||
{
|
||||
|
|
@ -169,7 +169,7 @@ spa_libva_dec_node_send_command (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_set_event_callback (SpaHandle *handle,
|
||||
SpaNodeEventCallback event,
|
||||
void *user_data)
|
||||
|
|
@ -185,7 +185,7 @@ spa_libva_dec_node_set_event_callback (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_get_n_ports (SpaHandle *handle,
|
||||
uint32_t *n_input_ports,
|
||||
uint32_t *max_input_ports,
|
||||
|
|
@ -207,7 +207,7 @@ spa_libva_dec_node_get_n_ports (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_get_port_ids (SpaHandle *handle,
|
||||
uint32_t n_input_ports,
|
||||
uint32_t *input_ids,
|
||||
|
|
@ -226,7 +226,7 @@ spa_libva_dec_node_get_port_ids (SpaHandle *handle,
|
|||
}
|
||||
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_add_port (SpaHandle *handle,
|
||||
SpaDirection direction,
|
||||
uint32_t *port_id)
|
||||
|
|
@ -234,14 +234,14 @@ spa_libva_dec_node_add_port (SpaHandle *handle,
|
|||
return SPA_RESULT_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_remove_port (SpaHandle *handle,
|
||||
uint32_t port_id)
|
||||
{
|
||||
return SPA_RESULT_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_port_enum_formats (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
uint32_t index,
|
||||
|
|
@ -270,7 +270,7 @@ spa_libva_dec_node_port_enum_formats (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_port_set_format (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
bool test_only,
|
||||
|
|
@ -278,7 +278,7 @@ spa_libva_dec_node_port_set_format (SpaHandle *handle,
|
|||
{
|
||||
SpaLibvaDec *this = (SpaLibvaDec *) handle;
|
||||
SpaLibvaState *state;
|
||||
SpaResult res;
|
||||
int res;
|
||||
SpaFormat *f, *tf;
|
||||
size_t fs;
|
||||
|
||||
|
|
@ -316,7 +316,7 @@ spa_libva_dec_node_port_set_format (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_port_get_format (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
const SpaFormat **format)
|
||||
|
|
@ -340,7 +340,7 @@ spa_libva_dec_node_port_get_format (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_port_get_info (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
const SpaPortInfo **info)
|
||||
|
|
@ -358,7 +358,7 @@ spa_libva_dec_node_port_get_info (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_port_get_props (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
SpaProps **props)
|
||||
|
|
@ -366,7 +366,7 @@ spa_libva_dec_node_port_get_props (SpaHandle *handle,
|
|||
return SPA_RESULT_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_port_set_props (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
const SpaProps *props)
|
||||
|
|
@ -374,7 +374,7 @@ spa_libva_dec_node_port_set_props (SpaHandle *handle,
|
|||
return SPA_RESULT_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_port_get_status (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
const SpaPortStatus **status)
|
||||
|
|
@ -392,7 +392,7 @@ spa_libva_dec_node_port_get_status (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_port_use_buffers (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
SpaBuffer **buffers,
|
||||
|
|
@ -407,7 +407,7 @@ spa_libva_dec_node_port_use_buffers (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_port_alloc_buffers (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
SpaParam **params,
|
||||
|
|
@ -419,7 +419,7 @@ spa_libva_dec_node_port_alloc_buffers (SpaHandle *handle,
|
|||
}
|
||||
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_port_push_input (SpaHandle *handle,
|
||||
uint32_t n_info,
|
||||
SpaInputInfo *info)
|
||||
|
|
@ -427,7 +427,7 @@ spa_libva_dec_node_port_push_input (SpaHandle *handle,
|
|||
return SPA_RESULT_INVALID_PORT;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_node_port_pull_output (SpaHandle *handle,
|
||||
uint32_t n_info,
|
||||
SpaOutputInfo *info)
|
||||
|
|
@ -485,7 +485,7 @@ static const SpaNode libva_dec_node = {
|
|||
spa_libva_dec_node_port_pull_output,
|
||||
};
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_dec_get_interface (SpaHandle *handle,
|
||||
uint32_t interface_id,
|
||||
const void **interface)
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ static const SpaPropInfo prop_info[] =
|
|||
{ 0, },
|
||||
};
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_get_props (SpaHandle *handle,
|
||||
SpaProps **props)
|
||||
{
|
||||
|
|
@ -100,13 +100,13 @@ spa_libva_enc_node_get_props (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_set_props (SpaHandle *handle,
|
||||
const SpaProps *props)
|
||||
{
|
||||
SpaLibvaEnc *this = (SpaLibvaEnc *) handle;
|
||||
SpaLibvaEncProps *p = &this->props[1];
|
||||
SpaResult res;
|
||||
int res;
|
||||
|
||||
if (handle == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -121,7 +121,7 @@ spa_libva_enc_node_set_props (SpaHandle *handle,
|
|||
return res;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_send_command (SpaHandle *handle,
|
||||
SpaCommand *command)
|
||||
{
|
||||
|
|
@ -171,7 +171,7 @@ spa_libva_enc_node_send_command (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_set_event_callback (SpaHandle *handle,
|
||||
SpaEventCallback event,
|
||||
void *user_data)
|
||||
|
|
@ -187,7 +187,7 @@ spa_libva_enc_node_set_event_callback (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_get_n_ports (SpaHandle *handle,
|
||||
uint32_t *n_input_ports,
|
||||
uint32_t *max_input_ports,
|
||||
|
|
@ -209,7 +209,7 @@ spa_libva_enc_node_get_n_ports (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_get_port_ids (SpaHandle *handle,
|
||||
uint32_t n_input_ports,
|
||||
uint32_t *input_ids,
|
||||
|
|
@ -228,7 +228,7 @@ spa_libva_enc_node_get_port_ids (SpaHandle *handle,
|
|||
}
|
||||
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_add_port (SpaHandle *handle,
|
||||
SpaDirection direction,
|
||||
uint32_t *port_id)
|
||||
|
|
@ -236,14 +236,14 @@ spa_libva_enc_node_add_port (SpaHandle *handle,
|
|||
return SPA_RESULT_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_remove_port (SpaHandle *handle,
|
||||
uint32_t port_id)
|
||||
{
|
||||
return SPA_RESULT_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_port_enum_formats (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
uint32_t index,
|
||||
|
|
@ -272,7 +272,7 @@ spa_libva_enc_node_port_enum_formats (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_port_set_format (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
bool test_only,
|
||||
|
|
@ -280,7 +280,7 @@ spa_libva_enc_node_port_set_format (SpaHandle *handle,
|
|||
{
|
||||
SpaLibvaEnc *this = (SpaLibvaEnc *) handle;
|
||||
SpaLibvaState *state;
|
||||
SpaResult res;
|
||||
int res;
|
||||
SpaFormat *f, *tf;
|
||||
size_t fs;
|
||||
|
||||
|
|
@ -318,7 +318,7 @@ spa_libva_enc_node_port_set_format (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_port_get_format (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
const SpaFormat **format)
|
||||
|
|
@ -342,7 +342,7 @@ spa_libva_enc_node_port_get_format (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_port_get_info (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
const SpaPortInfo **info)
|
||||
|
|
@ -360,7 +360,7 @@ spa_libva_enc_node_port_get_info (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_port_get_props (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
SpaProps **props)
|
||||
|
|
@ -368,7 +368,7 @@ spa_libva_enc_node_port_get_props (SpaHandle *handle,
|
|||
return SPA_RESULT_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_port_set_props (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
const SpaProps *props)
|
||||
|
|
@ -376,7 +376,7 @@ spa_libva_enc_node_port_set_props (SpaHandle *handle,
|
|||
return SPA_RESULT_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_port_get_status (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
const SpaPortStatus **status)
|
||||
|
|
@ -394,7 +394,7 @@ spa_libva_enc_node_port_get_status (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_port_use_buffers (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
SpaBuffer **buffers,
|
||||
|
|
@ -409,7 +409,7 @@ spa_libva_enc_node_port_use_buffers (SpaHandle *handle,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_port_alloc_buffers (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
SpaAllocParam **params,
|
||||
|
|
@ -421,7 +421,7 @@ spa_libva_enc_node_port_alloc_buffers (SpaHandle *handle,
|
|||
}
|
||||
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_port_push_input (SpaHandle *handle,
|
||||
uint32_t n_info,
|
||||
SpaInputInfo *info)
|
||||
|
|
@ -429,7 +429,7 @@ spa_libva_enc_node_port_push_input (SpaHandle *handle,
|
|||
return SPA_RESULT_INVALID_PORT;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_node_port_pull_output (SpaHandle *handle,
|
||||
uint32_t n_info,
|
||||
SpaOutputInfo *info)
|
||||
|
|
@ -487,7 +487,7 @@ static const SpaNode libva_enc_node = {
|
|||
spa_libva_enc_node_port_pull_output,
|
||||
};
|
||||
|
||||
static SpaResult
|
||||
static int
|
||||
spa_libva_enc_get_interface (SpaHandle *handle,
|
||||
uint32_t interface_id,
|
||||
const void **interface)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
SpaHandle * spa_libva_dec_new (void);
|
||||
SpaHandle * spa_libva_enc_new (void);
|
||||
|
||||
static SpaResult
|
||||
libva_dec_instantiate (const SpaHandleFactory *factory,
|
||||
static int
|
||||
libva_dec_instantiate (const struct spa_handle_factory *factory,
|
||||
SpaHandle **handle)
|
||||
{
|
||||
if (factory == NULL || handle == NULL)
|
||||
|
|
@ -35,8 +35,8 @@ libva_dec_instantiate (const SpaHandleFactory *factory,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
libva_enc_instantiate (const SpaHandleFactory *factory,
|
||||
static int
|
||||
libva_enc_instantiate (const struct spa_handle_factory *factory,
|
||||
SpaHandle **handle)
|
||||
{
|
||||
if (factory == NULL || handle == NULL)
|
||||
|
|
@ -48,7 +48,7 @@ libva_enc_instantiate (const SpaHandleFactory *factory,
|
|||
}
|
||||
|
||||
|
||||
static const SpaInterfaceInfo libva_interfaces[] =
|
||||
static const struct spa_interface_info libva_interfaces[] =
|
||||
{
|
||||
{ SPA_INTERFACE_ID_NODE,
|
||||
SPA_INTERFACE_ID_NODE_NAME,
|
||||
|
|
@ -56,10 +56,10 @@ static const SpaInterfaceInfo libva_interfaces[] =
|
|||
},
|
||||
};
|
||||
|
||||
static SpaResult
|
||||
libva_enum_interface_info (const SpaHandleFactory *factory,
|
||||
static int
|
||||
libva_enum_interface_info (const struct spa_handle_factory *factory,
|
||||
uint32_t index,
|
||||
const SpaInterfaceInfo **info)
|
||||
const struct spa_interface_info **info)
|
||||
{
|
||||
if (index >= 1)
|
||||
return SPA_RESULT_ENUM_END;
|
||||
|
|
@ -69,7 +69,7 @@ libva_enum_interface_info (const SpaHandleFactory *factory,
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
static const SpaHandleFactory factories[] =
|
||||
static const struct spa_handle_factory factories[] =
|
||||
{
|
||||
{ "libva-dec",
|
||||
NULL,
|
||||
|
|
@ -83,9 +83,9 @@ static const SpaHandleFactory factories[] =
|
|||
}
|
||||
};
|
||||
|
||||
SpaResult
|
||||
spa_enum_handle_factory (uint32_t index,
|
||||
const SpaHandleFactory **factory)
|
||||
int
|
||||
spa_handle_factory_enum (uint32_t index,
|
||||
const struct spa_handle_factory **factory)
|
||||
{
|
||||
if (index >= 2)
|
||||
return SPA_RESULT_ENUM_END;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue