blob: 343b6284f8100d6a80a5d9a83f90a7f5273ed7d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
}
|