## BaconVideoWidget BaconVideoWidget — video playing widget and abstraction |

## Stability Level

Unstable, unless otherwise indicated

## Functions

GtkWidget * | bacon_video_widget_new ()
void | bacon_video_widget_open ()
gboolean | bacon_video_widget_play ()
void | bacon_video_widget_pause ()
gboolean | bacon_video_widget_seek ()
gboolean | bacon_video_widget_seek_time ()
void | bacon_video_widget_stop ()
void | bacon_video_widget_close ()
gboolean | bacon_video_widget_can_direct_seek ()
gboolean | bacon_video_widget_can_get_frames ()
gboolean | bacon_video_widget_can_set_volume ()
void | bacon_video_widget_dvd_event ()
gboolean | bacon_video_widget_has_menus ()
BvwAspectRatio | bacon_video_widget_get_aspect_ratio ()
void | bacon_video_widget_set_aspect_ratio ()
BvwAudioOutputType | bacon_video_widget_get_audio_output_type ()
void | bacon_video_widget_set_audio_output_type ()
GdkPixbuf * | bacon_video_widget_get_current_frame ()
gint64 | bacon_video_widget_get_current_time ()
gboolean | bacon_video_widget_get_deinterlacing ()
void | bacon_video_widget_set_deinterlacing ()
GList * | bacon_video_widget_get_languages ()
int | bacon_video_widget_get_language ()
void | bacon_video_widget_set_language ()
void | bacon_video_widget_set_logo ()
gboolean | bacon_video_widget_get_logo_mode ()
void | bacon_video_widget_set_logo_mode ()
void | bacon_video_widget_get_metadata ()
GOptionGroup * | bacon_video_widget_get_option_group ()
double | bacon_video_widget_get_position ()
void | bacon_video_widget_set_referrer ()
BvwRotation | bacon_video_widget_get_rotation ()
void | bacon_video_widget_set_rotation ()
gint64 | bacon_video_widget_get_stream_length ()
GList * | bacon_video_widget_get_subtitles ()
int | bacon_video_widget_get_subtitle ()
void | bacon_video_widget_set_subtitle ()
void | bacon_video_widget_set_text_subtitle ()
void | bacon_video_widget_set_subtitle_encoding ()
void | bacon_video_widget_set_subtitle_font ()
void | bacon_video_widget_set_user_agent ()
int | bacon_video_widget_get_video_property ()
void | bacon_video_widget_set_video_property ()
double | bacon_video_widget_get_volume ()
void | bacon_video_widget_set_volume ()
BvwZoomMode | bacon_video_widget_get_zoom ()
void | bacon_video_widget_set_zoom ()
gboolean | bacon_video_widget_has_angles ()
void | bacon_video_widget_set_next_angle ()
gboolean | bacon_video_widget_has_next_track ()
gboolean | bacon_video_widget_has_previous_track ()
gboolean | bacon_video_widget_is_playing ()
gboolean | bacon_video_widget_is_seekable ()
gfloat | bacon_video_widget_get_rate ()
gboolean | bacon_video_widget_set_rate ()
gboolean | bacon_video_widget_step ()
GObject * | bacon_video_widget_get_controls_object ()
GObject * | bacon_video_widget_get_header_controls_object ()
void | bacon_video_widget_set_fullscreen ()
void | bacon_video_widget_set_next_language ()
void | bacon_video_widget_set_next_subtitle ()
void | bacon_video_widget_show_popup ()
void | bacon_video_widget_mark_popup_busy ()
void | bacon_video_widget_unmark_popup_busy ()

## Types and Values

| BaconVideoWidget
| BaconVideoWidgetClass
enum | BvwAspectRatio
enum | BvwAudioOutputType
enum | BvwDVDEvent
enum | BvwMetadataType
enum | BvwRotation
enum | BvwVideoProperty
enum | BvwZoomMode
enum | BvwError

## Includes

    #include <bacon-video-widget.h>

## Description

BaconVideoWidget is a widget to play audio or video streams, with support for visualisations for audio-only streams. It has a GStreamer backend, and abstracts away the differences to provide a simple interface to the functionality required by Totem. It handles all the low-level audio and video work for Totem (or passes the work off to the backend).

