"Fossies" - the Fresh Open Source Software Archive

Member "motion-Release-4.3.0/src/stream.h" (14 Jan 2020, 1551 Bytes) of package /linux/misc/motion-Release-4.3.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "stream.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  *      stream.h
    3  *
    4  *      Include file for stream.c
    5  *      Copyright (C) 2002 Jeroen Vreeken (pe1rxq@amsat.org)
    6  *
    7  *      This program is free software; you can redistribute it and/or modify
    8  *      it under the terms of the GNU General Public License as published by
    9  *      the Free Software Foundation; either version 2 of the License, or
   10  *      (at your option) any later version.
   11  *
   12  *      This program is distributed in the hope that it will be useful,
   13  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
   14  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15  *      GNU General Public License for more details.
   16  *
   17  *      You should have received a copy of the GNU General Public License
   18  *      along with this program; if not, write to the Free Software
   19  *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   20  */
   21 #ifndef _INCLUDE_STREAM_H_
   22 #define _INCLUDE_STREAM_H_
   23 
   24 struct stream_buffer {
   25     unsigned char *ptr;
   26     int ref;
   27     long size;
   28 };
   29 
   30 struct stream {
   31     int socket;
   32     FILE *fwrite;
   33     struct stream_buffer *tmpbuffer;
   34     char *cors_header;
   35     long filepos;
   36     int nr;
   37     unsigned long int last;
   38     struct stream *prev;
   39     struct stream *next;
   40 };
   41 
   42 int stream_init(struct stream *stm,
   43                 int port,
   44                 int localhost,
   45                 int ipv6_enabled,
   46                 const char *cors_header);
   47 void stream_put(struct context *, struct stream *, int *, unsigned char *, int);
   48 void stream_stop(struct stream *);
   49 
   50 #endif /* _INCLUDE_STREAM_H_ */