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
457 int (*query_formats)(AVFilterContext *);457 int (*query_formats)(AVFilterContext *);
458 458
459 int priv_size; ///< size of private data to allocate for the filter459 int priv_size; ///< size of private data to allocate for the filter
460
461 struct AVFilter *next;
460} AVFilter;462} AVFilter;
461 463
462/** An instance of a filter */464/** An instance of a filter */
@@ -622,8 +624,11 @@ AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_arrays(uint8_t **data, · 159 unmodified lines
622/** Initialize the filter system. Register all builtin filters. */624/** Initialize the filter system. Register all builtin filters. */
623void avfilter_register_all(void);625void avfilter_register_all(void);
624 626
627#if FF_API_OLD_FILTER_REGISTER
625/** Uninitialize the filter system. Unregister all filters. */628/** Uninitialize the filter system. Unregister all filters. */
629attribute_deprecated
626void avfilter_uninit(void);630void avfilter_uninit(void);
631#endif
627 632
628/**633/**
629 * Register a filter. This is only needed if you plan to use634 * Register a filter. This is only needed if you plan to use
@@ -646,13 +651,24 @@ int avfilter_register(AVFilter *filter); · 16 unmodified lines
646 */651 */
647AVFilter *avfilter_get_by_name(const char *name);652AVFilter *avfilter_get_by_name(const char *name);
648 653
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 */
659const AVFilter *avfilter_next(const AVFilter *prev);
660
661#if FF_API_OLD_FILTER_REGISTER
649/**662/**
650 * If filter is NULL, returns a pointer to the first registered filter pointer,663 * If filter is NULL, returns a pointer to the first registered filter pointer,
651 * if filter is non-NULL, returns the next pointer after filter.664 * if filter is non-NULL, returns the next pointer after filter.
652 * If the returned pointer points to NULL, the last registered filter665 * If the returned pointer points to NULL, the last registered filter
653 * was already reached.666 * was already reached.
667 * @deprecated use avfilter_next()
654 */668 */
669attribute_deprecated
655AVFilter **av_filter_next(AVFilter **filter);670AVFilter **av_filter_next(AVFilter **filter);
671#endif
656 672
657#if FF_API_AVFILTER_OPEN673#if FF_API_AVFILTER_OPEN
658/**674/**

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