gmerlin
filters.h
00001 /*****************************************************************
00002  * gmerlin - a general purpose multimedia framework and applications
00003  *
00004  * Copyright (c) 2001 - 2011 Members of the Gmerlin project
00005  * gmerlin-general@lists.sourceforge.net
00006  * http://gmerlin.sourceforge.net
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, either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00020  * *****************************************************************/
00021 
00022 
00023 #include <gavl/gavl.h>
00024 #include <gmerlin/bggavl.h>
00025 #include <gmerlin/plugin.h>
00026 
00027 
00028 
00041 typedef struct bg_audio_filter_chain_s bg_audio_filter_chain_t;
00042 
00049 typedef struct bg_video_filter_chain_s bg_video_filter_chain_t;
00050 
00051 /* Audio */
00052 
00060 bg_audio_filter_chain_t *
00061 bg_audio_filter_chain_create(const bg_gavl_audio_options_t * opt,
00062                              bg_plugin_registry_t * plugin_reg);
00063 
00072 const bg_parameter_info_t *
00073 bg_audio_filter_chain_get_parameters(bg_audio_filter_chain_t * ch);
00074 
00085 void bg_audio_filter_chain_set_parameter(void * data,
00086                                          const char * name,
00087                                          const bg_parameter_value_t * val);
00088 
00098 int bg_audio_filter_chain_need_restart(bg_audio_filter_chain_t * ch);
00099 
00100 
00101 
00111 void bg_audio_filter_chain_connect_input(bg_audio_filter_chain_t * ch,
00112                                          bg_read_audio_func_t func,
00113                                          void * priv,
00114                                          int stream);
00115 
00122 int bg_audio_filter_chain_init(bg_audio_filter_chain_t * ch,
00123                                const gavl_audio_format_t * in_format,
00124                                gavl_audio_format_t * out_format);
00125 
00131 void bg_audio_filter_chain_set_input_format(bg_audio_filter_chain_t * ch,
00132                                             const gavl_audio_format_t * in_format);
00133 
00143 int bg_audio_filter_chain_set_out_format(bg_audio_filter_chain_t * ch,
00144                                           const gavl_audio_format_t * out_format);
00145 
00154 int bg_audio_filter_chain_read(void * priv, gavl_audio_frame_t* frame,
00155                                int stream,
00156                                int num_samples);
00157 
00162 void bg_audio_filter_chain_destroy(bg_audio_filter_chain_t * ch);
00163 
00171 void bg_audio_filter_chain_lock(bg_audio_filter_chain_t * ch);
00172 
00180 void bg_audio_filter_chain_unlock(bg_audio_filter_chain_t * ch);
00181 
00188 void bg_audio_filter_chain_reset(bg_audio_filter_chain_t * ch);
00189 
00190 /* Video */
00191 
00199 bg_video_filter_chain_t *
00200 bg_video_filter_chain_create(const bg_gavl_video_options_t * opt,
00201                              bg_plugin_registry_t * plugin_reg);
00202 
00211 const bg_parameter_info_t *
00212 bg_video_filter_chain_get_parameters(bg_video_filter_chain_t * ch);
00213 
00225 void bg_video_filter_chain_set_parameter(void * data, const char * name,
00226                                          const bg_parameter_value_t * val);
00227 
00237 int bg_video_filter_chain_need_restart(bg_video_filter_chain_t * ch);
00238 
00239 
00249 void bg_video_filter_chain_connect_input(bg_video_filter_chain_t * ch,
00250                                          bg_read_video_func_t func,
00251                                          void * priv, int stream);
00252 
00259 int bg_video_filter_chain_init(bg_video_filter_chain_t * ch,
00260                                const gavl_video_format_t * in_format,
00261                                gavl_video_format_t * out_format);
00262 
00268 void bg_video_filter_chain_set_input_format(bg_video_filter_chain_t * ch,
00269                                            const gavl_video_format_t * in_format);
00270 
00279 int bg_video_filter_chain_set_out_format(bg_video_filter_chain_t * ch,
00280                                           const gavl_video_format_t * out_format);
00281 
00282 
00290 int bg_video_filter_chain_read(void * priv, gavl_video_frame_t* frame,
00291                                int stream);
00292 
00297 void bg_video_filter_chain_destroy(bg_video_filter_chain_t * ch);
00298 
00306 void bg_video_filter_chain_lock(bg_video_filter_chain_t * ch);
00307 
00315 void bg_video_filter_chain_unlock(bg_video_filter_chain_t * ch);
00316 
00323 void bg_video_filter_chain_reset(bg_video_filter_chain_t * ch);
00324