3737#define TSD_MEM_PAGE_SIZE (1024)
3838#define TSD_MAX_PID_REGS (16)
3939
40+ // C++ support
41+ #ifdef __cplusplus
42+ extern "C" {
43+ #endif
44+
45+
4046/**
4147 * @file
4248 * @ingroup tsdemux
@@ -48,6 +54,24 @@ typedef struct TSDemuxContext TSDemuxContext;
4854typedef struct TSDTable TSDTable ;
4955typedef struct TSDTableSection TSDTableSection ;
5056
57+ /**
58+ * Event Id.
59+ * The Id of all events that may occur during demux.
60+ * (Moved here because forward declaration not allowed on enum!)
61+ */
62+ typedef enum TSDEventId {
63+ TSD_EVENT_PAT = 0x0001 ,
64+ TSD_EVENT_PMT = 0x0002 ,
65+ TSD_EVENT_CAT = 0x0004 ,
66+ TSD_EVENT_TSDT = 0x0008 ,
67+ /// Unsupported TSDTable
68+ TSD_EVENT_TABLE = 0x0010 ,
69+ // User Registered PES data
70+ TSD_EVENT_PES = 0x0020 ,
71+ // User Registered Adaptionn Field Private Data
72+ TSD_EVENT_ADAP_FIELD_PRV_DATA = 0x0040 ,
73+ } TSDEventId ;
74+
5175typedef enum TSDEventId TSDEventId ;
5276
5377/**
@@ -349,22 +373,6 @@ typedef enum TSDPMTStreamType {
349373 TSD_PMT_STREAM_TYPE_ATSC_USER_PRIV = 0xEB ,
350374} TSDPMTStreamType ;
351375
352- /**
353- * Event Id.
354- * The Id of all events that may occur during demux.
355- */
356- typedef enum TSDEventId {
357- TSD_EVENT_PAT = 0x0001 ,
358- TSD_EVENT_PMT = 0x0002 ,
359- TSD_EVENT_CAT = 0x0004 ,
360- TSD_EVENT_TSDT = 0x0008 ,
361- /// Unsupported TSDTable
362- TSD_EVENT_TABLE = 0x0010 ,
363- // User Registered PES data
364- TSD_EVENT_PES = 0x0020 ,
365- // User Registered Adaptionn Field Private Data
366- TSD_EVENT_ADAP_FIELD_PRV_DATA = 0x0040 ,
367- } TSDEventId ;
368376
369377/**
370378 * Registration Type.
@@ -1568,4 +1576,10 @@ TSDCode tsd_parse_descriptor_multiplex_buffer(const uint8_t *data,
15681576 size_t size ,
15691577 TSDDescriptorMultiplexBuffer * desc );
15701578
1579+
1580+ #ifdef __cplusplus
1581+ }
1582+ #endif
1583+
1584+
15711585#endif // TS_DEMUX_H
0 commit comments