2
* Copyright (C) 2001-2002 the xine project
3
* Heavily modified by Bastien Nocera <hadess@hadess.net>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
* $Id: bacon-video-widget.h,v 1.53 2004/12/30 20:25:33 hadess Exp $
21
* the xine engine in a widget - header
24
#ifndef HAVE_BACON_VIDEO_WIDGET_H
25
#define HAVE_BACON_VIDEO_WIDGET_H
27
#include <gtk/gtkbox.h>
30
/* for optical disc enumeration type */
31
#include "totem-disc.h"
35
#define BACON_VIDEO_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), bacon_video_widget_get_type (), BaconVideoWidget))
36
#define BACON_VIDEO_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), bacon_video_widget_get_type (), BaconVideoWidgetClass))
37
#define BACON_IS_VIDEO_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, bacon_video_widget_get_type ()))
38
#define BACON_IS_VIDEO_WIDGET_CLASS(klass) (G_CHECK_INSTANCE_GET_CLASS ((klass), bacon_video_widget_get_type ()))
39
#define BVW_ERROR bacon_video_widget_error_quark ()
41
typedef struct BaconVideoWidgetPrivate BaconVideoWidgetPrivate;
45
BaconVideoWidgetPrivate *priv;
49
GtkBoxClass parent_class;
51
void (*error) (GtkWidget *bvw, const char *message,
52
gboolean playback_stopped, gboolean fatal);
53
void (*eos) (GtkWidget *bvw);
54
void (*got_metadata) (GtkWidget *bvw);
55
void (*title_change) (GtkWidget *bvw, const char *title);
56
void (*channels_change) (GtkWidget *bvw);
57
void (*tick) (GtkWidget *bvw, gint64 current_time, gint64 stream_length,
58
float current_position, gboolean seekable);
59
void (*buffering) (GtkWidget *bvw, guint progress);
60
void (*speed_warning) (GtkWidget *bvw);
61
} BaconVideoWidgetClass;
65
BVW_ERROR_AUDIO_PLUGIN,
66
BVW_ERROR_NO_PLUGIN_FOR_FILE,
67
BVW_ERROR_VIDEO_PLUGIN,
70
BVW_ERROR_BROKEN_FILE,
71
BVW_ERROR_FILE_GENERIC,
72
BVW_ERROR_FILE_PERMISSION,
73
BVW_ERROR_FILE_ENCRYPTED,
74
BVW_ERROR_FILE_NOT_FOUND,
76
BVW_ERROR_DVD_ENCRYPTED,
77
BVW_ERROR_INVALID_DEVICE,
79
BVW_ERROR_UNKNOWN_HOST,
80
BVW_ERROR_NETWORK_UNREACHABLE,
81
BVW_ERROR_CONNECTION_REFUSED,
83
BVW_ERROR_UNVALID_LOCATION,
85
BVW_ERROR_CODEC_NOT_HANDLED,
87
BVW_ERROR_CANNOT_CAPTURE,
89
BVW_ERROR_PLUGIN_LOAD,
93
GQuark bacon_video_widget_error_quark (void) G_GNUC_CONST;
94
GType bacon_video_widget_get_type (void);
95
struct poptOption *bacon_video_widget_get_popt_table (void);
100
BVW_USE_TYPE_CAPTURE,
101
BVW_USE_TYPE_METADATA
104
GtkWidget *bacon_video_widget_new (int width, int height,
108
char *bacon_video_widget_get_backend_name (BaconVideoWidget *bvw);
111
gboolean bacon_video_widget_open (BaconVideoWidget *bvw,
114
gboolean bacon_video_widget_play (BaconVideoWidget *bvw,
116
void bacon_video_widget_pause (BaconVideoWidget *bvw);
117
gboolean bacon_video_widget_is_playing (BaconVideoWidget *bvw);
119
/* Seeking and length */
120
gboolean bacon_video_widget_is_seekable (BaconVideoWidget *bvw);
121
gboolean bacon_video_widget_seek (BaconVideoWidget *bvw,
124
gboolean bacon_video_widget_seek_time (BaconVideoWidget *bvw,
127
float bacon_video_widget_get_position (BaconVideoWidget *bvw);
128
gint64 bacon_video_widget_get_current_time (BaconVideoWidget *bvw);
129
gint64 bacon_video_widget_get_stream_length (BaconVideoWidget *bvw);
131
void bacon_video_widget_stop (BaconVideoWidget *bvw);
132
void bacon_video_widget_close (BaconVideoWidget *bvw);
135
gboolean bacon_video_widget_can_set_volume (BaconVideoWidget *bvw);
136
void bacon_video_widget_set_volume (BaconVideoWidget *bvw,
138
int bacon_video_widget_get_volume (BaconVideoWidget *bvw);
141
void bacon_video_widget_set_logo (BaconVideoWidget *bvw,
143
void bacon_video_widget_set_logo_mode (BaconVideoWidget *bvw,
145
gboolean bacon_video_widget_get_logo_mode (BaconVideoWidget *bvw);
147
void bacon_video_widget_set_proprietary_plugins_path
148
(BaconVideoWidget *bvw,
151
void bacon_video_widget_set_fullscreen (BaconVideoWidget *bvw,
152
gboolean fullscreen);
154
void bacon_video_widget_set_show_cursor (BaconVideoWidget *bvw,
155
gboolean use_cursor);
156
gboolean bacon_video_widget_get_show_cursor (BaconVideoWidget *bvw);
158
gboolean bacon_video_widget_get_auto_resize (BaconVideoWidget *bvw);
159
void bacon_video_widget_set_auto_resize (BaconVideoWidget *bvw,
160
gboolean auto_resize);
162
void bacon_video_widget_set_connection_speed (BaconVideoWidget *bvw,
164
int bacon_video_widget_get_connection_speed (BaconVideoWidget *bvw);
166
void bacon_video_widget_set_media_device (BaconVideoWidget *bvw,
168
gboolean bacon_video_widget_can_play (BaconVideoWidget *bvw,
170
G_CONST_RETURN gchar **bacon_video_widget_get_mrls
171
(BaconVideoWidget *bvw,
175
void bacon_video_widget_set_video_device (BaconVideoWidget *bvw,
188
BVW_INFO_DIMENSION_X,
189
BVW_INFO_DIMENSION_Y,
190
BVW_INFO_VIDEO_CODEC,
195
BVW_INFO_AUDIO_CODEC,
196
} BaconVideoWidgetMetadataType;
198
void bacon_video_widget_get_metadata (BaconVideoWidget *bvw,
199
BaconVideoWidgetMetadataType
203
/* Visualisation functions */
211
gboolean bacon_video_widget_set_show_visuals (BaconVideoWidget *bvw,
212
gboolean show_visuals);
213
GList *bacon_video_widget_get_visuals_list (BaconVideoWidget *bvw);
214
gboolean bacon_video_widget_set_visuals (BaconVideoWidget *bvw,
216
void bacon_video_widget_set_visuals_quality (BaconVideoWidget *bvw,
217
VisualsQuality quality);
219
/* Picture settings */
221
BVW_VIDEO_BRIGHTNESS,
223
BVW_VIDEO_SATURATION,
225
} BaconVideoWidgetVideoProperty;
230
BVW_RATIO_FOURBYTHREE,
231
BVW_RATIO_ANAMORPHIC,
233
} BaconVideoWidgetAspectRatio;
235
void bacon_video_widget_set_deinterlacing (BaconVideoWidget *bvw,
236
gboolean deinterlace);
237
gboolean bacon_video_widget_get_deinterlacing (BaconVideoWidget *bvw);
239
void bacon_video_widget_set_aspect_ratio (BaconVideoWidget *bvw,
240
BaconVideoWidgetAspectRatio
242
BaconVideoWidgetAspectRatio bacon_video_widget_get_aspect_ratio
243
(BaconVideoWidget *bvw);
245
void bacon_video_widget_set_scale_ratio (BaconVideoWidget *bvw,
248
gboolean bacon_video_widget_can_set_zoom (BaconVideoWidget *bvw);
249
void bacon_video_widget_set_zoom (BaconVideoWidget *bvw,
251
int bacon_video_widget_get_zoom (BaconVideoWidget *bvw);
253
int bacon_video_widget_get_video_property (BaconVideoWidget *bvw,
254
BaconVideoWidgetVideoProperty
256
void bacon_video_widget_set_video_property (BaconVideoWidget *bvw,
257
BaconVideoWidgetVideoProperty
265
BVW_DVD_SUBPICTURE_MENU,
268
BVW_DVD_CHAPTER_MENU,
269
BVW_DVD_NEXT_CHAPTER,
270
BVW_DVD_PREV_CHAPTER,
275
} BaconVideoWidgetDVDEvent;
277
void bacon_video_widget_dvd_event (BaconVideoWidget *bvw,
278
BaconVideoWidgetDVDEvent
280
GList *bacon_video_widget_get_languages (BaconVideoWidget *bvw);
281
int bacon_video_widget_get_language (BaconVideoWidget *bvw);
282
void bacon_video_widget_set_language (BaconVideoWidget *bvw,
285
GList *bacon_video_widget_get_subtitles (BaconVideoWidget *bvw);
286
int bacon_video_widget_get_subtitle (BaconVideoWidget *bvw);
287
void bacon_video_widget_set_subtitle (BaconVideoWidget *bvw,
290
/* Screenshot functions */
291
gboolean bacon_video_widget_can_get_frames (BaconVideoWidget *bvw,
293
GdkPixbuf *bacon_video_widget_get_current_frame (BaconVideoWidget *bvw);
295
/* TV-Out functions */
303
gboolean bacon_video_widget_fullscreen_mode_available (BaconVideoWidget *bvw,
306
gboolean bacon_video_widget_set_tv_out (BaconVideoWidget *bvw,
308
TvOutType bacon_video_widget_get_tv_out (BaconVideoWidget *bvw);
310
/* Audio-out functions */
312
BVW_AUDIO_SOUND_STEREO,
313
BVW_AUDIO_SOUND_4CHANNEL,
314
BVW_AUDIO_SOUND_41CHANNEL,
315
BVW_AUDIO_SOUND_5CHANNEL,
316
BVW_AUDIO_SOUND_51CHANNEL,
317
BVW_AUDIO_SOUND_AC3PASSTHRU
318
} BaconVideoWidgetAudioOutType;
320
BaconVideoWidgetAudioOutType bacon_video_widget_get_audio_out_type
321
(BaconVideoWidget *bvw);
322
void bacon_video_widget_set_audio_out_type (BaconVideoWidget *bvw,
323
BaconVideoWidgetAudioOutType
328
#endif /* HAVE_BACON_VIDEO_WIDGET_H */