Changeset 1898


Ignore:
Timestamp:
Mar 25, 2010, 10:57:17 PM (10 years ago)
Author:
_network
Message:
  • add QboxHD toolchain and add QboxHD pmt.tmp reading in dvbapi module, thx to boubaris
  • try to fix mips dvbapi issue
Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r1822 r1898  
    4747        set (OSCamOperatingSystem "Amino")
    4848        set (CS_OS_HW "amino")
     49        set (CS_OS_SYS "linux")
     50    elseif (OSCAM_SYSTEM_NAME MATCHES "QboxHD")
     51        set (OSCamOperatingSystem "QboxHD")
     52        set (CS_OS_HW "qboxhd")
    4953        set (CS_OS_SYS "linux")
    5054    else (OSCAM_SYSTEM_NAME MATCHES "Tuxbox")
     
    129133    add_definitions ("-DOS_LINUX -DSH4 -DTUXBOX")
    130134    set (DEFAULT_CS_CONFDIR "/usr/local/etc")
     135elseif (OSCamOperatingSystem MATCHES "QboxHD")
     136    add_definitions ("-DOS_LINUX -DSH4 -DQBOXHD -DTUXBOX")
     137    set (DEFAULT_CS_CONFDIR "/var/tuxbox/config")
    131138elseif (OSCamOperatingSystem MATCHES "Windows/Cygwin")
    132139    add_definitions ("-DOS_CYGWIN32 -static")
     
    371378elseif (OSCamOperatingSystem MATCHES "WRT54G")
    372379elseif (OSCamOperatingSystem MATCHES "Amino")
     380elseif (OSCamOperatingSystem MATCHES "QboxHD")
    373381elseif (OSCamOperatingSystem MATCHES "Windows/cygwin")
    374382elseif (OSCamOperatingSystem MATCHES "NeutrinoHD")
  • trunk/module-dvbapi.c

    r1894 r1898  
    786786}
    787787
    788 #if 0
     788#ifdef QBOXHD
    789789time_t pmt_timestamp=0;
    790790int pmt_id=-1, dir_fd=-1;
     
    792792void event_handler(int signal) {
    793793    struct stat pmt_info;
    794     uchar inhalt[200], dest[200];
    795     int len;
     794    uchar inhalt[400], dest[200];
     795    uint len;
    796796    signal=signal;
    797797    int pmt_fd = open("/tmp/pmt.tmp", O_RDONLY);
     
    799799        if (fstat(pmt_fd, &pmt_info) == 0) {
    800800            if (pmt_info.st_mtime == pmt_timestamp) {
     801                close(pmt_fd);
    801802                return;
    802803            }
     
    813814
    814815            cs_sleepms(100);
    815             //02 B0 <len> <srvid1> <srvid2> ..
     816
    816817            len = read(pmt_fd,inhalt,sizeof(inhalt));
    817818            if (len<1) return;
    818 
     819#ifdef QBOXHD
     820            uint j1,j2;
     821            // QboxHD pmt.tmp is the full capmt written as a string of hex values
     822            // pmt.tmp must be longer than 3 bytes (6 hex chars) and even length
     823            if ((len<6) || ((len%2) != 0)) {
     824                cs_log("dvbapi: error parsing QboxHD pmt.tmp, incorrect length");
     825                return;
     826            }
     827
     828            for(j2=0,j1=0;j2<len;j2+=2,j1++) {
     829                if (sscanf((char*)inhalt+j2,"%02X",(uint*)dest+j1) != 1) {
     830                    cs_log("dvbapi: error parsing QboxHD pmt.tmp, data not valid in position %d",j2);
     831                    return;
     832                }
     833            }
     834
     835            cs_ddump(dest,len/2,"QboxHD pmt.tmp:");
     836
     837            pmt_id = dvbapi_parse_capmt(dest+4, (len/2)-4, -1);
     838#else
    819839            cs_ddump(inhalt,len,"pmt:");
    820840       
     
    828848
    829849            pmt_id = dvbapi_parse_capmt(dest, 7 + len - 12 - 4, -1);
     850#endif
    830851            close(pmt_fd);
    831852        }
     
    880901    }
    881902
    882 #if 0
     903#ifdef QBOXHD
    883904    int pmt_fd = open("/tmp/pmt.tmp", O_RDONLY);
    884905    if(pmt_fd>0) {
     
    962983
    963984                if (type[i]==1) {
    964                     if (pfd2[i].fd==listenfd) {                     
     985                    if (pfd2[i].fd==listenfd) {
     986                        cs_debug("dvbapi: new socket connection");
    965987                        connfd = accept(listenfd, (struct sockaddr *)&servaddr, (socklen_t *)&clilen);
    966                         cs_debug("dvbapi: new socket connection %d", connfd);
    967988
    968989                        if (connfd <= 0) {
     
    9861007                        cs_log("dvbapi: New capmt on old socket. Please report.");
    9871008                        len = read(pfd2[i].fd, mbuf, sizeof(mbuf));
    988                         cs_dump(mbuf, len, "message:");                 
     1009                        cs_dump(mbuf, len, "message:");
    9891010                    }
    9901011                } else { // type==0
  • trunk/oscam-config.h

    r1760 r1898  
    1313#  endif
    1414#  define CS_EMBEDDED
    15 #  define CS_NOSHM
     15#  ifndef QBOXHD
     16#     define CS_NOSHM
     17#  endif
    1618#  define NO_FTIME
    1719#  define CS_HW_DBOX2   1
Note: See TracChangeset for help on using the changeset viewer.