297
|
1 #ifndef __CODEC_CFG_H
|
|
2 #define __CODEC_CFG_H
|
|
3
|
|
4 #ifndef IMGFMT_YV12
|
|
5 #define IMGFMT_YV12 0x32315659
|
|
6 #define IMGFMT_YUY2 (('2'<<24)|('Y'<<16)|('U'<<8)|'Y')
|
|
7 #define IMGFMT_RGB_MASK 0xFFFFFF00
|
|
8 #define IMGFMT_RGB (('R'<<24)|('G'<<16)|('B'<<8))
|
|
9 #define IMGFMT_BGR_MASK 0xFFFFFF00
|
|
10 #define IMGFMT_BGR (('B'<<24)|('G'<<16)|('R'<<8))
|
|
11 #endif
|
|
12
|
|
13 #define CODECS_MAX_FOURCC 16
|
|
14 #define CODECS_MAX_OUTFMT 16
|
|
15
|
303
|
16 // Global flags:
|
328
|
17 #define CODECS_FLAG_SEEKABLE (1<<0)
|
297
|
18
|
303
|
19 // Outfmt flags:
|
299
|
20 #define CODECS_FLAG_FLIP (1<<0)
|
|
21 #define CODECS_FLAG_NOFLIP (1<<1)
|
|
22 #define CODECS_FLAG_YUVHACK (1<<2)
|
|
23
|
316
|
24 #define CODECS_STATUS_NOT_WORKING 0
|
|
25 #define CODECS_STATUS_UNTESTED -1
|
|
26 #define CODECS_STATUS_PROBLEMS 1
|
|
27 #define CODECS_STATUS_WORKING 2
|
|
28
|
299
|
29
|
297
|
30 typedef struct {
|
300
|
31 unsigned long f1;
|
|
32 unsigned short f2;
|
|
33 unsigned short f3;
|
|
34 unsigned char f4[8];
|
297
|
35 } GUID;
|
|
36
|
|
37 typedef struct {
|
316
|
38 unsigned int fourcc[CODECS_MAX_FOURCC];
|
|
39 unsigned int fourccmap[CODECS_MAX_FOURCC];
|
|
40 unsigned int outfmt[CODECS_MAX_OUTFMT];
|
|
41 unsigned char outflags[CODECS_MAX_OUTFMT];
|
297
|
42 char *name;
|
|
43 char *info;
|
|
44 char *comment;
|
316
|
45 char *dll;
|
|
46 GUID guid;
|
297
|
47 short driver;
|
|
48 short flags;
|
316
|
49 short status;
|
297
|
50 } codecs_t;
|
|
51
|
328
|
52 codecs_t** parse_codec_cfg(char *cfgfile);
|
332
|
53 codecs_t* find_video_codec(unsigned int fourcc, unsigned int *fourccmap, codecs_t *start);
|
|
54 codecs_t* find_audio_codec(unsigned int fourcc, unsigned int *fourccmap, codecs_t *start);
|
|
55 codecs_t* find_codec(unsigned int fourcc,unsigned int *fourccmap,codecs_t *start,int audioflag);
|
297
|
56
|
|
57 #endif
|