bg_ov_plugin_s Struct Reference
[Video output]
Video output plugin.
More...
#include <plugin.h>
Data Fields |
bg_plugin_common_t | common |
| Infos and functions common to all plugin types.
|
void(* | set_window )(void *priv, const char *window_id) |
| Set window.
|
const char *(* | get_window )(void *priv) |
| Get window.
|
void(* | set_window_options )(void *priv, const char *name, const char *klass, const gavl_video_frame_t *icon, const gavl_video_format_t *icon_format) |
| Set window class.
|
void(* | set_window_title )(void *priv, const char *title) |
| Set window title.
|
void(* | set_callbacks )(void *priv, bg_ov_callbacks_t *callbacks) |
| Set callbacks.
|
int(* | open )(void *priv, gavl_video_format_t *format, int keep_aspect) |
| Open plugin.
|
gavl_video_frame_t *(* | create_frame )(void *priv) |
| Allocate a video frame.
|
int(* | add_overlay_stream )(void *priv, gavl_video_format_t *format) |
| Add a stream for transparent overlays.
|
gavl_overlay_t *(* | create_overlay )(void *priv, int id) |
| Allocate an overlay.
|
void(* | set_overlay )(void *priv, int stream, gavl_overlay_t *ovl) |
| Set an overlay for a specific stream.
|
void(* | put_video )(void *priv, gavl_video_frame_t *frame) |
| Display a frame of a video stream.
|
void(* | put_still )(void *priv, gavl_video_frame_t *frame) |
| Display a still image.
|
void(* | handle_events )(void *priv) |
| Get all events from the queue and handle them.
|
void(* | update_aspect )(void *priv, int pixel_width, int pixel_height) |
| Update aspect ratio.
|
void(* | destroy_frame )(void *priv, gavl_video_frame_t *frame) |
| Free a frame created with the create_frame() method.
|
void(* | destroy_overlay )(void *priv, int id, gavl_overlay_t *ovl) |
| Free an overlay created with the create_overlay() method.
|
void(* | close )(void *priv) |
| Close the plugin.
|
void(* | show_window )(void *priv, int show) |
| Show or hide the window.
|
Detailed Description
Video output plugin.
This handles video output and still-image display. In a window based system, it will typically open a new window, which is owned by the plugin.
Field Documentation
Infos and functions common to all plugin types.
Set window.
- Parameters:
-
| priv | The handle returned by the create() method - Parameters:
-
Call this immediately after creation of the plugin to embed video output into a foreign application. For X11, the window identifier has the form <display_name>:<normal_id>:<fullscreen_id>. |
Get window.
- Parameters:
-
| priv | The handle returned by the create() method - Returns:
- Window identifier
|
Set window class.
- Parameters:
-
| priv | The handle returned by the create() method - Parameters:
-
| name | The name of the window - Parameters:
-
| klass | The class of the window |
This makes sense probably only in an X11 environment. If the klass argument is the same for all windows of an application, they, might be grouped together in the window list. On X11 this results in a call to XSetClassHint(). |
|
Set window title.
- Parameters:
-
| priv | The handle returned by the create() method - Parameters:
-
| title | The title for the window |
|
Set callbacks.
- Parameters:
-
| priv | The handle returned by the create() method - Parameters:
-
| callbacks | Callback structure initialized by the caller before |
|
Open plugin.
- Parameters:
-
| priv | The handle returned by the create() method - Parameters:
-
| format | Video format - Parameters:
-
| window_title | Window title |
The format will be changed to the nearest format, which is supported by the plugin. To convert the source format to the output format, use a gavl_video_converter_t |
|
Allocate a video frame.
- Parameters:
-
| priv | The handle returned by the create() method - Returns:
- a newly allocated video frame
This optional method allocates a video frame in a plugin specific manner (e.g. in a shared memory segment). If this funtion is defined, all frames which are passed to the plugin, must be allocated by this function. Before the plugin is closed, all created frames must be freed with the destroy_frame() method. |
Add a stream for transparent overlays.
- Parameters:
-
| priv | The handle returned by the create() method - Parameters:
-
| format | Format of the overlays - Returns:
- The index of the overlay stream
It's up to the plugin, if they are realized in hardware or with a gavl_overlay_blend_context_t, but they must be there. add_overlay_stream() must be called after open() |
An application can have more than one overlay stream. Typical is one for subtitles and one for OSD. |
Allocate an overlay.
- Parameters:
-
| priv | The handle returned by the create() method - Parameters:
-
| id | The id returned by the add_overlay_stream() method - Returns:
- a newly allocated overlay
This optional method allocates an overlay in a plugin specific manner (e.g. in a shared memory segment). If this funtion is defined, all overlays which are passed to the plugin, must be allocated by this function. Before the plugin is closed, all created overlays must be freed with the destroy_overlay() method. |
|
Set an overlay for a specific stream.
- Parameters:
-
| priv | The handle returned by the create() method - Parameters:
-
|
Display a frame of a video stream.
- Parameters:
-
| priv | The handle returned by the create() method - Parameters:
-
This is for video playback |
Display a still image.
- Parameters:
-
| priv | The handle returned by the create() method - Parameters:
-
This function is like put_video() with the difference, that the frame will be remembered and redisplayed, when an expose event is received. |
Get all events from the queue and handle them.
- Parameters:
-
| priv | The handle returned by the create() method |
This function processes and handles all events, which were received from the windowing system. It calls mouse and key-callbacks, and redisplays the image when in still mode.
Update aspect ratio.
- Parameters:
-
| priv | The handle returned by the create() method - Parameters:
-
| pixel_width | New pixel width - Parameters:
-
| pixel_height | New pixel height |
|
|
Free a frame created with the create_frame() method.
- Parameters:
-
| priv | The handle returned by the create() method - Parameters:
-
| frame | The frame to be freed |
|
Free an overlay created with the create_overlay() method.
- Parameters:
-
| priv | The handle returned by the create() method - Parameters:
-
|
Close the plugin.
- Parameters:
-
| priv | The handle returned by the create() method |
Close everything so the plugin can be opened with a differtent format after.
Show or hide the window.
- Parameters:
-
| priv | The handle returned by the create() method - Parameters:
-
| show | 1 for showing, 0 for hiding |
|
The documentation for this struct was generated from the following file:
- /usr/src/packages/BUILD/gmerlin-1.0.0/include/gmerlin/plugin.h