diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-09-20 11:53:40 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-09-20 11:53:40 +0200 |
commit | 808225629721c2f7d5c751edc60e5c6744be7886 (patch) | |
tree | 3d97fc3b7319b5f94e688a454de51b32321ebfd7 /src/frame.cc | |
parent | 46d4e577bceb12c9463fdf4ef1d9a9a348f13543 (diff) |
First (crashing) prototype.
Diffstat (limited to 'src/frame.cc')
-rw-r--r-- | src/frame.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/frame.cc b/src/frame.cc index 4801897..38d6f0f 100644 --- a/src/frame.cc +++ b/src/frame.cc @@ -29,8 +29,33 @@ #include <stdio.h> #include <stdlib.h> +static unsigned long int ts_cnt = 0; + +Frame::Frame() +{ + data = NULL; + size = 0; + ts = 0; +} + +Frame::Frame(const Frame &frame) +{ + data = frame.data; + size = frame.size; + ts = frame.ts; +} + Frame::Frame(size_t s) { size = s; data = (char*)malloc(size); + ts = ts_cnt++; +} + +Frame::Frame(const char *d, size_t s) +{ + size = s; + data = (char*)malloc(size); + memcpy(data, d, s); + ts = ts_cnt++; } |