## Functions

### bacon_video_widget_new ()

    GtkWidget *
    bacon_video_widget_new (GError **error);

Creates a new BaconVideoWidget.

A BvwError will be returned on error.

#### Parameters

error | a GError, or `NULL` |

#### Returns

a new BaconVideoWidget, or `NULL`; destroy with `gtk_widget_destroy()`

### bacon_video_widget_open ()

    void
    bacon_video_widget_open (BaconVideoWidget *bvw,
                             const char *mrl);

Opens the given `mrl` in `bvw` for playing.

The MRL is loaded and waiting to be played with `bacon_video_widget_play()`.

#### Parameters

bvw | a BaconVideoWidget |
mrl | an MRL |

### bacon_video_widget_play ()

    gboolean
    bacon_video_widget_play (BaconVideoWidget *bvw,
                             GError **error);

Plays the currently-loaded video in `bvw` .

Errors from the GStreamer backend will be returned asynchronously via the “error” signal, even if this function returns `TRUE`.

#### Parameters

bvw | a BaconVideoWidget |
error | a GError, or `NULL` |

#### Returns

`TRUE` on success, `FALSE` otherwise

### bacon_video_widget_pause ()

    void
    bacon_video_widget_pause (BaconVideoWidget *bvw);

Pauses the current stream in the video widget.

If a live stream is being played, playback is stopped entirely.

#### Parameters

bvw | a BaconVideoWidget |

### bacon_video_widget_seek ()

    gboolean
    bacon_video_widget_seek (BaconVideoWidget *bvw,
                             double position,
                             GError **error);

Seeks the currently-playing stream to `position` as a percentage of the total stream length.

#### Parameters

bvw | a BaconVideoWidget |
position | the percentage of the way through the stream to which to seek |
error | a GError, or `NULL` |

#### Returns

`TRUE` on success, `FALSE` otherwise

### bacon_video_widget_seek_time ()

    gboolean
    bacon_video_widget_seek_time (BaconVideoWidget *bvw,
                                  gint64 _time,
                                  gboolean accurate,
                                  GError **error);

Seeks the currently-playing stream to the absolute position `time` , in milliseconds.

#### Parameters

bvw | a BaconVideoWidget |
_time | the time to which to seek, in milliseconds |
accurate | whether to use accurate seek, an accurate seek might be slower for some formats (see GStreamer docs) |
error | a GError, or `NULL` |

#### Returns

`TRUE` on success, `FALSE` otherwise

### bacon_video_widget_stop ()

    void
    bacon_video_widget_stop (BaconVideoWidget *bvw);

Stops playing the current stream and resets to the first position in the stream.

#### Parameters

bvw | a BaconVideoWidget |

### bacon_video_widget_close ()

    void
    bacon_video_widget_close (BaconVideoWidget *bvw);

Closes the current stream and frees the resources associated with it.

#### Parameters

bvw | a BaconVideoWidget |

### bacon_video_widget_can_direct_seek ()

    gboolean
    bacon_video_widget_can_direct_seek (BaconVideoWidget *bvw);

Determines whether direct seeking is possible for the current stream.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

`TRUE` if direct seeking is possible, `FALSE` otherwise

### bacon_video_widget_can_get_frames ()

    gboolean
    bacon_video_widget_can_get_frames (BaconVideoWidget *bvw,
                                       GError **error);

Determines whether individual frames from the current stream can be returned using `bacon_video_widget_get_current_frame()`.

Frames cannot be returned for audio-only streams, unless visualisations are enabled.

#### Parameters

bvw | a BaconVideoWidget |
error | a GError, or `NULL` |

#### Returns

`TRUE` if frames can be captured, `FALSE` otherwise

### bacon_video_widget_can_set_volume ()

    gboolean
    bacon_video_widget_can_set_volume (BaconVideoWidget *bvw);

Returns whether the volume level can be set, given the current settings.

The volume cannot be set if the audio output type is set to `BVW_AUDIO_SOUND_AC3PASSTHRU`.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

