Browse Source

Move service id to be the first field in ECM and EMM messages.

Anton Tinchev 12 years ago
parent
commit
610dc3fe55
1 changed files with 7 additions and 6 deletions
  1. 7
    6
      tables.c

+ 7
- 6
tables.c View File

@@ -248,7 +248,7 @@ void process_sdt(struct ts *ts, uint16_t pid, uint8_t *ts_packet) {
248 248
 	}
249 249
 }
250 250
 
251
-#define dump_sz      (16)
251
+#define dump_sz      (15)
252 252
 #define dump_buf_sz  (dump_sz * 6)
253 253
 
254 254
 static void __process_emm(struct ts *ts, uint16_t pid, uint8_t *ts_packet) {
@@ -267,10 +267,10 @@ static void __process_emm(struct ts *ts, uint16_t pid, uint8_t *ts_packet) {
267 267
 	struct ts_section_header *sec = ts->emm->section_header;
268 268
 	if (ts->debug_level >= 2) {
269 269
 		ts_hex_dump_buf(dump, dump_buf_sz, sec->section_data, min(dump_sz, sec->section_data_len), 0);
270
-		ts_LOGf("EMM | CAID: 0x%04x PID 0x%04x SID 0x%04x Table: 0x%02x Length: %3d Data: %s..\n",
270
+		ts_LOGf("EMM | SID 0x%04x CAID: 0x%04x PID 0x%04x Table: 0x%02x Length: %4d Data: %s..\n",
271
+			ts->service_id,
271 272
 			ts->emm_caid,
272 273
 			th->pid,
273
-			ts->service_id,
274 274
 			sec->table_id,
275 275
 			sec->section_data_len,
276 276
 			dump);
@@ -310,10 +310,10 @@ static void __process_ecm(struct ts *ts, uint16_t pid, uint8_t *ts_packet) {
310 310
 	if (!duplicate || ts->is_cw_error) {
311 311
 		if (ts->ecm_cw_log) {
312 312
 			ts_hex_dump_buf(dump, dump_buf_sz, sec->section_data, min(dump_sz, sec->section_data_len), 0);
313
-			ts_LOGf("ECM | CAID: 0x%04x PID 0x%04x SID 0x%04x Table: 0x%02x Length: %3d Data: %s..\n",
313
+			ts_LOGf("ECM | SID 0x%04x CAID: 0x%04x PID 0x%04x Table: 0x%02x Length: %4d Data: %s..\n",
314
+				ts->service_id,
314 315
 				ts->ecm_caid,
315 316
 				th->pid,
316
-				ts->service_id,
317 317
 				sec->table_id,
318 318
 				sec->section_data_len,
319 319
 				dump);
@@ -321,7 +321,8 @@ static void __process_ecm(struct ts *ts, uint16_t pid, uint8_t *ts_packet) {
321 321
 		ts->is_cw_error = 0;
322 322
 		camd_process_packet(ts, camd_msg_alloc(ECM_MSG, ts->ecm_caid, ts->service_id, sec->section_data, sec->section_data_len));
323 323
 	} else if (ts->debug_level >= 3) {
324
-		ts_LOGf("ECM | CAID: 0x%04x PID 0x%04x Table: 0x%02x Length: %3d Data: -dup-\n",
324
+		ts_LOGf("ECM | SID 0x%04x CAID: 0x%04x PID 0x%04x Table: 0x%02x Length: %4d Data: -dup-\n",
325
+			ts->service_id,
325 326
 			ts->ecm_caid,
326 327
 			th->pid,
327 328
 			sec->table_id,

Loading…
Cancel
Save