Commit a6179121 authored by Bastien Nocera's avatar Bastien Nocera Committed by Bastien Nocera
Browse files

upd

2006-12-06  Bastien Nocera  <hadess@hadess.net>

	* README: upd
	* src/backend/bacon-video-widget-xine.c: (xine_try_error),
	(bacon_video_widget_button_press),
	(bacon_video_widget_get_metadata_string),
	(bacon_video_widget_get_current_frame):
	* src/totem.c: (on_video_button_press_event),
	(video_widget_create): Remove old < 2.9.1 glib compat code in the
	xine-lib backend, Make double-click toggle fullscreen, and a middle
	click play/pause (Closes: #162814)
parent dbb258aa
2006-12-06 Bastien Nocera <hadess@hadess.net>
* README: upd
* src/backend/bacon-video-widget-xine.c: (xine_try_error),
(bacon_video_widget_button_press),
(bacon_video_widget_get_metadata_string),
(bacon_video_widget_get_current_frame):
* src/totem.c: (on_video_button_press_event),
(video_widget_create): Remove old < 2.9.1 glib compat code in the
xine-lib backend, Make double-click toggle fullscreen, and a middle
click play/pause (Closes: #162814)
2006-12-06 Bastien Nocera <hadess@hadess.net>
 
* configure.in: print out all the options enabled/disabled after the
......
......@@ -82,6 +82,10 @@ D:
Toggle drawing using Gromit
E:
Erase drawing using Gromit
Mouse button 1 double-click:
Toggle full screen
Middle mouse button click:
Play/Pause
Copyright
=========
......@@ -96,14 +100,12 @@ FAQ
TODO
====
- support gxine, freevo, ypl playlist formats
- write a widget more suitable for seeking in place of the current slider
- broadcasting and network client
- Play with OSD and stuff
- ports to other windowing system/OSes?
- OO.o plugin?
http://www.openoffice.org/issues/show_bug.cgi?id=41419
- split the baconvideowidget into a GtkWidget and a GObject (use a GInterface)?
- add equaliser support to the API
- be able to choose the deinterlace method?
http://article.gmane.org/gmane.comp.video.xine.devel/4304/match=tvtime
......
......@@ -175,6 +175,8 @@ struct BaconVideoWidgetPrivate {
char *codecs_path;
gboolean got_redirect;
gboolean has_subtitle;
/* Whether the last button event was consumed internally */
gboolean bevent_consumed;
GAsyncQueue *queue;
int video_width, video_height;
......@@ -1480,28 +1482,6 @@ bacon_video_widget_sort_queue (gconstpointer a, gconstpointer b, gpointer data)
return 1;
}
#if (!(GLIB_CHECK_VERSION(2,9,1)))
static void
bacon_video_widget_queue_sort (GAsyncQueue *queue)
{
GList *list = NULL, *l;
signal_data *data;
while ((data = g_async_queue_try_pop (queue)) != NULL) {
list = g_list_insert_sorted (list, data, (GCompareFunc) bacon_video_widget_sort_queue);
}
if (list == NULL)
return;
for (l = list; l != NULL; l = l->next) {
g_async_queue_push (queue, l->data);
}
g_list_free (list);
}
#endif /* ! GLIB_CHECK_VERSION 2.9.1 */
static void
xine_try_error (BaconVideoWidget *bvw, gboolean probe_error, GError **error)
{
......@@ -1513,11 +1493,7 @@ xine_try_error (BaconVideoWidget *bvw, gboolean probe_error, GError **error)
sched_yield ();
/* Sort the queue with the errors first */
#if GLIB_CHECK_VERSION(2,9,1)
g_async_queue_sort (bvw->priv->queue, bacon_video_widget_sort_queue, NULL);
#else
bacon_video_widget_queue_sort (bvw->priv->queue);
#endif
/* Steal messages from the async queue, if there's an error,
* to use as the error message rather than the crappy errors from
......@@ -1862,7 +1838,18 @@ bacon_video_widget_button_press (GtkWidget *widget, GdkEventButton *event)
{
BaconVideoWidget *bvw = (BaconVideoWidget *) widget;
generate_mouse_event (bvw, (GdkEvent *)event, FALSE);
/* Don't propagate double-click events if we just had a button
* event consumed internally */
if (event->type == GDK_2BUTTON_PRESS && bvw->priv->bevent_consumed != FALSE) {
bvw->priv->bevent_consumed = FALSE;
return TRUE;
}
/* If the event was consumed, mark it as such */
if (generate_mouse_event (bvw, (GdkEvent *)event, FALSE) != FALSE && bvw->priv->cursor != NULL) {
bvw->priv->bevent_consumed = TRUE;
return FALSE;
}
if (GTK_WIDGET_CLASS (parent_class)->button_press_event != NULL)
(* GTK_WIDGET_CLASS (parent_class)->button_press_event) (widget, event);
......@@ -3459,7 +3446,7 @@ bacon_video_widget_get_metadata_string (BaconVideoWidget *bvw, BaconVideoWidgetM
mode = xine_get_stream_info (bvw->priv->stream,
XINE_STREAM_INFO_AUDIO_MODE);
switch (mode) {
switch (mode)
#endif
}
break;
......@@ -3884,7 +3871,6 @@ bacon_video_widget_get_current_frame (BaconVideoWidget *bvw)
if (xine_get_current_frame (bvw->priv->stream, &width, &height,
&ratio, &format, yuv) == 0)
{
g_message ("with malloced");
g_free (yuv);
return NULL;
}
......
......@@ -2298,8 +2298,13 @@ static gboolean
on_video_button_press_event (BaconVideoWidget *bvw, GdkEventButton *event,
Totem *totem)
{
if (event->type == GDK_BUTTON_PRESS && event->button == 3)
{
if (event->type == GDK_2BUTTON_PRESS && event->button == 1) {
totem_action_fullscreen_toggle(totem);
return TRUE;
} else if (event->type == GDK_BUTTON_PRESS && event->button == 2) {
totem_action_play_pause(totem);
return TRUE;
} else if (event->type == GDK_BUTTON_PRESS && event->button == 3) {
totem_action_menu_popup (totem, event->button);
return TRUE;
}
......@@ -3100,7 +3105,7 @@ video_widget_create (Totem *totem)
"motion-notify-event",
G_CALLBACK (on_video_motion_notify_event),
totem);
g_signal_connect (G_OBJECT (totem->bvw),
g_signal_connect_after (G_OBJECT (totem->bvw),
"button-press-event",
G_CALLBACK (on_video_button_press_event),
totem);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment