bg_encoder_pp_plugin_s Struct Reference
[Encoding postprocessor]

Encoding postprocessor. More...

#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.

Detailed Description

Encoding postprocessor.


Field Documentation

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).

Set callbacks.

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

Initialize.

Parameters:
priv The 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, bg_metadata_t *metadata, int pp_only)

Add a transcoded track.

Parameters:
priv The handle returned by the create() method
Parameters:
filename Name of the media file
Parameters:
metadata Metadata for the track
Parameters:
pp_only Set 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:
priv The handle returned by the create() method
Parameters:
directory The directory, where output files can be written
Parameters:
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.

Parameters:
priv The 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:
Generated on Sat Jan 28 06:53:19 2012 for gmerlin by  doxygen 1.6.3