gmerlin
bg_image_reader_plugin_s Struct Reference

Image reader 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 * mimetypes
 Supported mimetypes.
 
int(* read_header )(void *priv, const char *filename, gavl_video_format_t *format)
 Read the file header.
 
const gavl_metadata_t *(* get_metadata )(void *priv)
 Get metadata.
 
int(* get_compression_info )(void *priv, gavl_compression_info_t *ci)
 Get compression info.
 
int(* read_image )(void *priv, gavl_video_frame_t *frame)
 Read the image.
 

Detailed Description

Image reader plugin.

Field Documentation

◆ common

bg_plugin_common_t bg_image_reader_plugin_s::common

Infos and functions common to all plugin types.

◆ extensions

const char* bg_image_reader_plugin_s::extensions

Supported file extensions (space separated)

◆ mimetypes

const char* bg_image_reader_plugin_s::mimetypes

Supported mimetypes.

◆ read_header

int(* bg_image_reader_plugin_s::read_header) (void *priv, const char *filename, gavl_video_format_t *format)

Read the file header.

Parameters
privThe handle returned by the create() method
filenameFilename
formatReturns the format of the image
Returns
1 on success, 0 on error.

◆ get_metadata

const gavl_metadata_t *(* bg_image_reader_plugin_s::get_metadata) (void *priv)

Get metadata.

Parameters
privThe handle returned by the create() method
Returns
Metadata for the image or NULL

◆ get_compression_info

int(* bg_image_reader_plugin_s::get_compression_info) (void *priv, gavl_compression_info_t *ci)

Get compression info.

Parameters
privThe handle returned by the create() method
ciReturns the compression info
Returns
1 if the compression info could be returned, 0 else

◆ read_image

int(* bg_image_reader_plugin_s::read_image) (void *priv, gavl_video_frame_t *frame)

Read the image.

Parameters
privThe handle returned by the create() method
frameThe frame, where the image will be copied
Returns
1 if the image was read, 0 else

After reading the image the plugin is cleaned up, so read_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: