Skip to content

Commit

Permalink
fix spacing; no binary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
David Coppa committed Sep 21, 2011
1 parent 003d499 commit a7f2520
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 49 deletions.
12 changes: 6 additions & 6 deletions x11/gnome-mplayer/patches/patch-src_gui_c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$OpenBSD: patch-src_gui_c,v 1.17 2011/09/21 12:20:07 dcoppa Exp $
$OpenBSD: patch-src_gui_c,v 1.18 2011/09/21 13:10:36 dcoppa Exp $

Fix an issue when alsa is not being used
(upstream svn revision r2151)
Expand All @@ -19,7 +19,7 @@ Bugfix: 'f' not going to/returning from fullscreen
(upstream svn revision r2161)

--- src/gui.c.orig Mon Jun 27 16:59:45 2011
+++ src/gui.c Wed Sep 21 12:29:37 2011
+++ src/gui.c Wed Sep 21 15:05:50 2011
@@ -106,6 +106,7 @@ PLAYSTATE media_state_to_playstate(GmtkMediaPlayerMedi
void set_media_player_attributes(GtkWidget * widget)
{
Expand Down Expand Up @@ -89,10 +89,10 @@ Bugfix: 'f' not going to/returning from fullscreen
g_thread_create(get_cover_art, metadata, FALSE, NULL);
break;
+
+ case ATTRIBUTE_RETRY_ON_FULL_CACHE:
+ idledata->retry_on_full_cache = gmtk_media_player_get_attribute_boolean (GMTK_MEDIA_PLAYER(media), ATTRIBUTE_RETRY_ON_FULL_CACHE);
+ break;
+
+ case ATTRIBUTE_RETRY_ON_FULL_CACHE:
+ idledata->retry_on_full_cache = gmtk_media_player_get_attribute_boolean (GMTK_MEDIA_PLAYER(media), ATTRIBUTE_RETRY_ON_FULL_CACHE);
+ break;
+
default:
if (verbose) {
printf("Unhandled attribute change %i\n", attribute);
62 changes: 29 additions & 33 deletions x11/gnome-mplayer/patches/patch-src_libgmtk_gmtk_media_player_c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$OpenBSD: patch-src_libgmtk_gmtk_media_player_c,v 1.2 2011/09/21 12:20:07 dcoppa Exp $
$OpenBSD: patch-src_libgmtk_gmtk_media_player_c,v 1.3 2011/09/21 13:10:36 dcoppa Exp $

Raise event on incomplete QuickTime file, and mark it for retry
(fix apple.com/trailers) - upstream svn revision r2152
Expand All @@ -10,8 +10,8 @@ Wait for the socket_id to be valid, but in plugin mode it may
not so timeout (upstream svn revision r41 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 13:05:46 2011
@@ -69,15 +69,27 @@ gboolean signal_event(gpointer data)
+++ src/libgmtk/gmtk_media_player.c Wed Sep 21 15:00:39 2011
@@ -69,15 +69,22 @@ gboolean signal_event(gpointer data)

if (event && event->event_name != NULL
&& (event->player->restart == FALSE || event->event_data_int == ATTRIBUTE_AF_EXPORT_FILENAME)) {
Expand All @@ -23,39 +23,35 @@ not so timeout (upstream svn revision r41 of gmtk)
- } else {
- g_signal_emit_by_name(event->player, event->event_name, event->event_data_int);
- }
-
+ switch (event->type) {
+ case EVENT_TYPE_INT:
+ case EVENT_TYPE_INT:
+ g_signal_emit_by_name(event->player, event->event_name, event->event_data_int);
+ break;
+
+ case EVENT_TYPE_DOUBLE:
+ break;
+ case EVENT_TYPE_DOUBLE:
+ g_signal_emit_by_name(event->player, event->event_name, event->event_data_double);
+ break;
+
+ case EVENT_TYPE_BOOLEAN:
+ break;
+ case EVENT_TYPE_BOOLEAN:
+ g_signal_emit_by_name(event->player, event->event_name, event->event_data_boolean);
+ break;
+
+ case EVENT_TYPE_ALLOCATION:
+ break;
+ case EVENT_TYPE_ALLOCATION:
+ g_signal_emit_by_name(event->player, event->event_name, event->event_allocation);
+ break;
+
+ default:
+ printf("undefined event %s\n", event->event_name);
+ break;
+ default:
+ printf("undefined event %s\n", event->event_name);
+ }
g_free(event->event_name);
}
if (event)
@@ -93,6 +105,7 @@ void create_event_int(GmtkMediaPlayer * player, const
@@ -93,6 +100,7 @@ void create_event_int(GmtkMediaPlayer * player, const

event = g_new0(GmtkMediaPlayerEvent, 1);
event->player = player;
+ event->type = EVENT_TYPE_INT;
event->event_name = g_strdup(name);
event->event_data_int = value;
g_idle_add(signal_event, event);
@@ -104,17 +117,31 @@ void create_event_double(GmtkMediaPlayer * player, con
@@ -104,17 +112,31 @@ void create_event_double(GmtkMediaPlayer * player, con

event = g_new0(GmtkMediaPlayerEvent, 1);
event->player = player;
Expand Down Expand Up @@ -87,15 +83,15 @@ not so timeout (upstream svn revision r41 of gmtk)
event->event_name = g_strdup(name);
event->event_allocation = allocation;
g_idle_add(signal_event, event);
@@ -300,6 +327,7 @@ static void gmtk_media_player_init(GmtkMediaPlayer * p
@@ -300,6 +322,7 @@ static void gmtk_media_player_init(GmtkMediaPlayer * p
player->channel_in = NULL;
player->channel_out = NULL;
player->channel_err = NULL;
+ player->retry_on_full_cache = FALSE;
}

static void gmtk_media_player_dispose(GObject * object)
@@ -908,6 +936,10 @@ void gmtk_media_player_set_attribute_boolean(GmtkMedia
@@ -908,6 +931,10 @@ void gmtk_media_player_set_attribute_boolean(GmtkMedia
player->hardware_ac3 = value;
break;

Expand All @@ -106,7 +102,7 @@ not so timeout (upstream svn revision r41 of gmtk)
default:
if (player->debug)
printf("Unsupported Attribute\n");
@@ -993,6 +1025,14 @@ gboolean gmtk_media_player_get_attribute_boolean(GmtkM
@@ -993,6 +1020,14 @@ gboolean gmtk_media_player_get_attribute_boolean(GmtkM
ret = player->hardware_ac3;
break;

Expand All @@ -121,15 +117,15 @@ not so timeout (upstream svn revision r41 of gmtk)
default:
if (player->debug)
printf("Unsupported Attribute\n");
@@ -1788,6 +1828,7 @@ gpointer launch_mplayer(gpointer data)
@@ -1788,6 +1823,7 @@ gpointer launch_mplayer(gpointer data)
player->title_is_menu = FALSE;
player->enable_divx = TRUE;
player->disable_xvmc = FALSE;
+ player->retry_on_full_cache = FALSE;

g_mutex_lock(player->thread_running);

@@ -1976,8 +2017,11 @@ gpointer launch_mplayer(gpointer data)
@@ -1976,8 +2012,11 @@ gpointer launch_mplayer(gpointer data)
argv[argn++] = g_strdup_printf("-sub-fuzziness");
argv[argn++] = g_strdup_printf("%i", player->subtitle_fuzziness);

Expand All @@ -142,15 +138,15 @@ 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);

@@ -2477,6 +2521,11 @@ gboolean thread_reader_error(GIOChannel * source, GIOC
@@ -2475,6 +2514,11 @@ gboolean thread_reader_error(GIOChannel * source, GIOC

if (strstr(mplayer_output->str, "Compressed SWF format not supported") != NULL) {
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, "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: ");
20 changes: 10 additions & 10 deletions x11/gnome-mplayer/patches/patch-src_libgmtk_gmtk_media_player_h
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
$OpenBSD: patch-src_libgmtk_gmtk_media_player_h,v 1.1 2011/07/12 08:12:29 dcoppa Exp $
$OpenBSD: patch-src_libgmtk_gmtk_media_player_h,v 1.2 2011/09/21 13:10:36 dcoppa Exp $

Raise event on incomplete QuickTime file, and mark it for retry
(fix apple.com/trailers) - upstream svn revision r2152

--- src/libgmtk/gmtk_media_player.h.orig Tue Jun 28 15:29:18 2011
+++ src/libgmtk/gmtk_media_player.h Mon Jul 11 10:19:19 2011
+++ src/libgmtk/gmtk_media_player.h Wed Sep 21 14:48:22 2011
@@ -170,7 +170,8 @@ typedef enum {
ATTRIBUTE_ENABLE_FRAME_DROP,
ATTRIBUTE_TITLE,
ATTRIBUTE_ARTIST,
- ATTRIBUTE_ALBUM
+ ATTRIBUTE_ALBUM,
+ ATTRIBUTE_RETRY_ON_FULL_CACHE
+ ATTRIBUTE_RETRY_ON_FULL_CACHE
} GmtkMediaPlayerMediaAttributes;

typedef enum {
Expand All @@ -20,10 +20,10 @@ Raise event on incomplete QuickTime file, and mark it for retry
} GmtkMediaPlayerCommand;

+typedef enum {
+ EVENT_TYPE_INT,
+ EVENT_TYPE_DOUBLE,
+ EVENT_TYPE_BOOLEAN,
+ EVENT_TYPE_ALLOCATION
+ EVENT_TYPE_INT,
+ EVENT_TYPE_DOUBLE,
+ EVENT_TYPE_BOOLEAN,
+ EVENT_TYPE_ALLOCATION
+} GmtkMediaPlayerEventType;
+
typedef struct _GmtkMediaPlayer GmtkMediaPlayer;
Expand All @@ -33,19 +33,19 @@ Raise event on incomplete QuickTime file, and mark it for retry

typedef struct _GmtkMediaPlayerEvent {
GmtkMediaPlayer *player;
+ GmtkMediaPlayerEventType type;
+ GmtkMediaPlayerEventType type;
gchar *event_name;
gint event_data_int;
gdouble event_data_double;
+ gboolean event_data_boolean;
+ gboolean event_data_boolean;
GtkAllocation *event_allocation;
} GmtkMediaPlayerEvent;

@@ -304,6 +314,7 @@ struct _GmtkMediaPlayer {
gchar *album;
gboolean enable_divx;
gboolean disable_xvmc;
+ gboolean retry_on_full_cache;
+ gboolean retry_on_full_cache;

gboolean deinterlace;
gboolean frame_drop;

0 comments on commit a7f2520

Please sign in to comment.