freebsd-ports/graphics/pornview/files/patch-gtkxine.c
Juergen Lock d613b75b1d - Update multimedia/libxine to 1.2.1 with a commit merged from hg
to fix DVB support.  (which still is broken for tuners using
  hardware pid filtering, like when running webcamd with
  "-m dvb-usb-init.force_pid_filter_usage=1".)

- Add patches to fix build of ports depending on libxine to:
  audio/amarok,
  graphics/gimageview [1], graphics/pornview [1],
  graphics/osg [2], graphics/osg-devel [2],
  multimedia/emotion,
  x11/kdelibs4 [3],
  multimedia/kmplayer,
  multimedia/konverter,
  multimedia/qdvdauthor [4],
  multimedia/vdr-plugin-xineliboutput,
  multimedia/xfce4-media [5],
  multimedia/xine_artsplugin,
  multimedia/k9copy-kde4 [6]

- Fix RUN_DEPENDS= xine... which should be LIB_DEPENDS for audio/atunes . [7]

- Mark multimedia/phonon-xine BROKEN which refuses to build with
  libxine 1.2.x and is deprecated upstream. [3]

- Disable XINE knob for x11/eaglemode for which I don't have a fix. [2]

- Note: multimedia/kaffeine runs after rakuco's x11/kdelibs4 fix,
  but it only shows a green window at least with mp4 or ts files.
  (avi files and audio still work.)  It seems the kaffeine developers
  have found this too and are now switching away from libxine in
  their git repo - so I guess we'll have a broken kaffeine at least
  until they release a new version.

- Bump PORTREVISIONs for ports depending on libxine by default.

- Add optional libbluray support to multimedia/libxine and
  multimedia/vdr-plugin-xineliboutput.

PR:		ports/165057 [6]
Submitted by:	nox (self) [6], rakuco [3]
Approved by:	dinoex (maintainer, via irc) [1],
		amdmi3 (maintainer, via private email) [2],
		kde@ (rakuco, via irc) [3],
		Phil Oleson <oz@nixil.net> (maintainer, via private email) [4],
		xfce@ (rene, via irc) [5],
		Eduardo Gielamo Oliveira <egoliveira@gmail.com> (maintainer) [6],
		lme (maintainer, via irc) [7]
Thanx to:	Darren Salt (upstream libxine maintainer) for a few
		hints on irc to help with patching ports depending
		on deprecated libxine features
2012-02-26 15:22:37 +00:00

129 lines
3.9 KiB
C

--- src/support/widgets/gtkxine.c.orig
+++ src/support/widgets/gtkxine.c
@@ -244,13 +244,21 @@ frame_output_cb (void *gxine_gen,
*dest_pixel_aspect = video_pixel_aspect * gxine->display_ratio;
}
+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2)
static xine_vo_driver_t *
+#else
+static xine_video_port_t *
+#endif
load_video_out_driver (GtkXine * this)
{
double res_h, res_v;
x11_visual_t vis;
const char *video_driver_id;
+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2)
xine_vo_driver_t *vo_driver;
+#else
+ xine_video_port_t *vo_driver;
+#endif
vis.display = this->display;
vis.screen = this->screen;
@@ -296,10 +304,18 @@ load_video_out_driver (GtkXine * this)
XINE_VISUAL_TYPE_X11, (void *) &vis);
}
+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2)
static xine_ao_driver_t *
+#else
+static xine_audio_port_t *
+#endif
load_audio_out_driver (GtkXine * this)
{
+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2)
xine_ao_driver_t *ao_driver;
+#else
+ xine_audio_port_t *ao_driver;
+#endif
const char *audio_driver_id;
/*
@@ -354,8 +370,13 @@ xine_thread (void *this_gen)
if (event.xexpose.count != 0)
break;
+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2)
xine_gui_send_vo_data (this->stream,
- XINE_GUI_SEND_EXPOSE_EVENT, &event);
+ XINE_GUI_SEND_EXPOSE_EVENT, &event);
+#else
+ xine_port_send_gui_data (this->vo_driver,
+ XINE_GUI_SEND_EXPOSE_EVENT, &event);
+#endif
break;
case FocusIn: /* happens only in fullscreen mode */
@@ -368,8 +389,13 @@ xine_thread (void *this_gen)
if (event.type == this->completion_event)
{
+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2)
xine_gui_send_vo_data (this->stream,
XINE_GUI_SEND_COMPLETION_EVENT, &event);
+#else
+ xine_port_send_gui_data (this->vo_driver,
+ XINE_GUI_SEND_EXPOSE_EVENT, &event);
+#endif
/*
* printf ("gtkxine: completion event\n");
*/
@@ -632,7 +658,7 @@ gtk_xine_unrealize (GtkWidget * widget)
*/
if (this->vo_driver != NULL)
xine_close_video_driver (this->xine, this->vo_driver);
- if (this->vo_driver != NULL)
+ if (this->ao_driver != NULL)
xine_close_audio_driver (this->xine, this->ao_driver);
/*
@@ -748,6 +774,7 @@ gtk_xine_play (GtkXine * gtx, gint pos,
return retval;
}
+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2)
gint
gtk_xine_trick_mode (GtkXine * gtx, gint mode, gint value)
{
@@ -757,6 +784,7 @@ gtk_xine_trick_mode (GtkXine * gtx, gint
return xine_trick_mode (gtx->stream, mode, value);
}
+#endif
gint
gtk_xine_get_pos_length (GtkXine * gtx, gint * pos_stream,
@@ -1001,9 +1029,15 @@ gtk_xine_set_fullscreen (GtkXine * gtx,
gtx->toplevel, RevertToNone, CurrentTime);
XMoveWindow (gtx->display, gtx->fullscreen_window, 0, 0);
+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2)
xine_gui_send_vo_data (gtx->stream,
XINE_GUI_SEND_DRAWABLE_CHANGED,
(void *) gtx->fullscreen_window);
+#else
+ xine_port_send_gui_data (gtx->vo_driver,
+ XINE_GUI_SEND_DRAWABLE_CHANGED,
+ (void *) gtx->fullscreen_window);
+#endif
/*
* switch off mouse cursor
@@ -1014,9 +1048,15 @@ gtk_xine_set_fullscreen (GtkXine * gtx,
}
else
{
+#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2)
xine_gui_send_vo_data (gtx->stream,
XINE_GUI_SEND_DRAWABLE_CHANGED,
(void *) gtx->video_window);
+#else
+ xine_port_send_gui_data (gtx->vo_driver,
+ XINE_GUI_SEND_DRAWABLE_CHANGED,
+ (void *) gtx->video_window);
+#endif
XDestroyWindow (gtx->display, gtx->fullscreen_window);
}