diff -u -r -N tv_grab_dvb-0.9/Makefile tv_grab_dvb-new/Makefile
--- tv_grab_dvb-0.9/Makefile 2004-09-07 20:52:46.000000000 +0200
+++ tv_grab_dvb-new/Makefile 2006-03-28 14:38:34.000000000 +0200
@@ -12,4 +12,6 @@
clean:
rm *.o tv_grab_dvb
+install:
+ cp ./tv_grab_dvb /usr/local/bin/tv_grab_dvb
diff -u -r -N tv_grab_dvb-0.9/dvb_info_tables.h tv_grab_dvb-new/dvb_info_tables.h
--- tv_grab_dvb-0.9/dvb_info_tables.h 2004-05-21 20:22:39.000000000 +0200
+++ tv_grab_dvb-new/dvb_info_tables.h 2006-03-28 14:37:58.000000000 +0200
@@ -87,14 +87,14 @@
{ 0xA1, "tourism/travel" },
{ 0xA2, "handicraft" },
{ 0xA3, "motoring" },
- { 0xA4, "fitness & health" },
+ { 0xA4, "fitness & health" },
{ 0xA5, "cooking" },
{ 0xA6, "advertizement/shopping" },
{ 0xA7, "gardening" },
// Special
{ 0xB0, "Original Language" },
- { 0xB1, "black & white" },
+ { 0xB1, "black & white" },
{ 0xB2, "unpublished" },
{ 0xB3, "live broadcast" },
diff -u -r -N tv_grab_dvb-0.9/tv_grab_dvb.c tv_grab_dvb-new/tv_grab_dvb.c
--- tv_grab_dvb-0.9/tv_grab_dvb.c 2004-09-07 21:11:13.000000000 +0200
+++ tv_grab_dvb-new/tv_grab_dvb.c 2006-03-28 15:11:51.000000000 +0200
@@ -282,10 +282,50 @@
printf("\t
%s\n",lang,xmlify(evt));
if (*dsc)
- printf("\t%s\n",lang,xmlify(dsc));
+ printf("\t%s\n",lang,xmlify(dsc));
}
+typedef struct {
+ u_char tag :8;
+ u_char descriptors_loop_length :8;
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char desc_nb :4;
+ u_char last_desc_nb :4;
+#else
+ u_char last_desc_nb :4;
+ u_char desc_nb :4;
+#endif
+ char language_code[3];
+ u_char length_of_items;
+ u_char text_length;
+ char text[];
+
+} eit_long_event_t;
+
+void parseLongEventDescription(char *evtdesc)
+{
+ char lang[4];
+ char dsc[256];
+
+ //printf("\t\n");
+
+ // Daten in Struktur pressen
+ eit_long_event_t *levt=(eit_long_event_t*)evtdesc;
+
+ strncpy(lang, levt->language_code, 3);
+ lang[3] = 0;
+
+ strncpy(dsc, levt->text, levt->text_length);
+ dsc[levt->text_length] = 0; // String terminieren
+
+ printf("%s%s%s%s%s", ((levt->desc_nb == 0)?"\tdesc_nb == 0)?lang:""),
+ ((levt->desc_nb == 0)?"\">":""),
+ xmlify(dsc),
+ ((levt->desc_nb == levt->last_desc_nb)?"\n":""));// Last Descriptionpart, close XML!
+}
+
/* video is a flag, 1=> output the video information, 0=> output the
audio information. seen is a pointer to a counter to ensure we
only output the first one of each (XMLTV can't cope with more than
@@ -397,7 +437,7 @@
break;;
case 0x4E: //long evt descriptor
if (round == 0)
- printf("\t\n");
+ parseLongEventDescription(desc+i);
break;;
case 0x50: //component desc [video] [audio]
if (round == 2)
@@ -544,7 +584,7 @@
//printf("\t%i\n",evt->running_status);
//1 Airing, 2 Starts in a few seconds, 3 Pausing, 4 About to air
- strncpy((char*)&desc,(char*)evt+EIT_EVENT_LEN,dll);
+ memcpy((char*)&desc,(char*)evt+EIT_EVENT_LEN,dll);
desc[dll+1]=0;
parseDescription((char*)&desc,dll);
printf("\n");