--- /dev/null
+--- a/fbshot.c
++++ b/fbshot.c
+@@ -148,6 +148,8 @@
+ pict->bps=fb_varinfo.bits_per_pixel;
+ pict->gray=fb_varinfo.grayscale;
+
++ int stride=fb_fixinfo.line_length;
++
+ if(fb_fixinfo.visual==FB_VISUAL_PSEUDOCOLOR){
+ pict->colormap=(struct fb_cmap*)malloc(sizeof(struct fb_cmap));
+ pict->colormap->red=(__u16*)malloc(sizeof(__u16)*(1<<pict->bps));
+@@ -203,8 +205,24 @@
+ if (vt_num!=-1)
+ chvt(vt_num);
+
+- j= (read(fd, pict->buffer, ((pict->xres * pict->yres) * i) )!=
+- (pict->xres * pict->yres *i ));
++ /* Workaround for broken osd screenshot with new fb driver
++ and 1280x720 resolution */
++ if ((pict->xres * i) < stride) {
++ char* toBuf = pict->buffer;
++ int fromRead = 0;
++ int ii;
++ for (ii = 0; ii < pict->yres; ii++) {
++ j = (read(fd, toBuf, pict->xres*i) != (pict->xres *i));
++ fromRead += stride;
++ int seekRet = lseek(fd, fromRead, SEEK_SET);
++ toBuf += pict->xres * i;
++ if (j != 0)
++ break;
++ }
++ }
++ else
++ j = (read(fd, pict->buffer, ((pict->xres * pict->yres) * i) ) != (pict->xres * pict->yres *i ));
++
+ #ifdef DEBUG
+ printf("to read:%i read:%i\n",(pict->xres* pict->yres * i), j);
+ #endif
$(REMOVE)/hotplug
touch $@
-$(D)/fbshot: $(D)/zlib $(ARCHIVE)/fbshot-0.3.tar.gz | $(TARGETPREFIX)
- $(UNTAR)/fbshot-0.3.tar.gz
- pushd $(BUILD_TMP)/fbshot-0.3 && \
+$(D)/fbshot: $(D)/zlib $(ARCHIVE)/fbshot-$(FBSHOT_VER).tar.gz | $(TARGETPREFIX)
+ $(UNTAR)/fbshot-$(FBSHOT_VER).tar.gz
+ pushd $(BUILD_TMP)/fbshot-$(FBSHOT_VER) && \
$(PATCH)/fbshot-0.3-32bit_cs_fb.diff && \
+ $(PATCH)/fbshot_cs_hd2.diff && \
$(TARGET)-gcc $(TARGET_CFLAGS) $(TARGET_LDFLAGS) fbshot.c -lpng -lz -o $(TARGETPREFIX)/bin/fbshot
cd $(TARGETPREFIX)/bin && \
ln -sf fbshot dboxshot
- $(REMOVE)/fbshot-0.3
+ $(REMOVE)/fbshot-$(FBSHOT_VER)
touch $@
$(D)/ntp: $(D)/openssl $(ARCHIVE)/ntp-$(NTP_VER).tar.gz | $(TARGETPREFIX)
$(ARCHIVE)/hotplug.tar.gz:
$(WGET) http://www.fhloston-paradise.de/hotplug.tar.gz
-$(ARCHIVE)/fbshot-0.3.tar.gz:
- $(WGET) http://www.fhloston-paradise.de/fbshot-0.3.tar.gz
+$(ARCHIVE)/fbshot-$(FBSHOT_VER).tar.gz:
+ $(WGET) http://distro.ibiblio.org/amigolinux/download/Utils/fbshot/fbshot-$(FBSHOT_VER).tar.gz
$(ARCHIVE)/ffmpeg-git-$(FFMPEG_GIT).tar.gz:
set -e; cd $(BUILD_TMP); \
# C library for parsing XML
EXPAT_VER = 2.2.0
+# Picture from Framebuffer
+FBSHOT_VER = 0.3
+
# FFMPEG-3.3 | A complete, cross-platform solution to record, convert and stream audio and video
FFMPEG_GIT = 2ba896f