History

avfilter: deprecate avfilter_link_get_channels()

And move the channels field to the public section of the struct.

James Almer committed 8 years ago

Commit 798dcf21 parent b9ad04b4 files · +20 −6Browse files

Unified · Split

4 files
  1. doc/APIchanges +4 −0
  2. libavfilter/avfilter.c +2 −0
  3. libavfilter/avfilter.h +10 −5
  4. libavfilter/version.h +4 −1
doc/APIchanges+4−0
@@ -15,6 +15,10 @@ libavutil: 2017-10-21 · 14 unmodified lines
1515
1616 API changes, most recent first:
1717
18+2018-01-xx - xxxxxxx - lavfi 7.11.101 - avfilter.h
19+ Deprecate avfilter_link_get_channels(), and make AVFilterLink->channels
20+ public.
21+
1822 2017-xx-xx - xxxxxxx - lavr 4.0.0 - avresample.h
1923 Deprecate the entire library. Merged years ago to provide compatibility
2024 with Libav, it remained unmaintained by the FFmpeg project and duplicated
libavfilter/avfilter.c+2−0
@@ -183,10 +183,12 @@ void avfilter_link_free(AVFilterLink **link) · 182 unmodified lines
183183 av_freep(link);
184184 }
185185
186+#if FF_API_FILTER_GET_SET
186187 int avfilter_link_get_channels(AVFilterLink *link)
187188 {
188189 return link->channels;
189190 }
191+#endif
190192
191193 void ff_filter_set_ready(AVFilterContext *filter, unsigned priority)
192194 {
libavfilter/avfilter.h+10−5
@@ -448,6 +448,11 @@ struct AVFilterLink { · 447 unmodified lines
448448 */
449449 AVRational time_base;
450450
451+ /**
452+ * Number of channels.
453+ */
454+ int channels;
455+
451456 /*****************************************************************
452457 * All fields below this line are not part of the public API. They
453458 * may not be used outside of libavfilter and can be changed and
@@ -551,11 +556,6 @@ struct AVFilterLink { · 97 unmodified lines
551556 */
552557 int max_samples;
553558
554− /**
555− * Number of channels.
556− */
557− int channels;
558−
559559 /**
560560 * Link processing flags.
561561 */
@@ -647,10 +647,15 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, · 85 unmodified lines
647647 */
648648 void avfilter_link_free(AVFilterLink **link);
649649
650+#if FF_API_FILTER_GET_SET
650651 /**
651652 * Get the number of channels of a link.
653+ * @deprecated This accessor used to be provided for ABI compatibility, and
654+ * does not need to be used anymore.
652655 */
656+attribute_deprecated
653657 int avfilter_link_get_channels(AVFilterLink *link);
658+#endif
654659
655660 /**
656661 * Set the closed field of a link.
libavfilter/version.h+4−1
@@ -31,7 +31,7 @@ · 30 unmodified lines
3131
3232 #define LIBAVFILTER_VERSION_MAJOR 7
3333 #define LIBAVFILTER_VERSION_MINOR 11
34−#define LIBAVFILTER_VERSION_MICRO 100
34+#define LIBAVFILTER_VERSION_MICRO 101
3535
3636 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
3737 LIBAVFILTER_VERSION_MINOR, \
@@ -55,5 +55,8 @@ · 17 unmodified lines
5555 #ifndef FF_API_LAVR_OPTS
5656 #define FF_API_LAVR_OPTS (LIBAVFILTER_VERSION_MAJOR < 8)
5757 #endif
58+#ifndef FF_API_FILTER_GET_SET
59+#define FF_API_FILTER_GET_SET (LIBAVFILTER_VERSION_MAJOR < 8)
60+#endif
5861
5962 #endif /* AVFILTER_VERSION_H */

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