mirror of
https://github.com/asticode/go-astiav.git
synced 2025-10-30 03:01:47 +08:00
Moved all c code to .h and .c files + removed struc_ prefix when not needed
This commit is contained in:
22
class.c
Normal file
22
class.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user