`TRUE` if the volume can be set, `FALSE` otherwise

### bacon_video_widget_dvd_event ()

    void
    bacon_video_widget_dvd_event (BaconVideoWidget *bvw,
                                  BvwDVDEvent type);

Issues a DVD navigation event to the video widget, such as one to skip to the next chapter, or navigate to the DVD title menu.

This is a no-op if the current stream is not navigable.

#### Parameters

bvw | a BaconVideoWidget |
type | the type of DVD event to issue |

### bacon_video_widget_has_menus ()

    gboolean
    bacon_video_widget_has_menus (BaconVideoWidget *bvw);

Returns whether the widget is currently displaying a menu, such as a DVD menu.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

`TRUE` if a menu is displayed, `FALSE` otherwise

### bacon_video_widget_get_aspect_ratio ()

    BvwAspectRatio
    bacon_video_widget_get_aspect_ratio (BaconVideoWidget *bvw);

Returns the current aspect ratio used by the widget, from BvwAspectRatio.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

the aspect ratio

### bacon_video_widget_set_aspect_ratio ()

    void
    bacon_video_widget_set_aspect_ratio (BaconVideoWidget *bvw,
                                         BvwAspectRatio ratio);

Sets the aspect ratio used by the widget, from BvwAspectRatio.

Changes to this take effect immediately.

#### Parameters

bvw | a BaconVideoWidget |
ratio | the new aspect ratio |

### bacon_video_widget_get_audio_output_type ()

    BvwAudioOutputType
    bacon_video_widget_get_audio_output_type
                                   (BaconVideoWidget *bvw);

Returns the current audio output type (e.g. how many speaker channels) from BvwAudioOutputType.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

the audio output type, or `-1`

### bacon_video_widget_set_audio_output_type ()

    void
    bacon_video_widget_set_audio_output_type
                                   (BaconVideoWidget *bvw,
                                    BvwAudioOutputType type);

Sets the audio output type (number of speaker channels) in the video widget.

#### Parameters

bvw | a BaconVideoWidget |
type | the new audio output type |

### bacon_video_widget_get_current_frame ()

    GdkPixbuf *
    bacon_video_widget_get_current_frame (BaconVideoWidget *bvw);

Returns a GdkPixbuf containing the current frame from the playing stream. This will wait for any pending seeks to complete before capturing the frame.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

the current frame, or `NULL`; unref with `g_object_unref()`

### bacon_video_widget_get_current_time ()

    gint64
    bacon_video_widget_get_current_time (BaconVideoWidget *bvw);

Returns the current position in the stream, as the time (in milliseconds) since the beginning of the stream.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

time since the beginning of the stream, in milliseconds, or `-1`

### bacon_video_widget_get_deinterlacing ()

    gboolean
    bacon_video_widget_get_deinterlacing (BaconVideoWidget *bvw);

Returns whether deinterlacing of videos is enabled for this widget.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

`TRUE` if automatic deinterlacing is enabled, `FALSE` otherwise

### bacon_video_widget_set_deinterlacing ()

    void
    bacon_video_widget_set_deinterlacing (BaconVideoWidget *bvw,
                                          gboolean deinterlace);

Sets whether the widget should deinterlace videos.

#### Parameters

bvw | a BaconVideoWidget |
deinterlace | `TRUE` if videos should be automatically deinterlaced, `FALSE` otherwise |

### bacon_video_widget_get_languages ()

    GList *
    bacon_video_widget_get_languages (BaconVideoWidget *bvw);

Returns a list of BvwLangInfo for each audio track.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

a GList of BvwLanginfo, or `NULL`; free each element with `bacon_video_widget_lang_info_free()` and the list with `g_list_free()`

### bacon_video_widget_get_language ()

    int
    bacon_video_widget_get_language (BaconVideoWidget *bvw);

Returns the index of the current audio language.

If the widget is not playing, or the default language is in use, `-1` will be returned.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

the audio language index

### bacon_video_widget_set_language ()

    void
    bacon_video_widget_set_language (BaconVideoWidget *bvw,
                                     int language);

