[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-cvslog
Subject:    [xine-cvs] CVS: gnome-xine/src key_events.c, 1.114, 1.115 player.c,
From:       Darren Salt <dsalt () users ! sourceforge ! net>
Date:       2006-08-27 18:28:42
Message-ID: E1GHPNC-0007nF-Hd () sc8-pr-cvs10 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/xine/gnome-xine/src
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29899/src

Modified Files:
	key_events.c player.c 
Log Message:
JS eject() and a key bindings entry.


Index: key_events.c
===================================================================
RCS file: /cvsroot/xine/gnome-xine/src/key_events.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- key_events.c	9 Aug 2006 19:50:45 -0000	1.114
+++ key_events.c	27 Aug 2006 18:28:40 -0000	1.115
@@ -89,6 +89,7 @@
   { N_("Exit gxine"), "exit ();", GDK_q, 0 },
   { N_("Pause"), "if (!vdr ('PAUSE') && !is_live_stream ()) pause ();", GDK_space, 0 },
   { N_("Stop"), "vdr ('STOP') || stop ();", 0, 0 },
+  { N_("Eject"), "eject ();", 0, 0 },
   { N_("Windowed mode"), "vo_fullscreen.v = false;", GDK_Escape, 0 },
   { N_("Fullscreen mode"), "vo_fullscreen.toggle ();", GDK_f, 0 },
   { N_("Aspect ratio"), "++vo_aspect.v;", GDK_a, 0 },

Index: player.c
===================================================================
RCS file: /cvsroot/xine/gnome-xine/src/player.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -r1.88 -r1.89
--- player.c	6 Jul 2006 18:03:32 -0000	1.88
+++ player.c	27 Aug 2006 18:28:40 -0000	1.89
@@ -61,7 +61,7 @@
 static pthread_t       play_thread;
 static char           *cur_mrl = NULL, *cur_title = NULL;
 
-static __attribute__ ((noreturn)) void *play_exec (void *queue_gen)
+static __attribute__ ((noreturn)) void *play_exec (void *data)
 {
   xine_cfg_entry_t entry;
   char *hash, *mrl = NULL;
@@ -215,8 +215,12 @@
     abort();
   }
 
+  if (playlist_showing_logo ())
+    pthread_join (play_thread, NULL);
+  else
+    pthread_detach (play_thread);
+
   pthread_attr_destroy (&attr);
-  pthread_detach (play_thread);
 }
 
 
@@ -490,6 +494,21 @@
   return JS_TRUE;
 }
 
+static JSBool controls_eject (JSContext *cx, JSObject *obj, uintN argc,
+			      jsval *argv, jsval *rval)
+{
+  se_log_fncall_checkinit ("eject");
+  if (xine_get_status (stream) == XINE_STATUS_PLAY)
+    xine_stop (stream);
+  gdk_threads_leave (); /* need to do this to allow play_exec() to proceed */
+  playlist_logo ();
+  gdk_threads_enter ();
+  ui_set_control_adjustment (Control_SEEKER, 0);
+  int ret = xine_eject (stream);
+  *rval = BOOLEAN_TO_JSVAL (ret);
+  return JS_TRUE;
+}
+
 #ifdef WITH_DEPRECATED
 
 static JSBool js_set_speed (JSContext *cx, JSObject *obj, uintN argc,
@@ -1090,6 +1109,8 @@
   	SE_GROUP_ENGINE, N_("[bool]"), NULL },
       { "stop", controls_stop, 0, 0,
 	SE_GROUP_ENGINE, NULL, NULL },
+      { "eject", controls_eject, 0, 0,
+	SE_GROUP_ENGINE, NULL, NULL },
       { "play_pause", controls_play_pause, 0, 0,
 	SE_GROUP_ENGINE, N_("[bool]"), NULL },
       { "snapshot", js_snapshot, 0, 0,


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Xine-cvslog mailing list
Xine-cvslog@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-cvslog
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic