summaryrefslogtreecommitdiff
path: root/recordmydesktop
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2008-02-11 17:28:01 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2008-02-11 17:28:01 +0000
commit9d5a21e329695522bc4b3ec7150686c5f493be29 (patch)
tree0a1b63e40b9a4831472d9c0e88a43b1a1563cdea /recordmydesktop
parentc581601ea3f669226770a6c6625b9a40c9da0c83 (diff)
src/get_frame.c: added some comments
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@493 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop')
-rw-r--r--recordmydesktop/src/get_frame.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/recordmydesktop/src/get_frame.c b/recordmydesktop/src/get_frame.c
index 6e8463d..162094b 100644
--- a/recordmydesktop/src/get_frame.c
+++ b/recordmydesktop/src/get_frame.c
@@ -28,6 +28,8 @@
#include <recordmydesktop.h>
+//besides taking the first screenshot, this functions primary purpose is to
+//initialize the structures and memory.
int FirstFrame(ProgData *pdata,XImage **image,XShmSegmentInfo *shminfo,
char **pxl_data){
@@ -111,6 +113,8 @@ void BRWinCpy(BRWindow *target,BRWindow *source){
}
+//recenters the capture area to the mouse
+//without exiting the display bounding box
void MoveCaptureArea( BRWindow *brwin,
int cursor_x,
int cursor_y,
@@ -128,6 +132,8 @@ void MoveCaptureArea( BRWindow *brwin,
height-brwin->rgeom.height:t_y);
}
+
+
void *GetFrame(ProgData *pdata){
int i=0,
blocknum_x=pdata->enc_data->yuv.y_width/Y_UNIT_WIDTH,
@@ -200,7 +206,10 @@ void *GetFrame(ProgData *pdata){
mouse_pos_abs.y=mouse_pos_temp.y=0;
mouse_pos_abs.width=mouse_pos_temp.width=pdata->dummy_p_size;
mouse_pos_abs.height=mouse_pos_temp.height=pdata->dummy_p_size;
-
+
+ //This is the the place where we call XSelectInput
+ //and arrange so that we listen for damage on all
+ //windows
InitEventsPolling(pdata);
while(pdata->running){
@@ -213,11 +222,17 @@ void *GetFrame(ProgData *pdata){
pthread_cond_wait(&pdata->time_cond,&time_mutex);
pthread_mutex_unlock(&time_mutex);
if(Paused){
+ //this is necessary since event loop processes
+ //the shortcuts which will unpause the program
EventLoop(pdata);
continue;
}
}
+ //read all events and construct list with damage
+ //events (if not full_shots)
EventLoop(pdata);
+
+ //switch back and front buffers (full_shots only)
if(d_buff)
img_sel=(img_sel)?0:1;
capture_busy=1;
© All Rights Reserved