Browse Source

Add ts_section_dump()

Georgi Chorbadzhiyski 13 years ago
parent
commit
a3b2567d33
2 changed files with 11 additions and 0 deletions
  1. 1
    0
      tsfuncs.h
  2. 10
    0
      tsfuncs_sections.c

+ 1
- 0
tsfuncs.h View File

76
 uint8_t *					ts_section_header_parse		(uint8_t *ts_packet, struct ts_header *ts_header, struct ts_section_header *ts_section_header);
76
 uint8_t *					ts_section_header_parse		(uint8_t *ts_packet, struct ts_header *ts_header, struct ts_section_header *ts_section_header);
77
 void						ts_section_header_generate	(uint8_t *ts_packet, struct ts_section_header *ts_section_header, uint8_t start);
77
 void						ts_section_header_generate	(uint8_t *ts_packet, struct ts_section_header *ts_section_header, uint8_t start);
78
 void						ts_section_header_dump		(struct ts_section_header *t);
78
 void						ts_section_header_dump		(struct ts_section_header *t);
79
+void						ts_section_dump				(struct ts_section_header *sec);
79
 
80
 
80
 int ts_section_is_same(struct ts_section_header *s1, struct ts_section_header *s2);
81
 int ts_section_is_same(struct ts_section_header *s1, struct ts_section_header *s2);
81
 
82
 

+ 10
- 0
tsfuncs_sections.c View File

144
 			t->section_pos);
144
 			t->section_pos);
145
 }
145
 }
146
 
146
 
147
+void ts_section_dump(struct ts_section_header *sec) {
148
+	int i;
149
+	for (i=0;i<sec->num_packets;i++) {
150
+		struct ts_header tshdr;
151
+		ts_packet_header_parse(sec->packet_data + (i * TS_PACKET_SIZE), &tshdr);
152
+		ts_packet_header_dump(&tshdr);
153
+	}
154
+	ts_section_header_dump(sec);
155
+}
156
+
147
 #undef IN
157
 #undef IN

Loading…
Cancel
Save