Sets the audio language index for `bvw` . If `language` is `-1`, the default language will be used.

#### Parameters

bvw | a BaconVideoWidget |
language | an audio language index |

### bacon_video_widget_set_logo ()

    void
    bacon_video_widget_set_logo (BaconVideoWidget *bvw,
                                 const char *name);

Sets the logo displayed on the video widget when no stream is loaded.

#### Parameters

bvw | a BaconVideoWidget |
name | the icon name of the logo |

### bacon_video_widget_get_logo_mode ()

    gboolean
    bacon_video_widget_get_logo_mode (BaconVideoWidget *bvw);

Gets whether the logo is displayed when no stream is loaded.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

`TRUE` if the logo is displayed, `FALSE` otherwise

### bacon_video_widget_set_logo_mode ()

    void
    bacon_video_widget_set_logo_mode (BaconVideoWidget *bvw,
                                      gboolean logo_mode);

Sets whether to display a logo set with `bacon_video_widget_set_logo` when no stream is loaded. If `logo_mode` is `FALSE`, nothing will be displayed and the video widget will take up no space. Otherwise, the logo will be displayed and will requisition a corresponding amount of space.

#### Parameters

bvw | a BaconVideoWidget |
logo_mode | `TRUE` to display the logo, `FALSE` otherwise |

### bacon_video_widget_get_metadata ()

    void
    bacon_video_widget_get_metadata (BaconVideoWidget *bvw,
                                     BvwMetadataType type,
                                     GValue *value);

Provides metadata of the given `type` about the current stream in `value` .

Free the GValue with `g_value_unset()`.

#### Parameters

bvw | a BaconVideoWidget |
type | the type of metadata to return |
value | a GValue |

### bacon_video_widget_get_option_group ()

    GOptionGroup *
    bacon_video_widget_get_option_group (void);

Returns the GOptionGroup containing command-line options for BaconVideoWidget.

Applications must call either this exactly once.

#### Returns

a GOptionGroup giving command-line options for BaconVideoWidget

### bacon_video_widget_get_position ()

    double
    bacon_video_widget_get_position (BaconVideoWidget *bvw);

Returns the current position in the stream, as a value between

`0` and `1`.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

the current position, or `-1`

### bacon_video_widget_set_referrer ()

    void
    bacon_video_widget_set_referrer (BaconVideoWidget *bvw,
                                     const char *referrer);

Sets the HTTP referrer URI to use when fetching HTTP ressources.

#### Parameters

bvw | a BaconVideoWidget |
referrer | a HTTP referrer URI, or `NULL` |

### bacon_video_widget_get_rotation ()

    BvwRotation
    bacon_video_widget_get_rotation (BaconVideoWidget *bvw);

Returns the angle of rotation of the video, in degrees.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

a BvwRotation.

### bacon_video_widget_set_rotation ()

    void
    bacon_video_widget_set_rotation (BaconVideoWidget *bvw,
                                     BvwRotation rotation);

Sets the rotation to be applied to the video when it is displayed.

#### Parameters

bvw | a BaconVideoWidget |
rotation | the BvwRotation of the video in degrees |

### bacon_video_widget_get_stream_length ()

    gint64
    bacon_video_widget_get_stream_length (BaconVideoWidget *bvw);

Returns the total length of the stream, in milliseconds.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

the stream length, in milliseconds, or `-1`

### bacon_video_widget_get_subtitles ()

    GList *
    bacon_video_widget_get_subtitles (BaconVideoWidget *bvw);

Returns a list of BvwLangInfo for each subtitle track.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

a GList of BvwLangInfo, or `NULL`; free each element with `bacon_video_widget_lang_info_free()` and the list with `g_list_free()`

### bacon_video_widget_get_subtitle ()

    int
    bacon_video_widget_get_subtitle (BaconVideoWidget *bvw);

Returns the index of the current subtitles.

If the widget is not playing, `-2` will be returned. If no subtitles are being used, `-1` is returned.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

the subtitle index

### bacon_video_widget_set_subtitle ()

    void
    bacon_video_widget_set_subtitle (BaconVideoWidget *bvw,
                                     int subtitle);

