summaryrefslogtreecommitdiffstats
path: root/gst-libs/ext/mplex/vector.cc
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-07-26 03:01:58 +0000
committerDavid Schleef <ds@schleef.org>2003-07-26 03:01:58 +0000
commit2f0cc8ec30e8c26fed7b2c9ac2614c9a7655fb65 (patch)
tree25c3fbda1c8f8f5a33cad05c78b40887be7d2fba /gst-libs/ext/mplex/vector.cc
parent4df5590ec318054389219b84153cce0ce363613b (diff)
downloadgst-plugins-bad-2f0cc8ec30e8c26fed7b2c9ac2614c9a7655fb65.tar.gz
gst-plugins-bad-2f0cc8ec30e8c26fed7b2c9ac2614c9a7655fb65.tar.bz2
gst-plugins-bad-2f0cc8ec30e8c26fed7b2c9ac2614c9a7655fb65.zip
Moved from gst-plugins/ext/mplex/. See that directory for older changelogs.
Original commit message from CVS: Moved from gst-plugins/ext/mplex/. See that directory for older changelogs.
Diffstat (limited to 'gst-libs/ext/mplex/vector.cc')
-rw-r--r--gst-libs/ext/mplex/vector.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/gst-libs/ext/mplex/vector.cc b/gst-libs/ext/mplex/vector.cc
new file mode 100644
index 00000000..343b6284
--- /dev/null
+++ b/gst-libs/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;
+}