fix aio-grab
authorikseong <ikseong@dev03-server.(none)>
Thu, 3 Jun 2010 10:39:02 +0000 (19:39 +0900)
committerikseong <ikseong@dev03-server.(none)>
Thu, 3 Jun 2010 10:39:02 +0000 (19:39 +0900)
add PR,PV,SRCDATE for vuplus by _vuplus
append aio-grab_vuplus.patch

recipes/aio-grab/aio-grab.bb [changed mode: 0644->0755]
recipes/aio-grab/aio-grab/aio-grab_vuplus.patch [new file with mode: 0755]

old mode 100644 (file)
new mode 100755 (executable)
index 28254d7..a11c9b2
@@ -4,7 +4,13 @@ LICENSE = "GPL"
 PR = "r0"
 PV = "0.8+cvs${SRCDATE}"
 SRCDATE = "20100220"
+
+PR_vuplus = "r1"
+PV_vuplus = "0.8cvs${SRCDATE}"
+SRCDATE_vuplus = "20090625"
 SRC_URI="cvs://anonymous@cvs.schwerkraft.elitedvb.net/cvsroot/aio-grab;module=aio-grab;method=pserver"
+SRC_URI_append_vuplus = "\
+       file://aio-grab_vuplus.patch;patch=1"
 
 S = "${WORKDIR}/aio-grab"
 
diff --git a/recipes/aio-grab/aio-grab/aio-grab_vuplus.patch b/recipes/aio-grab/aio-grab/aio-grab_vuplus.patch
new file mode 100755 (executable)
index 0000000..6d44241
--- /dev/null
@@ -0,0 +1,67 @@
+--- aio-grab/main.c    2009-06-26 01:13:25.000000000 +0900
++++ aio-grab/main3.c   2010-02-02 09:19:06.000000000 +0900
+@@ -85,8 +85,8 @@
+ void combine(unsigned char *output, unsigned char *video, unsigned char *osd, unsigned char *osd_alpha, int xres, int yres);
+ char* upcase(char* mixedstr);
+-enum {UNKNOWN,PALLAS,VULCAN,XILLEON,BRCM7401,BRCM4380};
+-char *stb_name[]={"unknown","Pallas","Vulcan","Xilleon","Brcm7401","Brcm4380"};
++enum {UNKNOWN,PALLAS,VULCAN,XILLEON,BRCM7401,BRCM4380, VUPLUSDUO, VUPLUSSOLO};
++char *stb_name[]={"unknown","Pallas","Vulcan","Xilleon","Brcm7401","Brcm4380", "VuplusDuo", "VuplusSolo"};
+ int stb_type=UNKNOWN;
+ // main program
+@@ -123,12 +123,27 @@
+       pclose(pipe);
+       if (stb_type == BRCM7401) // Bcrm7401 + Bcrm4380 use the same framebuffer string, so fall back to /proc/cpuinfO for detecting DM8000
+       {
+-              pipe=popen("cat /proc/cpuinfo","r");
+-              while (fgets(buf,sizeof(buf),pipe))
++              pipe=popen("cat /proc/stb/info/version","r");
++              memset(buf, 0, sizeof(buf));
++              fgets(buf,4,pipe);
++
++              printf("%s\n", buf);
++
++              if(!strcmp(buf, "120"))
++                      stb_type=VUPLUSDUO;
++              else if(!strcmp(buf, "140"))
++                      stb_type=VUPLUSSOLO;                            
++              pclose(pipe);
++
++              if(stb_type == UNKNOWN)
+               {
+-                      if (strstr(upcase(buf),"BRCM4380")) {stb_type=BRCM4380;}
++                      pipe=popen("cat /proc/cpuinfo","r");
++                      while (fgets(buf,sizeof(buf),pipe))
++                      {
++                              if (strstr(upcase(buf),"BRCM4380")) {stb_type=BRCM4380;}
++                      }
++                      pclose(pipe);
+               }
+-              pclose(pipe);
+       }
+       if (stb_type == UNKNOWN)
+       {
+@@ -439,6 +454,21 @@
+ {
+       printf("Grabbing Video ...\n");
+       
++      if(stb_type == VUPLUSSOLO || stb_type == VUPLUSDUO)
++      {
++              
++              int fd_video = open("/dev/dvb/adapter0/video0", O_RDONLY);
++              if (fd_video < 0)
++              {
++                      printf("could not open video device");
++                      return;
++              }        
++              
++              int r = read(fd_video, video, 1920 * 1080 * 3 );
++              *xres = 1920;
++              *yres = 1080;
++              return;
++      }
+       int mem_fd;
+       //unsigned char *memory;
+       void *memory;