bool desc::short_event(dvbpsi_descriptor_t* p_descriptor) { if (p_descriptor->i_tag != DT_ShortEvent) return false; dvbpsi_short_event_dr_t* dr = dvbpsi_DecodeShortEventDr(p_descriptor); if (desc_dr_failed(dr)) return false; memcpy(_4d.lang, dr->i_iso_639_code, 3); get_descriptor_text(dr->i_event_name, dr->i_event_name_length, _4d.name); get_descriptor_text(dr->i_text, dr->i_text_length, _4d.text); dPrintf("%s, %s, %s", _4d.lang, _4d.name, _4d.text); return true; }
static void dumpDescriptors(dvbpsi_descriptor_t* descriptor, EventPrivate *e) { while(descriptor) { // qDebug() << "| Descriptor " << qPrintable(QString("(0x%1)").arg(descriptor->i_tag, 2, 16)); switch (descriptor->i_tag) { case 0x4D: { // Short event descriptor dvbpsi_short_event_dr_t *sed = dvbpsi_DecodeShortEventDr(descriptor); // qDebug() << "| Event name : " << qPrintable(QString::fromLatin1(QByteArray((const char *)sed->i_event_name, sed->i_event_name_length))); // qDebug() << "| Event text : " << qPrintable(QString::fromLatin1(QByteArray((const char *)sed->i_text, sed->i_text_length))); if (e && sed) { e->name = QString::fromLatin1(QByteArray((const char *)sed->i_event_name, sed->i_event_name_length)); e->shortDescription = QString::fromLatin1(QByteArray((const char *)sed->i_text, sed->i_text_length)); } break; } case 0x4E: { // Extended event descriptor // dvbpsi_extended_event_dr_t *eed = dvbpsi_DecodeExtendedEventDr(descriptor); // qDebug() << "| ISO 693 lang code : " << eed->i_iso_639_code; // qDebug() << "| Event name : " << qPrintable(QString(QByteArray((const char *)eed->i_text, eed->i_text_length))); // eed-> // break; } case 0x50: // Component descriptor break; case 0x54: { // Content descriptor dvbpsi_content_dr_t *cd = dvbpsi_DecodeContentDr(descriptor); if (e && cd && cd->i_contents_number) { e->type = (Event::EventType)DVDPSI_GetContentCategoryFromType(cd->p_content[0].i_type); } break; } case 0x55: // Parental rating descriptor break; } descriptor = descriptor->p_next; } }