Changeset 8119 for trunk/module-dvbapi-coolapi.c
- Timestamp:
- 01/18/13 02:30:35 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-dvbapi-coolapi.c
r8087 r8119 400 400 } 401 401 402 //coolstream supports only a 12 bytes demux filter so we need to compare all 16 bytes403 int32_t emm_pattern_matching(uchar * buff, dmx_callback_data_t * data, int32_t pid)404 {405 uint32_t i,j,found;406 407 if (ll_count(ll_cool_filter) > 0) {408 LL_ITER itr = ll_iter_create(ll_cool_filter);409 S_COOL_FILTER *filter_item;410 while ((filter_item=ll_iter_next(&itr))) {411 if (filter_item->pid != pid || (int32_t) filter_item->channel != (int32_t) data->channel)412 continue;413 found = 1;414 for (i=0,j=0; i < 16 && i < data->len && found; i++,j++) {415 found = (filter_item->filter16[j] == (buff[i]&filter_item->mask16[j]));416 if (i==0) i+=2;417 }418 if (found)419 return 0;420 }421 }422 return -1;423 }424 425 402 int32_t coolapi_read(dmx_t * dmx, dmx_callback_data_t * data) 426 403 { … … 459 436 //cs_debug_mask(D_DVBAPI, "bytes read %d\n", done); 460 437 461 if (dmx->type == TYPE_ECM || dmx->pid == 0x001 || emm_pattern_matching(buff,data,dmx->pid) > -1) 462 return 0; 463 else 464 return -1; 438 return 0; 465 439 } 466 440
Note:
See TracChangeset
for help on using the changeset viewer.