aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice/fbdev_common.c
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki@gmail.com>2013-11-07 19:06:38 +0100
committerLukasz Marek <lukasz.m.luki@gmail.com>2013-12-06 19:15:47 +0100
commitfa3bfeb1c152c03cd98430992dd670d59007b051 (patch)
treef701aa180b9af2f128b252dc6b43366d379484fb /libavdevice/fbdev_common.c
parent90539cea336fd513c47295a03c164cb4a851166f (diff)
downloadffmpeg-fa3bfeb1c152c03cd98430992dd670d59007b051.tar.gz
lavd/fbdev_enc: add default device
Use device specified by environment variable FRAMEBUFFER or /dev/fb0 as default. Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Diffstat (limited to 'libavdevice/fbdev_common.c')
-rw-r--r--libavdevice/fbdev_common.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavdevice/fbdev_common.c b/libavdevice/fbdev_common.c
index eb8f3d2581..45ae08b698 100644
--- a/libavdevice/fbdev_common.c
+++ b/libavdevice/fbdev_common.c
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <stdlib.h>
#include "fbdev_common.h"
#include "libavutil/common.h"
@@ -55,3 +56,12 @@ enum AVPixelFormat ff_get_pixfmt_from_fb_varinfo(struct fb_var_screeninfo *varin
return AV_PIX_FMT_NONE;
}
+
+const char* ff_fbdev_default_device()
+{
+ const char *dev = getenv("FRAMEBUFFER");
+ if (!dev)
+ dev = "/dev/fb0";
+ return dev;
+}
+