History

lavfi: drop planar/packed negotiation support

The planar/packed switch and the packing_formats list is no longer required, since the planar/packed information is now stored in the sample format enum. This is technically a major API break, possibly it should be not too painful as we marked the audio filtering API as unstable.

Stefano Sabatini committed 14 years ago

Commit 4d4098d1 parent 183596f28 files · +71 −145Browse files

Showing the changes to libavfilter/avfiltergraph.c (1 of 28 files). Show all

Unified · Split

libavfilter/avfiltergraph.c+6−10
@@ -200,14 +200,12 @@ static int insert_conv_filter(AVFilterGraph *graph, AVFilterLink *link, · 199 unmodified lines
200 200
201 if (link->type == AVMEDIA_TYPE_AUDIO &&201 if (link->type == AVMEDIA_TYPE_AUDIO &&
202 (((link = filt_ctx-> inputs[0]) &&202 (((link = filt_ctx-> inputs[0]) &&
203 (!ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts) ||203 !ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts)) ||
204 !avfilter_merge_formats(link->in_packing, link->out_packing))) ||
205 ((link = filt_ctx->outputs[0]) &&204 ((link = filt_ctx->outputs[0]) &&
206 (!ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts) ||205 !ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts)))
207 !avfilter_merge_formats(link->in_packing, link->out_packing))))
208 ) {206 ) {
209 av_log(NULL, AV_LOG_ERROR,207 av_log(NULL, AV_LOG_ERROR,
210 "Impossible to convert between the channel layouts/packing formats supported by the filter "208 "Impossible to convert between the channel layouts formats supported by the filter "
211 "'%s' and the filter '%s'\n", link->src->name, link->dst->name);209 "'%s' and the filter '%s'\n", link->src->name, link->dst->name);
212 return AVERROR(EINVAL);210 return AVERROR(EINVAL);
213 }211 }
@@ -219,7 +217,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 5 unmodified lines
219{217{
220 int i, j, ret;218 int i, j, ret;
221 char filt_args[128];219 char filt_args[128];
222 AVFilterFormats *formats, *packing;220 AVFilterFormats *formats;
223 AVFilterChannelLayouts *chlayouts;221 AVFilterChannelLayouts *chlayouts;
224 AVFilterFormats *samplerates;222 AVFilterFormats *samplerates;
225 int scaler_count = 0, resampler_count = 0;223 int scaler_count = 0, resampler_count = 0;
@@ -254,8 +252,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 28 unmodified lines
254 return ret;252 return ret;
255 }253 }
256 else if (link->type == AVMEDIA_TYPE_AUDIO) {254 else if (link->type == AVMEDIA_TYPE_AUDIO) {
257 if (!link->in_channel_layouts || !link->out_channel_layouts ||255 if (!link->in_channel_layouts || !link->out_channel_layouts)
258 !link->in_packing || !link->out_packing)
259 return AVERROR(EINVAL);256 return AVERROR(EINVAL);
260 257
261 /* Merge all three list before checking: that way, in all258 /* Merge all three list before checking: that way, in all
@@ -264,9 +261,8 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 2 unmodified lines
264 formats = avfilter_merge_formats(link->in_formats, link->out_formats);261 formats = avfilter_merge_formats(link->in_formats, link->out_formats);
265 chlayouts = ff_merge_channel_layouts(link->in_channel_layouts , link->out_channel_layouts);262 chlayouts = ff_merge_channel_layouts(link->in_channel_layouts , link->out_channel_layouts);
266 samplerates = ff_merge_samplerates (link->in_samplerates, link->out_samplerates);263 samplerates = ff_merge_samplerates (link->in_samplerates, link->out_samplerates);
267 packing = avfilter_merge_formats(link->in_packing, link->out_packing);
268 264
269 if (!formats || !chlayouts || !packing || !samplerates)265 if (!formats || !chlayouts || !samplerates)
270 if (ret = insert_conv_filter(graph, link, "aconvert", NULL))266 if (ret = insert_conv_filter(graph, link, "aconvert", NULL))
271 return ret;267 return ret;
272#else268#else

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t