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/mem.h"
32 #include "libavutil/opt.h"
33 #include "libavutil/thread.h"
34 #include "avfilter.h"
35 #include "filters.h"
36 #include "audio.h"
37 #include "formats.h"
38 #include "internal.h"
39 
40 typedef struct FliteContext {
41  const AVClass *class;
42  char *voice_str;
43  char *textfile;
44  char *text;
45  char *text_p;
46  char *text_saveptr;
51  cst_voice *voice;
52  cst_audio_streaming_info *asi;
54  int64_t pts;
55  int frame_nb_samples; ///< number of samples per frame
56 } FliteContext;
57 
58 #define OFFSET(x) offsetof(FliteContext, x)
59 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
60 
61 static const AVOption flite_options[] = {
62  { "list_voices", "list voices and exit", OFFSET(list_voices), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS },
63  { "nb_samples", "set number of samples per frame", OFFSET(frame_nb_samples), AV_OPT_TYPE_INT, {.i64=512}, 0, INT_MAX, FLAGS },
64  { "n", "set number of samples per frame", OFFSET(frame_nb_samples), AV_OPT_TYPE_INT, {.i64=512}, 0, INT_MAX, FLAGS },
65  { "text", "set text to speak", OFFSET(text), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
66  { "textfile", "set filename of the text to speak", OFFSET(textfile), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
67  { "v", "set voice", OFFSET(voice_str), AV_OPT_TYPE_STRING, {.str="kal"}, 0, 0, FLAGS },
68  { "voice", "set voice", OFFSET(voice_str), AV_OPT_TYPE_STRING, {.str="kal"}, 0, 0, FLAGS },
69  { NULL }
70 };
71 
73 
75 
76 static int flite_inited = 0;
77 
78 /* declare functions for all the supported voices */
79 #define DECLARE_REGISTER_VOICE_FN(name) \
80  cst_voice *register_cmu_us_## name(const char *); \
81  void unregister_cmu_us_## name(cst_voice *)
87 
88 struct voice_entry {
89  const char *name;
90  cst_voice * (*register_fn)(const char *);
91  void (*unregister_fn)(cst_voice *);
92  cst_voice *voice;
93  unsigned usage_count;
94 };
95 
96 #define MAKE_VOICE_STRUCTURE(voice_name) { \
97  .name = #voice_name, \
98  .register_fn = register_cmu_us_ ## voice_name, \
99  .unregister_fn = unregister_cmu_us_ ## voice_name, \
100 }
101 static struct voice_entry voice_entries[] = {
104  MAKE_VOICE_STRUCTURE(kal16),
107 };
108 
109 static void list_voices(void *log_ctx, const char *sep)
110 {
111  int i, n = FF_ARRAY_ELEMS(voice_entries);
112  for (i = 0; i < n; i++)
113  av_log(log_ctx, AV_LOG_INFO, "%s%s",
114  voice_entries[i].name, i < (n-1) ? sep : "\n");
115 }
116 
117 static int select_voice(struct voice_entry **entry_ret, const char *voice_name, void *log_ctx)
118 {
119  int i;
120 
121  for (i = 0; i < FF_ARRAY_ELEMS(voice_entries); i++) {
122  struct voice_entry *entry = &voice_entries[i];
123  if (!strcmp(entry->name, voice_name)) {
124  cst_voice *voice;
126  if (!entry->voice)
127  entry->voice = entry->register_fn(NULL);
128  voice = entry->voice;
129  if (voice)
130  entry->usage_count++;
132  if (!voice) {
133  av_log(log_ctx, AV_LOG_ERROR,
134  "Could not register voice '%s'\n", voice_name);
135  return AVERROR_UNKNOWN;
136  }
137  *entry_ret = entry;
138  return 0;
139  }
140  }
141 
142  av_log(log_ctx, AV_LOG_ERROR, "Could not find voice '%s'\n", voice_name);
143  av_log(log_ctx, AV_LOG_INFO, "Choose between the voices: ");
144  list_voices(log_ctx, ", ");
145 
146  return AVERROR(EINVAL);
147 }
148 
149 static int audio_stream_chunk_by_word(const cst_wave *wave, int start, int size,
150  int last, cst_audio_streaming_info *asi)
151 {
152  FliteContext *flite = asi->userdata;
153  void *const ptr[8] = { &wave->samples[start] };
154 
155  flite->nb_channels = wave->num_channels;
156  flite->sample_rate = wave->sample_rate;
157  if (!flite->fifo) {
159  if (!flite->fifo)
160  return CST_AUDIO_STREAM_STOP;
161  }
162 
163  av_audio_fifo_write(flite->fifo, ptr, size);
164 
165  return CST_AUDIO_STREAM_CONT;
166 }
167 
169 {
170  FliteContext *flite = ctx->priv;
171  int ret = 0;
172  char *text;
173 
174  if (flite->list_voices) {
175  list_voices(ctx, "\n");
176  return AVERROR_EXIT;
177  }
178 
180  if (!flite_inited) {
181  if ((ret = flite_init()) >= 0)
182  flite_inited = 1;
183  }
185  if (ret < 0) {
186  av_log(ctx, AV_LOG_ERROR, "flite initialization failed\n");
187  return AVERROR_EXTERNAL;
188  }
189 
190  if ((ret = select_voice(&flite->voice_entry, flite->voice_str, ctx)) < 0)
191  return ret;
192  flite->voice = flite->voice_entry->voice;
193 
194  if (flite->textfile && flite->text) {
196  "Both text and textfile options set: only one must be specified\n");
197  return AVERROR(EINVAL);
198  }
199 
200  if (flite->textfile) {
201  uint8_t *textbuf;
202  size_t textbuf_size;
203 
204  if ((ret = av_file_map(flite->textfile, &textbuf, &textbuf_size, 0, ctx)) < 0) {
206  "The text file '%s' could not be read: %s\n",
207  flite->textfile, av_err2str(ret));
208  return ret;
209  }
210 
211  if (!(flite->text = av_malloc(textbuf_size+1))) {
212  av_file_unmap(textbuf, textbuf_size);
213  return AVERROR(ENOMEM);
214  }
215  memcpy(flite->text, textbuf, textbuf_size);
216  flite->text[textbuf_size] = 0;
217  av_file_unmap(textbuf, textbuf_size);
218  }
219 
220  if (!flite->text) {
222  "No speech text specified, specify the 'text' or 'textfile' option\n");
223  return AVERROR(EINVAL);
224  }
225 
226  flite->asi = new_audio_streaming_info();
227  if (!flite->asi)
228  return AVERROR_BUG;
229 
230  flite->asi->asc = audio_stream_chunk_by_word;
231  flite->asi->userdata = flite;
232  feat_set(flite->voice->features, "streaming_info", audio_streaming_info_val(flite->asi));
233 
234  flite->text_p = flite->text;
235  if (!(text = av_strtok(flite->text_p, "\n", &flite->text_saveptr)))
236  return AVERROR(EINVAL);
237  flite->text_p = NULL;
238 
239  flite_text_to_speech(text, flite->voice, "none");
240 
241  return 0;
242 }
243 
245 {
246  FliteContext *flite = ctx->priv;
247 
248  if (flite->voice_entry) {
250  if (!--flite->voice_entry->usage_count) {
251  flite->voice_entry->unregister_fn(flite->voice);
252  flite->voice_entry->voice = NULL;
253  }
255  }
256  av_audio_fifo_free(flite->fifo);
257 }
258 
260 {
261  FliteContext *flite = ctx->priv;
262  int ret;
263 
264  AVFilterChannelLayouts *chlayouts = NULL;
265  AVFilterFormats *sample_formats = NULL;
267  AVChannelLayout chlayout = { 0 };
268 
269  av_channel_layout_default(&chlayout, flite->nb_channels);
270 
271  if ((ret = ff_add_channel_layout (&chlayouts , &chlayout )) < 0 ||
272  (ret = ff_set_common_channel_layouts (ctx , chlayouts )) < 0 ||
273  (ret = ff_add_format (&sample_formats, AV_SAMPLE_FMT_S16 )) < 0 ||
274  (ret = ff_set_common_formats (ctx , sample_formats )) < 0 ||
275  (ret = ff_add_format (&sample_rates , flite->sample_rate )) < 0 ||
277  return ret;
278 
279  return 0;
280 }
281 
282 static int config_props(AVFilterLink *outlink)
283 {
284  AVFilterContext *ctx = outlink->src;
285  FliteContext *flite = ctx->priv;
286 
287  outlink->sample_rate = flite->sample_rate;
288  outlink->time_base = (AVRational){1, flite->sample_rate};
289 
290  av_log(ctx, AV_LOG_VERBOSE, "voice:%s fmt:%s sample_rate:%d\n",
291  flite->voice_str,
292  av_get_sample_fmt_name(outlink->format), outlink->sample_rate);
293 
294  return 0;
295 }
296 
298 {
299  AVFilterLink *outlink = ctx->outputs[0];
300  FliteContext *flite = ctx->priv;
301  AVFrame *samplesref;
302  int nb_samples;
303 
304  if (!ff_outlink_frame_wanted(outlink))
305  return FFERROR_NOT_READY;
306 
307  nb_samples = FFMIN(av_audio_fifo_size(flite->fifo), flite->frame_nb_samples);
308  if (!nb_samples) {
309  char *text;
310 
311  if (!(text = av_strtok(flite->text_p, "\n", &flite->text_saveptr))) {
312  ff_outlink_set_status(outlink, AVERROR_EOF, flite->pts);
313  return 0;
314  }
315 
316  flite_text_to_speech(text, flite->voice, "none");
317  ff_filter_set_ready(ctx, 100);
318  return 0;
319  }
320 
321  samplesref = ff_get_audio_buffer(outlink, nb_samples);
322  if (!samplesref)
323  return AVERROR(ENOMEM);
324 
325  av_audio_fifo_read(flite->fifo, (void **)samplesref->extended_data,
326  nb_samples);
327 
328  samplesref->pts = flite->pts;
329  samplesref->sample_rate = flite->sample_rate;
330  flite->pts += nb_samples;
331 
332  return ff_filter_frame(outlink, samplesref);
333 }
334 
335 static const AVFilterPad flite_outputs[] = {
336  {
337  .name = "default",
338  .type = AVMEDIA_TYPE_AUDIO,
339  .config_props = config_props,
340  },
341 };
342 
344  .name = "flite",
345  .description = NULL_IF_CONFIG_SMALL("Synthesize voice from text using libflite."),
346  .init = init,
347  .uninit = uninit,
348  .priv_size = sizeof(FliteContext),
349  .activate = activate,
350  .inputs = NULL,
353  .priv_class = &flite_class,
354 };
OFFSET
#define OFFSET(x)
Definition: asrc_flite.c:58
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:343
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:61
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:1015
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:43
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:92
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:374
AVFrame::pts
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
Definition: frame.h:486
AVOption
AVOption.
Definition: opt.h:357
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:159
voice_entry::usage_count
unsigned usage_count
Definition: asrc_flite.c:93
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:53
FliteContext
Definition: asrc_flite.c:40
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:96
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:74
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:297
FliteContext::fifo
AVAudioFifo * fifo
Definition: asrc_flite.c:49
FliteContext::asi
cst_audio_streaming_info * asi
Definition: asrc_flite.c:52
AVFilterPad
A filter pad used for either input or output.
Definition: internal.h:33
FliteContext::list_voices
int list_voices
Definition: asrc_flite.c:50
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:868
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:46
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
FliteContext::nb_channels
int nb_channels
Definition: asrc_flite.c:47
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:109
ctx
AVFormatContext * ctx
Definition: movenc.c:49
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:335
voice_entries
static struct voice_entry voice_entries[]
Definition: asrc_flite.c:101
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: asrc_flite.c:259
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:505
FliteContext::sample_rate
int sample_rate
Definition: asrc_flite.c:48
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:522
pthread_mutex_unlock
#define pthread_mutex_unlock(a)
Definition: ffprobe.c:82
voice_entry::unregister_fn
void(* unregister_fn)(cst_voice *)
Definition: asrc_flite.c:91
FliteContext::voice_str
char * voice_str
Definition: asrc_flite.c:42
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:94
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:122
AVFrame::sample_rate
int sample_rate
Sample rate of the audio data.
Definition: frame.h:573
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:149
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:282
AV_LOG_INFO
#define AV_LOG_INFO
Standard information.
Definition: log.h:191
sample_rates
sample_rates
Definition: ffmpeg_filter.c:424
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:54
FliteContext::text_p
char * text_p
Definition: asrc_flite.c:45
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
AVFrame::extended_data
uint8_t ** extended_data
pointers to the data planes/channels.
Definition: frame.h:435
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:44
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:244
channel_layout.h
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:245
avfilter.h
init
static av_cold int init(AVFilterContext *ctx)
Definition: asrc_flite.c:168
file.h
AVFilterContext
An instance of a filter.
Definition: avfilter.h:407
flite_inited
static int flite_inited
Definition: asrc_flite.c:76
FLAGS
#define FLAGS
Definition: asrc_flite.c:59
DECLARE_REGISTER_VOICE_FN
#define DECLARE_REGISTER_VOICE_FN(name)
Definition: asrc_flite.c:79
mem.h
audio.h
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:261
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:117
ff_set_common_samplerates
int ff_set_common_samplerates(AVFilterContext *ctx, AVFilterFormats *samplerates)
Definition: formats.c:809
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:249
FliteContext::frame_nb_samples
int frame_nb_samples
number of samples per frame
Definition: asrc_flite.c:55
FliteContext::voice
cst_voice * voice
Definition: asrc_flite.c:51
voice_entry
Definition: asrc_flite.c:88
voice_entry::name
const char * name
Definition: asrc_flite.c:89
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:235
pthread_mutex_lock
#define pthread_mutex_lock(a)
Definition: ffprobe.c:78
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:791