]> git.sesse.net Git - vlc/blob - plugins/imdct/imdct.c
* ALL: new module API. Makes a few things a lot simpler, and we gain
[vlc] / plugins / imdct / imdct.c
1 /*****************************************************************************
2  * imdct.c : IMDCT module
3  *****************************************************************************
4  * Copyright (C) 1999, 2000 VideoLAN
5  * $Id: imdct.c,v 1.11 2002/07/31 20:56:51 sam Exp $
6  *
7  * Authors: GaĆ«l Hendryckx <jimmy@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_imdct.h"
33 #include "ac3_imdct_common.h"
34
35 /*****************************************************************************
36  * Module initializer
37  *****************************************************************************/
38 static int Open ( vlc_object_t *p_this )
39 {
40     imdct_t *p_imdct = (imdct_t *)p_this;
41
42     p_imdct->pf_imdct_init    = E_( imdct_init );
43     p_imdct->pf_imdct_256     = E_( imdct_do_256 );
44     p_imdct->pf_imdct_256_nol = E_( imdct_do_256_nol );
45     p_imdct->pf_imdct_512     = E_( imdct_do_512 );
46     p_imdct->pf_imdct_512_nol = E_( imdct_do_512_nol );
47
48     return VLC_SUCCESS;
49 }
50
51 /*****************************************************************************
52  * Module descriptor
53  *****************************************************************************/
54 vlc_module_begin();
55 #if defined( MODULE_NAME_IS_imdct )
56     set_description( _("AC3 IMDCT module") );
57     set_capability( "imdct", 50 );
58     add_shortcut( "c" );
59 #elif defined( MODULE_NAME_IS_imdctsse )
60     set_description( _("SSE AC3 IMDCT module") );
61     set_capability( "imdct", 200 );
62     add_shortcut( "sse" );
63 #elif defined( MODULE_NAME_IS_imdct3dn )
64     set_description( _("3D Now! AC3 IMDCT module") );
65     set_capability( "imdct", 200 );
66     add_shortcut( "3dn" );
67     add_shortcut( "3dnow" );
68 #endif
69     set_callbacks( Open, NULL );
70 vlc_module_end();
71