bg_image_writer_plugin_s Struct Reference
[Image support]

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
 File extensions (space separated).
void(* set_callbacks )(void *priv, bg_iw_callbacks_t *cb)
 Set callbacks.
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.


Detailed Description

Image writer plugin.


Field Documentation

Infos and functions common to all plugin types.

File extensions (space separated).

Set callbacks.

Parameters:
priv The handle returned by the create() method
cb Callback structure

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.

Parameters:
priv The handle returned by the create() method
format Video format
Returns:
1 on success, 0 on error.
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

Write the image.

Parameters:
priv The handle returned by the create() method
frame The frame containing the image
Returns:
1 on success, 0 on error.
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.


The documentation for this struct was generated from the following file:

doxygen