1 --- aio-grab/main.c 2009-06-26 01:13:25.000000000 +0900
2 +++ aio-grab/main3.c 2010-02-02 09:19:06.000000000 +0900
4 void combine(unsigned char *output, unsigned char *video, unsigned char *osd, unsigned char *osd_alpha, int xres, int yres);
5 char* upcase(char* mixedstr);
7 -enum {UNKNOWN,PALLAS,VULCAN,XILLEON,BRCM7401,BRCM4380};
8 -char *stb_name[]={"unknown","Pallas","Vulcan","Xilleon","Brcm7401","Brcm4380"};
9 +enum {UNKNOWN,PALLAS,VULCAN,XILLEON,BRCM7401,BRCM4380, VUPLUSDUO, VUPLUSSOLO};
10 +char *stb_name[]={"unknown","Pallas","Vulcan","Xilleon","Brcm7401","Brcm4380", "VuplusDuo", "VuplusSolo"};
16 if (stb_type == BRCM7401) // Bcrm7401 + Bcrm4380 use the same framebuffer string, so fall back to /proc/cpuinfO for detecting DM8000
18 - pipe=popen("cat /proc/cpuinfo","r");
19 - while (fgets(buf,sizeof(buf),pipe))
20 + pipe=popen("cat /proc/stb/info/version","r");
21 + memset(buf, 0, sizeof(buf));
24 + printf("%s\n", buf);
26 + if(!strcmp(buf, "120"))
28 + else if(!strcmp(buf, "140"))
29 + stb_type=VUPLUSSOLO;
32 + if(stb_type == UNKNOWN)
34 - if (strstr(upcase(buf),"BRCM4380")) {stb_type=BRCM4380;}
35 + pipe=popen("cat /proc/cpuinfo","r");
36 + while (fgets(buf,sizeof(buf),pipe))
38 + if (strstr(upcase(buf),"BRCM4380")) {stb_type=BRCM4380;}
44 if (stb_type == UNKNOWN)
48 printf("Grabbing Video ...\n");
50 + if(stb_type == VUPLUSSOLO || stb_type == VUPLUSDUO)
53 + int fd_video = open("/dev/dvb/adapter0/video0", O_RDONLY);
56 + printf("could not open video device");
60 + int r = read(fd_video, video, 1920 * 1080 * 3 );
66 //unsigned char *memory;