mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
Use types with known sizes where we can, easier to serialize
Add iterator for POD and use it to implement some demarshalling.
This commit is contained in:
parent
23d09d5b60
commit
f92b68c3c3
77 changed files with 839 additions and 695 deletions
|
|
@ -147,10 +147,10 @@ spa_ffmpeg_dec_node_set_event_callback (SpaNode *node,
|
|||
|
||||
static SpaResult
|
||||
spa_ffmpeg_dec_node_get_n_ports (SpaNode *node,
|
||||
unsigned int *n_input_ports,
|
||||
unsigned int *max_input_ports,
|
||||
unsigned int *n_output_ports,
|
||||
unsigned int *max_output_ports)
|
||||
uint32_t *n_input_ports,
|
||||
uint32_t *max_input_ports,
|
||||
uint32_t *n_output_ports,
|
||||
uint32_t *max_output_ports)
|
||||
{
|
||||
if (node == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -169,9 +169,9 @@ spa_ffmpeg_dec_node_get_n_ports (SpaNode *node,
|
|||
|
||||
static SpaResult
|
||||
spa_ffmpeg_dec_node_get_port_ids (SpaNode *node,
|
||||
unsigned int n_input_ports,
|
||||
uint32_t n_input_ports,
|
||||
uint32_t *input_ids,
|
||||
unsigned int n_output_ports,
|
||||
uint32_t n_output_ports,
|
||||
uint32_t *output_ids)
|
||||
{
|
||||
if (node == NULL)
|
||||
|
|
@ -208,10 +208,9 @@ spa_ffmpeg_dec_node_port_enum_formats (SpaNode *node,
|
|||
uint32_t port_id,
|
||||
SpaFormat **format,
|
||||
const SpaFormat *filter,
|
||||
unsigned int index)
|
||||
uint32_t index)
|
||||
{
|
||||
SpaFFMpegDec *this;
|
||||
SpaFFMpegPort *port;
|
||||
|
||||
if (node == NULL || format == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -221,8 +220,6 @@ spa_ffmpeg_dec_node_port_enum_formats (SpaNode *node,
|
|||
if (!IS_VALID_PORT (this, direction, port_id))
|
||||
return SPA_RESULT_INVALID_PORT;
|
||||
|
||||
port = direction == SPA_DIRECTION_INPUT ? &this->in_ports[port_id] : &this->out_ports[port_id];
|
||||
|
||||
switch (index) {
|
||||
case 0:
|
||||
break;
|
||||
|
|
@ -516,10 +513,10 @@ SpaResult
|
|||
spa_ffmpeg_dec_init (SpaHandle *handle,
|
||||
const SpaDict *info,
|
||||
const SpaSupport *support,
|
||||
unsigned int n_support)
|
||||
uint32_t n_support)
|
||||
{
|
||||
SpaFFMpegDec *this;
|
||||
unsigned int i;
|
||||
uint32_t i;
|
||||
|
||||
handle->get_interface = spa_ffmpeg_dec_get_interface;
|
||||
|
||||
|
|
|
|||
|
|
@ -152,10 +152,10 @@ spa_ffmpeg_enc_node_set_event_callback (SpaNode *node,
|
|||
|
||||
static SpaResult
|
||||
spa_ffmpeg_enc_node_get_n_ports (SpaNode *node,
|
||||
unsigned int *n_input_ports,
|
||||
unsigned int *max_input_ports,
|
||||
unsigned int *n_output_ports,
|
||||
unsigned int *max_output_ports)
|
||||
uint32_t *n_input_ports,
|
||||
uint32_t *max_input_ports,
|
||||
uint32_t *n_output_ports,
|
||||
uint32_t *max_output_ports)
|
||||
{
|
||||
if (node == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -174,9 +174,9 @@ spa_ffmpeg_enc_node_get_n_ports (SpaNode *node,
|
|||
|
||||
static SpaResult
|
||||
spa_ffmpeg_enc_node_get_port_ids (SpaNode *node,
|
||||
unsigned int n_input_ports,
|
||||
uint32_t n_input_ports,
|
||||
uint32_t *input_ids,
|
||||
unsigned int n_output_ports,
|
||||
uint32_t n_output_ports,
|
||||
uint32_t *output_ids)
|
||||
{
|
||||
if (node == NULL)
|
||||
|
|
@ -213,7 +213,7 @@ spa_ffmpeg_enc_node_port_enum_formats (SpaNode *node,
|
|||
uint32_t port_id,
|
||||
SpaFormat **format,
|
||||
const SpaFormat *filter,
|
||||
unsigned int index)
|
||||
uint32_t index)
|
||||
{
|
||||
SpaFFMpegEnc *this;
|
||||
SpaFFMpegPort *port;
|
||||
|
|
@ -524,10 +524,10 @@ SpaResult
|
|||
spa_ffmpeg_enc_init (SpaHandle *handle,
|
||||
const SpaDict *info,
|
||||
const SpaSupport *support,
|
||||
unsigned int n_support)
|
||||
uint32_t n_support)
|
||||
{
|
||||
SpaFFMpegEnc *this;
|
||||
unsigned int i;
|
||||
uint32_t i;
|
||||
|
||||
handle->get_interface = spa_ffmpeg_enc_get_interface;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,15 +25,15 @@
|
|||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
|
||||
SpaResult spa_ffmpeg_dec_init (SpaHandle *handle, const SpaDict *info, const SpaSupport *support, unsigned int n_support);
|
||||
SpaResult spa_ffmpeg_enc_init (SpaHandle *handle, const SpaDict *info, const SpaSupport *support, unsigned int n_support);
|
||||
SpaResult spa_ffmpeg_dec_init (SpaHandle *handle, const SpaDict *info, const SpaSupport *support, uint32_t n_support);
|
||||
SpaResult spa_ffmpeg_enc_init (SpaHandle *handle, const SpaDict *info, const SpaSupport *support, uint32_t n_support);
|
||||
|
||||
static SpaResult
|
||||
ffmpeg_dec_init (const SpaHandleFactory *factory,
|
||||
SpaHandle *handle,
|
||||
const SpaDict *info,
|
||||
const SpaSupport *support,
|
||||
unsigned int n_support)
|
||||
uint32_t n_support)
|
||||
{
|
||||
if (factory == NULL || handle == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -46,7 +46,7 @@ ffmpeg_enc_init (const SpaHandleFactory *factory,
|
|||
SpaHandle *handle,
|
||||
const SpaDict *info,
|
||||
const SpaSupport *support,
|
||||
unsigned int n_support)
|
||||
uint32_t n_support)
|
||||
{
|
||||
if (factory == NULL || handle == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -63,7 +63,7 @@ static const SpaInterfaceInfo ffmpeg_interfaces[] =
|
|||
static SpaResult
|
||||
ffmpeg_enum_interface_info (const SpaHandleFactory *factory,
|
||||
const SpaInterfaceInfo **info,
|
||||
unsigned int index)
|
||||
uint32_t index)
|
||||
{
|
||||
if (factory == NULL || info == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -78,7 +78,7 @@ ffmpeg_enum_interface_info (const SpaHandleFactory *factory,
|
|||
|
||||
SpaResult
|
||||
spa_enum_handle_factory (const SpaHandleFactory **factory,
|
||||
unsigned int index)
|
||||
uint32_t index)
|
||||
{
|
||||
static const AVCodec *c = NULL;
|
||||
static int ci = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue