diff options
author | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-10-27 15:19:15 +0000 |
---|---|---|
committer | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-10-27 15:19:15 +0000 |
commit | 29d2e46787bee6bc3a951734d40a215088d58692 (patch) | |
tree | ee86c41aec5a5d762f06e08149e8086f2d569c6f /rMD-exp/include | |
parent | 1849f72f524948dddc02e530f7bfaa108a107ef1 (diff) |
image cache loading ,almost fuctional
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@123 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'rMD-exp/include')
-rw-r--r-- | rMD-exp/include/recordmydesktop.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/rMD-exp/include/recordmydesktop.h b/rMD-exp/include/recordmydesktop.h index e0eb0d9..0eafa01 100644 --- a/rMD-exp/include/recordmydesktop.h +++ b/rMD-exp/include/recordmydesktop.h @@ -268,6 +268,7 @@ typedef struct _ProgData{ //default 4+4+2+2+2=14!bad! //me add pad, make god of 2 happy! typedef struct _FrameHeader{ + char frame_prefix[4];//always FRAM u_int32_t frameno,//number of frame(cached frames) current_total;//number of frames that should have been //taken at time of caching this one @@ -562,6 +563,24 @@ int capture_busy, free(t_buf);\ };\ +#define INIT_FRAME(frame_t,fheader_t,yuv_t){\ + (frame_t)->header=(fheader_t);\ + (frame_t)->YBlocks=malloc(256);\ + (frame_t)->UBlocks=malloc(64);\ + (frame_t)->VBlocks=malloc(64);\ + (frame_t)->YData=malloc((yuv_t)->y_width*(yuv_t)->y_height);\ + (frame_t)->UData=malloc((yuv_t)->uv_width*(yuv_t)->uv_height);\ + (frame_t)->VData=malloc((yuv_t)->uv_width*(yuv_t)->uv_height);\ +}; + +#define CLEAR_FRAME(frame_t){\ + free((frame_t)->YBlocks);\ + free((frame_t)->UBlocks);\ + free((frame_t)->VBlocks);\ + free((frame_t)->YData);\ + free((frame_t)->UData);\ + free((frame_t)->VData);\ +}; /**Function prototypes*/ |