History

avfiltergraph: add an AVClass to AVFilterGraph on next major bump.

It will be used for logging, possibly also AVOptions.

Anton Khirnov committed 14 years ago

Commit 996f9f01 parent ddb44313 files · +27 −1Browse files

Showing the changes to libavfilter/avfiltergraph.c (1 of 3 files). Show all

Unified · Split

libavfilter/avfiltergraph.c+15−1
@@ -27,9 +27,23 @@ · 26 unmodified lines
2727 #include "avfiltergraph.h"
2828 #include "internal.h"
2929
30+#include "libavutil/log.h"
31+
32+static const AVClass filtergraph_class = {
33+ .class_name = "AVFilterGraph",
34+ .item_name = av_default_item_name,
35+ .version = LIBAVUTIL_VERSION_INT,
36+};
37+
3038 AVFilterGraph *avfilter_graph_alloc(void)
3139 {
32− return av_mallocz(sizeof(AVFilterGraph));
40+ AVFilterGraph *ret = av_mallocz(sizeof(AVFilterGraph));
41+ if (!ret)
42+ return NULL;
43+#if FF_API_GRAPH_AVCLASS
44+ ret->av_class = &filtergraph_class;
45+#endif
46+ return ret;
3347 }
3448
3549 void avfilter_graph_free(AVFilterGraph **graph)

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