History

Generalize pixel format enum fields to int formats.

This is needed to make the libavfilter framework work with audio filters. In particular add a type field to AVFilterLink, change the field types: enum PixelFormat format -> int format in AVFilterBuffer enum PixelFormat *formats -> int *formats in AVFilterFormats enum PixelFormat *format -> int format in AVFilterLink and change the function signatures: AVFilterFormats *avfilter_make_format_list(const enum PixelFormat *pix_fmts); -> AVFilterFormats *avfilter_make_format_list(const int *fmts); int avfilter_add_colorspace(AVFilterFormats **avff, enum PixelFormat pix_fmt); -> int avfilter_add_format(AVFilterFormats **avff, int fmt); AVFilterFormats *avfilter_all_colorspaces(void); -> AVFilterFormats *avfilter_all_formats(enum AVMediaType type); This change breaks libavfilter API/ABI. Patch by S.N. Hemanth Meenakshisundaram |smeenaks|ucsd|edu|. Originally committed as revision 24424 to svn://svn.ffmpeg.org/ffmpeg/trunk

S.N. Hemanth Meenakshisundaram committed 16 years ago

Commit bdab6141 parent 98137a16 files · +43 −33Browse files

Showing the changes to libavfilter/avfilter.c (1 of 6 files). Show all

Unified · Split

libavfilter/avfilter.c+4−2
@@ -98,7 +98,9 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, · 97 unmodified lines
98 link->dst = dst;98 link->dst = dst;
99 link->srcpad = srcpad;99 link->srcpad = srcpad;
100 link->dstpad = dstpad;100 link->dstpad = dstpad;
101 link->format = PIX_FMT_NONE;101 link->type = src->output_pads[srcpad].type;
102 assert(PIX_FMT_NONE == -1 && SAMPLE_FMT_NONE == -1);
103 link->format = -1;
102 104
103 return 0;105 return 0;
104}106}
@@ -122,7 +124,7 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, · 17 unmodified lines
122 link->dstpad = in;124 link->dstpad = in;
123 filt->inputs[in] = link;125 filt->inputs[in] = link;
124 126
125 /* if any information on supported colorspaces already exists on the127 /* if any information on supported media formats already exists on the
126 * link, we need to preserve that */128 * link, we need to preserve that */
127 if(link->out_formats)129 if(link->out_formats)
128 avfilter_formats_changeref(&link->out_formats,130 avfilter_formats_changeref(&link->out_formats,

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