output.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 #                                                                              #
00003 #      MJPG-streamer allows to stream JPG frames from an input-plugin          #
00004 #      to several output plugins                                               #
00005 #                                                                              #
00006 #      Copyright (C) 2007 Tom Stöveken                                         #
00007 #                                                                              #
00008 # This program is free software; you can redistribute it and/or modify         #
00009 # it under the terms of the GNU General Public License as published by         #
00010 # the Free Software Foundation; version 2 of the License.                      #
00011 #                                                                              #
00012 # This program is distributed in the hope that it will be useful,              #
00013 # but WITHOUT ANY WARRANTY; without even the implied warranty of               #
00014 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
00015 # GNU General Public License for more details.                                 #
00016 #                                                                              #
00017 # You should have received a copy of the GNU General Public License            #
00018 # along with this program; if not, write to the Free Software                  #
00019 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    #
00020 #                                                                              #
00021 *******************************************************************************/
00022 
00023 #include "mjpg_streamer.h"
00024 #define OUTPUT_PLUGIN_PREFIX " o: "
00025 #define OPRINT(...) { char _bf[1024] = {0}; snprintf(_bf, sizeof(_bf)-1, __VA_ARGS__); fprintf(stderr, "%s", OUTPUT_PLUGIN_PREFIX); fprintf(stderr, "%s", _bf); syslog(LOG_INFO, "%s", _bf); }
00026 
00027 /* parameters for output plugin */
00028 typedef struct _output_parameter output_parameter;
00029 struct _output_parameter {
00030     int id;
00031     char *parameters;
00032     int argc;
00033     char *argv[MAX_PLUGIN_ARGUMENTS];
00034     struct _globals *global;
00035 };
00036 
00037 
00038 
00039 /* structure to store variables/functions for output plugin */
00040 typedef struct _output output;
00041 struct _output {
00042     char *plugin;
00043     void *handle;
00044     output_parameter param;
00045 
00046     // input plugin parameters
00047     struct _control *out_parameters;
00048     int parametercount;
00049 
00050     int (*init)(output_parameter *param, int id);
00051     int (*stop)(int);
00052     int (*run)(int);
00053     int (*cmd)(int plugin, unsigned int control_id, unsigned int group, int value);
00054 };
00055 


corobot_pantilt
Author(s):
autogenerated on Sun Oct 5 2014 23:18:21