gmerlin
|
00001 /***************************************************************** 00002 * gmerlin - a general purpose multimedia framework and applications 00003 * 00004 * Copyright (c) 2001 - 2012 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 00135 int bg_audio_filter_chain_set_out_format(bg_audio_filter_chain_t * ch, 00136 const gavl_audio_format_t * out_format); 00137 00146 int bg_audio_filter_chain_read(void * priv, gavl_audio_frame_t* frame, 00147 int stream, 00148 int num_samples); 00149 00154 void bg_audio_filter_chain_destroy(bg_audio_filter_chain_t * ch); 00155 00163 void bg_audio_filter_chain_lock(void * ch); 00164 00172 void bg_audio_filter_chain_unlock(void * ch); 00173 00180 void bg_audio_filter_chain_reset(bg_audio_filter_chain_t * ch); 00181 00192 gavl_audio_source_t * 00193 bg_audio_filter_chain_connect(bg_audio_filter_chain_t * ch, 00194 gavl_audio_source_t * src); 00195 00196 00197 /* Video */ 00198 00206 bg_video_filter_chain_t * 00207 bg_video_filter_chain_create(const bg_gavl_video_options_t * opt, 00208 bg_plugin_registry_t * plugin_reg); 00209 00218 const bg_parameter_info_t * 00219 bg_video_filter_chain_get_parameters(bg_video_filter_chain_t * ch); 00220 00232 void bg_video_filter_chain_set_parameter(void * data, const char * name, 00233 const bg_parameter_value_t * val); 00234 00244 int bg_video_filter_chain_need_restart(bg_video_filter_chain_t * ch); 00245 00246 00256 void bg_video_filter_chain_connect_input(bg_video_filter_chain_t * ch, 00257 bg_read_video_func_t func, 00258 void * priv, int stream); 00259 00266 int bg_video_filter_chain_init(bg_video_filter_chain_t * ch, 00267 const gavl_video_format_t * in_format, 00268 gavl_video_format_t * out_format); 00269 00278 int bg_video_filter_chain_set_out_format(bg_video_filter_chain_t * ch, 00279 const gavl_video_format_t * out_format); 00280 00281 00289 int bg_video_filter_chain_read(void * priv, gavl_video_frame_t* frame, 00290 int stream); 00291 00302 gavl_video_source_t * 00303 bg_video_filter_chain_connect(bg_video_filter_chain_t * ch, 00304 gavl_video_source_t * src); 00305 00310 void bg_video_filter_chain_destroy(bg_video_filter_chain_t * ch); 00311 00319 void bg_video_filter_chain_lock(void * ch); 00320 00328 void bg_video_filter_chain_unlock(void * ch); 00329 00336 void bg_video_filter_chain_reset(bg_video_filter_chain_t * ch); 00337