Encoder plugin. 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. | |
int | max_subtitle_text_streams |
Maximum number of text subtitle streams. -1 means infinite. | |
int | max_subtitle_overlay_streams |
Maximum number of overlay subtitle streams. -1 means infinite. | |
void(* | set_callbacks )(void *priv, bg_encoder_callbacks_t *cb) |
Set callbacks. | |
int(* | writes_compressed_audio )(void *priv, const gavl_audio_format_t *format, const gavl_compression_info_t *info) |
Query for writing compressed audio packets. | |
int(* | writes_compressed_video )(void *priv, const gavl_video_format_t *format, const gavl_compression_info_t *info) |
Query for writing compressed video packets. | |
int(* | open )(void *data, const char *filename, const bg_metadata_t *metadata, const bg_chapter_list_t *chapter_list) |
Open a file. | |
const bg_parameter_info_t *(* | get_audio_parameters )(void *priv) |
Get audio related parameters. | |
const bg_parameter_info_t *(* | get_video_parameters )(void *priv) |
Get video related parameters. | |
const bg_parameter_info_t *(* | get_subtitle_text_parameters )(void *priv) |
Get text subtitle related parameters. | |
const bg_parameter_info_t *(* | get_subtitle_overlay_parameters )(void *priv) |
Get overlay subtitle related parameters. | |
int(* | add_audio_stream )(void *priv, const char *language, const gavl_audio_format_t *format) |
Add an audio stream. | |
int(* | add_audio_stream_compressed )(void *priv, const char *language, const gavl_audio_format_t *format, const gavl_compression_info_t *info) |
Add an audio stream fpr compressed writing. | |
int(* | add_video_stream )(void *priv, const gavl_video_format_t *format) |
Add a video stream. | |
int(* | add_video_stream_compressed )(void *priv, const gavl_video_format_t *format, const gavl_compression_info_t *info) |
Add a video stream for compressed writing. | |
int(* | add_subtitle_text_stream )(void *priv, const char *language, int *timescale) |
Add a text subtitle stream. | |
int(* | add_subtitle_overlay_stream )(void *priv, const char *language, const gavl_video_format_t *format) |
Add a text subtitle stream. | |
void(* | set_audio_parameter )(void *priv, int stream, const char *name, const bg_parameter_value_t *v) |
Set audio encoding parameter. | |
void(* | set_video_parameter )(void *priv, int stream, const char *name, const bg_parameter_value_t *v) |
Set video encoding parameter. | |
void(* | set_subtitle_text_parameter )(void *priv, int stream, const char *name, const bg_parameter_value_t *v) |
Set text subtitle encoding parameter. | |
void(* | set_subtitle_overlay_parameter )(void *priv, int stream, const char *name, const bg_parameter_value_t *v) |
Set text subtitle encoding parameter. | |
int(* | set_video_pass )(void *priv, int stream, int pass, int total_passes, const char *stats_file) |
Setup multipass video encoding. | |
int(* | start )(void *priv) |
Set up all codecs and prepare for encoding. | |
void(* | get_audio_format )(void *priv, int stream, gavl_audio_format_t *ret) |
Get audio format. | |
void(* | get_video_format )(void *priv, int stream, gavl_video_format_t *ret) |
Get video format. | |
void(* | get_subtitle_overlay_format )(void *priv, int stream, gavl_video_format_t *ret) |
Get video format of an overlay subtitle stream. | |
int(* | write_audio_frame )(void *data, gavl_audio_frame_t *frame, int stream) |
Write audio samples. | |
int(* | write_audio_packet )(void *data, gavl_packet_t *packet, int stream) |
Write audio packet. | |
int(* | write_video_frame )(void *data, gavl_video_frame_t *frame, int stream) |
Write video frame. | |
int(* | write_video_packet )(void *data, gavl_packet_t *packet, int stream) |
Write video packet. | |
int(* | write_subtitle_text )(void *data, const char *text, int64_t start, int64_t duration, int stream) |
Write a text subtitle. | |
int(* | write_subtitle_overlay )(void *data, gavl_overlay_t *ovl, int stream) |
Write an overlay subtitle. | |
int(* | close )(void *data, int do_delete) |
Close encoder. |
Encoder plugin.
Infos and functions common to all plugin types.
Maximum number of audio streams. -1 means infinite.
Maximum number of video streams. -1 means infinite.
Maximum number of text subtitle streams. -1 means infinite.
Maximum number of overlay subtitle streams. -1 means infinite.
void(* bg_encoder_plugin_s::set_callbacks)(void *priv, bg_encoder_callbacks_t *cb) |
Set callbacks.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::writes_compressed_audio)(void *priv, const gavl_audio_format_t *format, const gavl_compression_info_t *info) |
Query for writing compressed audio packets.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::writes_compressed_video)(void *priv, const gavl_video_format_t *format, const gavl_compression_info_t *info) |
Query for writing compressed video packets.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::open)(void *data, const char *filename, const bg_metadata_t *metadata, const bg_chapter_list_t *chapter_list) |
Open a file.
priv | The handle returned by the create() method
|
const bg_parameter_info_t*(* bg_encoder_plugin_s::get_audio_parameters)(void *priv) |
Get audio related parameters.
priv | The handle returned by the create() method
|
const bg_parameter_info_t*(* bg_encoder_plugin_s::get_video_parameters)(void *priv) |
Get video related parameters.
priv | The handle returned by the create() method
|
const bg_parameter_info_t*(* bg_encoder_plugin_s::get_subtitle_text_parameters)(void *priv) |
Get text subtitle related parameters.
priv | The handle returned by the create() method
|
const bg_parameter_info_t*(* bg_encoder_plugin_s::get_subtitle_overlay_parameters)(void *priv) |
Get overlay subtitle related parameters.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::add_audio_stream)(void *priv, const char *language, const gavl_audio_format_t *format) |
Add an audio stream.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::add_audio_stream_compressed)(void *priv, const char *language, const gavl_audio_format_t *format, const gavl_compression_info_t *info) |
Add an audio stream fpr compressed writing.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::add_video_stream)(void *priv, const gavl_video_format_t *format) |
Add a video stream.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::add_video_stream_compressed)(void *priv, const gavl_video_format_t *format, const gavl_compression_info_t *info) |
Add a video stream for compressed writing.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::add_subtitle_text_stream)(void *priv, const char *language, int *timescale) |
Add a text subtitle stream.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::add_subtitle_overlay_stream)(void *priv, const char *language, const gavl_video_format_t *format) |
Add a text subtitle stream.
priv | The handle returned by the create() method
|
void(* bg_encoder_plugin_s::set_audio_parameter)(void *priv, int stream, const char *name, const bg_parameter_value_t *v) |
Set audio encoding parameter.
priv | The handle returned by the create() method
|
void(* bg_encoder_plugin_s::set_video_parameter)(void *priv, int stream, const char *name, const bg_parameter_value_t *v) |
Set video encoding parameter.
priv | The handle returned by the create() method
|
void(* bg_encoder_plugin_s::set_subtitle_text_parameter)(void *priv, int stream, const char *name, const bg_parameter_value_t *v) |
Set text subtitle encoding parameter.
priv | The handle returned by the create() method
|
void(* bg_encoder_plugin_s::set_subtitle_overlay_parameter)(void *priv, int stream, const char *name, const bg_parameter_value_t *v) |
Set text subtitle encoding parameter.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::set_video_pass)(void *priv, int stream, int pass, int total_passes, const char *stats_file) |
Setup multipass video encoding.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::start)(void *priv) |
Set up all codecs and prepare for encoding.
priv | The handle returned by the create() method
|
void(* bg_encoder_plugin_s::get_audio_format)(void *priv, int stream, gavl_audio_format_t *ret) |
Get audio format.
priv | The handle returned by the create() method
|
void(* bg_encoder_plugin_s::get_video_format)(void *priv, int stream, gavl_video_format_t *ret) |
Get video format.
priv | The handle returned by the create() method
|
void(* bg_encoder_plugin_s::get_subtitle_overlay_format)(void *priv, int stream, gavl_video_format_t *ret) |
Get video format of an overlay subtitle stream.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::write_audio_frame)(void *data, gavl_audio_frame_t *frame, int stream) |
Write audio samples.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::write_audio_packet)(void *data, gavl_packet_t *packet, int stream) |
Write audio packet.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::write_video_frame)(void *data, gavl_video_frame_t *frame, int stream) |
Write video frame.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::write_video_packet)(void *data, gavl_packet_t *packet, int stream) |
Write video packet.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::write_subtitle_text)(void *data, const char *text, int64_t start, int64_t duration, int stream) |
Write a text subtitle.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::write_subtitle_overlay)(void *data, gavl_overlay_t *ovl, int stream) |
Write an overlay subtitle.
priv | The handle returned by the create() method
|
int(* bg_encoder_plugin_s::close)(void *data, int do_delete) |
Close encoder.
priv | The handle returned by the create() method
|