Input plugin. More...
#include <plugin.h>
Data Fields | |
bg_plugin_common_t | common |
Infos and functions common to all plugin types. | |
const char *(* | get_protocols )(void *priv) |
Get supported protocols. | |
const char *(* | get_mimetypes )(void *priv) |
Get supported mimetypes. | |
const char *(* | get_extensions )(void *priv) |
Get supported extensions. | |
void(* | set_callbacks )(void *priv, bg_input_callbacks_t *callbacks) |
Set callbacks. | |
int(* | open )(void *priv, const char *arg) |
Open file/url/device. | |
int(* | open_fd )(void *priv, int fd, int64_t total_bytes, const char *mimetype) |
Open plugin from filedescriptor (optional). | |
int(* | open_callbacks )(void *priv, int(*read_callback)(void *priv, uint8_t *data, int len), int64_t(*seek_callback)(void *priv, uint64_t pos, int whence), void *cb_priv, const char *filename, const char *mimetype, int64_t total_bytes) |
Open plugin with callbacks (optional). | |
const bg_edl_t *(* | get_edl )(void *priv) |
Get the edl (optional). | |
const char *(* | get_disc_name )(void *priv) |
Get the disc name (optional). | |
int(* | eject_disc )(const char *device) |
Eject disc (optional). | |
int(* | get_num_tracks )(void *priv) |
Get the number of tracks. | |
bg_track_info_t *(* | get_track_info )(void *priv, int track) |
Return information about a track. | |
int(* | set_track )(void *priv, int track) |
Set the track to be played. | |
int(* | get_audio_compression_info )(void *priv, int stream, gavl_compression_info_t *info) |
Get the compression info of an audio stream. | |
int(* | get_video_compression_info )(void *priv, int stream, gavl_compression_info_t *info) |
Get the compression info of a video stream. | |
int(* | set_audio_stream )(void *priv, int stream, bg_stream_action_t action) |
Setup audio stream. | |
int(* | set_video_stream )(void *priv, int stream, bg_stream_action_t action) |
Setup video stream. | |
int(* | set_subtitle_stream )(void *priv, int stream, bg_stream_action_t action) |
Setup subtitle stream. | |
int(* | start )(void *priv) |
Start decoding. | |
gavl_frame_table_t *(* | get_frame_table )(void *priv, int stream) |
Get frame table. | |
bg_read_audio_func_t | read_audio |
Read audio samples. | |
int(* | has_still )(void *priv, int stream) |
Check is a still image is available. | |
bg_read_video_func_t | read_video |
Read a video frame. | |
int(* | read_audio_packet )(void *priv, int stream, gavl_packet_t *p) |
Read compressed audio packet. | |
int(* | read_video_packet )(void *priv, int stream, gavl_packet_t *p) |
Read compressed video packet. | |
void(* | skip_video )(void *priv, int stream, int64_t *time, int scale, int exact) |
Skip frames in a video stream. | |
int(* | has_subtitle )(void *priv, int stream) |
Query if a new subtitle is available. | |
int(* | read_subtitle_overlay )(void *priv, gavl_overlay_t *ovl, int stream) |
Read one pixmap subtitle. | |
int(* | read_subtitle_text )(void *priv, char **text, int *text_alloc, int64_t *start_time, int64_t *duration, int stream) |
Read one text subtitle. | |
void(* | seek )(void *priv, int64_t *time, int scale) |
Seek within a media track. | |
void(* | stop )(void *priv) |
Stop playback. | |
void(* | close )(void *priv) |
Close plugin. |
Input plugin.
This is for all kinds of media inputs (files, disks, urls, etc), except recording from hardware devices (see Recorder).
Infos and functions common to all plugin types.
const char*(* bg_input_plugin_s::get_protocols)(void *priv) |
Get supported protocols.
priv | The handle returned by the create() method
|
const char*(* bg_input_plugin_s::get_mimetypes)(void *priv) |
Get supported mimetypes.
priv | The handle returned by the create() method
|
const char*(* bg_input_plugin_s::get_extensions)(void *priv) |
Get supported extensions.
priv | The handle returned by the create() method
|
void(* bg_input_plugin_s::set_callbacks)(void *priv, bg_input_callbacks_t *callbacks) |
Set callbacks.
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::open)(void *priv, const char *arg) |
Open file/url/device.
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::open_fd)(void *priv, int fd, int64_t total_bytes, const char *mimetype) |
Open plugin from filedescriptor (optional).
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::open_callbacks)(void *priv, int(*read_callback)(void *priv, uint8_t *data, int len), int64_t(*seek_callback)(void *priv, uint64_t pos, int whence), void *cb_priv, const char *filename, const char *mimetype, int64_t total_bytes) |
Open plugin with callbacks (optional).
priv | The handle returned by the create() method
|
const bg_edl_t*(* bg_input_plugin_s::get_edl)(void *priv) |
Get the edl (optional).
priv | The handle returned by the create() method
|
const char*(* bg_input_plugin_s::get_disc_name)(void *priv) |
Get the disc name (optional).
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::eject_disc)(const char *device) |
Eject disc (optional).
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::get_num_tracks)(void *priv) |
Get the number of tracks.
priv | The handle returned by the create() method
|
bg_track_info_t*(* bg_input_plugin_s::get_track_info)(void *priv, int track) |
Return information about a track.
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::set_track)(void *priv, int track) |
Set the track to be played.
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::get_audio_compression_info)(void *priv, int stream, gavl_compression_info_t *info) |
Get the compression info of an audio stream.
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::get_video_compression_info)(void *priv, int stream, gavl_compression_info_t *info) |
Get the compression info of a video stream.
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::set_audio_stream)(void *priv, int stream, bg_stream_action_t action) |
Setup audio stream.
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::set_video_stream)(void *priv, int stream, bg_stream_action_t action) |
Setup video stream.
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::set_subtitle_stream)(void *priv, int stream, bg_stream_action_t action) |
Setup subtitle stream.
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::start)(void *priv) |
Start decoding.
priv | The handle returned by the create() method
|
gavl_frame_table_t*(* bg_input_plugin_s::get_frame_table)(void *priv, int stream) |
Get frame table.
priv | The handle returned by the create() method
|
Read audio samples.
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::has_still)(void *priv, int stream) |
Check is a still image is available.
priv | The handle returned by the create() method
|
Read a video frame.
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::read_audio_packet)(void *priv, int stream, gavl_packet_t *p) |
Read compressed audio packet.
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::read_video_packet)(void *priv, int stream, gavl_packet_t *p) |
Read compressed video packet.
priv | The handle returned by the create() method
|
void(* bg_input_plugin_s::skip_video)(void *priv, int stream, int64_t *time, int scale, int exact) |
Skip frames in a video stream.
stream | Stream index (starting with 0)
|
int(* bg_input_plugin_s::has_subtitle)(void *priv, int stream) |
Query if a new subtitle is available.
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::read_subtitle_overlay)(void *priv, gavl_overlay_t *ovl, int stream) |
Read one pixmap subtitle.
priv | The handle returned by the create() method
|
int(* bg_input_plugin_s::read_subtitle_text)(void *priv, char **text, int *text_alloc, int64_t *start_time, int64_t *duration, int stream) |
Read one text subtitle.
priv | The handle returned by the create() method
|
void(* bg_input_plugin_s::seek)(void *priv, int64_t *time, int scale) |
Seek within a media track.
priv | The handle returned by the create() method
|
void(* bg_input_plugin_s::stop)(void *priv) |
Stop playback.
priv | The handle returned by the create() method |
void(* bg_input_plugin_s::close)(void *priv) |
Close plugin.
priv | The handle returned by the create() method |