gmerlin
Data Fields
bg_encoder_pp_plugin_s Struct Reference

Encoding postprocessor. More...

#include <plugin.h>

Data Fields

bg_plugin_common_t common
 Infos and functions common to all plugin types. More...
 
int max_audio_streams
 Maximum number of audio streams. -1 means infinite. More...
 
int max_video_streams
 Maximum number of video streams. -1 means infinite. More...
 
char * supported_extensions
 Supported file extensions (space separated) More...
 
void(* set_callbacks )(void *priv, bg_e_pp_callbacks_t *callbacks)
 Set callbacks. More...
 
int(* init )(void *priv)
 Initialize. More...
 
void(* add_track )(void *priv, const char *filename, gavl_metadata_t *metadata, int pp_only)
 Add a transcoded track. More...
 
void(* run )(void *priv, const char *directory, int cleanup)
 Start postprocessing. More...
 
void(* stop )(void *priv)
 Stop postprocessing. More...
 

Detailed Description

Encoding postprocessor.

Field Documentation

bg_plugin_common_t bg_encoder_pp_plugin_s::common

Infos and functions common to all plugin types.

int bg_encoder_pp_plugin_s::max_audio_streams

Maximum number of audio streams. -1 means infinite.

int bg_encoder_pp_plugin_s::max_video_streams

Maximum number of video streams. -1 means infinite.

char* bg_encoder_pp_plugin_s::supported_extensions

Supported file extensions (space separated)

void(* bg_encoder_pp_plugin_s::set_callbacks)(void *priv, bg_e_pp_callbacks_t *callbacks)

Set callbacks.

Parameters
privThe handle returned by the create() method
callbacksCallback structure initialized by the caller before
int(* bg_encoder_pp_plugin_s::init)(void *priv)

Initialize.

Parameters
privThe handle returned by the create() method

This functions clears all tracks and makes the plugin ready to add new tracks.

void(* bg_encoder_pp_plugin_s::add_track)(void *priv, const char *filename, gavl_metadata_t *metadata, int pp_only)

Add a transcoded track.

Parameters
privThe handle returned by the create() method
filenameName of the media file
metadataMetadata for the track
pp_onlySet this to 1 if this file was not encoded and is only postprocessed

Send a track to the postprocessor. This plugin will store all necessary data until the run() method is called. Some postprocessors might do some sanity tests on the file e.g. the audio CD burner will reject anything except WAV-files.

Usually, it is assumed, that files were encoded for the only purpose of postprocessing them. This means, they will be deleted if the cleanup flag is passed to the run() function. If you set the pp_only argument to 1, you tell, that this file should be kept after postprocessing.

void(* bg_encoder_pp_plugin_s::run)(void *priv, const char *directory, int cleanup)

Start postprocessing.

Parameters
privThe handle returned by the create() method
directoryThe directory, where output files can be written
cleanupSet this to 1 to erase all source files and temporary files after finishing Run can be a long operation, it should be called from a separate thread launched by the application and the callbacks should be used for progress reporting
void(* bg_encoder_pp_plugin_s::stop)(void *priv)

Stop postprocessing.

Parameters
privThe handle returned by the create() method

Call this function to cancel a previously called run() function. The plugin must implement the stop mechanism in a thread save manner, i.e. the stop method must savely be callable from another thread than the one, which called run().


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