![]() |
![]() |
![]() |
Totem Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
#include <bacon-video-widget.h> BaconVideoWidget; BaconVideoWidgetClass; enum BvwAspectRatio; enum BvwAudioOutputType; enum BvwDVDEvent; enum BvwMetadataType; enum BvwRotation; enum BvwVisualizationQuality; enum BvwVideoProperty; enum BvwZoomMode; enum BvwError; GtkWidget * bacon_video_widget_new (GError **error
); gboolean bacon_video_widget_open (BaconVideoWidget *bvw
,const char *mrl
,GError **error
); gboolean bacon_video_widget_play (BaconVideoWidget *bvw
,GError **error
); void bacon_video_widget_pause (BaconVideoWidget *bvw
); gboolean bacon_video_widget_seek (BaconVideoWidget *bvw
,double position
,GError **error
); gboolean bacon_video_widget_seek_time (BaconVideoWidget *bvw
,gint64 _time
,gboolean accurate
,GError **error
); void bacon_video_widget_stop (BaconVideoWidget *bvw
); void bacon_video_widget_close (BaconVideoWidget *bvw
); gboolean bacon_video_widget_can_direct_seek (BaconVideoWidget *bvw
); gboolean bacon_video_widget_can_get_frames (BaconVideoWidget *bvw
,GError **error
); gboolean bacon_video_widget_can_set_volume (BaconVideoWidget *bvw
); void bacon_video_widget_dvd_event (BaconVideoWidget *bvw
,BvwDVDEvent type
); gboolean bacon_video_widget_has_menus (BaconVideoWidget *bvw
); BvwAspectRatio bacon_video_widget_get_aspect_ratio (BaconVideoWidget *bvw
); void bacon_video_widget_set_aspect_ratio (BaconVideoWidget *bvw
,BvwAspectRatio ratio
); BvwAudioOutputType bacon_video_widget_get_audio_output_type (BaconVideoWidget *bvw
); void bacon_video_widget_set_audio_output_type (BaconVideoWidget *bvw
,BvwAudioOutputType type
); gboolean bacon_video_widget_get_auto_resize (BaconVideoWidget *bvw
); void bacon_video_widget_set_auto_resize (BaconVideoWidget *bvw
,gboolean auto_resize
); GdkPixbuf * bacon_video_widget_get_current_frame (BaconVideoWidget *bvw
); gint64 bacon_video_widget_get_current_time (BaconVideoWidget *bvw
); gboolean bacon_video_widget_get_deinterlacing (BaconVideoWidget *bvw
); void bacon_video_widget_set_deinterlacing (BaconVideoWidget *bvw
,gboolean deinterlace
); void bacon_video_widget_set_fullscreen (BaconVideoWidget *bvw
,gboolean fullscreen
); GList * bacon_video_widget_get_languages (BaconVideoWidget *bvw
); int bacon_video_widget_get_language (BaconVideoWidget *bvw
); void bacon_video_widget_set_language (BaconVideoWidget *bvw
,int language
); void bacon_video_widget_set_logo (BaconVideoWidget *bvw
,const char *name
); gboolean bacon_video_widget_get_logo_mode (BaconVideoWidget *bvw
); void bacon_video_widget_set_logo_mode (BaconVideoWidget *bvw
,gboolean logo_mode
); void bacon_video_widget_get_metadata (BaconVideoWidget *bvw
,BvwMetadataType type
,GValue *value
); GOptionGroup * bacon_video_widget_get_option_group (void
); double bacon_video_widget_get_position (BaconVideoWidget *bvw
); void bacon_video_widget_set_referrer (BaconVideoWidget *bvw
,const char *referrer
); BvwRotation bacon_video_widget_get_rotation (BaconVideoWidget *bvw
); void bacon_video_widget_set_rotation (BaconVideoWidget *bvw
,BvwRotation rotation
); void bacon_video_widget_set_scale_ratio (BaconVideoWidget *bvw
,float ratio
); gboolean bacon_video_widget_get_show_cursor (BaconVideoWidget *bvw
); void bacon_video_widget_set_show_cursor (BaconVideoWidget *bvw
,gboolean show_cursor
); void bacon_video_widget_set_show_visualizations (BaconVideoWidget *bvw
,gboolean show_visualizations
); gint64 bacon_video_widget_get_stream_length (BaconVideoWidget *bvw
); GList * bacon_video_widget_get_subtitles (BaconVideoWidget *bvw
); int bacon_video_widget_get_subtitle (BaconVideoWidget *bvw
); void bacon_video_widget_set_subtitle (BaconVideoWidget *bvw
,int subtitle
); void bacon_video_widget_set_text_subtitle (BaconVideoWidget *bvw
,const gchar *subtitle_uri
); void bacon_video_widget_set_subtitle_encoding (BaconVideoWidget *bvw
,const char *encoding
); void bacon_video_widget_set_subtitle_font (BaconVideoWidget *bvw
,const char *font
); void bacon_video_widget_set_user_agent (BaconVideoWidget *bvw
,const char *user_agent
); int bacon_video_widget_get_video_property (BaconVideoWidget *bvw
,BvwVideoProperty type
); void bacon_video_widget_set_video_property (BaconVideoWidget *bvw
,BvwVideoProperty type
,int value
); GList * bacon_video_widget_get_visualization_list (BaconVideoWidget *bvw
); void bacon_video_widget_set_visualization (BaconVideoWidget *bvw
,const char *name
); void bacon_video_widget_set_visualization_quality (BaconVideoWidget *bvw
,BvwVisualizationQuality quality
); double bacon_video_widget_get_volume (BaconVideoWidget *bvw
); void bacon_video_widget_set_volume (BaconVideoWidget *bvw
,double volume
); BvwZoomMode bacon_video_widget_get_zoom (BaconVideoWidget *bvw
); void bacon_video_widget_set_zoom (BaconVideoWidget *bvw
,BvwZoomMode mode
); gboolean bacon_video_widget_has_angles (BaconVideoWidget *bvw
); void bacon_video_widget_set_next_angle (BaconVideoWidget *bvw
); gboolean bacon_video_widget_has_next_track (BaconVideoWidget *bvw
); gboolean bacon_video_widget_has_previous_track (BaconVideoWidget *bvw
); gboolean bacon_video_widget_is_playing (BaconVideoWidget *bvw
); gboolean bacon_video_widget_is_seekable (BaconVideoWidget *bvw
); gfloat bacon_video_widget_get_rate (BaconVideoWidget *bvw
); gboolean bacon_video_widget_set_rate (BaconVideoWidget *bvw
,gfloat new_rate
); void bacon_video_widget_popup_osd (BaconVideoWidget *bvw
,const char *icon_name
); gboolean bacon_video_widget_step (BaconVideoWidget *bvw
,gboolean forward
,GError **error
);
GObject +----GInitiallyUnowned +----GtkWidget +----GtkContainer +----GtkClutterEmbed +----BaconVideoWidget
"audio-output-type" BvwAudioOutputType : Read / Write "auto-resize" gboolean : Read / Write "av-offset" gint64 : Read / Write "brightness" gint : Read / Write "contrast" gint : Read / Write "deinterlacing" gboolean : Read / Write "download-filename" gchar* : Read / Write "hue" gint : Read / Write "logo-mode" gboolean : Read / Write "playing" gboolean : Read "position" gdouble : Read "referrer" gchar* : Read / Write "saturation" gint : Read / Write "seekable" gboolean : Read "show-cursor" gboolean : Read / Write "show-visualizations" gboolean : Write "stream-length" gint64 : Read "user-agent" gchar* : Read / Write "visualization-quality" BvwVisualizationQuality : Read / Write "volume" gdouble : Read / Write
"buffering" :Run Last
"channels-change" :Run Last
"download-buffering" :Run Last
"eos" :Run Last
"error" :Run Last
"got-metadata" :Run Last
"got-redirect" :Run Last
"missing-plugins" :Run Last
"tick" :Run Last
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).
typedef struct _BaconVideoWidget BaconVideoWidget;
All the fields in the BaconVideoWidget structure are private and should never be accessed directly.
typedef struct { } BaconVideoWidgetClass;
All the fields in the BaconVideoWidgetClass structure are private and should never be accessed directly.
typedef enum { BVW_RATIO_AUTO = 0, BVW_RATIO_SQUARE = 1, BVW_RATIO_FOURBYTHREE = 2, BVW_RATIO_ANAMORPHIC = 3, BVW_RATIO_DVB = 4 } BvwAspectRatio;
The pixel aspect ratios available in which to display videos using
.
bacon_video_widget_set_aspect_ratio()
typedef enum { BVW_AUDIO_SOUND_STEREO, BVW_AUDIO_SOUND_4CHANNEL, BVW_AUDIO_SOUND_41CHANNEL, BVW_AUDIO_SOUND_5CHANNEL, BVW_AUDIO_SOUND_51CHANNEL, BVW_AUDIO_SOUND_AC3PASSTHRU } BvwAudioOutputType;
The audio output types available for use with bacon_video_widget_set_audio_output_type()
.
typedef enum { BVW_DVD_ROOT_MENU, BVW_DVD_TITLE_MENU, BVW_DVD_SUBPICTURE_MENU, BVW_DVD_AUDIO_MENU, BVW_DVD_ANGLE_MENU, BVW_DVD_CHAPTER_MENU, BVW_DVD_NEXT_CHAPTER, BVW_DVD_PREV_CHAPTER, BVW_DVD_NEXT_TITLE, BVW_DVD_PREV_TITLE, BVW_DVD_ROOT_MENU_UP, BVW_DVD_ROOT_MENU_DOWN, BVW_DVD_ROOT_MENU_LEFT, BVW_DVD_ROOT_MENU_RIGHT, BVW_DVD_ROOT_MENU_SELECT } BvwDVDEvent;
The DVD navigation actions available to fire as DVD events to the BaconVideoWidget.
root menu | |
title menu | |
subpicture menu (if available) | |
audio menu (if available) | |
angle menu (if available) | |
chapter menu | |
the next chapter | |
the previous chapter | |
the next title in the current chapter | |
the previous title in the current chapter | |
go up in the menu | |
go down in the menu | |
go left in the menu | |
go right in the menu | |
select the current menu entry |
typedef enum { BVW_INFO_TITLE, BVW_INFO_ARTIST, BVW_INFO_YEAR, BVW_INFO_COMMENT, BVW_INFO_ALBUM, BVW_INFO_DURATION, BVW_INFO_TRACK_NUMBER, BVW_INFO_COVER, BVW_INFO_CONTAINER, /* Video */ BVW_INFO_HAS_VIDEO, BVW_INFO_DIMENSION_X, BVW_INFO_DIMENSION_Y, BVW_INFO_VIDEO_BITRATE, BVW_INFO_VIDEO_CODEC, BVW_INFO_FPS, /* Audio */ BVW_INFO_HAS_AUDIO, BVW_INFO_AUDIO_BITRATE, BVW_INFO_AUDIO_CODEC, BVW_INFO_AUDIO_SAMPLE_RATE, BVW_INFO_AUDIO_CHANNELS } BvwMetadataType;
The different metadata available for querying from a BaconVideoWidget
stream with bacon_video_widget_get_metadata()
.
the stream's title | |
the artist who created the work | |
the year in which the work was created | |
a comment attached to the stream | |
the album in which the work was released | |
the stream's duration, in seconds | |
the track number of the work on the album | |
a GdkPixbuf of the cover artwork | |
the type of stream container | |
whether the stream has video | |
the video's width, in pixels | |
the video's height, in pixels | |
the video's bitrate, in kilobits per second | |
the video's codec | |
the number of frames per second in the video | |
whether the stream has audio | |
the audio's bitrate, in kilobits per second | |
the audio's codec | |
the audio sample rate, in bits per second | |
a string describing the number of audio channels in the stream |
typedef enum { BVW_ROTATION_R_ZERO = 0, BVW_ROTATION_R_90R = 1, BVW_ROTATION_R_180 = 2, BVW_ROTATION_R_90L = 3 } BvwRotation;
The rotation is used by the video widget, as set by
bacon_video_widget_set_rotation()
.
typedef enum { BVW_VISUALIZATION_SMALL = 0, BVW_VISUALIZATION_NORMAL, BVW_VISUALIZATION_LARGE, BVW_VISUALIZATION_EXTRA_LARGE } BvwVisualizationQuality;
The different visualisation sizes or qualities available for use
with bacon_video_widget_set_visualization_quality()
.
typedef enum { BVW_VIDEO_BRIGHTNESS, BVW_VIDEO_CONTRAST, BVW_VIDEO_SATURATION, BVW_VIDEO_HUE } BvwVideoProperty;
The video properties queryable with bacon_video_widget_get_video_property()
,
and settable with bacon_video_widget_set_video_property()
.
typedef enum { BVW_ZOOM_NONE = 0, BVW_ZOOM_EXPAND = 1 } BvwZoomMode;
The zoom mode used by the video widget, as set by
bacon_video_widget_set_zoom()
.
typedef enum { /* Plugins */ BVW_ERROR_NO_PLUGIN_FOR_FILE, /* File */ BVW_ERROR_BROKEN_FILE, BVW_ERROR_FILE_GENERIC, BVW_ERROR_FILE_PERMISSION, BVW_ERROR_FILE_ENCRYPTED, BVW_ERROR_FILE_NOT_FOUND, /* Devices */ BVW_ERROR_DVD_ENCRYPTED, BVW_ERROR_INVALID_DEVICE, /* Network */ BVW_ERROR_UNKNOWN_HOST, BVW_ERROR_NETWORK_UNREACHABLE, BVW_ERROR_CONNECTION_REFUSED, /* Generic */ BVW_ERROR_INVALID_LOCATION, BVW_ERROR_GENERIC, BVW_ERROR_CODEC_NOT_HANDLED, BVW_ERROR_CANNOT_CAPTURE, BVW_ERROR_READ_ERROR, BVW_ERROR_PLUGIN_LOAD, BVW_ERROR_EMPTY_FILE } BvwError;
Error codes for BaconVideoWidget operations.
A required GStreamer plugin is missing. | |
The movie file is broken and cannot be decoded. | |
A generic error for problems with movie files. | |
Permission was refused to access the stream, or authentication was required. | |
The stream is encrypted and cannot be played. | |
The stream cannot be found. | |
The DVD is encrypted and libdvdcss is not installed. | |
The device given in an MRL (e.g. DVD drive or DVB tuner) did not exist. | |
The host for a given stream could not be resolved. | |
The host for a given stream could not be reached. | |
The server for a given stream refused the connection. | |
An MRL was malformed, or CDDB playback was attempted (which is now unsupported). | |
A generic error occurred. | |
The audio or video codec required by the stream is not supported. | |
Error determining frame capture support for a video with bacon_video_widget_can_get_frames() .
|
|
A generic error for problems reading streams. | |
A library or plugin could not be loaded. | |
A movie file was empty. |
GtkWidget * bacon_video_widget_new (GError **error
);
Creates a new BaconVideoWidget.
A BvwError will be returned on error.
|
a GError, or NULL
|
Returns : |
a new BaconVideoWidget, or NULL ; destroy with gtk_widget_destroy()
|
gboolean bacon_video_widget_open (BaconVideoWidget *bvw
,const char *mrl
,GError **error
);
Opens the given mrl
in bvw
for playing.
If there was a filesystem error, a BVW_ERROR_GENERIC
error will be returned. Otherwise,
more specific BvwError errors will be returned.
On success, the MRL is loaded and waiting to be played with bacon_video_widget_play()
.
|
a BaconVideoWidget |
|
an MRL |
|
a GError, or NULL
|
Returns : |
TRUE on success, FALSE otherwise |
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
.
|
a BaconVideoWidget |
|
a GError, or NULL
|
Returns : |
TRUE on success, FALSE otherwise |
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.
|
a BaconVideoWidget |
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.
|
a BaconVideoWidget |
|
the percentage of the way through the stream to which to seek |
|
a GError, or NULL
|
Returns : |
TRUE on success, FALSE otherwise |
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.
|
a BaconVideoWidget |
|
the time to which to seek, in milliseconds |
|
whether to use accurate seek, an accurate seek might be slower for some formats (see GStreamer docs) |
|
a GError, or NULL
|
Returns : |
TRUE on success, FALSE otherwise |
void bacon_video_widget_stop (BaconVideoWidget *bvw
);
Stops playing the current stream and resets to the first position in the stream.
|
a BaconVideoWidget |
void bacon_video_widget_close (BaconVideoWidget *bvw
);
Closes the current stream and frees the resources associated with it.
|
a BaconVideoWidget |
gboolean bacon_video_widget_can_direct_seek (BaconVideoWidget *bvw
);
Determines whether direct seeking is possible for the current stream.
|
a BaconVideoWidget |
Returns : |
TRUE if direct seeking is possible, FALSE otherwise |
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.
|
a BaconVideoWidget |
|
a GError, or NULL
|
Returns : |
TRUE if frames can be captured, FALSE otherwise |
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
.
|
a BaconVideoWidget |
Returns : |
TRUE if the volume can be set, FALSE otherwise |
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.
|
a BaconVideoWidget |
|
the type of DVD event to issue |
gboolean bacon_video_widget_has_menus (BaconVideoWidget *bvw
);
Returns whether the widget is currently displaying a menu, such as a DVD menu.
|
a BaconVideoWidget |
Returns : |
TRUE if a menu is displayed, FALSE otherwise |
BvwAspectRatio bacon_video_widget_get_aspect_ratio (BaconVideoWidget *bvw
);
Returns the current aspect ratio used by the widget, from BvwAspectRatio.
|
a BaconVideoWidget |
Returns : |
the 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.
|
a BaconVideoWidget |
|
the new aspect ratio |
BvwAudioOutputType bacon_video_widget_get_audio_output_type
(BaconVideoWidget *bvw
);
Returns the current audio output type (e.g. how many speaker channels) from BvwAudioOutputType.
|
a BaconVideoWidget |
Returns : |
the audio output type, or -1
|
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.
|
a BaconVideoWidget |
|
the new audio output type |
gboolean bacon_video_widget_get_auto_resize (BaconVideoWidget *bvw
);
Returns whether the widget will automatically resize to fit videos.
|
a BaconVideoWidget |
Returns : |
TRUE if the widget will resize, FALSE otherwise |
void bacon_video_widget_set_auto_resize (BaconVideoWidget *bvw
,gboolean auto_resize
);
Sets whether the widget should automatically resize to fit to new videos when they are loaded. Changes to this will take effect when the next media file is loaded.
|
a BaconVideoWidget |
|
TRUE to automatically resize for new videos, FALSE otherwise |
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.
|
a BaconVideoWidget |
Returns : |
the current frame, or NULL ; unref with g_object_unref()
|
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.
|
a BaconVideoWidget |
Returns : |
time since the beginning of the stream, in milliseconds, or -1
|
gboolean bacon_video_widget_get_deinterlacing
(BaconVideoWidget *bvw
);
Returns whether deinterlacing of videos is enabled for this widget.
|
a BaconVideoWidget |
Returns : |
TRUE if automatic deinterlacing is enabled, FALSE otherwise |
void bacon_video_widget_set_deinterlacing (BaconVideoWidget *bvw
,gboolean deinterlace
);
Sets whether the widget should deinterlace videos.
|
a BaconVideoWidget |
|
TRUE if videos should be automatically deinterlaced, FALSE otherwise |
void bacon_video_widget_set_fullscreen (BaconVideoWidget *bvw
,gboolean fullscreen
);
Sets whether the widget renders the stream in fullscreen mode.
|
a BaconVideoWidget |
|
TRUE to go fullscreen, FALSE otherwise |
GList * bacon_video_widget_get_languages (BaconVideoWidget *bvw
);
Returns a list of audio language tags, each in the form AUDIO
,
where x
x
is the language index.
|
a BaconVideoWidget |
Returns : |
a GList of audio language tags, or NULL ; free each element with g_free() and the list with g_list_free()
|
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.
|
a BaconVideoWidget |
Returns : |
the audio language index |
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.
|
a BaconVideoWidget |
|
an audio language index |
void bacon_video_widget_set_logo (BaconVideoWidget *bvw
,const char *name
);
Sets the logo displayed on the video widget when no stream is loaded.
|
a BaconVideoWidget |
|
the icon name of the logo |
gboolean bacon_video_widget_get_logo_mode (BaconVideoWidget *bvw
);
Gets whether the logo is displayed when no stream is loaded.
|
a BaconVideoWidget |
Returns : |
TRUE if the logo is displayed, FALSE otherwise |
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.
|
a BaconVideoWidget |
|
TRUE to display the logo, FALSE otherwise |
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()
.
|
a BaconVideoWidget |
|
the type of metadata to return |
|
a GValue |
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 |
double bacon_video_widget_get_position (BaconVideoWidget *bvw
);
Returns the current position in the stream, as a value between
0
and 1
.
|
a BaconVideoWidget |
Returns : |
the current position, or -1
|
void bacon_video_widget_set_referrer (BaconVideoWidget *bvw
,const char *referrer
);
Sets the HTTP referrer URI to use when fetching HTTP ressources.
|
a BaconVideoWidget |
|
a HTTP referrer URI, or NULL
|
BvwRotation bacon_video_widget_get_rotation (BaconVideoWidget *bvw
);
Returns the angle of rotation of the video, in degrees.
|
a BaconVideoWidget |
Returns : |
a BvwRotation. |
void bacon_video_widget_set_rotation (BaconVideoWidget *bvw
,BvwRotation rotation
);
Sets the rotation to be applied to the video when it is displayed.
|
a BaconVideoWidget |
|
the BvwRotation of the video in degrees |
void bacon_video_widget_set_scale_ratio (BaconVideoWidget *bvw
,float ratio
);
Sets the ratio by which the widget will scale videos when they are
displayed. If ratio
is set to 0
, the highest ratio possible will
be chosen.
|
a BaconVideoWidget |
|
the new scale ratio |
gboolean bacon_video_widget_get_show_cursor (BaconVideoWidget *bvw
);
Returns whether the cursor is shown when it is over the video widget.
|
a BaconVideoWidget |
Returns : |
TRUE if the cursor is shown, FALSE otherwise |
void bacon_video_widget_set_show_cursor (BaconVideoWidget *bvw
,gboolean show_cursor
);
Sets whether the cursor should be shown when it is over the video
widget. If show_cursor
is FALSE
, the cursor will be invisible
when it is moved over the video widget.
|
a BaconVideoWidget |
|
TRUE to show the cursor, FALSE otherwise |
void bacon_video_widget_set_show_visualizations (BaconVideoWidget *bvw
,gboolean show_visualizations
);
Sets whether to show visualisations when playing audio-only streams.
|
a BaconVideoWidget |
|
TRUE to show visualisations, FALSE otherwise |
gint64 bacon_video_widget_get_stream_length
(BaconVideoWidget *bvw
);
Returns the total length of the stream, in milliseconds.
|
a BaconVideoWidget |
Returns : |
the stream length, in milliseconds, or -1
|
GList * bacon_video_widget_get_subtitles (BaconVideoWidget *bvw
);
Returns a list of subtitle tags, each in the form TEXT
,
where x
x
is the subtitle index.
|
a BaconVideoWidget |
Returns : |
a GList of subtitle tags, or NULL ; free each element with g_free() and the list with g_list_free()
|
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.
|
a BaconVideoWidget |
Returns : |
the subtitle index |
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.
|
a BaconVideoWidget |
|
a subtitle index |
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.
|
a BaconVideoWidget |
|
the URI of a subtitle file, or NULL . [allow-none]
|
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.
|
a BaconVideoWidget |
|
an encoding system |
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()
.
|
a BaconVideoWidget |
|
a font description string |
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.
|
a BaconVideoWidget |
|
a HTTP user agent string, or NULL to use the default |
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.
|
a BaconVideoWidget |
|
the type of property |
Returns : |
the property's value, in the range 0 to 65535
|
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.
|
a BaconVideoWidget |
|
the type of property |
|
the property's value, in the range 0 to 65535
|
GList * bacon_video_widget_get_visualization_list
(BaconVideoWidget *bvw
);
Returns a list of the visualisations available when playing audio-only streams.
|
a BaconVideoWidget |
Returns : |
a GList of visualisation names; owned by bvw
|
void bacon_video_widget_set_visualization (BaconVideoWidget *bvw
,const char *name
);
Sets the visualisation to display when playing audio-only streams.
If name
is NULL
, visualisations will be disabled. Otherwise, name
should be from the list returned by bacon_video_widget_get_visualization_list()
.
|
a BaconVideoWidget |
|
the visualisation's name, or NULL
|
void bacon_video_widget_set_visualization_quality (BaconVideoWidget *bvw
,BvwVisualizationQuality quality
);
Sets the quality/size of displayed visualisations.
|
a BaconVideoWidget |
|
the visualisation quality |
double bacon_video_widget_get_volume (BaconVideoWidget *bvw
);
Returns the current volume level, as a percentage between 0
and 1
.
|
a BaconVideoWidget |
Returns : |
the volume as a percentage between 0 and 1
|
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.
|
a BaconVideoWidget |
|
the new volume level, as a percentage between 0 and 1
|
BvwZoomMode bacon_video_widget_get_zoom (BaconVideoWidget *bvw
);
Returns the zoom mode applied to videos displayed by the widget.
|
a BaconVideoWidget |
Returns : |
a BvwZoomMode |
void bacon_video_widget_set_zoom (BaconVideoWidget *bvw
,BvwZoomMode mode
);
Sets the zoom type applied to the video when it is displayed.
|
a BaconVideoWidget |
|
the BvwZoomMode |
gboolean bacon_video_widget_has_angles (BaconVideoWidget *bvw
);
Returns whether the widget is currently playing a stream with multiple angles.
|
a BaconVideoWidget |
Returns : |
TRUE if the current video stream has multiple
angles, FALSE otherwise |
void bacon_video_widget_set_next_angle (BaconVideoWidget *bvw
);
Select the next angle, or video track in the playing stream.
|
a BaconVideoWidget |
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.
|
a BaconVideoWidget |
Returns : |
TRUE if there is another track, FALSE otherwise |
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.
|
a BaconVideoWidget |
Returns : |
TRUE if there is another track, FALSE otherwise |
gboolean bacon_video_widget_is_playing (BaconVideoWidget *bvw
);
Returns whether the widget is currently playing a stream.
|
a BaconVideoWidget |
Returns : |
TRUE if a stream is playing, FALSE otherwise |
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.
|
a BaconVideoWidget |
Returns : |
TRUE if the stream is seekable, FALSE otherwise |
gfloat bacon_video_widget_get_rate (BaconVideoWidget *bvw
);
Get the current playback rate, with 1.0 being normal rate.
|
a BaconVideoWidget |
Returns : |
the current playback rate |
gboolean bacon_video_widget_set_rate (BaconVideoWidget *bvw
,gfloat new_rate
);
Sets the current playback rate.
|
a BaconVideoWidget |
|
the new playback rate |
Returns : |
TRUE on success, FALSE on failure. |
void bacon_video_widget_popup_osd (BaconVideoWidget *bvw
,const char *icon_name
);
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
|
a BaconVideoWidget |
|
the direction of the frame step |
|
a GError, or NULL
|
Returns : |
TRUE on success, FALSE otherwise |
"audio-output-type"
property"audio-output-type" BvwAudioOutputType : Read / Write
The type of audio output to use (e.g. the number of channels).
Default value: BVW_AUDIO_SOUND_STEREO
"auto-resize"
property"auto-resize" gboolean : Read / Write
Whether to automatically resize the video widget to the video size when loading a new video.
Default value: FALSE
"av-offset"
property"av-offset" gint64 : Read / Write
Control the synchronisation offset between the audio and video streams. Positive values make the audio ahead of the video and negative values make the audio go behind the video.
Default value: 0
"brightness"
property"brightness" gint : Read / Write
The brightness of the video display.
Allowed values: [0,65535]
Default value: 32768
"contrast"
property"contrast" gint : Read / Write
The contrast of the video display.
Allowed values: [0,65535]
Default value: 32768
"deinterlacing"
property"deinterlacing" gboolean : Read / Write
Whether to automatically deinterlace videos.
Default value: FALSE
"download-filename"
property"download-filename" gchar* : Read / Write
The filename of the fully downloaded stream when using download buffering.
Default value: NULL
"hue"
property"hue" gint : Read / Write
The hue of the video display.
Allowed values: [0,65535]
Default value: 32768
"logo-mode"
property"logo-mode" gboolean : Read / Write
Whether the logo should be displayed when no stream is loaded, or the widget should take up no space.
Default value: FALSE
"playing"
property"playing" gboolean : Read
Whether a stream is currently playing.
Default value: FALSE
"position"
property"position" gdouble : Read
The current position in the stream, as a percentage between 0
and 1
.
Allowed values: [0,1]
Default value: 0
"saturation"
property"saturation" gint : Read / Write
The saturation of the video display.
Allowed values: [0,65535]
Default value: 32768
"seekable"
property"seekable" gboolean : Read
Whether the current stream can be seeked.
Default value: FALSE
"show-cursor"
property"show-cursor" gboolean : Read / Write
Whether the cursor should be shown, or should be invisible, when it is over the video widget.
Default value: FALSE
"show-visualizations"
property"show-visualizations" gboolean : Write
Whether visualisations should be shown for audio-only streams.
Default value: FALSE
"stream-length"
property"stream-length" gint64 : Read
The length of the current stream, in milliseconds.
Allowed values: >= 0
Default value: 0
"user-agent"
property"user-agent" gchar* : Read / Write
The HTTP user agent string to use.
Default value: NULL
"visualization-quality"
property"visualization-quality" BvwVisualizationQuality : Read / Write
The size of the visualizations to display when playing audio.
Default value: BVW_VISUALIZATION_SMALL
"volume"
property"volume" gdouble : Read / Write
The current volume level, as a percentage between 0
and 1
.
Allowed values: [0,1]
Default value: 0
"buffering"
signalvoid user_function (BaconVideoWidget *percentage,
gdouble arg1,
gpointer user_data) : Run Last
Emitted regularly when a network stream is being buffered, to provide status updates on the buffering progress.
|
the percentage of buffering completed, between 0 and 1
|
|
user data set when the signal handler was connected. |
"channels-change"
signalvoid user_function (BaconVideoWidget *arg0,
gpointer user_data) : Run Last
Emitted when the number of audio languages available changes, or when the selected audio language is changed.
Query the new list of audio languages with bacon_video_widget_get_languages()
.
|
user data set when the signal handler was connected. |
"download-buffering"
signalvoid user_function (BaconVideoWidget *percentage,
gdouble arg1,
gpointer user_data) : Run Last
Emitted regularly when a network stream is being cached on disk, to provide status updates on the buffering level of the stream.
|
the percentage of download buffering completed, between 0 and 1
|
|
user data set when the signal handler was connected. |
"eos"
signalvoid user_function (BaconVideoWidget *arg0,
gpointer user_data) : Run Last
Emitted when the end of the current stream is reached.
|
user data set when the signal handler was connected. |
"error"
signalvoid user_function (BaconVideoWidget *message,
gchar *playback_stopped,
gboolean fatal,
gpointer user_data) : Run Last
Emitted when the backend wishes to asynchronously report an error. If fatal
is TRUE
,
playback of this stream cannot be restarted.
"got-metadata"
signalvoid user_function (BaconVideoWidget *arg0,
gpointer user_data) : Run Last
Emitted when the widget has updated the metadata of the current stream. This will typically happen just after opening a stream.
Call bacon_video_widget_get_metadata()
to query the updated metadata.
|
user data set when the signal handler was connected. |
"got-redirect"
signalvoid user_function (BaconVideoWidget *new_mrl,
gchar *arg1,
gpointer user_data) : Run Last
Emitted when a redirect response is received from a stream's server.
|
the new MRL |
|
user data set when the signal handler was connected. |
"missing-plugins"
signalgboolean user_function (BaconVideoWidget *details,
GStrv descriptions,
GStrv playing,
gboolean Returns,
gpointer user_data) : Run Last
Emitted when plugins required to play the current stream are not found. This allows the application to request the user install them before proceeding to try and play the stream again.
Note that this signal is only available for the GStreamer backend.
|
a NULL -terminated array of missing plugin details for use when installing the plugins with libgimme-codec |
|
a NULL -terminated array of missing plugin descriptions for display to the user |
|
TRUE if the stream could be played even without these plugins, FALSE otherwise |
|
user data set when the signal handler was connected. |
Returns : |
TRUE if the signal was handled and some action was taken, FALSE otherwise |
"tick"
signalvoid user_function (BaconVideoWidget *current_time,
gint64 stream_length,
gint64 current_position,
gdouble seekable,
gboolean arg4,
gpointer user_data) : Run Last
Emitted every time an important time event happens, or at regular intervals when playing a stream.
|
the current position in the stream, in milliseconds since the beginning of the stream |
|
the length of the stream, in milliseconds |
|
the current position in the stream, as a percentage between 0 and 1
|
|
TRUE if the stream can be seeked, FALSE otherwise |
|
user data set when the signal handler was connected. |