bg_input_callbacks_s Struct Reference
[Media input]
Callbacks for input plugins.
More...
#include <plugin.h>
Data Fields |
void(* | duration_changed )(void *data, gavl_time_t duration) |
| Duration changed.
|
void(* | name_changed )(void *data, const char *name) |
| Name changed.
|
void(* | metadata_changed )(void *data, const bg_metadata_t *m) |
| Metadata changed.
|
void(* | buffer_notify )(void *data, float percentage) |
| Buffer callback.
|
int(* | user_pass )(void *data, const char *resource, char **username, char **password) |
| Authentication callback.
|
void(* | aspect_changed )(void *data, int stream, int pixel_width, int pixel_height) |
| Aspect ratio change callback.
|
void * | data |
| Application specific data passed as the first argument to all callbacks.
|
Detailed Description
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.
Field Documentation
Duration changed.
- Parameters:
-
Name changed.
- Parameters:
-
| data | The data member of this bg_input_callbacks_s struct - Parameters:
-
This is for web-radio stations, which send song-names. |
Metadata changed.
- Parameters:
-
| data | The data member of this bg_input_callbacks_s struct - Parameters:
-
This is for web-radio stations, which send metadata for each song. |
Buffer callback.
- Parameters:
-
| data | The data member of this bg_input_callbacks_s struct - Parameters:
-
| 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. |
Authentication callback.
- Parameters:
-
| data | The data member of this bg_input_callbacks_s struct - Parameters:
-
| resource | Name of the resource (e.g. server name) - Parameters:
-
| username | Returns the username - Parameters:
-
| password | Returns the password - Returns:
- 1 if username and password are available, 0 else.
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. |
|
|
|
Aspect ratio change callback.
- Parameters:
-
| data | The data member of this bg_input_callbacks_s struct - Parameters:
-
| stream | Video stream index (starts with 0) - Parameters:
-
| pixel_width | New pixel width - Parameters:
-
| 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. |
|
|
Application specific data passed as the first argument to all callbacks.
The documentation for this struct was generated from the following file:
- /usr/src/packages/BUILD/gmerlin-1.0.0/include/gmerlin/plugin.h