Nothing in it needs to be visible to filters.
Showing the changes to libavfilter (3 of 3 files). Show all
Unified · Split
| @@ -1647,3 +1647,9 @@ int ff_outlink_frame_wanted(AVFilterLink *link) · 1646 unmodified lines | |||
| 1647 | FilterLinkInternal * const li = ff_link_internal(link); | 1647 | FilterLinkInternal * const li = ff_link_internal(link); |
| 1648 | return li->frame_wanted_out; | 1648 | return li->frame_wanted_out; |
| 1649 | } | 1649 | } |
| 1650 | |||
| 1651 | int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, | ||
| 1652 | void *arg, int *ret, int nb_jobs) | ||
| 1653 | { | ||
| 1654 | return fffilterctx(ctx)->execute(ctx, func, arg, ret, nb_jobs); | ||
| 1655 | } | ||
| @@ -92,6 +92,24 @@ static inline FilterLinkInternal *ff_link_internal(AVFilterLink *link) · 91 unmodified lines | |||
| 92 | return (FilterLinkInternal*)link; | 92 | return (FilterLinkInternal*)link; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | typedef struct FFFilterContext { | ||
| 96 | /** | ||
| 97 | * The public AVFilterContext. See avfilter.h for it. | ||
| 98 | */ | ||
| 99 | AVFilterContext p; | ||
| 100 | |||
| 101 | avfilter_execute_func *execute; | ||
| 102 | |||
| 103 | // 1 when avfilter_init_*() was successfully called on this filter | ||
| 104 | // 0 otherwise | ||
| 105 | int initialized; | ||
| 106 | } FFFilterContext; | ||
| 107 | |||
| 108 | static inline FFFilterContext *fffilterctx(AVFilterContext *ctx) | ||
| 109 | { | ||
| 110 | return (FFFilterContext*)ctx; | ||
| 111 | } | ||
| 112 | |||
| 95 | typedef struct AVFilterCommand { | 113 | typedef struct AVFilterCommand { |
| 96 | double time; ///< time expressed in seconds | 114 | double time; ///< time expressed in seconds |
| 97 | char *command; ///< command | 115 | char *command; ///< command |
| @@ -199,24 +199,6 @@ static inline FilterLink* ff_filter_link(AVFilterLink *link) · 198 unmodified lines | |||
| 199 | return (FilterLink*)link; | 199 | return (FilterLink*)link; |
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | typedef struct FFFilterContext { | ||
| 203 | /** | ||
| 204 | * The public AVFilterContext. See avfilter.h for it. | ||
| 205 | */ | ||
| 206 | AVFilterContext p; | ||
| 207 | |||
| 208 | avfilter_execute_func *execute; | ||
| 209 | |||
| 210 | // 1 when avfilter_init_*() was successfully called on this filter | ||
| 211 | // 0 otherwise | ||
| 212 | int initialized; | ||
| 213 | } FFFilterContext; | ||
| 214 | |||
| 215 | static inline FFFilterContext *fffilterctx(AVFilterContext *ctx) | ||
| 216 | { | ||
| 217 | return (FFFilterContext*)ctx; | ||
| 218 | } | ||
| 219 | |||
| 220 | /** | 202 | /** |
| 221 | * The filter is aware of hardware frames, and any hardware frame context | 203 | * The filter is aware of hardware frames, and any hardware frame context |
| 222 | * should not be automatically propagated through it. | 204 | * should not be automatically propagated through it. |
| @@ -614,10 +596,7 @@ int ff_append_outpad_free_name(AVFilterContext *f, AVFilterPad *p); · 391 unmodified lines | |||
| 614 | */ | 596 | */ |
| 615 | int ff_fmt_is_in(int fmt, const int *fmts); | 597 | int ff_fmt_is_in(int fmt, const int *fmts); |
| 616 | 598 | ||
| 617 | static av_always_inline int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, | 599 | int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, |
| 618 | void *arg, int *ret, int nb_jobs) | 600 | void *arg, int *ret, int nb_jobs); |
| 619 | { | ||
| 620 | return fffilterctx(ctx)->execute(ctx, func, arg, ret, nb_jobs); | ||
| 621 | } | ||
| 622 | 601 | ||
| 623 | #endif /* AVFILTER_FILTERS_H */ | 602 | #endif /* AVFILTER_FILTERS_H */ |