|
gmerlin
|
Chains of A/V filters. More...
Typedefs | |
| typedef struct bg_audio_filter_chain_s | bg_audio_filter_chain_t |
| Audio filter chain. | |
| typedef struct bg_video_filter_chain_s | bg_video_filter_chain_t |
| Video filter chain. | |
Functions | |
| bg_audio_filter_chain_t * | bg_audio_filter_chain_create (const bg_gavl_audio_options_t *opt, bg_plugin_registry_t *plugin_reg) |
| Create an audio filter chain. | |
| const bg_parameter_info_t * | bg_audio_filter_chain_get_parameters (bg_audio_filter_chain_t *ch) |
| Return parameters. | |
| void | bg_audio_filter_chain_set_parameter (void *data, const char *name, const bg_parameter_value_t *val) |
| Set a parameter for an audio chain. | |
| int | bg_audio_filter_chain_need_rebuild (bg_audio_filter_chain_t *ch) |
| Check if an audio filter chain needs to be rebuilt. | |
| int | bg_audio_filter_chain_need_restart (bg_audio_filter_chain_t *ch) |
| Check if an audio filter chain needs to be restarted. | |
| void | bg_audio_filter_chain_connect_input (bg_audio_filter_chain_t *ch, bg_read_audio_func_t func, void *priv, int stream) |
| Set input callback of an audio filter chain. | |
| int | bg_audio_filter_chain_init (bg_audio_filter_chain_t *ch, const gavl_audio_format_t *in_format, gavl_audio_format_t *out_format) |
| Initialize an audio filter chain. | |
| void | bg_audio_filter_chain_set_input_format (bg_audio_filter_chain_t *ch, const gavl_audio_format_t *in_format) |
| Change the input format of an audio filter chain. | |
| int | bg_audio_filter_chain_set_out_format (bg_audio_filter_chain_t *ch, const gavl_audio_format_t *out_format) |
| Set output format of an audio filter chain. | |
| int | bg_audio_filter_chain_read (void *priv, gavl_audio_frame_t *frame, int stream, int num_samples) |
| Read a audio samples from an audio filter chain. | |
| void | bg_audio_filter_chain_destroy (bg_audio_filter_chain_t *ch) |
| Destroy an audio filter chain. | |
| void | bg_audio_filter_chain_lock (bg_audio_filter_chain_t *ch) |
| Lock an audio filter chain. | |
| void | bg_audio_filter_chain_unlock (bg_audio_filter_chain_t *ch) |
| Unlock an audio filter chain. | |
| void | bg_audio_filter_chain_reset (bg_audio_filter_chain_t *ch) |
| Reset an audio filter chain. | |
| bg_video_filter_chain_t * | bg_video_filter_chain_create (const bg_gavl_video_options_t *opt, bg_plugin_registry_t *plugin_reg) |
| Create a video filter chain. | |
| const bg_parameter_info_t * | bg_video_filter_chain_get_parameters (bg_video_filter_chain_t *ch) |
| Return parameters. | |
| void | bg_video_filter_chain_set_parameter (void *data, const char *name, const bg_parameter_value_t *val) |
| Set a parameter for a video chain. | |
| int | bg_video_filter_chain_need_rebuild (bg_video_filter_chain_t *ch) |
| Check if a video filter chain needs to be rebuilt. | |
| int | bg_video_filter_chain_need_restart (bg_video_filter_chain_t *ch) |
| Check if a video filter chain needs to be restarted. | |
| void | bg_video_filter_chain_connect_input (bg_video_filter_chain_t *ch, bg_read_video_func_t func, void *priv, int stream) |
| Set input callback of a video filter chain. | |
| int | bg_video_filter_chain_init (bg_video_filter_chain_t *ch, const gavl_video_format_t *in_format, gavl_video_format_t *out_format) |
| Initialize a video filter chain. | |
| void | bg_video_filter_chain_set_input_format (bg_video_filter_chain_t *ch, const gavl_video_format_t *in_format) |
| Change the input format of a video filter chain. | |
| int | bg_video_filter_chain_set_out_format (bg_video_filter_chain_t *ch, const gavl_video_format_t *out_format) |
| Set output format of a video filter chain. | |
| int | bg_video_filter_chain_read (void *priv, gavl_video_frame_t *frame, int stream) |
| Read a video frame from a video filter chain. | |
| void | bg_video_filter_chain_destroy (bg_video_filter_chain_t *ch) |
| Destroy a video filter chain. | |
| void | bg_video_filter_chain_lock (bg_video_filter_chain_t *ch) |
| Lock a video filter chain. | |
| void | bg_video_filter_chain_unlock (bg_video_filter_chain_t *ch) |
| Unlock a video filter chain. | |
| void | bg_video_filter_chain_reset (bg_video_filter_chain_t *ch) |
| Reset a video filter chain. | |
Chains of A/V filters.
| typedef struct bg_audio_filter_chain_s bg_audio_filter_chain_t |
Audio filter chain.
Opaque handle for an audio filter chain. You don't want to know, what's inside.
| typedef struct bg_video_filter_chain_s bg_video_filter_chain_t |
Video filter chain.
Opaque handle for a video filter chain. You don't want to know, what's inside.
| bg_audio_filter_chain_t* bg_audio_filter_chain_create | ( | const bg_gavl_audio_options_t * | opt, |
| bg_plugin_registry_t * | plugin_reg | ||
| ) |
Create an audio filter chain.
| opt | Conversion options |
| plugin_reg | A plugin registry |
The conversion options should be valid for the whole lifetime of the filter chain.
| const bg_parameter_info_t* bg_audio_filter_chain_get_parameters | ( | bg_audio_filter_chain_t * | ch | ) |
Return parameters.
| ch | An audio filter chain |
Usually, there will be a parameter of type BG_PARAMETER_MULTI_CHAIN, which includes all installed filters and their respective parameters.
| void bg_audio_filter_chain_set_parameter | ( | void * | data, |
| const char * | name, | ||
| const bg_parameter_value_t * | val | ||
| ) |
Set a parameter for an audio chain.
| data | An audio converter as void* |
| name | Name |
| val | Value |
In some cases the filter chain must be rebuilt after setting a parameter. The application should therefore call bg_audio_filter_chain_need_rebuild and call bg_audio_filter_chain_init if necessary.
| int bg_audio_filter_chain_need_rebuild | ( | bg_audio_filter_chain_t * | ch | ) |
Check if an audio filter chain needs to be rebuilt.
| ch | An audio filter chain |
If this returns true, you should call bg_audio_filter_chain_rebuild or bg_audio_filter_chain_init. It's usually used after bg_audio_filter_chain_set_parameter.
| int bg_audio_filter_chain_need_restart | ( | bg_audio_filter_chain_t * | ch | ) |
Check if an audio filter chain needs to be restarted.
| ch | An audio filter chain |
If this returns true, you should call bg_audio_filter_chain_init. It's usually used after bg_audio_filter_chain_set_parameter.
| void bg_audio_filter_chain_connect_input | ( | bg_audio_filter_chain_t * | ch, |
| bg_read_audio_func_t | func, | ||
| void * | priv, | ||
| int | stream | ||
| ) |
Set input callback of an audio filter chain.
| ch | An audio filter chain |
| func | The function to call |
| priv | The private handle to pass to func |
| stream | The stream argument to pass to func |
This function must be called *before* bg_audio_filter_chain_init.
| int bg_audio_filter_chain_init | ( | bg_audio_filter_chain_t * | ch, |
| const gavl_audio_format_t * | in_format, | ||
| gavl_audio_format_t * | out_format | ||
| ) |
Initialize an audio filter chain.
| ch | An audio filter chain |
| in_format | Input format |
| out_format | Returns the output format |
| void bg_audio_filter_chain_set_input_format | ( | bg_audio_filter_chain_t * | ch, |
| const gavl_audio_format_t * | in_format | ||
| ) |
Change the input format of an audio filter chain.
| ch | An audio filter chain |
| in_format | New input format |
| int bg_audio_filter_chain_set_out_format | ( | bg_audio_filter_chain_t * | ch, |
| const gavl_audio_format_t * | out_format | ||
| ) |
Set output format of an audio filter chain.
| ch | An audio filter chain |
| out_format | Output format |
This function initializes a final audio converter at the output for delivering the desired format.
| int bg_audio_filter_chain_read | ( | void * | priv, |
| gavl_audio_frame_t * | frame, | ||
| int | stream, | ||
| int | num_samples | ||
| ) |
Read a audio samples from an audio filter chain.
| priv | An audio filter chain |
| frame | An audio frame |
| stream | Stream number (must be 0) |
| num_samples | Number of samples to read |
| void bg_audio_filter_chain_destroy | ( | bg_audio_filter_chain_t * | ch | ) |
Destroy an audio filter chain.
| ch | An audio filter chain |
| void bg_audio_filter_chain_lock | ( | bg_audio_filter_chain_t * | ch | ) |
Lock an audio filter chain.
| ch | An audio filter chain |
In multithreaded enviroments, you must lock the chain for calls to bg_audio_filter_chain_set_parameter and bg_audio_filter_chain_read.
| void bg_audio_filter_chain_unlock | ( | bg_audio_filter_chain_t * | ch | ) |
Unlock an audio filter chain.
| ch | An audio filter chain |
In multithreaded enviroments, you must lock the chain for calls to bg_audio_filter_chain_set_parameter and bg_audio_filter_chain_read.
| void bg_audio_filter_chain_reset | ( | bg_audio_filter_chain_t * | ch | ) |
Reset an audio filter chain.
| ch | An audio filter chain |
Set the internal state as if no sample has been processed since last init
| bg_video_filter_chain_t* bg_video_filter_chain_create | ( | const bg_gavl_video_options_t * | opt, |
| bg_plugin_registry_t * | plugin_reg | ||
| ) |
Create a video filter chain.
| opt | Conversion options |
| plugin_reg | A plugin registry |
The conversion options should be valid for the whole lifetime of the filter chain.
| const bg_parameter_info_t* bg_video_filter_chain_get_parameters | ( | bg_video_filter_chain_t * | ch | ) |
Return parameters.
| ch | A video filter chain |
Usually, there will be a parameter of type BG_PARAMETER_MULTI_CHAIN, which includes all installed filters and their respective parameters.
| void bg_video_filter_chain_set_parameter | ( | void * | data, |
| const char * | name, | ||
| const bg_parameter_value_t * | val | ||
| ) |
Set a parameter for a video chain.
| data | A video converter as void* |
| name | Name |
| val | Value |
In some cases the filter chain must be rebuilt after setting a parameter. The application should therefore call bg_video_filter_chain_need_rebuild and call bg_video_filter_chain_init if necessary.
| int bg_video_filter_chain_need_rebuild | ( | bg_video_filter_chain_t * | ch | ) |
Check if a video filter chain needs to be rebuilt.
| ch | A video filter chain |
If this returns true, you should call bg_video_filter_chain_init. It's usually used after bg_video_filter_chain_set_parameter.
| int bg_video_filter_chain_need_restart | ( | bg_video_filter_chain_t * | ch | ) |
Check if a video filter chain needs to be restarted.
| ch | A video filter chain |
If this returns true, you should call bg_video_filter_chain_init. It's usually used after bg_video_filter_chain_set_parameter.
| void bg_video_filter_chain_connect_input | ( | bg_video_filter_chain_t * | ch, |
| bg_read_video_func_t | func, | ||
| void * | priv, | ||
| int | stream | ||
| ) |
Set input callback of a video filter chain.
| ch | A video filter chain |
| func | The function to call |
| priv | The private handle to pass to func |
| stream | The stream argument to pass to func |
This function must be called *before* bg_video_filter_chain_init.
| int bg_video_filter_chain_init | ( | bg_video_filter_chain_t * | ch, |
| const gavl_video_format_t * | in_format, | ||
| gavl_video_format_t * | out_format | ||
| ) |
Initialize a video filter chain.
| ch | A video filter chain |
| in_format | Input format |
| out_format | Returns the output format |
| void bg_video_filter_chain_set_input_format | ( | bg_video_filter_chain_t * | ch, |
| const gavl_video_format_t * | in_format | ||
| ) |
Change the input format of a video filter chain.
| ch | An video filter chain |
| in_format | New input format |
| int bg_video_filter_chain_set_out_format | ( | bg_video_filter_chain_t * | ch, |
| const gavl_video_format_t * | out_format | ||
| ) |
Set output format of a video filter chain.
| ch | A video filter chain |
| out_format | Output format |
This function initializes a final video converter at the output for delivering the desired format.
| int bg_video_filter_chain_read | ( | void * | priv, |
| gavl_video_frame_t * | frame, | ||
| int | stream | ||
| ) |
Read a video frame from a video filter chain.
| priv | A video filter chain |
| frame | A video frame |
| stream | Stream number (must be 0) |
| void bg_video_filter_chain_destroy | ( | bg_video_filter_chain_t * | ch | ) |
Destroy a video filter chain.
| ch | A video filter chain |
| void bg_video_filter_chain_lock | ( | bg_video_filter_chain_t * | ch | ) |
Lock a video filter chain.
| ch | A video filter chain |
In multithreaded enviroments, you must lock the chain for calls to bg_video_filter_chain_set_parameter and bg_video_filter_chain_read.
| void bg_video_filter_chain_unlock | ( | bg_video_filter_chain_t * | ch | ) |
Unlock a video filter chain.
| ch | A video filter chain |
In multithreaded enviroments, you must lock the chain for calls to bg_video_filter_chain_set_parameter and bg_video_filter_chain_read.
| void bg_video_filter_chain_reset | ( | bg_video_filter_chain_t * | ch | ) |
Reset a video filter chain.
| ch | A video filter chain |
Set the internal state as if no sample has been processed since last init
1.7.3