[dvblast-devel] save EPG to file
Georgi Chorbadzhiyski
gf at unixsol.org
Wed Mar 6 14:20:18 CET 2013
Around 03/04/2013 05:49 PM, Nuno Mota scribbled:
> I'm guessing you will have to write the EPG packet yourself. There must be
> a if ( packet = epg) somewhere around here :D.
>
> Besides you would have to parse TS packets into readable language like XML.
Probably something in that direction (just a quick hack). Function like demux_Print
should open file per service and write the xml data there. That way you can have
up-to-date EIT tables dumped on disk.
diff --git a/demux.c b/demux.c
index 78c0fed..fe1e325 100644
--- a/demux.c
+++ b/demux.c
@@ -1099,6 +1099,8 @@ static void SendSDT( mtime_t i_dts )
/*****************************************************************************
* SendEIT
*****************************************************************************/
+static void demux_Print(void *_unused, const char *psz_format, ...);
+
static void SendEIT( sid_t *p_sid, mtime_t i_dts, uint8_t *p_eit )
{
uint8_t i_table_id = psi_get_tableid( p_eit );
@@ -1119,6 +1121,9 @@ static void SendEIT( sid_t *p_sid, mtime_t i_dts, uint8_t *p_eit )
{
eit_set_tsid( p_eit, p_output->i_tsid );
psi_set_crc( p_eit );
+
+ eit_print(p_eit, demux_Print, NULL, demux_Iconv, NULL, PRINT_XML);
+
}
OutputPSISection( p_output, p_eit, EIT_PID, &p_output->i_eit_cc,
--
Georgi Chorbadzhiyski
http://georgi.unixsol.org/
More information about the dvblast-devel
mailing list