00001 /* output_plugin.h 00002 * Copyright (C) 1999-2002 Andy Lo A Foe <andy@alsaplayer.org> 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 * 00018 * 00019 * 00020 * $Id: output_plugin.h,v 1.8 2003/04/08 15:14:58 adnans Exp $ 00021 * 00022 */ 00023 00024 #ifndef __output_plugin_h__ 00025 #define __output_plugin_h__ 00026 00027 #define OUTPUT_PLUGIN_BASE_VERSION 0x1000 00028 #define OUTPUT_PLUGIN_VERSION (OUTPUT_PLUGIN_BASE_VERSION + 6) 00029 00030 typedef int output_version_type; 00031 typedef int(*output_init_type)(void); 00032 typedef int(*output_open_type)(const char *path); 00033 typedef void(*output_close_type)(void); 00034 typedef int(*output_write_type)(void *data, int byte_count); 00035 typedef int(*output_start_callbacks_type)(void *data); 00036 typedef int(*output_set_buffer_type)(int *frag_size, int *frag_count, int *channels); 00037 typedef unsigned int(*output_set_sample_rate_type)(unsigned int rate); 00038 typedef int(*output_get_queue_count_type)(void); 00039 typedef int(*output_get_latency_type)(void); 00040 00041 typedef struct _output_plugin 00042 { 00046 output_version_type version; 00047 00051 char *name; 00052 00056 char *author; 00057 00062 output_init_type init; 00063 00070 output_open_type open; 00071 00075 output_close_type close; 00076 00085 output_write_type write; 00086 00092 output_start_callbacks_type start_callbacks; 00093 00105 output_set_buffer_type set_buffer; 00106 00113 output_set_sample_rate_type set_sample_rate; 00114 00119 output_get_queue_count_type get_queue_count; 00120 00125 output_get_latency_type get_latency; 00126 } output_plugin; 00127 00128 typedef output_plugin*(*output_plugin_info_type)(void); 00129 00130 #endif