Those functions are only useful inside filters. It is better to not support user filters until the API is more stable. This breaks audio filtering API and ABI in theory, but since it's unusable right now this shouldn't be a problem.
Showing the changes to libavfilter/avfilter.c (1 of 5 files). Show all
Unified · Split
| @@ -26,6 +26,8 @@ · 25 unmodified lines | ||
| 26 | 26 | #include "libavutil/audioconvert.h" |
| 27 | 27 | #include "libavutil/imgutils.h" |
| 28 | 28 | #include "libavcodec/avcodec.h" |
| 29 | + | |
| 30 | +#include "audio.h" | |
| 29 | 31 | #include "avfilter.h" |
| 30 | 32 | #include "internal.h" |
| 31 | 33 | |
| @@ -366,8 +368,8 @@ fail: · 334 unmodified lines | ||
| 366 | 368 | return NULL; |
| 367 | 369 | } |
| 368 | 370 | |
| 369 | −AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms, | |
| 370 | − int nb_samples) | |
| 371 | +AVFilterBufferRef *ff_get_audio_buffer(AVFilterLink *link, int perms, | |
| 372 | + int nb_samples) | |
| 371 | 373 | { |
| 372 | 374 | AVFilterBufferRef *ret = NULL; |
| 373 | 375 | |
| @@ -375,7 +377,7 @@ AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms, · 1 unmodified line | ||
| 375 | 377 | ret = link->dstpad->get_audio_buffer(link, perms, nb_samples); |
| 376 | 378 | |
| 377 | 379 | if (!ret) |
| 378 | − ret = avfilter_default_get_audio_buffer(link, perms, nb_samples); | |
| 380 | + ret = ff_default_get_audio_buffer(link, perms, nb_samples); | |
| 379 | 381 | |
| 380 | 382 | if (ret) |
| 381 | 383 | ret->type = AVMEDIA_TYPE_AUDIO; |
| @@ -570,7 +572,7 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 188 unmodified lines | ||
| 570 | 572 | draw_slice(link, y, h, slice_dir); |
| 571 | 573 | } |
| 572 | 574 | |
| 573 | −void avfilter_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) | |
| 575 | +void ff_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) | |
| 574 | 576 | { |
| 575 | 577 | void (*filter_samples)(AVFilterLink *, AVFilterBufferRef *); |
| 576 | 578 | AVFilterPad *dst = link->dstpad; |
| @@ -578,7 +580,7 @@ void avfilter_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) · 1 unmodified line | ||
| 578 | 580 | FF_DPRINTF_START(NULL, filter_samples); ff_dlog_link(NULL, link, 1); |
| 579 | 581 | |
| 580 | 582 | if (!(filter_samples = dst->filter_samples)) |
| 581 | − filter_samples = avfilter_default_filter_samples; | |
| 583 | + filter_samples = ff_default_filter_samples; | |
| 582 | 584 | |
| 583 | 585 | /* prepare to copy the samples if the buffer has insufficient permissions */ |
| 584 | 586 | if ((dst->min_perms & samplesref->perms) != dst->min_perms || |
| @@ -591,8 +593,8 @@ void avfilter_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) · 6 unmodified lines | ||
| 591 | 593 | "Copying audio data in avfilter (have perms %x, need %x, reject %x)\n", |
| 592 | 594 | samplesref->perms, link->dstpad->min_perms, link->dstpad->rej_perms); |
| 593 | 595 | |
| 594 | − link->cur_buf = avfilter_default_get_audio_buffer(link, dst->min_perms, | |
| 595 | − samplesref->audio->nb_samples); | |
| 596 | + link->cur_buf = ff_default_get_audio_buffer(link, dst->min_perms, | |
| 597 | + samplesref->audio->nb_samples); | |
| 596 | 598 | link->cur_buf->pts = samplesref->pts; |
| 597 | 599 | link->cur_buf->audio->sample_rate = samplesref->audio->sample_rate; |
| 598 | 600 | |