Sets the subtitle index for `bvw` . If `subtitle` is `-1`, no subtitles will be used.

#### Parameters

bvw | a BaconVideoWidget |
subtitle | a subtitle index |

### bacon_video_widget_set_text_subtitle ()

    void
    bacon_video_widget_set_text_subtitle (BaconVideoWidget *bvw,
                                          const gchar *subtitle_uri);

Sets the URI for the text subtitle file to be displayed alongside the current video. Use `NULL` if you want to unload the current text subtitle file being used.

#### Parameters

bvw | a BaconVideoWidget |
subtitle_uri | the URI of a subtitle file, or `NULL`. | [allow-none]

### bacon_video_widget_set_subtitle_encoding ()

    void
    bacon_video_widget_set_subtitle_encoding
                                   (BaconVideoWidget *bvw,
                                    const char *encoding);

Sets the encoding system for the subtitles, so that they can be decoded properly.

#### Parameters

bvw | a BaconVideoWidget |
encoding | an encoding system |

### bacon_video_widget_set_subtitle_font ()

    void
    bacon_video_widget_set_subtitle_font (BaconVideoWidget *bvw,
                                          const char *font);

Sets the font size and style in which to display subtitles.

`font` is a Pango font description string, as understood by `pango_font_description_from_string()`.

#### Parameters

bvw | a BaconVideoWidget |
font | a font description string |

### bacon_video_widget_set_user_agent ()

    void
    bacon_video_widget_set_user_agent (BaconVideoWidget *bvw,
                                       const char *user_agent);

Sets the HTTP user agent string to use when fetching HTTP ressources.

#### Parameters

bvw | a BaconVideoWidget |
user_agent | a HTTP user agent string, or `NULL` to use the default |

### bacon_video_widget_get_video_property ()

    int
    bacon_video_widget_get_video_property (BaconVideoWidget *bvw,
                                           BvwVideoProperty type);

Returns the given property of the video display, such as its brightness or saturation.

It is returned as a percentage in the full range of integer values; from `0` to `65535` (inclusive), where `32768` is the default.

#### Parameters

bvw | a BaconVideoWidget |
type | the type of property |

#### Returns

the property's value, in the range `0` to `65535`

### bacon_video_widget_set_video_property ()

    void
    bacon_video_widget_set_video_property (BaconVideoWidget *bvw,
                                           BvwVideoProperty type,
                                           int value);

Sets the given property of the video display, such as its brightness or saturation.

It should be given as a percentage in the full range of integer values; from `0` to `65535` (inclusive), where `32768` is the default.

#### Parameters

bvw | a BaconVideoWidget |
type | the type of property |
value | the property's value, in the range `0` to `65535` |

### bacon_video_widget_get_volume ()

    double
    bacon_video_widget_get_volume (BaconVideoWidget *bvw);

Returns the current volume level, as a percentage between `0` and `1`.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

the volume as a percentage between `0` and `1`

### bacon_video_widget_set_volume ()

    void
    bacon_video_widget_set_volume (BaconVideoWidget *bvw,
                                   double volume);

Sets the volume level of the stream as a percentage between `0` and `1`.

If `bacon_video_widget_can_set_volume()` returns `FALSE`, this is a no-op.

#### Parameters

bvw | a BaconVideoWidget |
volume | the new volume level, as a percentage between `0` and `1` |

### bacon_video_widget_get_zoom ()

    BvwZoomMode
    bacon_video_widget_get_zoom (BaconVideoWidget *bvw);

Returns the zoom mode applied to videos displayed by the widget.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

a BvwZoomMode

### bacon_video_widget_set_zoom ()

    void
    bacon_video_widget_set_zoom (BaconVideoWidget *bvw,
                                 BvwZoomMode mode);

Sets the zoom type applied to the video when it is displayed.

#### Parameters

bvw | a BaconVideoWidget |
mode | the BvwZoomMode |

### bacon_video_widget_has_angles ()

    gboolean
    bacon_video_widget_has_angles (BaconVideoWidget *bvw);

Returns whether the widget is currently playing a stream with multiple angles.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

