Changeset 10609
- Timestamp:
- 03/01/15 20:58:24 (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-dvbapi.c
r10606 r10609 1293 1293 for(i = 0; i < MAX_DEMUX; i++) 1294 1294 { 1295 if( demux[demux_id].ca_mask & (1 << i))1295 if(((demux[demux_id].ca_mask & (1 << i)) == (uint) (1 << i))) 1296 1296 { 1297 1297 int8_t action = 0; … … 1307 1307 memset(&ca_pid2, 0, sizeof(ca_pid2)); 1308 1308 ca_pid2.pid = demux[demux_id].STREAMpids[num]; 1309 #if defined(__powerpc__) 1309 1310 if(action == REMOVED_STREAMPID_LASTINDEX) idx = -1; // removed last index of streampid -> disable pid with -1 1311 #endif 1310 1312 ca_pid2.index = idx; 1311 1313 … … 4733 4735 for(n = 0; n < demux[demux_index].STREAMpidcount; n++) 4734 4736 { 4735 if(!demux[demux_index].ECMpids[pid].streams || demux[demux_index].ECMpids[pid].streams & (1 << n)){4737 if(!demux[demux_index].ECMpids[pid].streams || ((demux[demux_index].ECMpids[pid].streams & (1 << n)) == (uint) (1 << n))){ 4736 4738 dvbapi_set_pid(demux_index, n, idx - 1, true); // enable streampid 4737 4739 } … … 4756 4758 { 4757 4759 if (cadevice == listitem->cadevice && pid == listitem->streampid){ 4758 if( listitem->activeindexers &(1 << idx)){4760 if((listitem->activeindexers & (1 << idx)) == (uint) (1 << idx)){ 4759 4761 return FOUND_STREAMPID_INDEX; // match found 4760 4762 }else{ … … 4781 4783 4782 4784 struct s_streampid *listitem; 4785 int8_t removed = 0; 4783 4786 4784 4787 LL_ITER itr; … … 4788 4791 while((listitem = ll_iter_next(&itr))) 4789 4792 { 4790 if (cadevice == listitem->cadevice && pid == listitem->streampid){ 4791 if(idx != -1 && listitem->activeindexers & (1 << idx)){ 4792 listitem->activeindexers &= ~(1 << idx); // flag it as disabled for this index 4793 } 4793 if (cadevice == listitem->cadevice && pid == listitem->streampid) 4794 { 4794 4795 if(idx == -1){ // idx -1 means disable all! 4795 4796 listitem->activeindexers = 0; 4796 } 4797 cs_log_dbg(D_DVBAPI, "Remove streampid %04X using indexer %d from ca%d", pid, idx, cadevice); 4798 if (listitem->activeindexers == 0){ // all indexers disabled? -> remove pid from list! 4797 removed = 1; 4798 } 4799 else if((listitem->activeindexers & (1 << idx)) == (uint) (1 << idx)) 4800 { 4801 listitem->activeindexers &= ~(1 << idx); // flag it as disabled for this index 4802 removed = 1; 4803 } 4804 4805 if(removed) 4806 { 4807 cs_log_dbg(D_DVBAPI, "Remove streampid %04X using indexer %d from ca%d", pid, idx, cadevice); 4808 } 4809 if (listitem->activeindexers == 0 && removed == 1) // all indexers disabled? -> remove pid from list! 4810 { 4799 4811 ll_iter_remove_data(&itr); 4800 4812 cs_log_dbg(D_DVBAPI, "Removed last indexer of streampid %04X from ca%d", pid, cadevice); 4801 4813 return REMOVED_STREAMPID_LASTINDEX; 4802 4814 } 4803 return REMOVED_STREAMPID_INDEX; 4815 else if(removed == 1) 4816 { 4817 return REMOVED_STREAMPID_INDEX; 4818 } 4804 4819 } 4805 4820 } … … 4821 4836 // search for old enabled streampids on all ca devices that have to be disabled, index 0 is skipped as it belongs to fta! 4822 4837 for(i = 0; i < MAX_DEMUX && idx; i++){ 4823 if(!( demux[demux_id].ca_mask &(1 << i))) continue; // continue if ca is unused by this demuxer4838 if(!((demux[demux_id].ca_mask & (1 << i)) == (uint) (1 << i))) continue; // continue if ca is unused by this demuxer 4824 4839 4825 4840 LL_ITER itr; … … 4828 4843 { 4829 4844 if (i != listitem->cadevice) continue; // ca doesnt match 4830 if (!( listitem->activeindexers &(1 << (idx-1)))) continue; // index doesnt match4845 if (!((listitem->activeindexers & (1 << (idx-1))) == (uint) (1 << (idx-1)))) continue; // index doesnt match 4831 4846 for(n = 0; n < demux[demux_id].STREAMpidcount; n++){ 4832 4847 if (listitem->streampid == demux[demux_id].STREAMpids[n]){ // check if pid matches with current streampid on demuxer -
trunk/module-dvbapi.h
r10598 r10609 123 123 int8_t demux_index; 124 124 FILTERTYPE demux_fd[MAX_FILTER]; 125 int32_t ca_mask;125 uint32_t ca_mask; 126 126 int8_t adapter_index; 127 127 int32_t socket_fd;
Note:
See TracChangeset
for help on using the changeset viewer.