Custom Filter.
More...
|
GF_Filter * | gf_fs_new_filter (GF_FilterSession *session, const char *name, u32 flags, GF_Err *e) |
|
GF_Err | gf_filter_push_caps (GF_Filter *filter, u32 code, GF_PropertyValue *value, const char *name, u32 flags, u8 priority) |
|
GF_Err | gf_filter_set_process_ckb (GF_Filter *filter, GF_Err(*process_cbk)(GF_Filter *filter)) |
|
GF_Err | gf_filter_set_configure_ckb (GF_Filter *filter, GF_Err(*configure_cbk)(GF_Filter *filter, GF_FilterPid *PID, Bool is_remove)) |
|
GF_Err | gf_filter_set_process_event_ckb (GF_Filter *filter, Bool(*process_event_cbk)(GF_Filter *filter, const GF_FilterEvent *evt)) |
|
GF_Err | gf_filter_set_reconfigure_output_ckb (GF_Filter *filter, GF_Err(*reconfigure_output_cbk)(GF_Filter *filter, GF_FilterPid *PID)) |
|
GF_Err | gf_filter_set_probe_data_cbk (GF_Filter *filter, const char *(*probe_data_cbk)(const u8 *data, u32 size, GF_FilterProbeScore *score)) |
|
Custom filters are filters created by the app with no associated registry. The app is responsible for assigning capabilities to the filter, and setting callback functions. Each callback is optional, but a custom filter should at least have a process callback, and a configure_pid callback if not a source filter.
Custom filters do not have any arguments exposed, and cannot be selected for sink or source filters. If your app requires custom I/Os for source or sinks, use GF_FileIO.
◆ gf_fs_new_filter()
Loads custom filter
- Parameters
-
session | filter session |
name | name of filter to use - optional, may be NULL |
flags | flags for filter registry, currently only GF_FS_REG_MAIN_THREAD is used |
e | set to the error code if any - optional, may be NULL |
- Returns
- filter or NULL if error
◆ gf_filter_push_caps()
GF_Err gf_filter_push_caps |
( |
GF_Filter * |
filter, |
|
|
u32 |
code, |
|
|
GF_PropertyValue * |
value, |
|
|
const char * |
name, |
|
|
u32 |
flags, |
|
|
u8 |
priority |
|
) |
| |
Push a new capability for a custom filter
- Parameters
-
- Returns
- error if any
◆ gf_filter_set_process_ckb()
Set the process function for a custom filter
- Parameters
-
filter | the target filter |
process_cbk | the process callback, may be NULL - cf process in __gf_filter_register |
- Returns
- error if any
◆ gf_filter_set_configure_ckb()
Set the PID configuration function for a custom filter
- Parameters
-
filter | the target filter |
configure_cbk | the configure callback, may be NULL - cf configure_pid in __gf_filter_register |
- Returns
- error if any
◆ gf_filter_set_process_event_ckb()
Set the process event function for a custom filter
- Parameters
-
filter | the target filter |
process_event_cbk | the process event callback, may be NULL - cf process_event in __gf_filter_register |
- Returns
- error if any
◆ gf_filter_set_reconfigure_output_ckb()
Set the reconfigure output function for a custom filter
- Parameters
-
filter | the target filter |
reconfigure_output_cbk | the reconfigure callback, may be NULL - cf reconfigure_output_cbk in __gf_filter_register |
- Returns
- error if any
◆ gf_filter_set_probe_data_cbk()
Set the data prober function for a custom filter
- Parameters
-
filter | the target filter |
probe_data_cbk | the data prober callback , may be NULL- cf probe_data in __gf_filter_register |
- Returns
- error if any