History

lavfi: change the filter registering system to match the other libraries

Removes an arbitrary hardcoded limit on the number of filters.

Anton Khirnov committed 13 years ago

Commit fa2a34c1 parent 7e8fe4b7 files · +48 −29Browse files

Showing the changes to libavfilter/avfilter.h (1 of 7 files). Show all

Unified · Split

libavfilter/avfilter.h+16−0
@@ -457,6 +457,8 @@ typedef struct AVFilter { · 456 unmodified lines
457457 int (*query_formats)(AVFilterContext *);
458458
459459 int priv_size; ///< size of private data to allocate for the filter
460+
461+ struct AVFilter *next;
460462 } AVFilter;
461463
462464 /** An instance of a filter */
@@ -622,8 +624,11 @@ AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_arrays(uint8_t **data, · 159 unmodified lines
622624 /** Initialize the filter system. Register all builtin filters. */
623625 void avfilter_register_all(void);
624626
627+#if FF_API_OLD_FILTER_REGISTER
625628 /** Uninitialize the filter system. Unregister all filters. */
629+attribute_deprecated
626630 void avfilter_uninit(void);
631+#endif
627632
628633 /**
629634 * Register a filter. This is only needed if you plan to use
@@ -646,13 +651,24 @@ int avfilter_register(AVFilter *filter); · 16 unmodified lines
646651 */
647652 AVFilter *avfilter_get_by_name(const char *name);
648653
654+/**
655+ * Iterate over all registered filters.
656+ * @return If prev is non-NULL, next registered filter after prev or NULL if
657+ * prev is the last filter. If prev is NULL, return the first registered filter.
658+ */
659+const AVFilter *avfilter_next(const AVFilter *prev);
660+
661+#if FF_API_OLD_FILTER_REGISTER
649662 /**
650663 * If filter is NULL, returns a pointer to the first registered filter pointer,
651664 * if filter is non-NULL, returns the next pointer after filter.
652665 * If the returned pointer points to NULL, the last registered filter
653666 * was already reached.
667+ * @deprecated use avfilter_next()
654668 */
669+attribute_deprecated
655670 AVFilter **av_filter_next(AVFilter **filter);
671+#endif
656672
657673 #if FF_API_AVFILTER_OPEN
658674 /**

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