summaryrefslogtreecommitdiff
path: root/src/frame.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-09-20 11:53:40 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2014-09-20 11:53:40 +0200
commit808225629721c2f7d5c751edc60e5c6744be7886 (patch)
tree3d97fc3b7319b5f94e688a454de51b32321ebfd7 /src/frame.cc
parent46d4e577bceb12c9463fdf4ef1d9a9a348f13543 (diff)
First (crashing) prototype.
Diffstat (limited to 'src/frame.cc')
-rw-r--r--src/frame.cc25
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++;
}