gmerlin
|
Callbacks for input plugins. More...
#include <plugin.h>
Data Fields | |
void(* | duration_changed )(void *data, gavl_time_t duration) |
Duration changed. More... | |
void(* | name_changed )(void *data, const char *name) |
Name changed. More... | |
void(* | metadata_changed )(void *data, const gavl_metadata_t *m) |
Metadata changed. More... | |
void(* | buffer_notify )(void *data, float percentage) |
Buffer callback. More... | |
int(* | user_pass )(void *data, const char *resource, char **username, char **password) |
Authentication callback. More... | |
void(* | aspect_changed )(void *data, int stream, int pixel_width, int pixel_height) |
Aspect ratio change callback. More... | |
void * | data |
Application specific data passed as the first argument to all callbacks. More... | |
Callbacks for input plugins.
Passing the callback structure to the plugin is optional. Futhermore, any of the callback functions is optional (i.e. can be NULL). The plugin might use the callbacks for propagating events.
void(* bg_input_callbacks_s::duration_changed)(void *data, gavl_time_t duration) |
Duration changed.
data | The data member of this bg_input_callbacks_s struct |
time | The new duration |
void(* bg_input_callbacks_s::name_changed)(void *data, const char *name) |
Name changed.
data | The data member of this bg_input_callbacks_s struct |
time | The new name |
This is for web-radio stations, which send song-names.
void(* bg_input_callbacks_s::metadata_changed)(void *data, const gavl_metadata_t *m) |
Metadata changed.
data | The data member of this bg_input_callbacks_s struct |
m | The new metadata |
This is for web-radio stations, which send metadata for each song.
void(* bg_input_callbacks_s::buffer_notify)(void *data, float percentage) |
Buffer callback.
data | The data member of this bg_input_callbacks_s struct |
percentage | The buffer fullness (0.0..1.0) |
For network connections, plugins might buffer data. This takes some time, so they notify the API about the progress with this callback.
int(* bg_input_callbacks_s::user_pass)(void *data, const char *resource, char **username, char **password) |
Authentication callback.
data | The data member of this bg_input_callbacks_s struct |
resource | Name of the resource (e.g. server name) |
username | Returns the username |
password | Returns the password |
For sources, which require authentication (like FTP servers), this function is called by the plugin to get username and password. Username and password must be returned in newly allocated strings, which will be freed by the plugin.
void(* bg_input_callbacks_s::aspect_changed)(void *data, int stream, int pixel_width, int pixel_height) |
Aspect ratio change callback.
data | The data member of this bg_input_callbacks_s struct |
stream | Video stream index (starts with 0) |
pixel_width | New pixel width |
pixel_height | New pixel height |
Some streams (e.g. DVB) change the pixel aspect ratio on the fly. If the input plugin detects such a change, it should call this callback.
void* bg_input_callbacks_s::data |
Application specific data passed as the first argument to all callbacks.