#include <plugin.h>
Data Fields | |
bg_plugin_common_t | common |
Infos and functions common to all plugin types. | |
int | max_audio_streams |
Maximum number of audio streams. -1 means infinite. | |
int | max_video_streams |
Maximum number of video streams. -1 means infinite. | |
char * | supported_extensions |
Supported file extensions (space separated). | |
void(* | set_callbacks )(void *priv, bg_e_pp_callbacks_t *callbacks) |
Set callbacks. | |
int(* | init )(void *priv) |
Initialize. | |
void(* | add_track )(void *priv, const char *filename, bg_metadata_t *metadata, int pp_only) |
Add a transcoded track. | |
void(* | run )(void *priv, const char *directory, int cleanup) |
Start postprocessing. | |
void(* | stop )(void *priv) |
Stop postprocessing. |
Infos and functions common to all plugin types.
Maximum number of audio streams. -1 means infinite.
Maximum number of video streams. -1 means infinite.
Supported file extensions (space separated).
void(* bg_encoder_pp_plugin_s::set_callbacks)(void *priv, bg_e_pp_callbacks_t *callbacks) |
Set callbacks.
priv | The handle returned by the create() method | |
callbacks | Callback structure initialized by the caller before |
int(* bg_encoder_pp_plugin_s::init)(void *priv) |
Initialize.
priv | The handle returned by the create() method |
void(* bg_encoder_pp_plugin_s::add_track)(void *priv, const char *filename, bg_metadata_t *metadata, int pp_only) |
Add a transcoded track.
priv | The handle returned by the create() method | |
filename | Name of the media file | |
metadata | Metadata for the track | |
pp_only | Set this to 1 if this file was not encoded and is only postprocessed |
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.
priv | The handle returned by the create() method | |
directory | The directory, where output files can be written | |
cleanup | Set 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.
priv | The handle returned by the create() method |