Go to the documentation of this file.
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;
const char * ff_fbdev_default_device()
AVPixelFormat
Pixel format.
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
char * device_name
device name, format depends on device
int nb_devices
number of autodetected devices
static const struct rgb_pixfmt_map_entry rgb_pixfmt_map[]
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
AVDeviceInfo ** devices
list of autodetected devices
enum AVPixelFormat ff_get_pixfmt_from_fb_varinfo(struct fb_var_screeninfo *varinfo)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int ff_fbdev_get_device_list(AVDeviceInfoList *device_list)
int avpriv_open(const char *filename, int flags,...)
A wrapper for open() setting O_CLOEXEC.
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
enum AVPixelFormat pixfmt
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
Structure describes basic parameters of the device.
char * device_description
human friendly name
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
#define i(width, name, range_min, range_max)
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
#define AV_PIX_FMT_RGB565
#define FF_ARRAY_ELEMS(a)
int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem)
Add an element to a dynamic array.
int default_device
index of default device or -1 if no default
char * av_strdup(const char *s)
Duplicate a string.