summaryrefslogtreecommitdiffstats
path: root/ext/mplex/vector.cc
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2002-10-24 22:37:51 +0000
committerWim Taymans <wim.taymans@gmail.com>2002-10-24 22:37:51 +0000
commit1496394c0f4be1a718fb189846c6350cbd9e43da (patch)
tree7f839063fd206ad3db102a7a20c336d0c8423295 /ext/mplex/vector.cc
parent440801dd9e53284925575c2170b53bf947522414 (diff)
downloadgst-plugins-bad-1496394c0f4be1a718fb189846c6350cbd9e43da.tar.gz
gst-plugins-bad-1496394c0f4be1a718fb189846c6350cbd9e43da.tar.bz2
gst-plugins-bad-1496394c0f4be1a718fb189846c6350cbd9e43da.zip
First stab at porting mplex
Original commit message from CVS: First stab at porting mplex
Diffstat (limited to 'ext/mplex/vector.cc')
-rw-r--r--ext/mplex/vector.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/mplex/vector.cc b/ext/mplex/vector.cc
new file mode 100644
index 00000000..343b6284
--- /dev/null
+++ b/ext/mplex/vector.cc
@@ -0,0 +1,23 @@
+#include <config.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "mjpeg_types.h"
+#include "vector.hh"
+
+
+AUStream::AUStream ():
+cur_rd (0), cur_wr (0), totalctr (0), size (0), buf (0)
+{
+ buf = new (Aunit *)[AUStream::BUF_SIZE];
+}
+
+
+void
+AUStream::init (Aunit * rec)
+{
+ buf[cur_wr] = rec;
+ ++cur_wr;
+ cur_wr = cur_wr >= AUStream::BUF_SIZE ? 0 : cur_wr;
+ cur_rd = cur_wr;
+}