]> git.sesse.net Git - vlc/blob - plugins/downmix/downmix.c
* ALL: new module API. Makes a few things a lot simpler, and we gain
[vlc] / plugins / downmix / downmix.c
1 /*****************************************************************************
2  * downmix.c : AC3 downmix module
3  *****************************************************************************
4  * Copyright (C) 1999-2001 VideoLAN
5  * $Id: downmix.c,v 1.10 2002/07/31 20:56:51 sam Exp $
6  *
7  * Authors: Renaud Dartus <reno@via.ecp.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  * 
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 /*****************************************************************************
25  * Preamble
26  *****************************************************************************/
27 #include <stdlib.h>
28 #include <string.h>
29
30 #include <vlc/vlc.h>
31
32 #include "ac3_downmix.h"
33 #include "ac3_downmix_common.h"
34
35 /*****************************************************************************
36  * Module initializer
37  *****************************************************************************/
38 static int Open ( vlc_object_t *p_this )
39 {
40     downmix_t *p_downmix = (downmix_t *)p_this;
41
42     p_downmix->pf_downmix_3f_2r_to_2ch = E_( downmix_3f_2r_to_2ch );
43     p_downmix->pf_downmix_3f_1r_to_2ch = E_( downmix_3f_1r_to_2ch );
44     p_downmix->pf_downmix_2f_2r_to_2ch = E_( downmix_2f_2r_to_2ch );
45     p_downmix->pf_downmix_2f_1r_to_2ch = E_( downmix_2f_1r_to_2ch );
46     p_downmix->pf_downmix_3f_0r_to_2ch = E_( downmix_3f_0r_to_2ch );
47     p_downmix->pf_stream_sample_2ch_to_s16 = E_( stream_sample_2ch_to_s16 );
48     p_downmix->pf_stream_sample_1ch_to_s16 = E_( stream_sample_1ch_to_s16 );
49
50     return VLC_SUCCESS;
51 }
52
53 /*****************************************************************************
54  * Module descriptor
55  *****************************************************************************/
56 vlc_module_begin();
57 #ifdef MODULE_NAME_IS_downmix
58     set_description( _("AC3 downmix module") );
59     set_capability( "downmix", 50 );
60     add_shortcut( "c" );
61 #elif defined( MODULE_NAME_IS_downmixsse )
62     set_description( _("SSE AC3 downmix module") );
63     set_capability( "downmix", 200 );
64     add_shortcut( "sse" );
65 #elif defined( MODULE_NAME_IS_downmix3dn )
66     set_description( _("3D Now! AC3 downmix module") );
67     set_capability( "downmix", 200 );
68     add_shortcut( "3dn" );
69     add_shortcut( "3dnow" );
70 #endif
71     set_callbacks( Open, NULL );
72 vlc_module_end();
73