History

avfilter/internal: Uninline ff_insert_(in|out)pad()

These functions are not hot at all.

Andreas Rheinhardt committed 5 years ago

Commit dff17091 parent d905af02 files · +24 −29Browse files

Unified · Split

2 files
  1. libavfilter/avfilter.c +21 −3
  2. libavfilter/internal.h +3 −26
libavfilter/avfilter.c+21−3
@@ -101,9 +101,17 @@ void ff_command_queue_pop(AVFilterContext *filter) · 100 unmodified lines
101 av_free(c);101 av_free(c);
102}102}
103 103
104int ff_append_pad(unsigned *count,104/**
105 AVFilterPad **pads, AVFilterLink ***links,105 * Append a new pad.
106 AVFilterPad *newpad)106 *
107 * @param count Pointer to the number of pads in the list
108 * @param pads Pointer to the pointer to the beginning of the list of pads
109 * @param links Pointer to the pointer to the beginning of the list of links
110 * @param newpad The new pad to add. A copy is made when adding.
111 * @return >= 0 in case of success, a negative AVERROR code on error
112 */
113static int append_pad(unsigned *count, AVFilterPad **pads,
114 AVFilterLink ***links, AVFilterPad *newpad)
107{115{
108 AVFilterLink **newlinks;116 AVFilterLink **newlinks;
109 AVFilterPad *newpads;117 AVFilterPad *newpads;
@@ -126,6 +134,16 @@ int ff_append_pad(unsigned *count, · 16 unmodified lines
126 return 0;134 return 0;
127}135}
128 136
137int ff_append_inpad(AVFilterContext *f, AVFilterPad *p)
138{
139 return append_pad(&f->nb_inputs, &f->input_pads, &f->inputs, p);
140}
141
142int ff_append_outpad(AVFilterContext *f, AVFilterPad *p)
143{
144 return append_pad(&f->nb_outputs, &f->output_pads, &f->outputs, p);
145}
146
129int avfilter_link(AVFilterContext *src, unsigned srcpad,147int avfilter_link(AVFilterContext *src, unsigned srcpad,
130 AVFilterContext *dst, unsigned dstpad)148 AVFilterContext *dst, unsigned dstpad)
131{149{
libavfilter/internal.h+3−26
@@ -230,33 +230,10 @@ void ff_tlog_ref(void *ctx, AVFrame *ref, int end); · 229 unmodified lines
230void ff_tlog_link(void *ctx, AVFilterLink *link, int end);230void ff_tlog_link(void *ctx, AVFilterLink *link, int end);
231 231
232/**232/**
233 * Insert a new pad.233 * Append a new input/output pad to the filter's list of such pads.
234 *
235 * @param count Pointer to the number of pads in the list
236 * @param pads Pointer to the pointer to the beginning of the list of pads
237 * @param links Pointer to the pointer to the beginning of the list of links
238 * @param newpad The new pad to add. A copy is made when adding.
239 * @return >= 0 in case of success, a negative AVERROR code on error
240 */234 */
241int ff_append_pad(unsigned *count,235int ff_append_inpad (AVFilterContext *f, AVFilterPad *p);
242 AVFilterPad **pads, AVFilterLink ***links,236int ff_append_outpad(AVFilterContext *f, AVFilterPad *p);
243 AVFilterPad *newpad);
244
245/** Insert a new input pad for the filter. */
246static inline int ff_append_inpad(AVFilterContext *f,
247 AVFilterPad *p)
248{
249 return ff_append_pad(&f->nb_inputs,
250 &f->input_pads, &f->inputs, p);
251}
252
253/** Insert a new output pad for the filter. */
254static inline int ff_append_outpad(AVFilterContext *f,
255 AVFilterPad *p)
256{
257 return ff_append_pad(&f->nb_outputs,
258 &f->output_pads, &f->outputs, p);
259}
260 237
261/**238/**
262 * Request an input frame from the filter at the other end of the link.239 * Request an input frame from the filter at the other end of the link.

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