Image writer plugin. More...
#include <plugin.h>
Data Fields | |
| bg_plugin_common_t | common |
| Infos and functions common to all plugin types. | |
| const char * | extensions |
| Supported file extensions (space separated). | |
| const char *(* | get_extension )(void *priv) |
| Return the file extension. | |
| int(* | write_header )(void *priv, const char *filename, gavl_video_format_t *format, const bg_metadata_t *m) |
| Write the file header. | |
| int(* | write_image )(void *priv, gavl_video_frame_t *frame) |
| Write the image. | |
Image writer plugin.
Infos and functions common to all plugin types.
| const char* bg_image_writer_plugin_s::extensions |
Supported file extensions (space separated).
| const char*(* bg_image_writer_plugin_s::get_extension)(void *priv) |
Return the file extension.
| priv | The handle returned by the create() method |
This function is mandatory for all plugins. Most plugins will always return the same extension. Others might have multiple supported formats, which are selected through parameters.
| int(* bg_image_writer_plugin_s::write_header)(void *priv, const char *filename, gavl_video_format_t *format, const bg_metadata_t *m) |
Write the file header.
| priv | The handle returned by the create() method | |
| format | Video format |
The format will be changed to the nearest format, which is supported by the plugin. To convert the source format to the output format, use a gavl_video_converter_t
| int(* bg_image_writer_plugin_s::write_image)(void *priv, gavl_video_frame_t *frame) |
Write the image.
| priv | The handle returned by the create() method | |
| frame | The frame containing the image |
After writing the image the plugin is cleaned up, so write_header() can be called again after that. If frame is NULL, no image is read, and the plugin is reset.
1.6.3