5 #include <vorbis/codec.h>
8 typedef long (*audio_read_func
)(void *src
, float **buffer
, int samples
);
9 typedef void (*progress_func
)(char *fn
, long totalsamples
,
10 long samples
, double time
);
11 typedef void (*enc_end_func
)(char *fn
, double time
, int rate
,
12 long samples
, long bytes
);
13 typedef void (*enc_start_func
)(char *fn
, char *outfn
, int bitrate
,
14 float quality
, int qset
, int managed
, int min_br
, int max_br
);
15 typedef void (*error_func
)(char *errormessage
);
18 void *timer_start(void);
19 double timer_time(void *);
20 void timer_clear(void *);
21 int create_directories(char *, int);
23 void update_statistics_full(char *fn
, long total
, long done
, double time
);
24 void update_statistics_notime(char *fn
, long total
, long done
, double time
);
25 void update_statistics_null(char *fn
, long total
, long done
, double time
);
26 void start_encode_full(char *fn
, char *outfn
, int bitrate
, float quality
, int qset
,
27 int managed
, int min
, int max
);
28 void start_encode_null(char *fn
, char *outfn
, int bitrate
, float quality
, int qset
,
29 int managed
, int min
, int max
);
30 void final_statistics(char *fn
, double time
, int rate
, long total_samples
,
32 void final_statistics_null(char *fn
, double time
, int rate
, long total_samples
,
34 void encode_error(char *errmsg
);
59 char **lyrics_language
;
60 int lyrics_language_count
;
76 char *namefmt_replace
;
86 /* Float from 0 to 1 (low->high) */
95 unsigned int skeleton_serial
;
96 unsigned int kate_serial
;
105 vorbis_comment
*comments
;
106 unsigned int serialno
;
107 unsigned int skeleton_serialno
;
108 unsigned int kate_serialno
;
110 audio_read_func read_samples
;
111 progress_func progress_update
;
112 enc_end_func end_encode
;
113 enc_start_func start_encode
;
118 long total_samples_per_channel
;
127 /* Various bitrate/quality options */
143 char *lyrics_language
;
147 int oe_encode(oe_enc_opt
*opt
);
149 #endif /* __ENCODE_H */