1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
/*
* import_def.h
*
* Copyright (C) Thomas Oestreich - June 2001
*
* This file is part of transcode, a video stream processing tool
*
* transcode is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* transcode is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU Make; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef _IMPORT_DEF_H
#define _IMPORT_DEF_H
#ifndef MOD_PRE
#error MOD_PRE not defined!
#endif
#define r2(i, a, b) import_ ## a ## b
#define r1(a, b) r2(import_, a, b)
#define RENAME(a, b) r1(a, b)
#define MOD_name static int RENAME(MOD_PRE, _name) (transfer_t *param)
#define MOD_open static int RENAME(MOD_PRE, _open) (transfer_t *param, vob_t *vob)
#define MOD_decode static int RENAME(MOD_PRE, _decode) (transfer_t *param, vob_t *vob)
#define MOD_close static int RENAME(MOD_PRE, _close) (transfer_t *param)
//extern int verbose_flag;
//extern int capability_flag;
/* ------------------------------------------------------------
*
* codec id string
*
* ------------------------------------------------------------*/
MOD_name
{
static int display=0;
verbose_flag = param->flag;
// print module version only once
if(verbose_flag && (display++ == 0)) tc_log_info(MOD_NAME, "%s %s", MOD_VERSION, MOD_CODEC);
// return module capability flag
param->flag = capability_flag;
return(0);
}
MOD_open;
MOD_decode;
MOD_close;
/* ------------------------------------------------------------
*
* interface
*
* ------------------------------------------------------------*/
int tc_import(int opt, void *para1, void *para2)
{
switch(opt)
{
case TC_IMPORT_NAME:
return RENAME(MOD_PRE, _name)((transfer_t *) para1);
case TC_IMPORT_OPEN:
return RENAME(MOD_PRE, _open)((transfer_t *) para1, (vob_t *) para2);
case TC_IMPORT_DECODE:
return RENAME(MOD_PRE, _decode)((transfer_t *) para1, (vob_t *) para2);
case TC_IMPORT_CLOSE:
return RENAME(MOD_PRE, _close)((transfer_t *) para1);
default:
return(TC_IMPORT_UNKNOWN);
}
}
#endif
|