Changeset 11801
- Timestamp:
- 11/28/11 20:40:58 (12 years ago)
- Location:
- titan/titan
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/epg.h
r11722 r11801 895 895 896 896 transponderid = (onid << 16) | tid; 897 897 898 898 if(getlinkedchannel(chnode, serviceid, transponderid) == NULL) 899 899 addlinkedchannel(chnode, serviceid, transponderid, NULL); … … 1030 1030 1031 1031 //Parse Descriptor 1032 void parseeitdesc(struct channel* chnode, struct epg* epgnode, unsigned char *buf, int len) 1033 { 1034 //int pds = 0; 1035 1032 void parseeitdesc(struct channel* chnode, struct epg* epgnode, unsigned char *buf, int len, int onlylinkedchannel) 1033 { 1036 1034 unsigned char *p; 1037 1035 for(p = buf; p < buf + len; p += 2 + p[1]) 1038 1036 { 1037 if(onlylinkedchannel == 1 && (int)p[0] != 0x4A) continue; 1039 1038 switch((int)p[0]) 1040 1039 { … … 1110 1109 unsigned long transponderid = 0; 1111 1110 int serviceid = 0, eventid = 0; 1111 int onlylinkedchannel = 0; 1112 1112 1113 1113 len -= 4; //remove CRC … … 1117 1117 for (p = (unsigned char*)&eit->data; p < buf + len; p += EITEVENTLEN + GETEITDESCLEN(p)) 1118 1118 { 1119 onlylinkedchannel = 0; 1119 1120 struct eitevent* evt = (struct eitevent*)p; 1120 1121 … … 1151 1152 { 1152 1153 m_unlock(&status.epgmutex, 4); 1153 continue; 1154 } 1155 delepg(tmpchnode, eventid, 1); 1154 onlylinkedchannel = 1; 1155 } 1156 else 1157 delepg(tmpchnode, eventid, 1); 1156 1158 } 1157 1159 … … 1174 1176 #endif 1175 1177 1176 epgnode = addepg(tmpchnode, eventid, eit->version_number, starttime, endtime, NULL, 1); 1177 if(epgnode == NULL) 1178 { 1179 debug(1000, "out -> NULL detect"); 1180 m_unlock(&status.epgmutex, 4); 1181 continue; 1178 if(onlylinkedchannel == 0) 1179 { 1180 epgnode = addepg(tmpchnode, eventid, eit->version_number, starttime, endtime, NULL, 1); 1181 if(epgnode == NULL) 1182 { 1183 debug(1000, "out -> NULL detect"); 1184 m_unlock(&status.epgmutex, 4); 1185 continue; 1186 } 1182 1187 } 1183 1188 … … 1185 1190 //printf("RunningStatus %d\n", evt->running_status); 1186 1191 1187 parseeitdesc(tmpchnode, epgnode, (unsigned char*)&evt->data, eitlen );1192 parseeitdesc(tmpchnode, epgnode, (unsigned char*)&evt->data, eitlen, onlylinkedchannel); 1188 1193 //compress long desc 1189 if( epgnode->desc != NULL)1194 if(onlylinkedchannel == 0 && epgnode->desc != NULL) 1190 1195 { 1191 1196 ret = zip(epgnode->desc, strlen(epgnode->desc) + 1, &zbuf, &zlen, 1); -
titan/titan/linkedchannel.h
r11723 r11801 54 54 listbox->aktpage = -1; 55 55 56 addscreenrc(linkedchannel, listbox); 57 start: 58 tmp = NULL; 59 delmarkedscreennodes(linkedchannel, 1); 56 60 if(status.aktservice->channel != NULL) 57 61 { … … 63 67 if(chnode != NULL) 64 68 { 69 epgnode = getepgakt(chnode); 70 //don't show linked channel with start/end 1day 71 if(epgnode != NULL && epgnode->endtime - epgnode->starttime >= 86400) 72 { 73 node = node->next; 74 continue; 75 } 65 76 tmp = addlistbox(linkedchannel, listbox, tmp, 1); 66 77 if(tmp != NULL) 67 78 { 68 79 tmpstr = ostrcat(tmpstr, chnode->name, 1, 0); 69 epgnode = getepgakt(chnode);70 80 if(epgnode != NULL) 71 81 { … … 77 87 tmp->handle = (char*)node; 78 88 tmp->handle1 = (char*)chnode; 79 80 /*81 tmp->type = CHOICEBOX;82 if(status.aktservice->channel->audiopid == node->audiopid)83 changeinput(tmp, _("running"));84 else85 changeinput(tmp, "");86 */87 89 } 88 90 } … … 93 95 94 96 drawscreen(linkedchannel, 0); 95 addscreenrc(linkedchannel, listbox);96 97 97 98 while(1) 98 99 { 99 rcret = waitrc(linkedchannel, 0, 0); 100 rcret = waitrc(linkedchannel, 2000, 0); 101 102 if(rcret == RCTIMEOUT) goto start; 100 103 101 104 if(rcret == getrcconfigint("rcexit", NULL)) break; … … 106 109 m_lock(&status.linkedchannelmutex, 14); 107 110 if(checklinkedchannel(status.aktservice->channel, (struct linkedchannel*)listbox->select->handle) != NULL) 111 { 112 m_unlock(&status.linkedchannelmutex, 14); 108 113 servicecheckret(servicestart((struct channel*)listbox->select->handle1, NULL, NULL, 0), 0); 109 m_unlock(&status.linkedchannelmutex, 14); 114 } 115 else 116 m_unlock(&status.linkedchannelmutex, 14); 110 117 } 111 118 break;
Note: See TracChangeset
for help on using the changeset viewer.