More bugfixes backported from upstream svn:

fix issue with not being able to play media off an SFTP share

when mplayer reports that it has video, resize the media
window so that mplayer has something to draw to

fix problem with seeking in the tracker

While here, regen WANTLIB.
This commit is contained in:
dcoppa 2011-09-29 11:03:19 +00:00
parent b64f66bfac
commit 13d913156d
4 changed files with 116 additions and 18 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.46 2011/09/21 12:20:07 dcoppa Exp $
# $OpenBSD: Makefile,v 1.47 2011/09/29 11:03:19 dcoppa Exp $
COMMENT = GTK+/GNOME frontend for MPlayer
DISTNAME = gnome-mplayer-1.0.4
REVISION = 3
REVISION = 4
CATEGORIES = x11 multimedia
MAINTAINER = David Coppa <dcoppa@openbsd.org>
@ -17,12 +17,13 @@ PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB = X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama \
Xrandr Xrender Xss atk-1.0 c cairo curl dbus-1 \
WANTLIB = GL X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi \
Xinerama Xrandr Xrender Xss atk-1.0 c cairo curl dbus-1 \
dbus-glib-1 expat fontconfig freetype gdk-x11-2.0 \
gdk_pixbuf-2.0 gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 \
gpod gthread-2.0 gtk-x11-2.0 m musicbrainz3 neon notify \
pango-1.0 pangocairo-1.0 pangoft2-1.0 pthread z
pango-1.0 pangocairo-1.0 pangoft2-1.0 pixman-1 png \
pthread pthread-stubs xcb xcb-render xcb-shm z
MODULES = devel/gettext \
devel/dconf

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-src_gui_c,v 1.18 2011/09/21 13:10:36 dcoppa Exp $
$OpenBSD: patch-src_gui_c,v 1.19 2011/09/29 11:03:19 dcoppa Exp $
Fix an issue when alsa is not being used
(upstream svn revision r2151)
@ -18,8 +18,11 @@ going to/returning from fullscreen (upstream svn r2167 - r2169)
Bugfix: 'f' not going to/returning from fullscreen
(upstream svn revision r2161)
Fix problem with seeking in the tracker
(upstream svn revision r2176)
--- src/gui.c.orig Mon Jun 27 16:59:45 2011
+++ src/gui.c Wed Sep 21 15:05:50 2011
+++ src/gui.c Wed Sep 28 15:34:17 2011
@@ -106,6 +106,7 @@ PLAYSTATE media_state_to_playstate(GmtkMediaPlayerMedi
void set_media_player_attributes(GtkWidget * widget)
{
@ -96,3 +99,31 @@ Bugfix: 'f' not going to/returning from fullscreen
default:
if (verbose) {
printf("Unhandled attribute change %i\n", attribute);
@@ -6229,6 +6252,19 @@ void player_position_changed_callback(GmtkMediaTracker
}
}
+gboolean tracker_value_changed_callback(GtkWidget * widget, gint value, gpointer data)
+{
+ if (gmtk_media_player_get_attribute_boolean(GMTK_MEDIA_PLAYER(media), ATTRIBUTE_SEEKABLE)) {
+ if (!autopause) {
+ if (gmtk_media_player_get_state(GMTK_MEDIA_PLAYER(media)) != MEDIA_STATE_STOP) {
+ gmtk_media_player_seek(GMTK_MEDIA_PLAYER(media), value * 1.0, SEEK_PERCENT);
+ }
+ }
+ }
+
+ return FALSE;
+}
+
gboolean tracker_difference_callback(GtkWidget * widget, gdouble difference, void *data)
{
@@ -7146,6 +7182,7 @@ GtkWidget *create_window(gint windowid)
tracker = GMTK_MEDIA_TRACKER(gmtk_media_tracker_new());
gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(tracker), TRUE, TRUE, 2);
g_signal_connect(G_OBJECT(tracker), "difference-changed", G_CALLBACK(tracker_difference_callback), NULL);
+ g_signal_connect(G_OBJECT(tracker), "value-changed", G_CALLBACK(tracker_value_changed_callback), NULL);
g_signal_connect(G_OBJECT(tracker), "button_press_event", G_CALLBACK(progress_callback), NULL);
g_signal_connect_swapped(G_OBJECT(media), "position_changed",
G_CALLBACK(player_position_changed_callback), tracker);

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-src_libgmtk_gmtk_media_player_c,v 1.3 2011/09/21 13:10:36 dcoppa Exp $
$OpenBSD: patch-src_libgmtk_gmtk_media_player_c,v 1.4 2011/09/29 11:03:19 dcoppa Exp $
Raise event on incomplete QuickTime file, and mark it for retry
(fix apple.com/trailers) - upstream svn revision r2152
@ -9,8 +9,15 @@ Bugfix: ATTRIBUTE_FORCE_CACHE not being processed
Wait for the socket_id to be valid, but in plugin mode it may
not so timeout (upstream svn revision r41 of gmtk)
Fix issue with not being able to play media off an SFTP share
(upstream svn revision r45 of gmtk)
When mplayer reports that it has video, resize the media
window so that mplayer has something to draw to
(upstream svn revision r46 of gmtk)
--- src/libgmtk/gmtk_media_player.c.orig Tue Jun 28 18:19:18 2011
+++ src/libgmtk/gmtk_media_player.c Wed Sep 21 15:00:39 2011
+++ src/libgmtk/gmtk_media_player.c Wed Sep 28 14:54:04 2011
@@ -69,15 +69,22 @@ gboolean signal_event(gpointer data)
if (event && event->event_name != NULL
@ -117,7 +124,17 @@ not so timeout (upstream svn revision r41 of gmtk)
default:
if (player->debug)
printf("Unsupported Attribute\n");
@@ -1788,6 +1823,7 @@ gpointer launch_mplayer(gpointer data)
@@ -1779,6 +1814,9 @@ gpointer launch_mplayer(gpointer data)
GList *list;
GmtkMediaPlayerSubtitle *subtitle;
GmtkMediaPlayerAudioTrack *track;
+#ifdef GIO_ENABLED
+ GFile *file;
+#endif
player->seekable = FALSE;
player->has_chapters = FALSE;
@@ -1788,6 +1826,7 @@ gpointer launch_mplayer(gpointer data)
player->title_is_menu = FALSE;
player->enable_divx = TRUE;
player->disable_xvmc = FALSE;
@ -125,7 +142,25 @@ not so timeout (upstream svn revision r41 of gmtk)
g_mutex_lock(player->thread_running);
@@ -1976,8 +2012,11 @@ gpointer launch_mplayer(gpointer data)
@@ -1818,7 +1857,17 @@ gpointer launch_mplayer(gpointer data)
argn = 0;
player->playback_error = NO_ERROR;
if (player->uri != NULL) {
+#ifdef GIO_ENABLED
+ file = g_file_new_for_uri(player->uri);
+ if (file != NULL) {
+ filename = g_file_get_path(file);
+ g_object_unref(file);
+ }
+#else
filename = g_filename_from_uri(player->uri, NULL, NULL);
+#endif
+ if (filename != NULL)
+ player->type = TYPE_FILE;
}
player->minimum_mplayer = detect_mplayer_features(player);
@@ -1976,8 +2025,11 @@ gpointer launch_mplayer(gpointer data)
argv[argn++] = g_strdup_printf("-sub-fuzziness");
argv[argn++] = g_strdup_printf("%i", player->subtitle_fuzziness);
@ -138,15 +173,29 @@ not so timeout (upstream svn revision r41 of gmtk)
argv[argn++] = g_strdup_printf("-wid");
argv[argn++] = g_strdup_printf("0x%x", player->socket_id);
@@ -2475,6 +2514,11 @@ gboolean thread_reader_error(GIOChannel * source, GIOC
if (strstr(mplayer_output->str, "Compressed SWF format not supported") != NULL) {
@@ -2477,6 +2529,11 @@ gboolean thread_reader_error(GIOChannel * source, GIOC
error_msg = g_strdup_printf(_("Compressed SWF format not supported"));
+ }
+
}
+ if (strstr(mplayer_output->str, "MOV: missing header (moov/cmov) chunk") != NULL) {
+ player->retry_on_full_cache = TRUE;
+ create_event_boolean(player, "attribute-changed", ATTRIBUTE_RETRY_ON_FULL_CACHE);
}
+ }
+
if (strstr(mplayer_output->str, "Title: ") != 0) {
buf = strstr(mplayer_output->str, "Title:");
buf = strstr(mplayer_output->str, "Title: ") + strlen("Title: ");
@@ -2875,6 +2932,13 @@ gboolean thread_reader(GIOChannel * source, GIOConditi
}
player->video_format = g_strdup(buf);
create_event_int(player, "attribute-changed", ATTRIBUTE_VIDEO_FORMAT);
+ if (player->video_width == 0 && player->video_height == 0) {
+ if (player->debug)
+ printf("Setting to minimum size so that mplayer has something to draw to\n");
+ allocation.width = 32;
+ allocation.height = 16;
+ create_event_allocation(player, "size_allocate", &allocation);
+ }
}
if (strstr(mplayer_output->str, "ID_VIDEO_CODEC") != 0) {

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-src_libgmtk_gmtk_media_tracker_c,v 1.1 2011/09/29 11:03:19 dcoppa Exp $
Fix problem with seeking in the tracker
(upstream svn revision r48 of gmtk)
--- src/libgmtk/gmtk_media_tracker.c.orig Wed Sep 28 14:55:12 2011
+++ src/libgmtk/gmtk_media_tracker.c Wed Sep 28 14:56:17 2011
@@ -196,9 +196,6 @@ static gboolean gmtk_media_tracker_motion_notify(GtkWi
gtk_range_set_value(GTK_RANGE(GMTK_MEDIA_TRACKER(tracker)->scale), position);
g_signal_emit_by_name(tracker, "value-changed", (gint) (100 * position));
difference = (GMTK_MEDIA_TRACKER(tracker)->length * position) - GMTK_MEDIA_TRACKER(tracker)->position;
- if (ABS(position) > 15)
- g_signal_emit_by_name(tracker, "difference-changed", difference);
-
} else {
if (GMTK_MEDIA_TRACKER(tracker)->length > 0.0) {
tip = gm_seconds_to_string(GMTK_MEDIA_TRACKER(tracker)->length * ((gdouble) event->x / alloc.width));