stamp-h1
+aio-grab_vuplus_*
diff --git a/main.c b/main.c
-index 190ff5f..c611913 100644
+index 190ff5f..ef186a8 100644
--- a/main.c
+++ b/main.c
+@@ -1,5 +1,5 @@
+ /*
+-AiO Dreambox Screengrabber v0.83a
++AiO Screengrabber v0.83a
+
+ written 2006 - 2009 by Seddi
+ Contact: seddi@ihad.tv / http://www.ihad.tv
@@ -38,6 +38,7 @@ Feel free to use the code for your own projects. See LICENSE file for details.
#include <sys/stat.h>
#include <sys/types.h>
+#define IS_VUPLUS 1
+#if IS_VUPLUS
+enum {UNKNOWN,PALLAS,VULCAN,XILLEON,BRCM7401,BRCM7400,BRCM7405,BRCM7335,BRCM7325,BRCM7346,BRCM7425};
-+char *stb_name[]={"unknown","Pallas","Vulcan","Xilleon","Brcm7401","Brcm7400","Brcm7405","Brcm7335","Brcm7325","Brcm7346","Brcm7425"};
++char *stb_name[]={"unknown","Pallas","Vulcan","Xilleon","Brcm7401","Brcm7400","Brcm7405","Brcm7335","Brcm7325","Brcm7346","Brcm7425\/7241"};
+#else
enum {UNKNOWN,PALLAS,VULCAN,XILLEON,BRCM7401,BRCM7400,BRCM7405};
static const char *stb_name[]={"unknown","Pallas","Vulcan","Xilleon","Brcm7401","Brcm7400","Brcm7405"};
static const char *file_getline(const char *filename)
{
static char *line = NULL;
-@@ -184,7 +199,6 @@ static int file_scanf_lines(const char *filename, const char *fmt, ...)
+@@ -184,10 +199,9 @@ static int file_scanf_lines(const char *filename, const char *fmt, ...)
}
// main program
-
int main(int argc, char **argv) {
- printf("AiO Dreambox Screengrabber " PACKAGE_VERSION "\n\n");
-@@ -205,11 +219,29 @@ int main(int argc, char **argv) {
+- printf("AiO Dreambox Screengrabber " PACKAGE_VERSION "\n\n");
++ printf("AiO Screengrabber " PACKAGE_VERSION "\n\n");
+
+ unsigned int xres_v = 0,yres_v = 0,xres_o,yres_o,xres,yres,aspect,width;
+ int c,osd_only,video_only,use_osd_res,use_png,use_jpg,jpg_quality,no_aspect,use_letterbox;
+@@ -205,11 +219,31 @@ int main(int argc, char **argv) {
char filename[256] = { "/tmp/screenshot.bmp" };
// detect STB
+ stb_type=BRCM7425;
+ else if (strstr(upcase(line),"7425"))
+ stb_type=BRCM7425;
++ else if (strstr(upcase(line),"7241"))
++ stb_type=BRCM7425;
+#else
line = file_getline("/proc/stb/info/model");
if (line == NULL)
return 1;
-@@ -221,6 +253,7 @@ int main(int argc, char **argv) {
+@@ -221,6 +255,7 @@ int main(int argc, char **argv) {
!strcmp(line, "dm800se") ||
!strcmp(line, "dm7020hd"))
stb_type = BRCM7405;
} else if (strstr(line, "xilleonfb")) {
stb_type = XILLEON;
} else if (strstr(line, "Pallas FB")) {
-@@ -563,16 +596,34 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
+@@ -563,16 +598,34 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
perror("/dev/mem");
return false;
}
unsigned char data[100];
unsigned int adr,adr2,ofs,ofs2,offset/*,vert_start,vert_end*/;
-@@ -582,12 +633,30 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
+@@ -582,12 +635,30 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
memcpy(data,memory,100);
//vert_start=data[0x1B]<<8|data[0x1A];
//vert_end=data[0x19]<<8|data[0x18];
munmap(memory, 100);
-@@ -609,7 +678,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
+@@ -609,7 +680,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
assert(chroma);
// grabbing luma & chroma plane from the decoder memory
// on dm800/dm500hd we have direct access to the decoder memory
memory = mmap(0, offset + stride*(ofs2+64), PROT_READ, MAP_SHARED, mem_fd, adr);
if (memory == MAP_FAILED) {
-@@ -620,7 +693,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
+@@ -620,7 +695,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
usleep(50000); // we try to get a full picture, its not possible to get a sync from the decoder so we use a delay
// and hope we get a good timing. dont ask me why, but every DM800 i tested so far produced a good
// result with a 50ms delay
// on dm8000 we have to use dma, so dont change anything here until you really know what you are doing !
unsigned int i = 0;
-@@ -639,7 +716,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
+@@ -639,7 +718,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
}
volatile unsigned long *mem_dma;
if (mem_dma == MAP_FAILED) {
perror("mmap");
return false;
-@@ -675,8 +756,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
+@@ -675,8 +758,11 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
unsigned int t = 0, t2 = 0, dat1 = 0;
unsigned int chr_luma_stride = 0x40;
unsigned int sw;
chr_luma_stride *= 2;
xsub=chr_luma_stride;
-@@ -710,10 +794,17 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
+@@ -710,10 +796,17 @@ static bool getvideo(unsigned char *video, unsigned int *xres, unsigned int *yre
dat1+=stride;
}
}