Sorry for interrupting the party, great job for sure, but I think EPG on DVB-S2 is in fact buggy on DVB APIs 5.3 to 5.7.
For these API verisons, the API 5.8 code fork replaces DTV_STREAM_ID with DTV_DVBT2_PLP_ID, and sends this command to DVB-S2 cards, even though DVB-S2 cards can hardly handle DVB-T2 commands. At least DVBAPI 5.2 will fail miserably on that, not sure if DVBAPI 5.3 to 5.7 is more tolerant in ignoring this.
Suggested fix is to at least limit the DTV_STREAM_ID call for DVB-S2 to DVB API 5.8.
Alternatively, you can take over my runtime check, or just drop support for DVB API 5.7 and older.
Cheers,
Udo