visual.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * visual.h : Header for the visualisation system
00003  *****************************************************************************
00004  * Copyright (C) 2002-2009 the VideoLAN team
00005  * $Id: d1b20c42bfcb32365d4fa00438306f98cbb6ce88 $
00006  *
00007  * Authors: Clément Stenac <zorglub@via.ecp.fr>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 typedef struct visual_effect_t
00025 {
00026     const char *psz_name;    /* Filter name*/
00027 
00028     int        (*pf_run)( struct visual_effect_t * , vlc_object_t *,
00029                           const block_t *, picture_t *);
00030     void *     p_data; /* The effect stores whatever it wants here */
00031     int        i_width;
00032     int        i_height;
00033     char *     psz_args;
00034     int        i_nb_chans;
00035 
00036     /* Channels index */
00037     int        i_idx_left;
00038     int        i_idx_right;
00039 } visual_effect_t ;
00040 
00041 typedef struct spectrum_data
00042 {
00043     int *peaks;
00044     int *prev_heights;
00045 
00046     unsigned i_prev_nb_samples;
00047     int16_t *p_prev_s16_buff;
00048 } spectrum_data;
00049 
00050 typedef struct
00051 {
00052     int *peaks;
00053 
00054     unsigned i_prev_nb_samples;
00055     int16_t *p_prev_s16_buff;
00056 } spectrometer_data;
00057 
00058 /*****************************************************************************
00059  * aout_filter_sys_t: visualizer audio filter method descriptor
00060  *****************************************************************************
00061  * This structure is part of the audio filter descriptor.
00062  * It describes some visualizer specific variables.
00063  *****************************************************************************/
00064 struct filter_sys_t
00065 {
00066     vout_thread_t   *p_vout;
00067 
00068     int             i_width;
00069     int             i_height;
00070 
00071     int             i_effect;
00072     visual_effect_t **effect;
00073 };
00074 
00075 /* Prototypes */
00076 int scope_Run
00077         (visual_effect_t * , vlc_object_t *, const block_t *, picture_t *);
00078 int vuMeter_Run
00079         (visual_effect_t * , vlc_object_t *, const block_t *, picture_t *);
00080 int dummy_Run
00081         (visual_effect_t * , vlc_object_t *, const block_t *, picture_t *);
00082 int random_Run
00083         (visual_effect_t * , vlc_object_t *, const block_t *, picture_t *);
00084 int spectrum_Run
00085         (visual_effect_t * , vlc_object_t *, const block_t *, picture_t *);
00086 int spectrometer_Run
00087         (visual_effect_t * , vlc_object_t *, const block_t *, picture_t *);
00088 
00089 /* Default vout size */
00090 #define VOUT_WIDTH 800
00091 #define VOUT_HEIGHT 640

Generated on Tue May 25 08:05:00 2010 for VLC by  doxygen 1.5.6