gmerlin
Data Fields
bg_image_writer_plugin_s Struct Reference

Image writer plugin. More...

#include <plugin.h>

Data Fields

bg_plugin_common_t common
 Infos and functions common to all plugin types. More...
 
const char * extensions
 File extensions (space separated) More...
 
void(* set_callbacks )(void *priv, bg_iw_callbacks_t *cb)
 Set callbacks. More...
 
int(* write_header )(void *priv, const char *filename, gavl_video_format_t *format, const gavl_metadata_t *m)
 Write the file header. More...
 
int(* write_image )(void *priv, gavl_video_frame_t *frame)
 Write the image. More...
 

Detailed Description

Image writer plugin.

Field Documentation

bg_plugin_common_t bg_image_writer_plugin_s::common

Infos and functions common to all plugin types.

const char* bg_image_writer_plugin_s::extensions

File extensions (space separated)

void(* bg_image_writer_plugin_s::set_callbacks)(void *priv, bg_iw_callbacks_t *cb)

Set callbacks.

Parameters
privThe handle returned by the create() method
cbCallback structure
int(* bg_image_writer_plugin_s::write_header)(void *priv, const char *filename, gavl_video_format_t *format, const gavl_metadata_t *m)

Write the file header.

Parameters
privThe handle returned by the create() method
formatVideo 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

int(* bg_image_writer_plugin_s::write_image)(void *priv, gavl_video_frame_t *frame)

Write the image.

Parameters
privThe handle returned by the create() method
frameThe 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: