diff options
author | deva <deva> | 2006-04-10 13:04:31 +0000 |
---|---|---|
committer | deva <deva> | 2006-04-10 13:04:31 +0000 |
commit | 582bcd19d6a58c266f5453961c87acf72fae5353 (patch) | |
tree | 5ee3bdc1726d833da65efab320e5eabfcb802e51 /lib/frame.h | |
parent | 46b3c21f079a10e1ed072976d355a8026bcb7580 (diff) |
*** empty log message ***
Diffstat (limited to 'lib/frame.h')
-rw-r--r-- | lib/frame.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/frame.h b/lib/frame.h index 988f460..66c2ce7 100644 --- a/lib/frame.h +++ b/lib/frame.h @@ -28,12 +28,15 @@ #ifndef __FRAME_H__ #define __FRAME_H__ +#define START_USE_FRAME(x) x->usage++ +#define STOP_USE_FRAME(x) if(--x->usage == 0) delete x; x = NULL + // Definition of vector #include <vector> class Frame { public: - Frame(unsigned char *d, int sz); + Frame(unsigned char *d, int sz = 0); ~Frame(); unsigned char *data; @@ -51,6 +54,8 @@ public: char timecode[12]; bool endOfFrameStream; + + int usage; }; typedef std::vector< Frame* > FrameVector; |