Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=78da24db4176b3cd640d072d7469c0e964902853

commit 78da24db4176b3cd640d072d7469c0e964902853
Author: crazy <[EMAIL PROTECTED]>
Date:   Tue Feb 12 00:23:44 2008 +0100

recordmydesktop-0.3.7.2-2-i686
* added patch from upstream to fix xcb issues

diff --git a/source/xapps-extra/recordmydesktop/FrugalBuild 
b/source/xapps-extra/recordmydesktop/FrugalBuild
index 56d3214..ff4c72c 100644
--- a/source/xapps-extra/recordmydesktop/FrugalBuild
+++ b/source/xapps-extra/recordmydesktop/FrugalBuild
@@ -3,12 +3,14 @@

pkgname=recordmydesktop
pkgver=0.3.7.2
-pkgrel=1
+pkgrel=2
pkgdesc="recordMyDesktop is a program that captures audio-video data of a linux 
desktop session."
depends=('libsm' 'libxext' 'libice' 'libxdamage' 'libvorbis' 'libtheora' 'zlib' 
'alsa-lib' 'libx11' 'libxfixes' 'libpng')
groups=('xapps-extra')
archs=('i686' 'x86_64')
Finclude sourceforge
-sha1sums=('c86a8ac75a1824a5c3ed1afdaa9f01e2118ae355')
+source=($source fix-xcb-patch4.diff)
+sha1sums=('c86a8ac75a1824a5c3ed1afdaa9f01e2118ae355' \
+          'fdc2a7844d188820ea6f212a910939ff55c96b9f')

