Moved all c code to .h and .c files + removed struc_ prefix when not needed

This commit is contained in:
Quentin Renard
2024-09-05 11:38:25 +02:00
parent e7c92c0115
commit 09a88834bb
45 changed files with 304 additions and 276 deletions

22
class.c Normal file
View File

@@ -0,0 +1,22 @@
#include <libavutil/log.h>
#include <stdint.h>
#include <stdlib.h>
char* astiavClassItemName(AVClass* c, void* ptr) {
return (char*)c->item_name(ptr);
}
AVClassCategory astiavClassCategory(AVClass* c, void* ptr) {
if (c->get_category) return c->get_category(ptr);
return c->category;
}
AVClass** astiavClassParent(AVClass* c, void* ptr) {
if (c->parent_log_context_offset) {
AVClass** parent = *(AVClass ***) (((uint8_t *) ptr) + c->parent_log_context_offset);
if (parent && *parent) {
return parent;
}
}
return NULL;
}