1 /***************************************************************************
2         \file ADM_videoCodec
3         \brief Search and instantiate video coder
4         \author mean fixounet@free.fr (C) 2010
5 
6     see here : http://www.webartz.com/fourcc/
7 
8  ***************************************************************************/
9 
10 /***************************************************************************
11  *                                                                         *
12  *   This program is free software; you can redistribute it and/or modify  *
13  *   it under the terms of the GNU General Public License as published by  *
14  *   the Free Software Foundation; either version 2 of the License, or     *
15  *   (at your option) any later version.                                   *
16  *                                                                         *
17  ***************************************************************************/
18 
19 #include "ADM_default.h"
20 #include "ADM_codec.h"
21 #include "ADM_ffmp43.h"
22 #include "fourcc.h"
23 #include "DIA_coreToolkit.h"
24 
25 #if defined(USE_VPX)
26 #include "ADM_vpx.h"
27 #endif
28 
29 
30 extern bool vdpauUsable(void);
31 extern bool xvbaUsable(void);
32 extern bool libvaUsable(void);
33 
34 decoders *tryCreatingVideoDecoder(uint32_t w, uint32_t h, uint32_t fcc,uint32_t extraDataLen,
35                     uint8_t *extra, uint32_t bpp);
36 /**
37     \fn getDecoder
38     \brief returns the correct decoder for a stream w,h,fcc,extraLen,extraData,bpp
39 */
ADM_getDecoder(uint32_t fcc,uint32_t w,uint32_t h,uint32_t extraLen,uint8_t * extraData,uint32_t bpp)40 decoders *ADM_getDecoder (uint32_t fcc, uint32_t w, uint32_t h, uint32_t extraLen,
41             uint8_t * extraData,uint32_t bpp)
42 {
43     ADM_info("Searching decoder in plugins\n");
44     decoders *fromPlugin=tryCreatingVideoDecoder(w,h,fcc,extraLen,extraData,bpp);
45     if(fromPlugin)
46         return fromPlugin;
47     ADM_info("Searching decoder in coreVideoCodec(%d x %d, extradataSize:%d)...\n",w,h,extraLen);
48     return ADM_coreCodecGetDecoder(fcc,w,h,extraLen,extraData,bpp);
49 }
50 //EOF
51 
52