upipe/upipe_helper_output_size.h header reference
Upipe helper functions for output size More
Header inclusion
Members
Macro
Description
Upipe helper functions for output size
Members detail
This macro is declared in upipe/upipe_helper_output_size.h source file, line 106.
This macro declares functions dealing with the output size of a pipe.
You must add one member to your private upipe structure, for instance:
unsigned int output_size;
You must also declare UPIPE_HELPER_OUTPUT prior to using this macro.
Supposing the name of your structure is upipe_foo, it declares:
void upipe_foo_init_output_size(struct upipe *upipe,
unsigned int output_size)Typically called in your upipe_foo_alloc() function. The output_size parameter is used for initialization.
int upipe_foo_get_output_size(struct upipe *upipe, unsigned int *p)
Typically called from your upipe_foo_control() handler, such as:
case UPIPE_GET_OUTPUT_SIZE: {
unsgigned int *p = va_arg(args, unsigned int *);
return upipe_foo_get_output_size(upipe, p);
}int upipe_foo_set_output_size(struct upipe *upipe, unsigned int output_size)
Typically called from your upipe_foo_control() handler, such as:
case UPIPE_SET_OUTPUT_SIZE: {
unsigned int output_size = va_arg(args, unsigned int);
return upipe_foo_set_output_size(upipe, output_size);
}int upipe_foo_control_output_size(struct upipe *upipe,
int command, va_list args)Typically called from your upipe_foo_control() handler, such as:
int upipe_foo_control(struct upipe *upipe, int command, va_list args)
{
...
UBASE_HANDLED_RETURN(
upipe_foo_control_output_size(upipe, command, args));
...
}void upipe_foo_clean_output_size(struct upipe *upipe)
Typically called from your upipe_foo_free() function.
Parameter list:
- STRUCTURE: name of your private upipe structure
- OUTPUT_SIZE: name of the unsigned int field of your private upipe structure
This macro is declared in upipe/upipe_helper_output_size.h source file, line 29.