# optimization OK
diff --git a/source/xapps-extra/recordmydesktop/fix-xcb-patch4.diff 
b/source/xapps-extra/recordmydesktop/fix-xcb-patch4.diff
new file mode 100644
index 0000000..a60c23c
--- /dev/null
+++ b/source/xapps-extra/recordmydesktop/fix-xcb-patch4.diff
@@ -0,0 +1,340 @@
+? Makefile
+? Makefile.in
+? aclocal.m4
+? autom4te.cache
+? compile
+? config.guess
+? config.h
+? config.h.in
+? config.log
+? config.status
+? config.sub
+? configure
+? depcomp
+? install-sh
+? missing
+? mkinstalldirs
+? patch2.diff
+? patch3.diff
+? patch4.diff
+? stamp-h1
+? doc/Makefile
+? doc/Makefile.in
+? include/.rmdfunc.h.swp
+? include/.rmdtypes.h.swp
+? include/Makefile
+? include/Makefile.in
+? src/.deps
+? src/Makefile
+? src/Makefile.in
+? src/recordmydesktop
+Index: include/rmdfunc.h
+===================================================================
+RCS file: /cvsroot/recordmydesktop/recordmydesktop/include/rmdfunc.h,v
+retrieving revision 1.17
+diff -u -r1.17 rmdfunc.h
+--- include/rmdfunc.h  13 Dec 2007 16:08:46 -0000      1.17
++++ include/rmdfunc.h  10 Feb 2008 18:25:13 -0000
+@@ -41,7 +41,11 @@
+ * and pickup key events for shortcuts.
+ * \param pdata ProgData struct containing all program data
+ */
+-void *PollEvents(ProgData *pdata);
++//void *PollEvents(ProgData *pdata);
++void InitEventsPolling(ProgData *pdata);
++
++
++void EventLoop(ProgData *pdata);
+
+ /**
+ * Loop ,signal timer cond var,sleep-\
+Index: include/rmdtypes.h
+===================================================================
+RCS file: /cvsroot/recordmydesktop/recordmydesktop/include/rmdtypes.h,v
+retrieving revision 1.23
+diff -u -r1.23 rmdtypes.h
+--- include/rmdtypes.h 13 Dec 2007 14:53:02 -0000      1.23
++++ include/rmdtypes.h 10 Feb 2008 18:25:13 -0000
+@@ -270,7 +270,7 @@
+     ProgArgs args;          //the program arguments
+     DisplaySpecs specs;     //Display specific information
+     BRWindow brwin;         //recording window
+-    RectArea *rect_root[2]; //the interchanging list roots for storing
++    RectArea *rect_root;    //the interchanging list roots for storing
+                             //the changed regions
+     SndBuffer   *sound_buffer;
+     EncData     *enc_data;
+@@ -283,9 +283,7 @@
+ /**X related info*/
+     Display *dpy;           //curtrent display
+ /** Mutexes*/
+-    pthread_mutex_t list_mutex[2],  //mutexes for concurrency
+-                                    //protection of the lists
+-                    sound_buffer_mutex,
++    pthread_mutex_t sound_buffer_mutex,
+                     snd_buff_ready_mutex,
+                     img_buff_ready_mutex,
+                     theora_lib_mutex,
+@@ -322,8 +320,7 @@
+                 frametime;  //time that a frame lasts (microsecs)
+     char    *window_manager;   //name of the window manager at program launch
+     Window  shaped_w;       //frame
+-    int list_selector,      //selector for the rect_roots
+-        damage_event,       //damage event base code
++    int damage_event,       //damage event base code
+         damage_error,       //damage error base code
+         shm_opcode,         //MIT-Shm opcode
+         running,            //1 while the program is capturing/paused/encoding
+Index: src/get_frame.c
+===================================================================
+RCS file: /cvsroot/recordmydesktop/recordmydesktop/src/get_frame.c,v
+retrieving revision 1.34
+diff -u -r1.34 get_frame.c
+--- src/get_frame.c    5 Dec 2007 14:11:44 -0000       1.34
++++ src/get_frame.c    10 Feb 2008 18:25:15 -0000
+@@ -130,7 +130,6 @@
+
+ void *GetFrame(ProgData *pdata){
+     int i=0,
+-        tlist_sel=0,
+         blocknum_x=pdata->enc_data->yuv.y_width/Y_UNIT_WIDTH,
+         blocknum_y=pdata->enc_data->yuv.y_height/Y_UNIT_WIDTH;
+     unsigned int msk_ret;
+@@ -202,6 +201,8 @@
+     mouse_pos_abs.width=mouse_pos_temp.width=pdata->dummy_p_size;
+     mouse_pos_abs.height=mouse_pos_temp.height=pdata->dummy_p_size;
+
++    InitEventsPolling(pdata);
++
+     while(pdata->running){
+
+         //if we are left behind we must not wait.
+@@ -212,22 +213,21 @@
+             pthread_cond_wait(&pdata->time_cond,&time_mutex);
+             pthread_mutex_unlock(&time_mutex);
+             if(Paused){
+-                pthread_mutex_lock(&pause_mutex);
+-                pthread_cond_wait(&pdata->pause_cond,&pause_mutex);
+-                pthread_mutex_unlock(&pause_mutex);
++                EventLoop(pdata);
++                continue;
++//                pthread_mutex_lock(&pause_mutex);
++  //              pthread_cond_wait(&pdata->pause_cond,&pause_mutex);
++     //           pthread_mutex_unlock(&pause_mutex);
+             }
+         }
++        EventLoop(pdata);
+         if(d_buff)
+             img_sel=(img_sel)?0:1;
+         capture_busy=1;
+
+         BRWinCpy(&temp_brwin,&pdata->brwin);
+-        //mutexes and lists with changes are useless when full_shots is 
enabled
+-        if(!pdata->args.full_shots){
+-            tlist_sel=pdata->list_selector;
+-            pdata->list_selector=((pdata->list_selector+1)%2);
+-            pthread_mutex_lock(&pdata->list_mutex[tlist_sel]);
+-        }
++
++
+         if(pdata->args.xfixes_cursor ||
+            pdata->args.have_dummy_cursor||
+            pdata->args.follow_mouse){
+@@ -244,7 +244,7 @@
+                     (mouse_pos_temp.y>=0)&&
+                     (mouse_pos_temp.width>0)&&
+                     (mouse_pos_temp.height>0))
+-                    RectInsert(&pdata->rect_root[tlist_sel],&mouse_pos_temp);
++                    RectInsert(&pdata->rect_root,&mouse_pos_temp);
+             }
+             //find new one
+             if(pdata->args.xfixes_cursor){
+@@ -284,7 +284,7 @@
+             UpdateImage(pdata->dpy,
+                         &pdata->enc_data->yuv,
+                         &pdata->specs,
+-                        &pdata->rect_root[tlist_sel],
++                        &pdata->rect_root,
+                         &temp_brwin,
+                         pdata->enc_data,
+                         image->data,
+@@ -292,7 +292,7 @@
+                         &shminfo,
+                         pdata->shm_opcode,
+                         pdata->args.no_quick_subsample);
+-            BlocksFromList(&pdata->rect_root[tlist_sel],
++            BlocksFromList(&pdata->rect_root,
+                            temp_brwin.rgeom.x,
+                            temp_brwin.rgeom.y,
+                            pdata->enc_data->yuv.y_width/Y_UNIT_WIDTH,
+@@ -409,8 +409,7 @@
+             }
+         }
+         if(!pdata->args.full_shots){
+-            ClearList(&pdata->rect_root[tlist_sel]);
+-            pthread_mutex_unlock(&pdata->list_mutex[tlist_sel]);
++            ClearList(&pdata->rect_root);
+         }
+         if(encoder_busy){
+             frames_lost++;
+Index: src/initialize_data.c
+===================================================================
+RCS file: /cvsroot/recordmydesktop/recordmydesktop/src/initialize_data.c,v
+retrieving revision 1.18
+diff -u -r1.18 initialize_data.c
+--- src/initialize_data.c      13 Dec 2007 14:53:02 -0000      1.18
++++ src/initialize_data.c      10 Feb 2008 18:25:15 -0000
+@@ -62,9 +62,7 @@
+         pdata->dummy_p_size=0;
+
+
+-    pdata->rect_root[0]=pdata->rect_root[1]=NULL;
+-    pthread_mutex_init(&pdata->list_mutex[0],NULL);
+-    pthread_mutex_init(&pdata->list_mutex[1],NULL);
++    pdata->rect_root=NULL;
+     pthread_mutex_init(&pdata->sound_buffer_mutex,NULL);
+     pthread_mutex_init(&pdata->snd_buff_ready_mutex,NULL);
+     pthread_mutex_init(&pdata->img_buff_ready_mutex,NULL);
+@@ -82,7 +80,7 @@
+     pthread_cond_init(&pdata->theora_lib_clean,NULL);
+     pthread_cond_init(&pdata->vorbis_lib_clean,NULL);
+     pdata->th_encoding_clean=pdata->v_encoding_clean=1;
+-    pdata->list_selector=Paused=Aborted=pdata->avd=0;
++    Paused=Aborted=pdata->avd=0;
+     pdata->sound_buffer=NULL;
+     pdata->running=1;
+     time_cond=&pdata->time_cond;
+Index: src/poll_events.c
+===================================================================
+RCS file: /cvsroot/recordmydesktop/recordmydesktop/src/poll_events.c,v
+retrieving revision 1.3
+diff -u -r1.3 poll_events.c
+--- src/poll_events.c  1 Dec 2007 02:56:19 -0000       1.3
++++ src/poll_events.c  10 Feb 2008 18:25:15 -0000
+@@ -40,14 +40,12 @@
+ #include <rmdmacro.h>
+
+
+-void *PollEvents(ProgData *pdata){
++void InitEventsPolling(ProgData *pdata){
+     Window root_return,
+            parent_return,
+            *children;
+     unsigned int i,
+-                 nchildren,
+-                 inserts=0;
+-    XEvent event;
++                 nchildren;
+
+
+     XSelectInput (pdata->dpy,pdata->specs.root, SubstructureNotifyMask);
+@@ -78,7 +76,17 @@
+     }
+
+
+-    while(pdata->running){
++
++//    pthread_exit(&errno);
++}
++
++
++void EventLoop(ProgData *pdata){
++    int inserts=0;
++
++    XEvent event;
++
++    while(XPending(pdata->dpy)){
+         XNextEvent(pdata->dpy,&event);
+         if(event.type == KeyPress){
+             XKeyEvent *e=(XKeyEvent *)(&event);
+@@ -146,10 +154,7 @@
+                 if((wgeom.x>=0)&&(wgeom.y>=0)&&
+                    (wgeom.width>0)&&(wgeom.height>0)){
+
+-                    int tlist_sel=pdata->list_selector;
+-                    pthread_mutex_lock(&pdata->list_mutex[tlist_sel]);
+-                    inserts+=RectInsert(&pdata->rect_root[tlist_sel],&wgeom);
+-                    pthread_mutex_unlock(&pdata->list_mutex[tlist_sel]);
++                    inserts+=RectInsert(&pdata->rect_root,&wgeom);
+
+                 }
+             }
+@@ -157,6 +162,7 @@
+
+     }
+
+-    pthread_exit(&errno);
++
+ }
+
++
+Index: src/rmd_timer.c
+===================================================================
+RCS file: /cvsroot/recordmydesktop/recordmydesktop/src/rmd_timer.c,v
+retrieving revision 1.3
+diff -u -r1.3 rmd_timer.c
+--- src/rmd_timer.c    6 Dec 2007 18:42:45 -0000       1.3
++++ src/rmd_timer.c    10 Feb 2008 18:25:15 -0000
+@@ -64,10 +64,12 @@
+             if(capture_busy){
+                 frames_lost++;
+             }
+-            pthread_mutex_lock(&time_mutex);
+-            pthread_cond_broadcast(time_cond);
+-            pthread_mutex_unlock(&time_mutex);
+         }
++
++        pthread_mutex_lock(&time_mutex);
++        pthread_cond_broadcast(time_cond);
++        pthread_mutex_unlock(&time_mutex);
++
+
+         if(secs_tw)
+             sleep(secs_tw);
+Index: src/rmdthreads.c
+===================================================================
+RCS file: /cvsroot/recordmydesktop/recordmydesktop/src/rmdthreads.c,v
+retrieving revision 1.7
+diff -u -r1.7 rmdthreads.c
+--- src/rmdthreads.c   2 Dec 2007 09:07:24 -0000       1.7
++++ src/rmdthreads.c   10 Feb 2008 18:25:16 -0000
+@@ -48,7 +48,7 @@
+                 sound_cache_t,
+                 flush_to_ogg_t,
+                 timer_t;
+-    Window dummy_w;
++ //   Window dummy_w;
+
+     if(pdata->args.delay>0){
+         fprintf(stderr,"Will sleep for %d seconds now.\n",pdata->args.delay);
+@@ -56,10 +56,10 @@
+     }
+
+     /*start threads*/
+-    pthread_create(&poll_events_t,
++ /*   pthread_create(&poll_events_t,
+                    NULL,
+                    (void *)PollEvents,
+-                   (void *)pdata);
++                   (void *)pdata);*/
+     pthread_create(&image_capture_t,
+                    NULL,
+                    (void *)GetFrame,
+@@ -170,7 +170,7 @@
+      * The second XFlush should be unnecesary.
+      */
+
+-    dummy_w=XCreateSimpleWindow(pdata->dpy,
++/*    dummy_w=XCreateSimpleWindow(pdata->dpy,
+                                 pdata->specs.root,
+                                 1,1,1,1,0,
+                                 pdata->specs.bpixel,
+@@ -180,7 +180,7 @@
+     XFlush(pdata->dpy);
+
+     pthread_join(poll_events_t,NULL);
+-
++*/
+     //Now that we are done with recording we cancel the timer
+     pdata->timer_alive=0;
+     pthread_join(timer_t,NULL);
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to