diff options
author | David Schleef <ds@schleef.org> | 2003-07-27 05:24:15 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2003-07-27 05:24:15 +0000 |
commit | d1f62e8a4f976e11634d2f9187821e8686cec76d (patch) | |
tree | 7aeb45681425dc71469510056d67f4aa20d3574b /ext/mplex/vector.hh | |
parent | a10432d76cb431d03e27b97d790d2ba7ae34f4b8 (diff) | |
download | gst-plugins-bad-d1f62e8a4f976e11634d2f9187821e8686cec76d.tar.gz gst-plugins-bad-d1f62e8a4f976e11634d2f9187821e8686cec76d.tar.bz2 gst-plugins-bad-d1f62e8a4f976e11634d2f9187821e8686cec76d.zip |
Moved to gst-libs/ext/mplex
Original commit message from CVS:
Moved to gst-libs/ext/mplex
Diffstat (limited to 'ext/mplex/vector.hh')
-rw-r--r-- | ext/mplex/vector.hh | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/ext/mplex/vector.hh b/ext/mplex/vector.hh deleted file mode 100644 index 9a4f0413..00000000 --- a/ext/mplex/vector.hh +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef __AUSTREAM_H__ -#define __AUSTREAM_H__ - -#include <config.h> -#include <deque> -#include "mjpeg_logging.h" -#include "aunit.hh" - -class AUStream -{ -public: - AUStream (); - - void init (Aunit * rec); - - void append (Aunit & rec) - { - if (size == BUF_SIZE) - mjpeg_error_exit1 ("INTERNAL ERROR: AU buffer overflow"); - *buf[cur_wr] = rec; - ++size; - ++cur_wr; - cur_wr = cur_wr >= BUF_SIZE ? 0 : cur_wr; - } - - inline Aunit *next () - { - if (size == 0) { - return 0; - } else { - Aunit *ret; - - ret = buf[cur_rd]; - ++cur_rd; - ++totalctr; - --size; - cur_rd = cur_rd >= BUF_SIZE ? 0 : cur_rd; - return ret; - } - } - - inline Aunit *lookahead () - { - return size == 0 ? 0 : buf[cur_rd]; - } - - inline Aunit *last () - { - int i = cur_wr - 1 < 0 ? BUF_SIZE - 1 : cur_wr - 1; - - return buf[i]; - } - - static const unsigned int BUF_SIZE = 128; - - inline unsigned int current () - { - return totalctr; - } -//private: - unsigned int cur_rd; - unsigned int cur_wr; - unsigned int totalctr; - unsigned int size; - Aunit **buf; -}; - - - - -#endif // __AUSTREAM_H__ |