summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rMD-exp/include/recordmydesktop.h5
-rw-r--r--rMD-exp/src/cache_frame.c2
-rw-r--r--rMD-exp/src/poll_damage.c2
-rw-r--r--rMD-exp/src/recordmydesktop.c7
4 files changed, 11 insertions, 5 deletions
diff --git a/rMD-exp/include/recordmydesktop.h b/rMD-exp/include/recordmydesktop.h
index 0e2f892..9c55caf 100644
--- a/rMD-exp/include/recordmydesktop.h
+++ b/rMD-exp/include/recordmydesktop.h
@@ -304,8 +304,9 @@ unsigned char Yr[256],Yg[256],Yb[256],
Vr[256],Vg[256],Vb[256];
//the following values are of no effect
//but they might be usefull later for profiling
-unsigned int frames_total,//frames calculated by total time expirations
- frames_lost;//the value of shame
+unsigned int inserts,//total insertions in the lists
+ frames_total,//frames calculated by total time expirations
+ frames_lost;//the value of shame
//used to determine frame drop which can
//happen on failure to receive a signal over a condition variable
int capture_busy,
diff --git a/rMD-exp/src/cache_frame.c b/rMD-exp/src/cache_frame.c
index 6f97723..8a1e0ca 100644
--- a/rMD-exp/src/cache_frame.c
+++ b/rMD-exp/src/cache_frame.c
@@ -189,7 +189,7 @@ void *CacheImageBuffer(void *pdata){
free(yuv[i].u);
free(yuv[i].v);
}
- fprintf(stderr,"Saved %d frames in a total of %d requests",frameno,frames_total);
+// fprintf(stderr,"Saved %d frames in a total of %d requests",frameno,frames_total);
gzclose(fp);
pthread_exit(&errno);
}
diff --git a/rMD-exp/src/poll_damage.c b/rMD-exp/src/poll_damage.c
index 5433bbc..73742f5 100644
--- a/rMD-exp/src/poll_damage.c
+++ b/rMD-exp/src/poll_damage.c
@@ -31,7 +31,7 @@ void *PollDamage(void *pdata){
Damage damage;
XEvent event;
- int inserts=0;
+ inserts=0;
damage= XDamageCreate( ((ProgData *)pdata)->dpy, ((ProgData *)pdata)->brwin.windowid, XDamageReportRawRectangles);
diff --git a/rMD-exp/src/recordmydesktop.c b/rMD-exp/src/recordmydesktop.c
index c6b059a..24037ce 100644
--- a/rMD-exp/src/recordmydesktop.c
+++ b/rMD-exp/src/recordmydesktop.c
@@ -208,6 +208,8 @@ int main(int argc,char **argv){
pthread_join(image_capture_t,NULL);
fprintf(stderr,"Shutting down.");
+ //if no damage events have been received the thread will get stuck
+ pthread_cond_broadcast(&pdata.image_buffer_ready);
if(pdata.args.encOnTheFly)
pthread_join(image_encode_t,NULL);
else
@@ -257,7 +259,10 @@ int main(int argc,char **argv){
shmctl (shminfo.shmid, IPC_RMID, 0);
}
fprintf(stderr,"\n");
- XCloseDisplay(pdata.dpy);
+
+ if(pdata.args.full_shots || inserts!=1)//otherwise it will hang
+ XCloseDisplay(pdata.dpy);
+
/** Encoding */
© All Rights Reserved