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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
|
/*
* tcinfo.h - definitions of info_t and decode_t
* Written by Andrew Church <achurch@achurch.org>
*
* This file is part of transcode, a video stream processing tool.
* transcode is free software, distributable under the terms of the GNU
* General Public License (version 2 or later). See the file COPYING
* for details.
*/
#ifndef TCINFO_H
#define TCINFO_H
#ifndef PROBE_H
# include "probe.h" // for ProbeInfo
#endif
/*************************************************************************/
typedef struct _info_t {
int fd_in; // Input stream file descriptor
int fd_out; // Output stream file descriptor
long magic; // Specifies file magic for extract thread
int track; // Track to extract
long stype; // Specifies stream type for extract thread
long codec; // Specifies codec for extract thread
int verbose; // Verbosity
int dvd_title;
int dvd_chapter;
int dvd_angle;
int vob_offset;
int ps_unit;
int ps_seq1;
int ps_seq2;
int ts_pid;
int seek_allowed;
int demux;
int select; // Selected packet payload type
int subid; // Selected packet substream ID
int keep_seq; // Do not drop first sequence (cluster mode)
double fps;
int fd_log;
const char *name; // Source name as supplied with -i option
const char *nav_seek_file; // Seek/index file
int probe; // Flag for probe only mode
int factor; // Amount of file to probe, in MB
ProbeInfo *probe_info;
int quality;
int error;
long frame_limit[3];
int hard_fps_flag; // If this is set, disable demuxer smooth drop
} info_t;
typedef struct {
int fd_in; // Input stream file descriptor
int fd_out; // Output stream file descriptor
double ac3_gain[3];
long frame_limit[3];
int dv_yuy2_mode;
int padrate; // Zero padding rate
long magic; // Specifies file magic
long stype; // Specifies stream type
long codec; // Specifies codec
int verbose; // Verbosity
int quality;
const char *name; // Source name as supplied with -i option
int width;
int height;
int a52_mode;
long format; // Specifies raw stream format for output
int select; // Selected packet payload type
} decode_t;
/*************************************************************************/
#include "libtc/tccodecs.h"
typedef struct tcarea_ TCArea;
struct tcarea_ {
int top;
int left;
int bottom;
int right;
};
typedef struct tcexportinfo_ TCExportInfo;
struct tcexportinfo_ {
uint32_t attributes;
/*
* common fields for video/audio/mplex sections:
* string : generic opaque string identifier
* (for video, mainly used for fourcc).
* module : (NMS) encode module to use.
* module_opts : (opaque) option string to module.
*
* common fields for video/audio sections:
* format : identifier of video format to use in encoding phase.
* Isn't a proper codec identifer since it can be a
* 'special' format like TC_CODEC_COPY
* FIXME: can sometimes be CODEC_XXX not TC_CODEC_XXX.
* quality : encoding quality condensed in a single param.
* Rarely used but still needed.
* bitrate : MEAN video bitrate to use (kbps) in encoding.
*/
struct {
char *string;
char *module;
char *module_opts;
TCCodecID format;
int quality;
int bitrate;
char *log_file;
/* path to log file to use, if needed, for multipass encoding. */
int width;
int height;
/*
* FINAL requested video frame width/height: encoded video stream will
* have this width/height.
*/
int keep_asr_flag;
/* final asr should be forced equal to import asr? */
int fast_resize_flag; /* self explanatory :) */
int zoom_interlaced_flag; /* self explanatory :) */
int asr;
/*
* frame aspect ratio; often (but NOT always)
* computed from width/height pair
*/
int frc; /* frame rate code */
int par;
/* pixel aspect ratio; 1:1 by default, overridden by user in case */
int encode_fields;
/* field based encoding selection */
TCArea pre_clip;
/* clip specified area BEFORE any other operation */
TCArea post_clip;
/* clip specified area AFTER any other operation */
int gop_size;
/* video GOP size also known as keyframe interval */
int quantizer_min;
int quantizer_max;
/* quantizer range to use in encoding */
int bitrate_max;
/*
* Maximum video bitrate to use (kbps) in encoding.
* Rarely used but still needed.
*/
int pass_number; /* set for usage in multipass encoding */
} video;
struct {
char *string;
char *module;
char *module_opts;
TCCodecID format;
int quality;
int bitrate;
int sample_rate; /* audio sample rate (Hz) */
int sample_bits; /* bits to use for each audio sample */
int channels; /* number of channels in audio stream */
int mode; /* audio mode: mode, stereo, joint stereo... */
/*
* those last three fields are mainly used by lame, but they
* should be generalized
*/
int vbr_flag;
int flush_flag;
int bit_reservoir;
} audio;
struct {
char *string;
char *module;
char *module_opts;
char *out_file; /* self explanatory :) */
char *out_file_aux;
/*
* path of extra output file (separate audio track.
* Provided for back compatibilty, can go away in future revisions.
*/
} mplex;
};
/*************************************************************************/
#endif // TCINFO_H
/*
* Local variables:
* c-file-style: "stroustrup"
* c-file-offsets: ((case-label . *) (statement-case-intro . *))
* indent-tabs-mode: nil
* End:
*
* vim: expandtab shiftwidth=4:
*/
|