[xiph-cvs] cvs commit: postfish input.c input.h mainpanel.c version.h

Monty xiphmont at xiph.org
Fri Oct 17 01:40:18 PDT 2003



xiphmont    03/10/17 04:40:18

  Modified:    .        input.c input.h mainpanel.c version.h
  Log:
  attach >>| control
  time_to_cursor fix

Revision  Changes    Path
1.10      +13 -14    postfish/input.c

Index: input.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/input.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- input.c	17 Oct 2003 06:28:15 -0000	1.9
+++ input.c	17 Oct 2003 08:40:18 -0000	1.10
@@ -103,8 +103,10 @@
     s=atoi(c+1);
     if(s>59)s=59;
     if(s<0)s=0;
-  }else
-    s=0;
+  }else{
+    s=atoi(temp);
+    *temp=0;
+  }
 
   /* minutes */
   c=strrchr(temp,':');
@@ -113,18 +115,15 @@
     m=atoi(c+1);
     if(m>59)m=59;
     if(m<0)m=0;
-  }else
-    m=0;
+  }else{
+    m=atoi(temp);
+    *temp=0;
+  }
 
   /* hours */
-  c=strrchr(temp,':');
-  if(c){
-    *c=0;
-    h=atoi(c+1);
-    if(h>9999)h=9999;
-    if(h<0)h=0;
-  }else
-    h=0;
+  h=atoi(temp);
+  if(h>9999)h=9999;
+  if(h<0)h=0;
 
   return ((off_t)hd + (off_t)s*100 + (off_t)m*60*100 + (off_t)h*60*60*100) *
     input_rate / 100 * inbytes * input_ch;
@@ -356,8 +355,8 @@
   return cursor;
 }
 
-int input_time_seek_rel(double s){
-  int ret;
+off_t input_time_seek_rel(double s){
+  off_t ret;
   pthread_mutex_lock(&master_mutex);
   ret=input_seek(cursor+input_rate*inbytes*input_ch*s);
   pthread_mutex_unlock(&master_mutex);

<p><p>1.6       +1 -1      postfish/input.h

Index: input.h
===================================================================
RCS file: /usr/local/cvsroot/postfish/input.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- input.h	17 Oct 2003 06:28:15 -0000	1.5
+++ input.h	17 Oct 2003 08:40:18 -0000	1.6
@@ -8,4 +8,4 @@
 extern int input_load(int n,char *list[]);
 extern int pull_input_feedback(double *peak,double *rms,off_t *cursor,int *n);
 extern void input_reset(void);
-extern int input_time_seek_rel(double s);
+extern off_t input_time_seek_rel(double s);

<p><p>1.18      +16 -1     postfish/mainpanel.c

Index: mainpanel.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/mainpanel.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- mainpanel.c	17 Oct 2003 08:27:21 -0000	1.17
+++ mainpanel.c	17 Oct 2003 08:40:18 -0000	1.18
@@ -72,6 +72,18 @@
   multibar_reset(MULTIBAR(p->outbar));
 }
 
+static void action_end(GtkWidget *widget,postfish_mainpanel *p){
+  off_t cursor=input_time_to_cursor("9999:59:59.99");
+  char buf[14];
+
+  output_halt_playback();
+  cursor=input_seek(cursor);
+  input_cursor_to_time(cursor,buf);
+  readout_set(READOUT(p->cue),(char *)buf);
+  multibar_reset(MULTIBAR(p->inbar));
+  multibar_reset(MULTIBAR(p->outbar));
+}
+
 static void action_bb(GtkWidget *widget,postfish_mainpanel *p){
   off_t cursor=input_time_seek_rel(-60);
   char time[14];
@@ -284,13 +296,14 @@
                            gpointer in){
   postfish_mainpanel *p=in;
 
+#if 0
   fprintf(stderr,"keypress: M%d C%d S%d L%d '%x'\n",
           event->state&GDK_MOD1_MASK,
           event->state&GDK_CONTROL_MASK,
           event->state&GDK_SHIFT_MASK,
           event->state&GDK_LOCK_MASK,
           event->keyval);
-
+#endif
   /* do not capture Alt accellerators */
   if(event->state&GDK_MOD1_MASK) return FALSE;
   if(event->state&GDK_CONTROL_MASK) return FALSE;
@@ -670,6 +683,8 @@
                         G_CALLBACK (action_f), panel);
       g_signal_connect (G_OBJECT (panel->deckactive[5]), "clicked",
                         G_CALLBACK (action_ff), panel);
+      g_signal_connect (G_OBJECT (panel->deckactive[6]), "clicked",
+			G_CALLBACK (action_end), panel);
 
 
     }

<p><p>1.15      +2 -2      postfish/version.h

Index: version.h
===================================================================
RCS file: /usr/local/cvsroot/postfish/version.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- version.h	17 Oct 2003 08:27:21 -0000	1.14
+++ version.h	17 Oct 2003 08:40:18 -0000	1.15
@@ -1,2 +1,2 @@
-#define VERSION "$Id: version.h,v 1.14 2003/10/17 08:27:21 xiphmont Exp $ "
-/* DO NOT EDIT: Automated versioning hack [Fri Oct 17 04:25:26 EDT 2003] */
+#define VERSION "$Id: version.h,v 1.15 2003/10/17 08:40:18 xiphmont Exp $ "
+/* DO NOT EDIT: Automated versioning hack [Fri Oct 17 04:38:49 EDT 2003] */

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list