25 #include <sys/ioctl.h> 66 const char *dev = getenv(
"FRAMEBUFFER");
74 struct fb_var_screeninfo varinfo;
75 struct fb_fix_screeninfo fixinfo;
84 for (i = 0; i <= 31; i++) {
85 snprintf(device_file,
sizeof(device_file),
"/dev/fb%d", i);
94 if (ioctl(fd, FBIOGET_VSCREENINFO, &varinfo) == -1)
96 if (ioctl(fd, FBIOGET_FSCREENINFO, &fixinfo) == -1)
115 if (default_device && !strcmp(device->
device_name, default_device)) {
117 default_device =
NULL;
Structure describes basic parameters of the device.
char * device_description
human friendly name
packed RGB 8:8:8, 24bpp, RGBRGB...
char * device_name
device name, format depends on device
#define FF_ARRAY_ELEMS(a)
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
const char * ff_fbdev_default_device()
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
int avpriv_open(const char *filename, int flags,...)
A wrapper for open() setting O_CLOEXEC.
int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem)
Add an element to a dynamic array.
Main libavdevice API header.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
enum AVPixelFormat pixfmt
AVDeviceInfo ** devices
list of autodetected devices
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
packed RGB 8:8:8, 24bpp, BGRBGR...
char * av_strdup(const char *s)
Duplicate a string.
static const struct rgb_pixfmt_map_entry rgb_pixfmt_map[]
int ff_fbdev_get_device_list(AVDeviceInfoList *device_list)
int default_device
index of default device or -1 if no default
common internal and external API header
enum AVPixelFormat ff_get_pixfmt_from_fb_varinfo(struct fb_var_screeninfo *varinfo)
#define AV_PIX_FMT_RGB565
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Frame references ownership and permissions
int nb_devices
number of autodetected devices
AVPixelFormat
Pixel format.