gstreamer-rs/gstreamer-allocators/sys/tests/constant.c

41 lines
1.5 KiB
C
Raw Normal View History

2022-03-30 15:45:54 +00:00
// Generated by gir (https://github.com/gtk-rs/gir @ 9aa16ead87e1)
2022-04-06 06:38:34 +00:00
// from gir-files (https://github.com/gtk-rs/gir-files @ b8b90867ab35)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ def5d67e738d)
2022-02-26 15:16:35 +00:00
// DO NOT EDIT
#include "manual.h"
#include <stdio.h>
#define PRINT_CONSTANT(CONSTANT_NAME) \
printf("%s;", #CONSTANT_NAME); \
printf(_Generic((CONSTANT_NAME), \
char *: "%s", \
const char *: "%s", \
char: "%c", \
signed char: "%hhd", \
unsigned char: "%hhu", \
short int: "%hd", \
unsigned short int: "%hu", \
int: "%d", \
unsigned int: "%u", \
long: "%ld", \
unsigned long: "%lu", \
long long: "%lld", \
unsigned long long: "%llu", \
float: "%f", \
double: "%f", \
long double: "%ld"), \
CONSTANT_NAME); \
printf("\n");
int main() {
PRINT_CONSTANT(GST_ALLOCATOR_DMABUF);
PRINT_CONSTANT(GST_ALLOCATOR_FD);
PRINT_CONSTANT(GST_CAPS_FEATURE_MEMORY_DMABUF);
PRINT_CONSTANT((guint) GST_FD_MEMORY_FLAG_DONT_CLOSE);
PRINT_CONSTANT((guint) GST_FD_MEMORY_FLAG_KEEP_MAPPED);
PRINT_CONSTANT((guint) GST_FD_MEMORY_FLAG_MAP_PRIVATE);
PRINT_CONSTANT((guint) GST_FD_MEMORY_FLAG_NONE);
return 0;
}