`TRUE` if the current video stream has multiple angles, `FALSE` otherwise

### bacon_video_widget_set_next_angle ()

    void
    bacon_video_widget_set_next_angle (BaconVideoWidget *bvw);

Select the next angle, or video track in the playing stream.

#### Parameters

bvw | a BaconVideoWidget |

### bacon_video_widget_has_next_track ()

    gboolean
    bacon_video_widget_has_next_track (BaconVideoWidget *bvw);

Determines whether there is another track after the current one, typically as a chapter on a DVD.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

`TRUE` if there is another track, `FALSE` otherwise

### bacon_video_widget_has_previous_track ()

    gboolean
    bacon_video_widget_has_previous_track (BaconVideoWidget *bvw);

Determines whether there is another track before the current one, typically as a chapter on a DVD.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

`TRUE` if there is another track, `FALSE` otherwise

### bacon_video_widget_is_playing ()

    gboolean
    bacon_video_widget_is_playing (BaconVideoWidget *bvw);

Returns whether the widget is currently playing a stream.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

`TRUE` if a stream is playing, `FALSE` otherwise

### bacon_video_widget_is_seekable ()

    gboolean
    bacon_video_widget_is_seekable (BaconVideoWidget *bvw);

Returns whether seeking is possible in the current stream.

If no stream is loaded, `FALSE` is returned.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

`TRUE` if the stream is seekable, `FALSE` otherwise

### bacon_video_widget_get_rate ()

    gfloat
    bacon_video_widget_get_rate (BaconVideoWidget *bvw);

Get the current playback rate, with 1.0 being normal rate.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

the current playback rate

### bacon_video_widget_set_rate ()

    gboolean
    bacon_video_widget_set_rate (BaconVideoWidget *bvw,
                                 gfloat new_rate);

Sets the current playback rate.

#### Parameters

bvw | a BaconVideoWidget |
new_rate | the new playback rate |

#### Returns

`TRUE` on success, `FALSE` on failure.

### bacon_video_widget_step ()

    gboolean
    bacon_video_widget_step (BaconVideoWidget *bvw,
                             gboolean forward,
                             GError **error);

Step one frame forward, if `forward` is `TRUE`, or backwards, if `forward` is `FALSE`

#### Parameters

bvw | a BaconVideoWidget |
forward | the direction of the frame step |
error | a GError, or `NULL` |

#### Returns

`TRUE` on success, `FALSE` otherwise

### bacon_video_widget_get_controls_object ()

    GObject *
    bacon_video_widget_get_controls_object
                                   (BaconVideoWidget *bvw);

Get the widget which displays the video controls.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

controls widget.

[transfer none]

Since: 3.12

### bacon_video_widget_get_header_controls_object ()

    GObject *
    bacon_video_widget_get_header_controls_object
                                   (BaconVideoWidget *bvw);

Get the widget which displays the video header controls.

#### Parameters

bvw | a BaconVideoWidget |

#### Returns

header controls widget.

[transfer none]

Since: 3.20

### bacon_video_widget_set_fullscreen ()

    void
    bacon_video_widget_set_fullscreen (BaconVideoWidget *bvw,
                                       gboolean fullscreen);

Sets the fullscreen state, enabling a toplevel header bar sliding from the top of the video widget.

#### Parameters

bvw | a BaconVideoWidget |
fullscreen | the new fullscreen state |

### bacon_video_widget_set_next_language ()

    void
    bacon_video_widget_set_next_language (BaconVideoWidget *bvw);

Switch to the next audio language index for the current video. See `bacon_video_widget_set_language()`.

#### Parameters

bvw | a BaconVideoWidget |

Since: 3.12

### bacon_video_widget_set_next_subtitle ()

    void
    bacon_video_widget_set_next_subtitle (BaconVideoWidget *bvw);

Switch to the next text subtitle index for the current video. See `bacon_video_widget_set_subtitle()`.

#### Parameters

bvw | a BaconVideoWidget |

Since: 3.12

### bacon_video_widget_show_popup ()

    void
    bacon_video_widget_show_popup (BaconVideoWidget *bvw);

