X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_openvuplus;a=blobdiff_plain;f=meta-openvuplus%2Frecipes-vuplus%2Faio-grab%2Faio-grab%2Faio-grab_vuplus_8394e1ba98c73d7c56d3235ef16cce253dc597cd.patch;h=ace4dbe07a93a591edbf3a4b2e741888c6aa4ea0;hp=b7208c697ad3899d5dee486e7cd377a3ffb4ee0d;hb=0d6acda3c9daf671af6c3a8e02270bae96286cd6;hpb=ff4abac25f637a256fc1e53985b7fcbfe3a52015 diff --git a/meta-openvuplus/recipes-vuplus/aio-grab/aio-grab/aio-grab_vuplus_8394e1ba98c73d7c56d3235ef16cce253dc597cd.patch b/meta-openvuplus/recipes-vuplus/aio-grab/aio-grab/aio-grab_vuplus_8394e1ba98c73d7c56d3235ef16cce253dc597cd.patch index b7208c6..ace4dbe 100644 --- a/meta-openvuplus/recipes-vuplus/aio-grab/aio-grab/aio-grab_vuplus_8394e1ba98c73d7c56d3235ef16cce253dc597cd.patch +++ b/meta-openvuplus/recipes-vuplus/aio-grab/aio-grab/aio-grab_vuplus_8394e1ba98c73d7c56d3235ef16cce253dc597cd.patch @@ -8,9 +8,16 @@ index ccfb515..a6f8d11 100644 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 #include @@ -26,7 +33,7 @@ index 190ff5f..c611913 100644 +#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"}; @@ -44,15 +51,19 @@ index 190ff5f..c611913 100644 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 @@ -79,11 +90,13 @@ index 190ff5f..c611913 100644 + 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; @@ -91,7 +104,7 @@ index 190ff5f..c611913 100644 } 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; } @@ -128,7 +141,7 @@ index 190ff5f..c611913 100644 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]; @@ -159,7 +172,7 @@ index 190ff5f..c611913 100644 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 @@ -171,7 +184,7 @@ index 190ff5f..c611913 100644 // 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 @@ -183,7 +196,7 @@ index 190ff5f..c611913 100644 // 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; @@ -195,7 +208,7 @@ index 190ff5f..c611913 100644 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; @@ -208,7 +221,7 @@ index 190ff5f..c611913 100644 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; } }