Annotation of margi2/ringbuffy.h, revision 1.1.1.1

1.1       cvs         1: /* 
                      2:     cvdv.h
                      3: 
                      4:     Copyright (C) Marcus Metzler for convergence integrated media.
                      5: 
                      6:     This program is free software; you can redistribute it and/or modify
                      7:     it under the terms of the GNU General Public License as published by
                      8:     the Free Software Foundation; either version 2 of the License, or
                      9:     (at your option) any later version.
                     10: 
                     11:     This program is distributed in the hope that it will be useful,
                     12:     but WITHOUT ANY WARRANTY; without even the implied warranty of
                     13:     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     14:     GNU General Public License for more details.
                     15: 
                     16:     You should have received a copy of the GNU General Public License
                     17:     along with this program; if not, write to the Free Software
                     18:     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
                     19: */
                     20: 
                     21: #ifndef RINGBUFFY_H
                     22: #define RINGBUFFY_H
                     23: 
                     24: 
                     25: #define FULL_BUFFER  -1000
                     26: typedef struct ringbuffy{
                     27:        long read_pos;
                     28:        long write_pos;
                     29:        long size;
                     30:        char *buffy;
                     31: } ringbuffy;
                     32: 
                     33: int  ring_init (ringbuffy *rbuf, long size);
                     34: void ring_destroy(ringbuffy *rbuf);
                     35: int ring_write(ringbuffy *rbuf, const char *data, int count);
                     36: int ring_read(ringbuffy *rbuf, char *data, int count);
                     37: long ring_read_rest(ringbuffy *rbuf);
                     38: long ring_write_rest(ringbuffy *rbuf);
                     39: void ring_flush(ringbuffy *rbuf);
                     40: int ring_read_direct(ringbuffy *rbuf, int addr, int count);
                     41: 
                     42: #endif /* RINGBUFFY_H */

LinuxTV legacy CVS <linuxtv.org/cvs>