Show the video controls popup, and schedule for it to be hidden again after a timeout.

#### Parameters

bvw | a BaconVideoWidget |

Since: 3.12

### bacon_video_widget_mark_popup_busy ()

    void
    bacon_video_widget_mark_popup_busy (BaconVideoWidget *bvw,
                                        const char *reason);

Mark the video controls popup as busy, for the given `reason` . Use `bacon_video_widget_unmark_popup_busy()` to undo.

#### Parameters

bvw | a BaconVideoWidget |
reason | human-readable reason for the controls popup being marked as busy |

Since: 3.12

### bacon_video_widget_unmark_popup_busy ()

    void
    bacon_video_widget_unmark_popup_busy (BaconVideoWidget *bvw,
                                          const char *reason);

Unmark the video controls popup as busy, for the given `reason` . The popup must previously have been marked as busy using `bacon_video_widget_mark_popup_busy()`.

#### Parameters

bvw | a BaconVideoWidget |
reason | human-readable reason for the controls popup being unmarked as busy |

Since: 3.12

## Types and Values

### BaconVideoWidget

    typedef struct {
    } BaconVideoWidget;

All the fields in the BaconVideoWidget structure are private and should never be accessed directly.

### BaconVideoWidgetClass

    typedef struct {
    } BaconVideoWidgetClass;

All the fields in the BaconVideoWidgetClass structure are private and should never be accessed directly.

### enum BvwAspectRatio

The pixel aspect ratios available in which to display videos using ``bacon_video_widget_set_aspect_ratio()`` .

#### Members

BVW_RATIO_AUTO | automatic |
BVW_RATIO_SQUARE | square (1:1) |
BVW_RATIO_FOURBYTHREE | four-by-three (4:3) |
BVW_RATIO_ANAMORPHIC | anamorphic (16:9) |
BVW_RATIO_DVB | DVB (20:9) |

### enum BvwAudioOutputType

The audio output types available for use with `bacon_video_widget_set_audio_output_type()`.

#### Members

BVW_AUDIO_SOUND_STEREO | stereo output |
BVW_AUDIO_SOUND_4CHANNEL | 4-channel output |
BVW_AUDIO_SOUND_41CHANNEL | 4.1-channel output |
BVW_AUDIO_SOUND_5CHANNEL | 5-channel output |
BVW_AUDIO_SOUND_51CHANNEL | 5.1-channel output |
BVW_AUDIO_SOUND_AC3PASSTHRU | AC3 passthrough output |

### enum BvwDVDEvent

The DVD navigation actions available to fire as DVD events to the BaconVideoWidget.

#### Members

BVW_DVD_ROOT_MENU | root menu |
BVW_DVD_TITLE_MENU | title menu |
BVW_DVD_SUBPICTURE_MENU | subpicture menu (if available) |
BVW_DVD_AUDIO_MENU | audio menu (if available) |
BVW_DVD_ANGLE_MENU | angle menu (if available) |
BVW_DVD_CHAPTER_MENU | chapter menu |
BVW_DVD_NEXT_CHAPTER | the next chapter |
BVW_DVD_PREV_CHAPTER | the previous chapter |
BVW_DVD_NEXT_TITLE | the next title in the current chapter |
BVW_DVD_PREV_TITLE | the previous title in the current chapter |
BVW_DVD_ROOT_MENU_UP | go up in the menu |
BVW_DVD_ROOT_MENU_DOWN | go down in the menu |
BVW_DVD_ROOT_MENU_LEFT | go left in the menu |
BVW_DVD_ROOT_MENU_RIGHT | go right in the menu |
BVW_DVD_ROOT_MENU_SELECT | select the current menu entry |

### enum BvwMetadataType

The different metadata available for querying from a BaconVideoWidget stream with `bacon_video_widget_get_metadata()`.

#### Members

