FFmpeg
asrc_flite.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012 Stefano Sabatini
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 /**
22  * @file
23  * flite voice synth source
24  */
25 
26 #include <flite/flite.h>
27 #include "libavutil/audio_fifo.h"
28 #include "libavutil/avstring.h"
30 #include "libavutil/file.h"
31 #include "libavutil/opt.h"
32 #include "libavutil/thread.h"
33 #include "avfilter.h"
34 #include "filters.h"
35 #include "audio.h"
36 #include "formats.h"
37 #include "internal.h"
38 
39 typedef struct FliteContext {
40  const AVClass *class;
41  char *voice_str;
42  char *textfile;
43  char *text;
44  char *text_p;
45  char *text_saveptr;
50  cst_voice *voice;
51  cst_audio_streaming_info *asi;
54  int frame_nb_samples; ///< number of samples per frame
55 } FliteContext;
56 
57 #define OFFSET(x) offsetof(FliteContext, x)
58 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
59 
60 static const AVOption flite_options[] = {
61  { "list_voices", "list voices and exit", OFFSET(list_voices), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS },
62  { "nb_samples", "set number of samples per frame", OFFSET(frame_nb_samples), AV_OPT_TYPE_INT, {.i64=512}, 0, INT_MAX, FLAGS },
63  { "n", "set number of samples per frame", OFFSET(frame_nb_samples), AV_OPT_TYPE_INT, {.i64=512}, 0, INT_MAX, FLAGS },
64  { "text", "set text to speak", OFFSET(text), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
65  { "textfile", "set filename of the text to speak", OFFSET(textfile), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
66  { "v", "set voice", OFFSET(voice_str), AV_OPT_TYPE_STRING, {.str="kal"}, 0, 0, FLAGS },
67  { "voice", "set voice", OFFSET(voice_str), AV_OPT_TYPE_STRING, {.str="kal"}, 0, 0, FLAGS },
68  { NULL }
69 };
70 
72 
74 
75 static int flite_inited = 0;
76 
77 /* declare functions for all the supported voices */
78 #define DECLARE_REGISTER_VOICE_FN(name) \
79  cst_voice *register_cmu_us_## name(const char *); \
80  void unregister_cmu_us_## name(cst_voice *)
86 
87 struct voice_entry {
88  const char *name;
89  cst_voice * (*register_fn)(const char *);
90  void (*unregister_fn)(cst_voice *);
91  cst_voice *voice;
92  unsigned usage_count;
93 };
94 
95 #define MAKE_VOICE_STRUCTURE(voice_name) { \
96  .name = #voice_name, \
97  .register_fn = register_cmu_us_ ## voice_name, \
98  .unregister_fn = unregister_cmu_us_ ## voice_name, \
99 }
100 static struct voice_entry voice_entries[] = {
103  MAKE_VOICE_STRUCTURE(kal16),
106 };
107 
108 static void list_voices(void *log_ctx, const char *sep)
109 {
110  int i, n = FF_ARRAY_ELEMS(voice_entries);
111  for (i = 0; i < n; i++)
112  av_log(log_ctx, AV_LOG_INFO, "%s%s",
113  voice_entries[i].name, i < (n-1) ? sep : "\n");
114 }
115 
116 static int select_voice(struct voice_entry **entry_ret, const char *voice_name, void *log_ctx)
117 {
118  int i;
119 
120  for (i = 0; i < FF_ARRAY_ELEMS(voice_entries); i++) {
121  struct voice_entry *entry = &voice_entries[i];
122  if (!strcmp(entry->name, voice_name)) {
123  cst_voice *voice;
125  if (!entry->voice)
126  entry->voice = entry->register_fn(NULL);
127  voice = entry->voice;
128  if (voice)
129  entry->usage_count++;
131  if (!voice) {
132  av_log(log_ctx, AV_LOG_ERROR,
133  "Could not register voice '%s'\n", voice_name);
134  return AVERROR_UNKNOWN;
135  }
136  *entry_ret = entry;
137  return 0;
138  }
139  }
140 
141  av_log(log_ctx, AV_LOG_ERROR, "Could not find voice '%s'\n", voice_name);
142  av_log(log_ctx, AV_LOG_INFO, "Choose between the voices: ");
143  list_voices(log_ctx, ", ");
144 
145  return AVERROR(EINVAL);
146 }
147 
148 static int audio_stream_chunk_by_word(const cst_wave *wave, int start, int size,
149  int last, cst_audio_streaming_info *asi)
150 {
151  FliteContext *flite = asi->userdata;
152  void *const ptr[8] = { &wave->samples[start] };
153 
154  flite->nb_channels = wave->num_channels;
155  flite->sample_rate = wave->sample_rate;
156  if (!flite->fifo) {
158  if (!flite->fifo)
159  return CST_AUDIO_STREAM_STOP;
160  }
161 
162  av_audio_fifo_write(flite->fifo, ptr, size);
163 
164  return CST_AUDIO_STREAM_CONT;
165 }
166 
168 {
169  FliteContext *flite = ctx->priv;
170  int ret = 0;
171  char *text;
172 
173  if (flite->list_voices) {
174  list_voices(ctx, "\n");
175  return AVERROR_EXIT;
176  }
177 
179  if (!flite_inited) {
180  if ((ret = flite_init()) >= 0)
181  flite_inited = 1;
182  }
184  if (ret < 0) {
185  av_log(ctx, AV_LOG_ERROR, "flite initialization failed\n");
186  return AVERROR_EXTERNAL;
187  }
188 
189  if ((ret = select_voice(&flite->voice_entry, flite->voice_str, ctx)) < 0)
190  return ret;
191  flite->voice = flite->voice_entry->voice;
192 
193  if (flite->textfile && flite->text) {
195  "Both text and textfile options set: only one must be specified\n");
196  return AVERROR(EINVAL);
197  }
198 
199  if (flite->textfile) {
200  uint8_t *textbuf;
201  size_t textbuf_size;
202 
203  if ((ret = av_file_map(flite->textfile, &textbuf, &textbuf_size, 0, ctx)) < 0) {
205  "The text file '%s' could not be read: %s\n",
206  flite->textfile, av_err2str(ret));
207  return ret;
208  }
209 
210  if (!(flite->text = av_malloc(textbuf_size+1))) {
211  av_file_unmap(textbuf, textbuf_size);
212  return AVERROR(ENOMEM);
213  }
214  memcpy(flite->text, textbuf, textbuf_size);
215  flite->text[textbuf_size] = 0;
216  av_file_unmap(textbuf, textbuf_size);
217  }
218 
219  if (!flite->text) {
221  "No speech text specified, specify the 'text' or 'textfile' option\n");
222  return AVERROR(EINVAL);
223  }
224 
225  flite->asi = new_audio_streaming_info();
226  if (!flite->asi)
227  return AVERROR_BUG;
228 
229  flite->asi->asc = audio_stream_chunk_by_word;
230  flite->asi->userdata = flite;
231  feat_set(flite->voice->features, "streaming_info", audio_streaming_info_val(flite->asi));
232 
233  flite->text_p = flite->text;
234  if (!(text = av_strtok(flite->text_p, "\n", &flite->text_saveptr)))
235  return AVERROR(EINVAL);
236  flite->text_p = NULL;
237 
238  flite_text_to_speech(text, flite->voice, "none");
239 
240  return 0;
241 }
242 
244 {
245  FliteContext *flite = ctx->priv;
246 
247  if (flite->voice_entry) {
249  if (!--flite->voice_entry->usage_count) {
250  flite->voice_entry->unregister_fn(flite->voice);
251  flite->voice_entry->voice = NULL;
252  }
254  }
255  av_audio_fifo_free(flite->fifo);
256 }
257 
259 {
260  FliteContext *flite = ctx->priv;
261  int ret;
262 
263  AVFilterChannelLayouts *chlayouts = NULL;
264  AVFilterFormats *sample_formats = NULL;
266  AVChannelLayout chlayout = { 0 };
267 
268  av_channel_layout_default(&chlayout, flite->nb_channels);
269 
270  if ((ret = ff_add_channel_layout (&chlayouts , &chlayout )) < 0 ||
271  (ret = ff_set_common_channel_layouts (ctx , chlayouts )) < 0 ||
272  (ret = ff_add_format (&sample_formats, AV_SAMPLE_FMT_S16 )) < 0 ||
273  (ret = ff_set_common_formats (ctx , sample_formats )) < 0 ||
274  (ret = ff_add_format (&sample_rates , flite->sample_rate )) < 0 ||
276  return ret;
277 
278  return 0;
279 }
280 
281 static int config_props(AVFilterLink *outlink)
282 {
283  AVFilterContext *ctx = outlink->src;
284  FliteContext *flite = ctx->priv;
285 
286  outlink->sample_rate = flite->sample_rate;
287  outlink->time_base = (AVRational){1, flite->sample_rate};
288 
289  av_log(ctx, AV_LOG_VERBOSE, "voice:%s fmt:%s sample_rate:%d\n",
290  flite->voice_str,
291  av_get_sample_fmt_name(outlink->format), outlink->sample_rate);
292 
293  return 0;
294 }
295 
297 {
298  AVFilterLink *outlink = ctx->outputs[0];
299  FliteContext *flite = ctx->priv;
300  AVFrame *samplesref;
301  int nb_samples;
302 
303  if (!ff_outlink_frame_wanted(outlink))
304  return FFERROR_NOT_READY;
305 
306  nb_samples = FFMIN(av_audio_fifo_size(flite->fifo), flite->frame_nb_samples);
307  if (!nb_samples) {
308  char *text;
309 
310  if (!(text = av_strtok(flite->text_p, "\n", &flite->text_saveptr))) {
311  ff_outlink_set_status(outlink, AVERROR_EOF, flite->pts);
312  return 0;
313  }
314 
315  flite_text_to_speech(text, flite->voice, "none");
316  ff_filter_set_ready(ctx, 100);
317  return 0;
318  }
319 
320  samplesref = ff_get_audio_buffer(outlink, nb_samples);
321  if (!samplesref)
322  return AVERROR(ENOMEM);
323 
324  av_audio_fifo_read(flite->fifo, (void **)samplesref->extended_data,
325  nb_samples);
326 
327  samplesref->pts = flite->pts;
328  samplesref->sample_rate = flite->sample_rate;
329  flite->pts += nb_samples;
330 
331  return ff_filter_frame(outlink, samplesref);
332 }
333 
334 static const AVFilterPad flite_outputs[] = {
335  {
336  .name = "default",
337  .type = AVMEDIA_TYPE_AUDIO,
338  .config_props = config_props,
339  },
340 };
341 
343  .name = "flite",
344  .description = NULL_IF_CONFIG_SMALL("Synthesize voice from text using libflite."),
345  .init = init,
346  .uninit = uninit,
347  .priv_size = sizeof(FliteContext),
348  .activate = activate,
349  .inputs = NULL,
352  .priv_class = &flite_class,
353 };
OFFSET
#define OFFSET(x)
Definition: asrc_flite.c:57
av_audio_fifo_free
void av_audio_fifo_free(AVAudioFifo *af)
Free an AVAudioFifo.
Definition: audio_fifo.c:48
ff_asrc_flite
const AVFilter ff_asrc_flite
Definition: asrc_flite.c:342
ff_get_audio_buffer
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
Definition: audio.c:97
AVFilterChannelLayouts
A list of supported channel layouts.
Definition: formats.h:85
name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
entry
#define entry
Definition: aom_film_grain_template.c:66
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
flite_options
static const AVOption flite_options[]
Definition: asrc_flite.c:60
opt.h
ff_filter_frame
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:1018
thread.h
AVERROR_EOF
#define AVERROR_EOF
End of file.
Definition: error.h:57
FFERROR_NOT_READY
return FFERROR_NOT_READY
Definition: filter_design.txt:204
FliteContext::textfile
char * textfile
Definition: asrc_flite.c:42
av_audio_fifo_write
int av_audio_fifo_write(AVAudioFifo *af, void *const *data, int nb_samples)
Write data to an AVAudioFifo.
Definition: audio_fifo.c:119
voice_entry::voice
cst_voice * voice
Definition: asrc_flite.c:91
int64_t
long long int64_t
Definition: coverity.c:34
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:344
AVFrame::pts
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
Definition: frame.h:456
AVOption
AVOption.
Definition: opt.h:346
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:159
voice_entry::usage_count
unsigned usage_count
Definition: asrc_flite.c:92
AV_LOG_VERBOSE
#define AV_LOG_VERBOSE
Detailed information.
Definition: log.h:196
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:170
AVERROR_UNKNOWN
#define AVERROR_UNKNOWN
Unknown error, typically from an external library.
Definition: error.h:73
FliteContext::voice_entry
struct voice_entry * voice_entry
Definition: asrc_flite.c:52
FliteContext
Definition: asrc_flite.c:39
AVFILTER_DEFINE_CLASS
AVFILTER_DEFINE_CLASS(flite)
av_malloc
#define av_malloc(s)
Definition: tableprint_vlc.h:30
MAKE_VOICE_STRUCTURE
#define MAKE_VOICE_STRUCTURE(voice_name)
Definition: asrc_flite.c:95
AVFilterFormats
A list of supported formats for one end of a filter link.
Definition: formats.h:64
formats.h
flite_mutex
static AVMutex flite_mutex
Definition: asrc_flite.c:73
AVAudioFifo
Context for an Audio FIFO Buffer.
Definition: audio_fifo.c:37
av_file_map
int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, int log_offset, void *log_ctx)
Read the file with name filename, and put its content in a newly allocated buffer or map it with mmap...
Definition: file.c:55
activate
static int activate(AVFilterContext *ctx)
Definition: asrc_flite.c:296
FliteContext::fifo
AVAudioFifo * fifo
Definition: asrc_flite.c:48
FliteContext::asi
cst_audio_streaming_info * asi
Definition: asrc_flite.c:51
AVFilterPad
A filter pad used for either input or output.
Definition: internal.h:33
FliteContext::list_voices
int list_voices
Definition: asrc_flite.c:49
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
av_cold
#define av_cold
Definition: attributes.h:90
ff_set_common_formats
int ff_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
A helper for query_formats() which sets all links to the same list of formats.
Definition: formats.c:867
AVMutex
#define AVMutex
Definition: thread.h:184
ff_outlink_set_status
static void ff_outlink_set_status(AVFilterLink *link, int status, int64_t pts)
Set the status field of a link from the source filter.
Definition: filters.h:189
FliteContext::text_saveptr
char * text_saveptr
Definition: asrc_flite.c:45
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
FliteContext::nb_channels
int nb_channels
Definition: asrc_flite.c:46
av_strtok
char * av_strtok(char *s, const char *delim, char **saveptr)
Split the string into several tokens which can be accessed by successive calls to av_strtok().
Definition: avstring.c:178
filters.h
list_voices
static void list_voices(void *log_ctx, const char *sep)
Definition: asrc_flite.c:108
ctx
AVFormatContext * ctx
Definition: movenc.c:48
av_get_sample_fmt_name
const char * av_get_sample_fmt_name(enum AVSampleFormat sample_fmt)
Return the name of sample_fmt, or NULL if sample_fmt is not recognized.
Definition: samplefmt.c:51
av_file_unmap
void av_file_unmap(uint8_t *bufptr, size_t size)
Unmap or free the buffer bufptr created by av_file_map().
Definition: file.c:146
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
NULL
#define NULL
Definition: coverity.c:32
flite_outputs
static const AVFilterPad flite_outputs[]
Definition: asrc_flite.c:334
voice_entries
static struct voice_entry voice_entries[]
Definition: asrc_flite.c:100
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: asrc_flite.c:258
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
av_audio_fifo_alloc
AVAudioFifo * av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels, int nb_samples)
Allocate an AVAudioFifo.
Definition: audio_fifo.c:62
ff_add_format
int ff_add_format(AVFilterFormats **avff, int64_t fmt)
Add fmt to the list of media formats contained in *avff.
Definition: formats.c:504
FliteContext::sample_rate
int sample_rate
Definition: asrc_flite.c:47
inputs
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
Definition: filter_design.txt:243
ff_add_channel_layout
int ff_add_channel_layout(AVFilterChannelLayouts **l, const AVChannelLayout *channel_layout)
Definition: formats.c:521
pthread_mutex_unlock
#define pthread_mutex_unlock(a)
Definition: ffprobe.c:81
voice_entry::unregister_fn
void(* unregister_fn)(cst_voice *)
Definition: asrc_flite.c:90
FliteContext::voice_str
char * voice_str
Definition: asrc_flite.c:41
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:106
AVChannelLayout
An AVChannelLayout holds information about the channel layout of audio data.
Definition: channel_layout.h:303
av_err2str
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
Definition: error.h:121
AVFrame::sample_rate
int sample_rate
Sample rate of the audio data.
Definition: frame.h:543
audio_stream_chunk_by_word
static int audio_stream_chunk_by_word(const cst_wave *wave, int start, int size, int last, cst_audio_streaming_info *asi)
Definition: asrc_flite.c:148
AV_MUTEX_INITIALIZER
#define AV_MUTEX_INITIALIZER
Definition: thread.h:185
av_audio_fifo_read
int av_audio_fifo_read(AVAudioFifo *af, void *const *data, int nb_samples)
Read data from an AVAudioFifo.
Definition: audio_fifo.c:175
size
int size
Definition: twinvq_data.h:10344
AVERROR_EXTERNAL
#define AVERROR_EXTERNAL
Generic error in an external library.
Definition: error.h:59
av_audio_fifo_size
int av_audio_fifo_size(AVAudioFifo *af)
Get the current number of samples in the AVAudioFifo available for reading.
Definition: audio_fifo.c:222
config_props
static int config_props(AVFilterLink *outlink)
Definition: asrc_flite.c:281
AV_LOG_INFO
#define AV_LOG_INFO
Standard information.
Definition: log.h:191
sample_rates
sample_rates
Definition: ffmpeg_filter.c:409
internal.h
av_channel_layout_default
void av_channel_layout_default(AVChannelLayout *ch_layout, int nb_channels)
Get the default channel layout for a given number of channels.
Definition: channel_layout.c:830
FliteContext::pts
int64_t pts
Definition: asrc_flite.c:53
FliteContext::text_p
char * text_p
Definition: asrc_flite.c:44
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
AVFrame::extended_data
uint8_t ** extended_data
pointers to the data planes/channels.
Definition: frame.h:405
FFMIN
#define FFMIN(a, b)
Definition: macros.h:49
AV_SAMPLE_FMT_S16
@ AV_SAMPLE_FMT_S16
signed 16 bits
Definition: samplefmt.h:58
audio_fifo.h
FliteContext::text
char * text
Definition: asrc_flite.c:43
AVFilterPad::name
const char * name
Pad name.
Definition: internal.h:39
AVFilter
Filter definition.
Definition: avfilter.h:166
ret
ret
Definition: filter_design.txt:187
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: asrc_flite.c:243
channel_layout.h
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:235
avfilter.h
init
static av_cold int init(AVFilterContext *ctx)
Definition: asrc_flite.c:167
file.h
AVFilterContext
An instance of a filter.
Definition: avfilter.h:407
flite_inited
static int flite_inited
Definition: asrc_flite.c:75
FLAGS
#define FLAGS
Definition: asrc_flite.c:58
DECLARE_REGISTER_VOICE_FN
#define DECLARE_REGISTER_VOICE_FN(name)
Definition: asrc_flite.c:78
audio.h
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:251
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:183
AVERROR_BUG
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
Definition: error.h:52
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
select_voice
static int select_voice(struct voice_entry **entry_ret, const char *voice_name, void *log_ctx)
Definition: asrc_flite.c:116
ff_set_common_samplerates
int ff_set_common_samplerates(AVFilterContext *ctx, AVFilterFormats *samplerates)
Definition: formats.c:808
AVERROR_EXIT
#define AVERROR_EXIT
Immediate exit was requested; the called function should not be restarted.
Definition: error.h:58
ff_outlink_frame_wanted
the definition of that something depends on the semantic of the filter The callback must examine the status of the filter s links and proceed accordingly The status of output links is stored in the status_in and status_out fields and tested by the ff_outlink_frame_wanted() function. If this function returns true
avstring.h
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:239
FliteContext::frame_nb_samples
int frame_nb_samples
number of samples per frame
Definition: asrc_flite.c:54
FliteContext::voice
cst_voice * voice
Definition: asrc_flite.c:50
voice_entry
Definition: asrc_flite.c:87
voice_entry::name
const char * name
Definition: asrc_flite.c:88
ff_filter_set_ready
void ff_filter_set_ready(AVFilterContext *filter, unsigned priority)
Mark a filter ready and schedule it for activation.
Definition: avfilter.c:234
pthread_mutex_lock
#define pthread_mutex_lock(a)
Definition: ffprobe.c:77
ff_set_common_channel_layouts
int ff_set_common_channel_layouts(AVFilterContext *ctx, AVFilterChannelLayouts *channel_layouts)
Helpers for query_formats() which set all free audio links to the same list of channel layouts/sample...
Definition: formats.c:790