libdvbv5: better document some MPEG TS fields
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 6 Mar 2014 13:21:22 +0000 (10:21 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 6 Mar 2014 13:23:34 +0000 (10:23 -0300)
Unfortunately, some names on this table don't reflect the names at the
MPEG specs. Yet, we want to be clear what they mean, so let's improve
the comments at the header.h and add a better description when debug
is enabled.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
lib/include/descriptors/header.h
lib/libdvbv5/descriptors/header.c

index 08f2ac8..8ba93b0 100644 (file)
@@ -17,6 +17,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  *
+ * Described at ISO/IEC 13818-1
  */
 
 #ifndef _HEADER_H
@@ -56,13 +57,13 @@ struct dvb_table_header {
                        uint8_t  syntax:1;
                } __attribute__((packed));
        };
-       uint16_t id;
+       uint16_t id;                    /* TS ID */
        uint8_t  current_next:1;
        uint8_t  version:5;
        uint8_t  one2:2;
 
-       uint8_t  section_id;
-       uint8_t  last_section;
+       uint8_t  section_id;            /* section_number */
+       uint8_t  last_section;          /* last_section_number */
 } __attribute__((packed));
 
 struct dvb_v5_fe_parms;
index 4453daf..f1ed873 100644 (file)
@@ -32,17 +32,17 @@ int dvb_table_header_init(struct dvb_table_header *t)
 
 void dvb_table_header_print(struct dvb_v5_fe_parms *parms, const struct dvb_table_header *t)
 {
-       dvb_log("| table_id       %d", t->table_id);
-       dvb_log("| section_length %d", t->section_length);
-       dvb_log("| zero           %d", t->zero);
-       dvb_log("| one            %d", t->one);
-       dvb_log("| zero2          %d", t->zero2);
-       dvb_log("| syntax         %d", t->syntax);
-       dvb_log("| id             %d", t->id);
-       dvb_log("| current_next   %d", t->current_next);
-       dvb_log("| version        %d", t->version);
-       dvb_log("| one2           %d", t->one2);
-       dvb_log("| section_id     %d", t->section_id);
-       dvb_log("| last_section   %d", t->last_section);
+       dvb_log("| table_id            %d", t->table_id);
+       dvb_log("| section_length      %d", t->section_length);
+       dvb_log("| zero                %d", t->zero);
+       dvb_log("| one                 %d", t->one);
+       dvb_log("| zero2               %d", t->zero2);
+       dvb_log("| syntax              %d", t->syntax);
+       dvb_log("| transport_stream_id %d", t->id);
+       dvb_log("| current_next        %d", t->current_next);
+       dvb_log("| version             %d", t->version);
+       dvb_log("| one2                %d", t->one2);
+       dvb_log("| section_number      %d", t->section_id);
+       dvb_log("| last_section_number %d", t->last_section);
 }