BVW_INFO_TITLE | the stream's title |
BVW_INFO_ARTIST | the artist who created the work |
BVW_INFO_YEAR | the year in which the work was created |
BVW_INFO_COMMENT | a comment attached to the stream |
BVW_INFO_ALBUM | the album in which the work was released |
BVW_INFO_DURATION | the stream's duration, in seconds |
BVW_INFO_TRACK_NUMBER | the track number of the work on the album |
BVW_INFO_COVER | a GdkPixbuf of the cover artwork |
BVW_INFO_CONTAINER | the type of stream container |
BVW_INFO_HAS_VIDEO | whether the stream has video |
BVW_INFO_DIMENSION_X | the video's width, in pixels |
BVW_INFO_DIMENSION_Y | the video's height, in pixels |
BVW_INFO_VIDEO_BITRATE | the video's bitrate, in kilobits per second |
BVW_INFO_VIDEO_CODEC | the video's codec |
BVW_INFO_FPS | the number of frames per second in the video |
BVW_INFO_HAS_AUDIO | whether the stream has audio |
BVW_INFO_AUDIO_BITRATE | the audio's bitrate, in kilobits per second |
BVW_INFO_AUDIO_CODEC | the audio's codec |
BVW_INFO_AUDIO_SAMPLE_RATE | the audio sample rate, in bits per second |
BVW_INFO_AUDIO_CHANNELS | a string describing the number of audio channels in the stream |

### enum BvwRotation

The rotation is used by the video widget, as set by `bacon_video_widget_set_rotation()`.

#### Members

BVW_ROTATION_R_ZERO | No rotation |
BVW_ROTATION_R_90R | Rotate 90 degrees to the right |
BVW_ROTATION_R_180 | Rotate 180 degrees |
BVW_ROTATION_R_90L | Rotate 90 degrees to the left |

### enum BvwVideoProperty

The video properties queryable with `bacon_video_widget_get_video_property()`, and settable with `bacon_video_widget_set_video_property()`.

#### Members

BVW_VIDEO_BRIGHTNESS | the video brightness |
BVW_VIDEO_CONTRAST | the video contrast |
BVW_VIDEO_SATURATION | the video saturation |
BVW_VIDEO_HUE | the video hue |

### enum BvwZoomMode

The zoom mode used by the video widget, as set by `bacon_video_widget_set_zoom()`.

#### Members

BVW_ZOOM_NONE | No video zooming/cropping |
BVW_ZOOM_EXPAND | Fill area with video, and crop the excess |

### enum BvwError

Error codes for BaconVideoWidget operations.

#### Members

BVW_ERROR_NO_PLUGIN_FOR_FILE | A required GStreamer plugin is missing. |
BVW_ERROR_BROKEN_FILE | The movie file is broken and cannot be decoded. |
BVW_ERROR_FILE_GENERIC | A generic error for problems with movie files. |
BVW_ERROR_FILE_PERMISSION | Permission was refused to access the stream, or authentication was required. |
BVW_ERROR_FILE_ENCRYPTED | The stream is encrypted and cannot be played. |
BVW_ERROR_FILE_NOT_FOUND | The stream cannot be found. |
BVW_ERROR_DVD_ENCRYPTED | The DVD is encrypted and libdvdcss is not installed. |
BVW_ERROR_INVALID_DEVICE | The device given in an MRL (e.g. DVD drive or DVB tuner) did not exist. |
BVW_ERROR_UNKNOWN_HOST | The host for a given stream could not be resolved. |
BVW_ERROR_NETWORK_UNREACHABLE | The host for a given stream could not be reached. |
BVW_ERROR_CONNECTION_REFUSED | The server for a given stream refused the connection. |
BVW_ERROR_INVALID_LOCATION | An MRL was malformed, or CDDB playback was attempted (which is now unsupported). |
BVW_ERROR_GENERIC | A generic error occurred. |
BVW_ERROR_CODEC_NOT_HANDLED | The audio or video codec required by the stream is not supported. |
BVW_ERROR_CANNOT_CAPTURE | Error determining frame capture support for a video with `bacon_video_widget_can_get_frames()`. |
BVW_ERROR_READ_ERROR | A generic error for problems reading streams. |
BVW_ERROR_PLUGIN_LOAD | A library or plugin could not be loaded. |
BVW_ERROR_EMPTY_FILE | A movie file was empty. |