dvb_table(3)

πŸ“¦
version 1.32.0 Β· 2 versions
, in fedora 43

🌸 NAME 🌸

dvb_table β€” Digital TV table parsing. Yes bestie, this is the one. It's dvb_table(3) from the Library Functions Manual, and it's a whole universe of headers, structs, macros and typedefs for pulling apart MPEG-TS and ATSC tables. Buckle up. πŸ’…


✨ SYNOPSIS ✨

πŸŽ€ Files πŸŽ€

Okay so these are all the headers in the group, and each one does a thing. Slay.

  • descriptors.h β€” the way you handle MPEG-TS descriptors found on Digital TV streams.
  • header.h β€” gives you the MPEG TS table headers.
  • atsc_header.h β€” some common ATSC stuff lives here.
  • atsc_eit.h β€” the table parser for the ATSC EIT (Event Information Table).
  • cat.h β€” the table parser for the CAT (Conditional Access Table).
  • eit.h β€” the table parser for the DVB EIT (Event Information Table).
  • mgt.h β€” the table parser for the ATSC MGT (Master Guide Table).
  • nit.h β€” the descriptors for the NIT MPEG-TS table.
  • pat.h β€” the descriptors for the PAT MPEG-TS table.
  • pmt.h β€” the descriptors for the PMT MPEG-TS table.
  • sdt.h β€” the descriptors for the SDT MPEG-TS table.
  • vct.h β€” the descriptors for TVCT and CVCT tables.
  • mpeg_es.h β€” the table parser for the MPEG-TS Elementary Stream.
  • mpeg_pes.h β€” the table parser for the MPEG-PES Elementary Stream.
  • mpeg_ts.h β€” the table parser for the MPEG-PES Elementary Stream. (Yes, it says MPEG-PES again. That's what the page says, so that's what you get. πŸ™ˆ)

πŸ¦‹ Data Structures πŸ¦‹

The little guys. The building blocks. The main characters of the whole operation.

  • struct dvb_desc β€” a linked list holding all the descriptors found on an MPEG-TS table.
  • struct dvb_descriptor β€” holds the parser information for the MPEG-TS parser code.
  • struct dvb_ts_packet_header β€” the header of an MPEG-TS transport packet.
  • struct dvb_table_header β€” the header of an MPEG-TS table.
  • struct atsc_table_eit_event β€” ATSC EIT event table.
  • union atsc_table_eit_desc_length β€” ATSC EIT descriptor length.
  • struct atsc_table_eit β€” ATSC EIT table.
  • struct dvb_table_eit_event β€” DVB EIT event table.
  • struct dvb_table_eit β€” DVB EIT table.
  • struct atsc_table_mgt_table β€” ATSC tables description at MGT table.
  • struct atsc_table_mgt β€” ATSC MGT table.
  • union dvb_table_nit_transport_header β€” MPEG-TS NIT transport header.
  • struct dvb_table_nit_transport β€” MPEG-TS NIT transport table.
  • struct dvb_table_nit β€” MPEG-TS NIT table.
  • struct dvb_table_pat_program β€” MPEG-TS PAT program table.
  • struct dvb_table_pat β€” MPEG-TS PAT table.
  • struct dvb_table_pmt_stream β€” MPEG-TS PMT stream table.
  • struct dvb_table_pmt β€” MPEG-TS PMT table.
  • struct dvb_table_sdt_service β€” MPEG-TS SDT service table.
  • struct dvb_table_sdt β€” MPEG-TS SDT table.
  • struct atsc_table_vct_channel β€” ATSC VCT channel table (covers both CVCT and TVCT).
  • struct atsc_table_vct β€” ATSC VCT table (covers both CVCT and TVCT).
  • union atsc_table_vct_descriptor_length β€” ATSC VCT descriptor length.
  • struct dvb_mpeg_es_seq_start β€” MPEG ES Sequence header.
  • struct dvb_mpeg_es_pic_start β€” MPEG ES Picture start header.
  • struct ts_t β€” MPEG PES timestamp structure, used for dts and pts.
  • struct dvb_mpeg_pes_optional β€” MPEG PES optional header.
  • struct dvb_mpeg_pes β€” MPEG PES data structure.
  • struct dvb_mpeg_ts_adaption β€” MPEG TS header adaption field.
  • struct dvb_mpeg_ts β€” MPEG TS header.

πŸ‘‘ Macros πŸ‘‘

The preprocessor girlies. Every single one, no skipping, that's the rule. πŸ’œ

  • #define DVB_MAX_PAYLOAD_PACKET_SIZE β€” Maximum size of a table session to be parsed.
  • #define DVB_CRC_SIZE β€” number of bytes for the descriptor's CRC check.
  • #define ATSC_BASE_PID β€” ATSC PID for the Program and System Information Protocol.
  • #define ATSC_TABLE_EIT β€” ATSC EIT table ID.
  • #define atsc_eit_event_foreach(_event, _eit) β€” Macro used to find event on an ATSC EIT table.
  • #define DVB_TABLE_CAT β€” ATSC CAT table ID.
  • #define DVB_TABLE_CAT_PID β€” ATSC PID table ID.
  • #define DVB_TABLE_EIT β€” DVB EIT table ID for the actual TS.
  • #define DVB_TABLE_EIT_OTHER β€” DVB EIT table ID for other TS.
  • #define DVB_TABLE_EIT_PID β€” DVB EIT Program ID.
  • #define DVB_TABLE_EIT_SCHEDULE β€” Start table ID for the DVB EIT schedule data on the actual TS. The range has 0x0f elements (0x50 to 0x5F).
  • #define DVB_TABLE_EIT_SCHEDULE_OTHER β€” Start table ID for the DVB EIT schedule data on other TS. The range has 0x0f elements (0x60 to 0x6F).
  • #define dvb_eit_event_foreach(_event, _eit) β€” Macro used to find event on a DVB EIT table.
  • #define ATSC_TABLE_MGT β€” ATSC MGT table ID.
  • #define DVB_TABLE_NIT β€” NIT table ID.
  • #define DVB_TABLE_NIT2 β€” NIT table ID (alternative table ID).
  • #define DVB_TABLE_NIT_PID β€” NIT Program ID.
  • #define dvb_nit_transport_foreach(_tran, _nit) β€” Macro used to find a transport inside a NIT table.
  • #define DVB_TABLE_PAT β€” PAT table ID.
  • #define DVB_TABLE_PAT_PID β€” PAT Program ID.
  • #define dvb_pat_program_foreach(_pgm, _pat) β€” Macro used to find programs on a PAT table.
  • #define DVB_TABLE_PMT β€” PMT table ID.
  • #define dvb_pmt_stream_foreach(_stream, _pmt) β€” Macro used to find streams on a PMT table.
  • #define DVB_TABLE_SDT β€” SDT table ID.
  • #define DVB_TABLE_SDT2 β€” SDT table ID (alternative table ID).
  • #define DVB_TABLE_SDT_PID β€” SDT Program ID.
  • #define dvb_sdt_service_foreach(_service, _sdt) β€” Macro used to find services on a SDT table.
  • #define ATSC_TABLE_TVCT β€” TVCT table ID.
  • #define ATSC_TABLE_CVCT β€” CVCT table ID.
  • #define ATSC_TABLE_VCT_PID β€” Program ID with the VCT tables on it.
  • #define atsc_vct_channel_foreach(_channel, _vct) β€” Macro used to find channels on a VCT table.
  • #define DVB_MPEG_ES_PIC_START β€” Picture Start.
  • #define DVB_MPEG_ES_USER_DATA β€” User Data.
  • #define DVB_MPEG_ES_SEQ_START β€” Sequence Start.
  • #define DVB_MPEG_ES_SEQ_EXT β€” Extension.
  • #define DVB_MPEG_ES_GOP β€” Group Of Pictures.
  • #define DVB_MPEG_ES_SLICES β€” Slices.
  • #define DVB_MPEG_PES β€” MPEG Packetized Elementary Stream magic.
  • #define DVB_MPEG_PES_AUDIO β€” PES Audio.
  • #define DVB_MPEG_PES_VIDEO β€” PES Video.
  • #define DVB_MPEG_STREAM_MAP β€” PES Stream map.
  • #define DVB_MPEG_STREAM_PADDING β€” PES padding.
  • #define DVB_MPEG_STREAM_PRIVATE_2 β€” PES private.
  • #define DVB_MPEG_STREAM_ECM β€” PES ECM Stream.
  • #define DVB_MPEG_STREAM_EMM β€” PES EMM Stream.
  • #define DVB_MPEG_STREAM_DIRECTORY β€” PES Stream directory.
  • #define DVB_MPEG_STREAM_DSMCC β€” PES DSMCC.
  • #define DVB_MPEG_STREAM_H222E β€” PES H.222.1 type E.
  • #define DVB_MPEG_TS β€” MPEG Transport Stream magic.
  • #define DVB_MPEG_TS_PACKET_SIZE β€” Size of an MPEG packet.

🌈 Typedefs 🌈

The function-prototype glow-ups. These are the shapes every callback has to match, so keep them exactly as written, fr fr. 🫢

  • typedef void(* dvb_table_init_func) (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, void **table) β€” function prototype for a function that initializes the descriptors parsing on a table.
  • typedef int(* dvb_desc_init_func) (struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_desc *desc) β€” function prototype for the descriptors parsing init code.
  • typedef void(* dvb_desc_print_func) (struct dvb_v5_fe_parms *parms, const struct dvb_desc *desc) β€” function prototype for the descriptors parsing print code.
  • typedef void(* dvb_desc_free_func) (struct dvb_desc *desc) β€” function prototype for the descriptors memory free code.
  • typedef void nit_handler_callback_t(struct dvb_table_nit *nit, struct dvb_desc *desc, void *priv) β€” typedef for a callback used when a NIT table entry is found.
  • typedef void nit_tran_handler_callback_t(struct dvb_table_nit *nit, struct dvb_table_nit_transport *tran, struct dvb_desc *desc, void *priv) β€” typedef for a callback used when a NIT transport table entry is found.
  • typedef int(* dvb_desc_ext_init_func) (struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_extension_descriptor *ext, void *desc) β€” function prototype for the extended descriptors parsing init code.
  • typedef void(* dvb_desc_ext_print_func) (struct dvb_v5_fe_parms *parms, const struct dvb_extension_descriptor *ext, const void *desc) β€” function prototype for the extended descriptors parsing print code.
  • typedef void(* dvb_desc_ext_free_func) (const void *desc) β€” function prototype for the extended descriptors parsing free code.

Bestie this is only part one. There's more coming, so don't go anywhere. πŸ“

✨ Enumerations ✨

okay bestie, this is where the named constants live. It’s giving alphabetized chaos but make it cute. These enums are the building blocks for descriptors and stream types, and you’re gonna want them memorized. No cap. πŸ’…


🌸 enum descriptors 🌸

enum descriptors { video_stream_descriptor, audio_stream_descriptor,
    hierarchy_descriptor, registration_descriptor,
    ds_alignment_descriptor, target_background_grid_descriptor,
    video_window_descriptor, conditional_access_descriptor,
    iso639_language_descriptor, system_clock_descriptor,
    multiplex_buffer_utilization_descriptor, copyright_descriptor,
    maximum_bitrate_descriptor, private_data_indicator_descriptor,
    smoothing_buffer_descriptor, std_descriptor, ibp_descriptor,
    mpeg4_video_descriptor, mpeg4_audio_descriptor, iod_descriptor,
    sl_descriptor, fmc_descriptor, external_es_id_descriptor,
    muxcode_descriptor, fmxbuffersize_descriptor,
    multiplexbuffer_descriptor, content_labeling_descriptor,
    metadata_pointer_descriptor, metadata_descriptor,
    metadata_std_descriptor, AVC_video_descriptor, ipmp_descriptor,
    AVC_timing_and_HRD_descriptor, mpeg2_aac_audio_descriptor,
    flexmux_timing_descriptor, network_name_descriptor,
    service_list_descriptor, stuffing_descriptor,
    satellite_delivery_system_descriptor,
    cable_delivery_system_descriptor, VBI_data_descriptor,
    VBI_teletext_descriptor, bouquet_name_descriptor,
    service_descriptor, country_availability_descriptor,
    linkage_descriptor, NVOD_reference_descriptor,
    time_shifted_service_descriptor, short_event_descriptor,
    extended_event_descriptor, time_shifted_event_descriptor,
    component_descriptor, mosaic_descriptor,
    stream_identifier_descriptor, CA_identifier_descriptor,
    content_descriptor, parental_rating_descriptor, teletext_descriptor,
    telephone_descriptor, local_time_offset_descriptor,
    subtitling_descriptor, terrestrial_delivery_system_descriptor,
    multilingual_network_name_descriptor,
    multilingual_bouquet_name_descriptor,
    multilingual_service_name_descriptor,
    multilingual_component_descriptor,
    private_data_specifier_descriptor, service_move_descriptor,
    short_smoothing_buffer_descriptor, frequency_list_descriptor,
    partial_transport_stream_descriptor, data_broadcast_descriptor,
    scrambling_descriptor, data_broadcast_id_descriptor,
    transport_stream_descriptor, DSNG_descriptor, PDC_descriptor,
    AC_3_descriptor, ancillary_data_descriptor, cell_list_descriptor,
    cell_frequency_link_descriptor, announcement_support_descriptor,
    application_signalling_descriptor, adaptation_field_data_descriptor,
    service_identifier_descriptor, service_availability_descriptor,
    default_authority_descriptor, related_content_descriptor,
    TVA_id_descriptor, content_identifier_descriptor,
    time_slice_fec_identifier_descriptor,
    ECM_repetition_rate_descriptor,
    S2_satellite_delivery_system_descriptor, enhanced_AC_3_descriptor,
    DTS_descriptor, AAC_descriptor, XAIT_location_descriptor,
    FTA_content_management_descriptor, extension_descriptor,
    CUE_identifier_descriptor, extended_channel_name, service_location,
    component_name_descriptor, logical_channel_number_descriptor,
    carousel_id_descriptor, association_tag_descriptor,
    deferred_association_tags_descriptor,
    hierarchical_transmission_descriptor,
    digital_copy_control_descriptor, network_identifier_descriptor,
    partial_transport_stream_time_descriptor,
    audio_component_descriptor, hyperlink_descriptor,
    target_area_descriptor, data_contents_descriptor,
    video_decode_control_descriptor, download_content_descriptor,
    CA_EMM_TS_descriptor, CA_contract_information_descriptor,
    CA_service_descriptor, TS_Information_descriptor,
    extended_broadcaster_descriptor, logo_transmission_descriptor,
    basic_local_event_descriptor, reference_descriptor,
    node_relation_descriptor, short_node_information_descriptor,
    STC_reference_descriptor, series_descriptor, event_group_descriptor,
    SI_parameter_descriptor, broadcaster_Name_Descriptor,
    component_group_descriptor, SI_prime_TS_descriptor,
    board_information_descriptor, LDT_linkage_descriptor,
    connected_transmission_descriptor, content_availability_descriptor,
    service_group_descriptor, carousel_compatible_composite_descriptor,
    conditional_playback_descriptor, ISDBT_delivery_system_descriptor,
    partial_reception_descriptor, emergency_information_descriptor,
    data_component_descriptor, system_management_descriptor,
    atsc_stuffing_descriptor, atsc_ac3_audio_descriptor,
    atsc_caption_service_descriptor, atsc_content_advisory_descriptor,
    atsc_extended_channel_descriptor, atsc_service_location_descriptor,
    atsc_time_shifted_service_descriptor,
    atsc_component_name_descriptor,
    atsc_DCC_departing_request_descriptor,
    atsc_DCC_arriving_request_descriptor,
    atsc_redistribution_control_descriptor,
    atsc_ATSC_private_information_descriptor, atsc_genre_descriptor }

This one is literally the master list containing all descriptors used by Digital TV MPEG-TS. It’s long, it’s iconic, it ate. Every single descriptor name is in there, so if you’re looking for atsc_genre_descriptor or extended_channel_name, boom, it’s here. 🫢

πŸ¦‹ enum dvb_streams πŸ¦‹

enum dvb_streams { stream_video, stream_video_h262, stream_audio,
    stream_audio_13818_3, stream_private_sections, stream_private_data,
    stream_mheg, stream_h222, stream_h222_1, stream_13818_6_A,
    stream_13818_6_B, stream_13818_6_C, stream_13818_6_D,
    stream_h222_aux, stream_audio_adts, stream_video_14496_2,
    stream_audio_latm, stream_14496_1_pes, stream_14496_1_iso,
    stream_download, stream_video_h264, stream_audio_14496_3,
    stream_video_hevc, stream_video_cavs, stream_video_moto,
    stream_audio_a52, stream_scte_27, stream_audio_sdds,
    stream_audio_dts_hdmv, stream_audio_e_ac3, stream_audio_dts,
    stream_audio_a52_vls, stream_spu_vls, stream_audio_sdds2 }

Add support for MPEG-TS Stream types. This enum is where you declare the stream types you’re rolling with. From stream_video to stream_audio_sdds2, it’s all here. Lowkey a whole mood. ✨

πŸŽ€ enum dvb_mpeg_es_frame_t πŸŽ€

enum dvb_mpeg_es_frame_t { DVB_MPEG_ES_FRAME_UNKNOWN,
    DVB_MPEG_ES_FRAME_I, DVB_MPEG_ES_FRAME_P, DVB_MPEG_ES_FRAME_B,
    DVB_MPEG_ES_FRAME_D }

MPEG frame types, bestie. That’s it. The I, P, B, D squad plus DVB_MPEG_ES_FRAME_UNKNOWN for when you just don’t know. It’s giving mystery. πŸ’€

πŸ› οΈ Functions πŸ› οΈ

okay bestie, this is the function roll call and it is long, but every single one is here, no skips, no shortcuts πŸ’–

  • uint32_t dvb_bcd (uint32_t bcd) β€” takes a BCD value and converts it into the CPU's internal integer representation. it's giving translator energy πŸ¦‹
  • void dvb_hexdump (struct dvb_v5_fe_parms *parms, const char *prefix, const unsigned char *buf, int len) β€” dumps data into the logs in hexadecimal format. prefix is the lil label, buf is the data, len is how much. very "let me show you the receipts" πŸ’…
  • int dvb_desc_parse (struct dvb_v5_fe_parms *parms, const uint8_t *buf, uint16_t buflen, struct dvb_desc **head_desc) β€” parses MPEG-TS descriptors πŸŽ€
  • void dvb_desc_free (struct dvb_desc **list) β€” frees a dvb_desc linked list. clean up after yourself, queen πŸ‘‘
  • void dvb_desc_print (struct dvb_v5_fe_parms *parms, struct dvb_desc *desc) β€” prints the contents of a struct dvb_desc linked list 🌸
  • void dvb_table_header_init (struct dvb_table_header *header) β€” initializes and parses MPEG-TS table header. it's the header, the main character, the opener ✨
  • void dvb_table_header_print (struct dvb_v5_fe_parms *parms, const struct dvb_table_header *header) β€” prints the content of the MPEG-TS table header 🫢

okay now we're getting into the table init/free/print trios and there are so many, but they're all so iconic in their own way, let's go πŸ’œ

  • ssize_t atsc_table_eit_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct atsc_table_eit **table) β€” initializes and parses ATSC EIT table πŸ”₯
  • void atsc_table_eit_free (struct atsc_table_eit *table) β€” frees all data allocated by the ATSC EIT table parser. yes, all of it 🧚
  • void atsc_table_eit_print (struct dvb_v5_fe_parms *parms, struct atsc_table_eit *table) β€” prints the content of the ATSC EIT table 🌈
  • ssize_t dvb_table_eit_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct dvb_table_eit **table) β€” initializes and parses EIT table. note: this one's the DVB flavor, not ATSC, keep them separate bestie πŸ’–
  • void dvb_table_eit_free (struct dvb_table_eit *table) β€” frees all data allocated by the DVB EIT table parser πŸŽ€
  • void dvb_table_eit_print (struct dvb_v5_fe_parms *parms, struct dvb_table_eit *table) β€” prints the content of the DVB EIT table ⭐
  • void dvb_time (const uint8_t data[5], struct tm *tm) β€” converts a DVB EIT formatted timestamp into struct tm. five bytes in, actual time out, we love a glow-up πŸ’…
  • ssize_t atsc_table_mgt_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct atsc_table_mgt **table) β€” initializes and parses MGT table 🌸
  • void atsc_table_mgt_free (struct atsc_table_mgt *table) β€” frees all data allocated by the MGT table parser πŸ¦‹
  • void atsc_table_mgt_print (struct dvb_v5_fe_parms *parms, struct atsc_table_mgt *table) β€” prints the content of the MGT table πŸ’œ
  • ssize_t dvb_table_nit_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct dvb_table_nit **table) β€” initializes and parses NIT table πŸ”₯
  • void dvb_table_nit_free (struct dvb_table_nit *table) β€” frees all data allocated by the NIT table parser 🧚
  • void dvb_table_nit_print (struct dvb_v5_fe_parms *parms, struct dvb_table_nit *table) β€” prints the content of the NIT table 🌈
  • void dvb_table_nit_descriptor_handler (struct dvb_v5_fe_parms *parms, struct dvb_table_nit *table, enum descriptors descriptor, nit_handler_callback_t *call_nit, nit_tran_handler_callback_t *call_tran, void *priv) β€” for each entry at NIT and NIT transport tables, call a callback. two callbacks, one priv pointer, no cap 🫢
  • ssize_t dvb_table_pat_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct dvb_table_pat **table) β€” initializes and parses PAT table ✨
  • void dvb_table_pat_free (struct dvb_table_pat *table) β€” frees all data allocated by the PAT table parser πŸŽ€
  • void dvb_table_pat_print (struct dvb_v5_fe_parms *parms, struct dvb_table_pat *table) β€” prints the content of the PAT table 🌸
  • ssize_t dvb_table_pmt_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct dvb_table_pmt **table) β€” initializes and parses PMT table πŸ¦‹
  • void dvb_table_pmt_free (struct dvb_table_pmt *table) β€” frees all data allocated by the PMT table parser πŸ’œ
  • void dvb_table_pmt_print (struct dvb_v5_fe_parms *parms, const struct dvb_table_pmt *table) β€” prints the content of the PAT table. and yes bestie, the page literally says PAT here even though we're in PMT-land β€” I'm just repeating what it says, not my business to edit the lore πŸ’€
  • ssize_t dvb_table_sdt_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct dvb_table_sdt **table) β€” initializes and parses SDT table πŸ”₯
  • void dvb_table_sdt_free (struct dvb_table_sdt *table) β€” frees all data allocated by the SDT table parser 🧚
  • void dvb_table_sdt_print (struct dvb_v5_fe_parms *parms, struct dvb_table_sdt *table) β€” prints the content of the SDT table 🌈
  • ssize_t atsc_table_vct_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct atsc_table_vct **table) β€” initializes and parses VCT table ⭐
  • void atsc_table_vct_free (struct atsc_table_vct *table) β€” frees all data allocated by the VCT table parser 🫢
  • void atsc_table_vct_print (struct dvb_v5_fe_parms *parms, struct atsc_table_vct *table) β€” prints the content of the VCT table πŸ’–

new category drop: MPEG elementary stream and PES/TS stuff, aka the deep lore of this page 🌸

  • int dvb_mpeg_es_seq_start_init (const uint8_t *buf, ssize_t buflen, struct dvb_mpeg_es_seq_start *seq_start) β€” initialize a struct dvb_mpeg_es_seq_start from buffer πŸŽ€
  • void dvb_mpeg_es_seq_start_print (struct dvb_v5_fe_parms *parms, struct dvb_mpeg_es_seq_start *seq_start) β€” print details of struct dvb_mpeg_es_seq_start πŸ’…
  • int dvb_mpeg_es_pic_start_init (const uint8_t *buf, ssize_t buflen, struct dvb_mpeg_es_pic_start *pic_start) β€” initialize a struct dvb_mpeg_es_pic_start from buffer πŸ¦‹
  • void dvb_mpeg_es_pic_start_print (struct dvb_v5_fe_parms *parms, struct dvb_mpeg_es_pic_start *pic_start) β€” print details of struct dvb_mpeg_es_pic_start πŸ’œ
  • ssize_t dvb_mpeg_pes_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, uint8_t *table) β€” initialize a struct dvb_mpeg_pes from buffer πŸ”₯
  • void dvb_mpeg_pes_free (struct dvb_mpeg_pes *pes) β€” deallocate memory associated with a struct dvb_mpeg_pes. give the memory back, bestie 🧚
  • void dvb_mpeg_pes_print (struct dvb_v5_fe_parms *parms, struct dvb_mpeg_pes *pes) β€” print details of struct dvb_mpeg_pes 🌈
  • ssize_t dvb_mpeg_ts_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, uint8_t *table, ssize_t *table_length) β€” initialize a struct dvb_mpeg_ts from buffer. note it takes an extra table_length out-pointer, she's thorough ⭐
  • void dvb_mpeg_ts_free (struct dvb_mpeg_ts *ts) β€” deallocate memory associated with a struct dvb_mpeg_ts 🫢
  • void dvb_mpeg_ts_print (struct dvb_v5_fe_parms *parms, struct dvb_mpeg_ts *ts) β€” print details of struct dvb_mpeg_ts πŸ’–

🌟 Variables 🌟

the global girlies, the exported constants, the whole vibe check πŸ’…

  • const dvb_table_init_func dvb_table_initializers [256] β€” table with all possible descriptors. two hundred and fifty-six slots of pure possibility πŸ‘‘
  • const struct dvb_descriptor dvb_descriptors [] β€” contains the parsers for the several descriptors πŸŽ€
  • const char * pmt_stream_name [] β€” converts from enum dvb_streams into a string. enum in, words out, we love a translator 🌸
  • const char * dvb_mpeg_es_frame_names [5] β€” vector that translates from enum dvb_mpeg_es_frame_t to string. five whole names, exactly five, don't @ me πŸ¦‹

πŸ“– Detailed Description πŸ“–

(more coming, bestie β€” this is where it gets juicy) πŸ’œ

✨ Macro Definition Documentation ✨

okay bestie, it's macro o'clock and honestly? these #defines are the blueprint. every single one is listed below with the exact file and line number, because we keep receipts. no cap. πŸ’…

  • #define ATSC_BASE_PID β€” ATSC PID for the Program and System Information Protocol.

Definition at line 44 of file atsc_header.h.

  • #define atsc_eit_event_foreach( _event, _eit) β€” Macro used to find event on an ATSC EIT table.

Parameters:

  • _event β€” event to seek
  • _eit β€” pointer to struct atsc_table_eit_event

Definition at line 160 of file atsc_eit.h.

  • #define ATSC_TABLE_CVCT β€” CVCT table ID.

Definition at line 60 of file vct.h.

  • #define ATSC_TABLE_EIT β€” ATSC EIT table ID.

Definition at line 53 of file atsc_eit.h.

  • #define ATSC_TABLE_MGT β€” ATSC MGT table ID.

Definition at line 51 of file mgt.h.

  • #define ATSC_TABLE_TVCT β€” TVCT table ID.

Definition at line 59 of file vct.h.

  • #define ATSC_TABLE_VCT_PID β€” Program ID with the VCT tables on it.

Definition at line 61 of file vct.h.

  • #define atsc_vct_channel_foreach( _channel, _vct) β€” Macro used to find channels on a VCT table.

Parameters:

  • _channel β€” channel to seek
  • _vct β€” pointer to struct atsc_table_vct_channel

Definition at line 202 of file vct.h.

  • #define DVB_CRC_SIZE β€” number of bytes for the descriptor's CRC check

Definition at line 61 of file descriptors.h.

  • #define dvb_eit_event_foreach( _event, _eit) β€” Macro used to find event on a DVB EIT table.

Parameters:

  • _event β€” event to seek
  • _eit β€” pointer to struct dvb_table_eit_event

Definition at line 162 of file eit.h.

  • #define DVB_MAX_PAYLOAD_PACKET_SIZE β€” Maximum size of a table session to be parsed.

Definition at line 55 of file descriptors.h.

  • #define DVB_MPEG_ES_GOP β€” Group Of Pictures.

Definition at line 67 of file mpeg_es.h.

  • #define DVB_MPEG_ES_PIC_START β€” Picture Start.

Definition at line 63 of file mpeg_es.h.

  • #define DVB_MPEG_ES_SEQ_EXT β€” Extension.

Definition at line 66 of file mpeg_es.h.

  • #define DVB_MPEG_ES_SEQ_START β€” Sequence Start.

Definition at line 65 of file mpeg_es.h.

  • #define DVB_MPEG_ES_SLICES β€” Slices.

Definition at line 68 of file mpeg_es.h.

  • #define DVB_MPEG_ES_USER_DATA β€” User Data.

Definition at line 64 of file mpeg_es.h.

  • #define DVB_MPEG_PES β€” MPEG Packetized Elementary Stream magic.

Definition at line 80 of file mpeg_pes.h.

  • #define DVB_MPEG_PES_AUDIO β€” PES Audio.

Definition at line 82 of file mpeg_pes.h.

  • #define DVB_MPEG_PES_VIDEO β€” PES Video.

Definition at line 83 of file mpeg_pes.h.

  • #define DVB_MPEG_STREAM_DIRECTORY β€” PES Stream directory.

Definition at line 90 of file mpeg_pes.h.

  • #define DVB_MPEG_STREAM_DSMCC β€” PES DSMCC.

Definition at line 91 of file mpeg_pes.h.

  • #define DVB_MPEG_STREAM_ECM β€” PES ECM Stream.

Definition at line 88 of file mpeg_pes.h.

  • #define DVB_MPEG_STREAM_EMM β€” PES EMM Stream.

Definition at line 89 of file mpeg_pes.h.

  • #define DVB_MPEG_STREAM_H222E β€” PES H.222.1 type E.

Definition at line 92 of file mpeg_pes.h.

  • #define DVB_MPEG_STREAM_MAP β€” PES Stream map.

Definition at line 85 of file mpeg_pes.h.

  • #define DVB_MPEG_STREAM_PADDING β€” PES padding.

Definition at line 86 of file mpeg_pes.h.

  • #define DVB_MPEG_STREAM_PRIVATE_2 β€” PES private.

Definition at line 87 of file mpeg_pes.h.

  • #define DVB_MPEG_TS β€” MPEG Transport Stream magic.

Definition at line 50 of file mpeg_ts.h.

  • #define DVB_MPEG_TS_PACKET_SIZE β€” Size of an MPEG packet.

Definition at line 51 of file mpeg_ts.h.

  • #define dvb_nit_transport_foreach( _tran, _nit) β€” Macro used to find a transport inside a NIT table.

Parameters:

  • _tran β€” transport to seek
  • _nit β€” pointer to struct dvb_table_nit_transport

Definition at line 189 of file nit.h.

  • #define dvb_pat_program_foreach( _pgm, _pat) β€” Macro used to find programs on a PAT table.

Parameters:

  • _pgm β€” program to seek
  • _pat β€” pointer to struct dvb_table_pat_program

Definition at line 121 of file pat.h.

  • #define dvb_pmt_stream_foreach( _stream, _pmt) β€” Macro used to find streams on a PMT table.

Parameters:

  • _stream β€” stream to seek
  • _pmt β€” pointer to struct dvb_table_pmt_stream

Definition at line 243 of file pmt.h.

  • #define dvb_sdt_service_foreach( _service, _sdt) β€” Macro used to find services on a SDT table.

Parameters:

  • _service β€” service to seek
  • _sdt β€” pointer to struct dvb_table_sdt_service

Definition at line 137 of file sdt.h.

  • #define DVB_TABLE_CAT β€” ATSC CAT table ID.

Definition at line 47 of file cat.h.

  • #define DVB_TABLE_CAT_PID β€” ATSC PID table ID.

Definition at line 48 of file cat.h.

  • #define DVB_TABLE_EIT β€” DVB EIT table ID for the actual TS.

Definition at line 68 of file eit.h.

  • #define DVB_TABLE_EIT_OTHER β€” DVB EIT table ID for other TS.

Definition at line 69 of file eit.h.

  • #define DVB_TABLE_EIT_PID β€” DVB EIT Program ID.

Definition at line 70 of file eit.h.

  • #define DVB_TABLE_EIT_SCHEDULE β€” Start table ID for the DVB EIT schedule data on the actual TS. The range has 0x0f elements (0x50 to 0x5F).

Definition at line 72 of file eit.h.

  • #define DVB_TABLE_EIT_SCHEDULE_OTHER β€” Start table ID for the DVB EIT schedule data on other TS. The range has 0x0f elements (0x60 to 0x6F).

Definition at line 73 of file eit.h.

  • #define DVB_TABLE_NIT β€” NIT table ID.

Definition at line 61 of file nit.h.

  • #define DVB_TABLE_NIT2 β€” NIT table ID (alternative table ID)

Definition at line 62 of file nit.h.

  • #define DVB_TABLE_NIT_PID β€” NIT Program ID.

Definition at line 63 of file nit.h.

  • #define DVB_TABLE_PAT β€” PAT table ID.

Definition at line 55 of file pat.h.

  • #define DVB_TABLE_PAT_PID β€” PAT Program ID.

Definition at line 56 of file pat.h.

  • #define DVB_TABLE_PMT β€” PMT table ID.

Definition at line 52 of file pmt.h.

  • #define DVB_TABLE_SDT β€” SDT table ID.

Definition at line 58 of file sdt.h.

  • #define DVB_TABLE_SDT2 β€” SDT table ID (alternative table ID)

Definition at line 59 of file sdt.h.

  • #define DVB_TABLE_SDT_PID β€” SDT Program ID.

Definition at line 60 of file sdt.h.


🫢 Typedef Documentation 🫢

bestie, these are the function-pointer typedefs, and they're giving plug-and-play parser energy. obsessed. πŸ¦‹

  • typedef void(* dvb_desc_ext_free_func) (const void *desc) β€” Function prototype for the extended descriptors parsing free code.

Parameters:

  • desc β€” struct dvb_desc pointer

Definition at line 156 of file desc_extension.h.

  • typedef int(* dvb_desc_ext_init_func) (struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_extension_descriptor *ext, void *desc) β€” Function prototype for the extended descriptors parsing init code.

Parameters:

  • parms β€” Struct dvb_v5_fe_parms pointer
  • buf β€” buffer with the content of the descriptor
  • ext β€” struct dvb_extension_descriptor pointer
  • desc β€” struct dvb_desc pointer

Definition at line 135 of file desc_extension.h.

  • typedef void(* dvb_desc_ext_print_func) (struct dvb_v5_fe_parms *parms, const struct dvb_extension_descriptor *ext, const void *desc) β€” Function prototype for the extended descriptors parsing print code.

Parameters:

  • parms β€” Struct dvb_v5_fe_parms pointer
  • ext β€” struct dvb_extension_descriptor pointer
  • desc β€” struct dvb_desc pointer

Definition at line 147 of file desc_extension.h.

  • typedef void(* dvb_desc_free_func) (struct dvb_desc *desc) β€” Function prototype for the descriptors memory free code.

Parameters:

  • desc β€” pointer to struct dvb_desc pointer to be freed

Definition at line 234 of file descriptors.h.

  • typedef int(* dvb_desc_init_func) (struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_desc *desc) β€” Function prototype for the descriptors parsing init code.

Parameters:

  • parms β€” Struct dvb_v5_fe_parms pointer
  • buf β€” buffer with the content of the descriptor
  • desc β€” struct dvb_desc pointer

Definition at line 215 of file descriptors.h.

  • typedef void(* dvb_desc_print_func) (struct dvb_v5_fe_parms *parms, const struct dvb_desc *desc) β€” Function prototype for the descriptors parsing print code.

Parameters:

  • parms β€” Struct dvb_v5_fe_parms pointer
  • desc β€” struct dvb_desc pointer

Definition at line 225 of file descriptors.h.

  • typedef void(* dvb_table_init_func) (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, void **table) β€” Function prototype for a function that initializes the descriptors parsing on a table.

Parameters:

  • parms β€” Struct dvb_v5_fe_parms pointer
  • buf β€” Buffer with data to be parsed
  • buflen β€” Size of the buffer to be parsed
  • table β€” pointer to a place where the allocated memory with the table structure will be stored.

Definition at line 79 of file descriptors.h.

  • typedef void nit_handler_callback_t(struct dvb_table_nit *nit, struct dvb_desc *desc, void *priv) β€” typedef for a callback used when a NIT table entry is found

Parameters:

  • nit β€” a struct dvb_table_nit pointer
  • desc β€” a struct dvb_desc pointer
  • priv β€” an opaque optional pointer

Definition at line 164 of file nit.h.

  • typedef void nit_tran_handler_callback_t(struct dvb_table_nit *nit, struct dvb_table_nit_transport *tran, struct dvb_desc *desc, void *priv) β€” typedef for a callback used when a NIT transport table entry is found

Parameters:

  • nit β€” a struct dvb_table_nit pointer
  • tran β€” a struct dvb_table_nit_transport pointer
  • desc β€” a struct dvb_desc pointer
  • priv β€” an opaque optional pointer

Definition at line 177 of file nit.h.


πŸ‘‘ Enumeration Type Documentation πŸ‘‘

  • enum descriptors β€” List containing all descriptors used by Digital TV MPEG-TS.

Enumerator:

  • video_stream_descriptor β€” video_stream descriptor - ISO/IEC 13818-1
  • audio_stream_descriptor β€” audio_stream descriptor - ISO/IEC 13818-1
  • hierarchy_descriptor β€” hierarchy descriptor - ISO/IEC 13818-1
  • registration_descriptor β€” registration descriptor - ISO/IEC 13818-1
  • ds_alignment_descriptor β€” ds_alignment descriptor - ISO/IEC 13818-1
  • target_background_grid_descriptor β€” target_background_grid descriptor - ISO/IEC 13818-1
  • video_window_descriptor β€” video_window descriptor - ISO/IEC 13818-1
  • conditional_access_descriptor β€” conditional_access descriptor - ISO/IEC 13818-1
  • iso639_language_descriptor β€” iso639_language descriptor - ISO/IEC 13818-1
  • system_clock_descriptor β€” system_clock descriptor - ISO/IEC 13818-1
  • multiplex_buffer_utilization_descriptor β€” multiplex_buffer_utilization descriptor - ISO/IEC 13818-1
  • copyright_descriptor β€” copyright descriptor - ISO/IEC 13818-1
  • maximum_bitrate_descriptor β€” maximum_bitrate descriptor - ISO/IEC 13818-1
  • private_data_indicator_descriptor β€” private_data_indicator descriptor - ISO/IEC 13818-1
  • smoothing_buffer_descriptor β€” smoothing_buffer descriptor - ISO/IEC 13818-1
  • std_descriptor β€” std descriptor - ISO/IEC 13818-1
  • ibp_descriptor β€” ibp descriptor - ISO/IEC 13818-1

Okay so we're deep in the descriptor roll call now, and bestie, this list is long β€” but every single one of these is a member of dvb_table and they all deserve their moment. Grouped by which standard they crawled out of. No skipping, no summarising, we're doing all of them πŸ’…


The ISO/IEC 13818-1 girlies ✨

  • mpeg4_video_descriptor β€” the mpeg4_video descriptor, straight from ISO/IEC 13818-1 πŸŽ€
  • mpeg4_audio_descriptor β€” the mpeg4_audio descriptor, also ISO/IEC 13818-1 🌸
  • iod_descriptor β€” the iod descriptor, ISO/IEC 13818-1 πŸ¦‹
  • sl_descriptor β€” the sl descriptor, ISO/IEC 13818-1 ✨
  • fmc_descriptor β€” the fmc descriptor, ISO/IEC 13818-1 πŸ’–
  • external_es_id_descriptor β€” the external_es_id descriptor, ISO/IEC 13818-1 🫢
  • muxcode_descriptor β€” the muxcode descriptor, ISO/IEC 13818-1 🌈
  • fmxbuffersize_descriptor β€” the fmxbuffersize descriptor, ISO/IEC 13818-1 πŸŽ€
  • multiplexbuffer_descriptor β€” the multiplexbuffer descriptor, ISO/IEC 13818-1 πŸ’œ
  • content_labeling_descriptor β€” the content_labeling descriptor, ISO/IEC 13818-1 πŸ‘‘
  • metadata_pointer_descriptor β€” the metadata_pointer descriptor, ISO/IEC 13818-1 ⭐
  • metadata_descriptor β€” the metadata descriptor, ISO/IEC 13818-1 πŸ“
  • metadata_std_descriptor β€” the metadata_std descriptor, ISO/IEC 13818-1 🧚
  • AVC_video_descriptor β€” the AVC_video descriptor, ISO/IEC 13818-1 πŸ’…
  • ipmp_descriptor β€” the ipmp descriptor, ISO/IEC 13818-1 🌸
  • AVC_timing_and_HRD_descriptor β€” the AVC_timing_and_HRD descriptor, ISO/IEC 13818-1 πŸ”₯
  • mpeg2_aac_audio_descriptor β€” the mpeg2_aac_audio descriptor, ISO/IEC 13818-1 πŸŽ€
  • flexmux_timing_descriptor β€” the flexmux_timing descriptor, ISO/IEC 13818-1 ✨

The ETSI EN 300 468 V1.11.1 (2010-04) squad β€” and yes, the version stamp is doing the most, we respect it 😭

  • network_name_descriptor β€” the network_name descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • service_list_descriptor β€” the service_list descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • stuffing_descriptor β€” the stuffing descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • satellite_delivery_system_descriptor β€” the satellite_delivery_system descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • cable_delivery_system_descriptor β€” the cable_delivery_system descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • VBI_data_descriptor β€” the VBI_data descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • VBI_teletext_descriptor β€” the VBI_teletext descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • bouquet_name_descriptor β€” the bouquet_name descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • service_descriptor β€” the service descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • country_availability_descriptor β€” the country_availability descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • linkage_descriptor β€” the linkage descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • NVOD_reference_descriptor β€” the NVOD_reference descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • time_shifted_service_descriptor β€” the time_shifted_service descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • short_event_descriptor β€” the short_event descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • extended_event_descriptor β€” the extended_event descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • time_shifted_event_descriptor β€” the time_shifted_event descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • component_descriptor β€” the component descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • mosaic_descriptor β€” the mosaic descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • stream_identifier_descriptor β€” the stream_identifier descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • CA_identifier_descriptor β€” the CA_identifier descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • content_descriptor β€” the content descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • parental_rating_descriptor β€” the parental_rating descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • teletext_descriptor β€” the teletext descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • telephone_descriptor β€” the telephone descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • local_time_offset_descriptor β€” the local_time_offset descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • subtitling_descriptor β€” the subtitling descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • terrestrial_delivery_system_descriptor β€” the terrestrial_delivery_system descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • multilingual_network_name_descriptor β€” the multilingual_network_name descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • multilingual_bouquet_name_descriptor β€” the multilingual_bouquet_name descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • multilingual_service_name_descriptor β€” the multilingual_service_name descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • multilingual_component_descriptor β€” the multilingual_component descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • private_data_specifier_descriptor β€” the private_data_specifier descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • service_move_descriptor β€” the service_move descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • short_smoothing_buffer_descriptor β€” the short_smoothing_buffer descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • frequency_list_descriptor β€” the frequency_list descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • partial_transport_stream_descriptor β€” the partial_transport_stream descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • data_broadcast_descriptor β€” the data_broadcast descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • scrambling_descriptor β€” the scrambling descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • data_broadcast_id_descriptor β€” the data_broadcast_id descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • transport_stream_descriptor β€” the transport_stream descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • DSNG_descriptor β€” the DSNG descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • PDC_descriptor β€” the PDC descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • AC_3_descriptor β€” the AC_3 descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • ancillary_data_descriptor β€” the ancillary_data descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • cell_list_descriptor β€” the cell_list descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • cell_frequency_link_descriptor β€” the cell_frequency_link descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • announcement_support_descriptor β€” the announcement_support descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • application_signalling_descriptor β€” the application_signalling descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • adaptation_field_data_descriptor β€” the adaptation_field_data descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • service_identifier_descriptor β€” the service_identifier descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • service_availability_descriptor β€” the service_availability descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • default_authority_descriptor β€” the default_authority descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • related_content_descriptor β€” the related_content descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • TVA_id_descriptor β€” the TVA_id descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • content_identifier_descriptor β€” the content_identifier descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • time_slice_fec_identifier_descriptor β€” the time_slice_fec_identifier descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • ECM_repetition_rate_descriptor β€” the ECM_repetition_rate descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • S2_satellite_delivery_system_descriptor β€” the S2_satellite_delivery_system descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • enhanced_AC_3_descriptor β€” the enhanced_AC_3 descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • DTS_descriptor β€” the DTS descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • AAC_descriptor β€” the AAC descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • XAIT_location_descriptor β€” the XAIT_location descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • FTA_content_management_descriptor β€” the FTA_content_management descriptor, ETSI EN 300 468 V1.11.1 (2010-04)
  • extension_descriptor β€” the extension descriptor, ETSI EN 300 468 V1.11.1 (2010-04)

The SCTE 35 2004 crew πŸ›°οΈ

  • CUE_identifier_descriptor β€” the CUE_identifier descriptor, SCTE 35 2004
  • extended_channel_name β€” the extended_channel_name descriptor, SCTE 35 2004 β€” and yeah, no _descriptor suffix on this one, she's built different πŸ’…
  • service_location β€” the service_location descriptor, SCTE 35 2004
  • component_name_descriptor β€” the component_name descriptor, SCTE 35 2004
  • See also β€” http://www.etherguidesystems.com/Help/SDOs/ATSC/Semantics/Descriptors/Default.aspx πŸ‘€
  • logical_channel_number_descriptor β€” the logical_channel_number descriptor, SCTE 35 2004
  • See also β€” http://www.coolstf.com/tsreader/descriptors.html πŸ‘€

The ABNT NBR 15603-1 2007 babes πŸ‡§πŸ‡·

  • carousel_id_descriptor β€” the carousel_id descriptor, ABNT NBR 15603-1 2007
  • association_tag_descriptor β€” the association_tag descriptor, ABNT NBR 15603-1 2007
  • deferred_association_tags_descriptor β€” the deferred_association_tags descriptor, ABNT NBR 15603-1 2007
  • hierarchical_transmission_descriptor β€” the hierarchical_transmission descriptor, ABNT NBR 15603-1 2007
  • digital_copy_control_descriptor β€” the digital_copy_control descriptor, ABNT NBR 15603-1 2007
  • network_identifier_descriptor β€” the network_identifier descriptor, ABNT NBR 15603-1 2007
  • partial_transport_stream_time_descriptor β€” the partial_transport_stream_time descriptor, ABNT NBR 15603-1 2007
  • audio_component_descriptor β€” the audio_component descriptor, ABNT NBR 15603-1 2007
  • hyperlink_descriptor β€” the hyperlink descriptor, ABNT NBR 15603-1 2007
  • target_area_descriptor β€” the target_area descriptor, ABNT NBR 15603-1 2007
  • data_contents_descriptor β€” the data_contents descriptor, ABNT NBR 15603-1 2007
  • video_decode_control_descriptor β€” the video_decode_control descriptor, ABNT NBR 15603-1 2007
  • download_content_descriptor β€” the download_content descriptor, ABNT NBR 15603-1 2007
  • CA_EMM_TS_descriptor β€” the CA_EMM_TS descriptor, ABNT NBR 15603-1 2007
  • CA_contract_information_descriptor β€” the CA_contract_information descriptor, ABNT NBR 15603-1 2007
  • CA_service_descriptor β€” the CA_service descriptor, ABNT NBR 15603-1 2007
  • TS_Information_descriptor β€” the transport_stream_information descriptor, ABNT NBR 15603-1 2007 β€” yes bestie, the name and the blurb don't match, that's just how she is, don't @ me πŸ™ˆ
  • extended_broadcaster_descriptor β€” the extended_broadcaster descriptor, ABNT NBR 15603-1 2007
  • logo_transmission_descriptor β€” the logo_transmission descriptor, ABNT NBR 15603-1 2007
  • basic_local_event_descriptor β€” the basic_local_event descriptor, ABNT NBR 15603-1 2007
  • reference_descriptor β€” the reference descriptor, ABNT NBR 15603-1 2007
  • node_relation_descriptor β€” the node_relation descriptor, ABNT NBR 15603-1 2007
  • short_node_information_descriptor β€” short_node_information descriptor - ABNT NBR 15603-1 2007
  • STC_reference_descriptor β€” STC_reference descriptor - ABNT NBR 15603-1 2007.
  • series_descriptor β€” series descriptor - ABNT NBR 15603-1 2007
  • event_group_descriptor β€” event_group descriptor - ABNT NBR 15603-1 2007
  • SI_parameter_descriptor β€” SI_parameter descriptor - ABNT NBR 15603-1 2007.
  • broadcaster_Name_Descriptor β€” broadcaster_Name descriptor - ABNT NBR 15603-1 2007
  • component_group_descriptor β€” component_group descriptor - ABNT NBR 15603-1 2007
  • SI_prime_TS_descriptor β€” SI_prime_transport_stream descriptor - ABNT NBR 15603-1 2007.
  • board_information_descriptor β€” board_information descriptor - ABNT NBR 15603-1 2007
  • LDT_linkage_descriptor β€” LDT_linkage descriptor - ABNT NBR 15603-1 2007.
  • connected_transmission_descriptor β€” connected_transmission descriptor - ABNT NBR 15603-1 2007
  • content_availability_descriptor β€” content_availability descriptor - ABNT NBR 15603-1 2007
  • service_group_descriptor β€” service_group descriptor - ABNT NBR 15603-1 2007
  • carousel_compatible_composite_descriptor β€” carousel_compatible_composite descriptor - ABNT NBR 15603-1 2007
  • conditional_playback_descriptor β€” conditional_playback descriptor - ABNT NBR 15603-1 2007
  • ISDBT_delivery_system_descriptor β€” ISDBT terrestrial_delivery_system descriptor - ABNT NBR 15603-1 2007.
  • partial_reception_descriptor β€” partial_reception descriptor - ABNT NBR 15603-1 2007
  • emergency_information_descriptor β€” emergency_information descriptor - ABNT NBR 15603-1 2007
  • data_component_descriptor β€” data_component descriptor - ABNT NBR 15603-1 2007
  • system_management_descriptor β€” system_management descriptor - ABNT NBR 15603-1 2007
  • atsc_stuffing_descriptor β€” atsc_stuffing descriptor - ATSC A/65:2009
  • atsc_ac3_audio_descriptor β€” atsc_ac3_audio descriptor - ATSC A/65:2009
  • atsc_caption_service_descriptor β€” atsc_caption_service descriptor - ATSC A/65:2009
  • atsc_content_advisory_descriptor β€” atsc_content_advisory descriptor - ATSC A/65:2009
  • atsc_extended_channel_descriptor β€” atsc_extended_channel descriptor - ATSC A/65:2009
  • atsc_service_location_descriptor β€” atsc_service_location descriptor - ATSC A/65:2009
  • atsc_time_shifted_service_descriptor β€” atsc_time_shifted_service descriptor - ATSC A/65:2009
  • atsc_component_name_descriptor β€” atsc_component_name descriptor - ATSC A/65:2009
  • atsc_DCC_departing_request_descriptor β€” atsc_DCC_departing_request descriptor - ATSC A/65:2009
  • atsc_DCC_arriving_request_descriptor β€” atsc_DCC_arriving_request descriptor - ATSC A/65:2009
  • atsc_redistribution_control_descriptor β€” atsc_redistribution_control descriptor - ATSC A/65:2009
  • atsc_ATSC_private_information_descriptor β€” atsc_ATSC_private_information descriptor - ATSC A/65:2009
  • atsc_genre_descriptor β€” atsc_genre descriptor - ATSC A/65:2009

Defined at line 592 of descriptors.h. πŸ“


enum dvb_mpeg_es_frame_t

okay so these are the MPEG frame types bestie, the little building blocks of a video stream πŸ’…

Enumerator

  • DVB_MPEG_ES_FRAME_UNKNOWN β€” Unknown frame. (mystery frame, we don't know her πŸ™ˆ)
  • DVB_MPEG_ES_FRAME_I β€” I frame. πŸ‘‘
  • DVB_MPEG_ES_FRAME_P β€” P frame. ✨
  • DVB_MPEG_ES_FRAME_B β€” B frame. πŸ’–
  • DVB_MPEG_ES_FRAME_D β€” D frame. πŸ¦‹

Defined at line 165 of mpeg_es.h.


enum dvb_streams

this one adds support for MPEG-TS Stream types 🌈

Enumerator

  • stream_video β€” ISO/IEC 11172 Video.
  • stream_video_h262 β€” ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream
  • stream_audio β€” ISO/IEC 11172 Audio.
  • stream_audio_13818_3 β€” ISO/IEC 13818-3 Audio.
  • stream_private_sections β€” ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections
  • stream_private_data β€” ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data
  • stream_mheg β€” ISO/IEC 13522 MHEG.
  • stream_h222 β€” ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Annex A DSM-CC
  • stream_h222_1 β€” ITU-T Rec. H.222.1
  • stream_13818_6_A β€” ISO/IEC 13818-6 type A.
  • stream_13818_6_B β€” ISO/IEC 13818-6 type B.
  • stream_13818_6_C β€” ISO/IEC 13818-6 type C.
  • stream_13818_6_D β€” ISO/IEC 13818-6 type D.
  • stream_h222_aux β€” ITU-T Rec. H.222.0 | ISO/IEC 13818-1 auxiliary
  • stream_audio_adts β€” ISO/IEC 13818-7 Audio with ADTS transport syntax.
  • stream_video_14496_2 β€” ISO/IEC 14496-2 Visual.
  • stream_audio_latm β€” ISO/IEC 14496-3 Audio with the LATM transport syntax as defined in ISO/IEC 14496-3 / AMD 1.
  • stream_14496_1_pes β€” ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in PES packets.
  • stream_14496_1_iso β€” ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in ISO/IEC14496_sections.
  • stream_download β€” ISO/IEC 13818-6 Synchronized Download Protocol.
  • stream_video_h264
  • stream_audio_14496_3
  • stream_video_hevc
  • stream_video_cavs
  • stream_video_moto
  • stream_audio_a52
  • stream_scte_27
  • stream_audio_sdds
  • stream_audio_dts_hdmv
  • stream_audio_e_ac3
  • stream_audio_dts
  • stream_audio_a52_vls
  • stream_spu_vls
  • stream_audio_sdds2

Defined at line 100 of pmt.h.


πŸ› οΈ Function Documentation πŸ› οΈ

okay bestie this is the part where we meet the actual functions, the girlies doing the work πŸ’…


void atsc_table_eit_free (struct atsc_table_eit * table)

Frees all data allocated by the ATSC EIT table parser. 🧹

Parameters

  • table β€” pointer to struct atsc_table_eit to be freed

ssize_t atsc_table_eit_init (struct dvb_v5_fe_parms * parms, const uint8_t * buf, ssize_t buflen, struct atsc_table_eit ** table)

Initializes and parses ATSC EIT table. ✨

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • buf β€” buffer containing the EIT raw data
  • buflen β€” length of the buffer
  • table β€” pointer to struct atsc_table_eit to be allocated and filled

This function allocates an ATSC EIT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change.

heads up: your buffer is not safe from edits here, it may get changed πŸ’€

Returns

On success, it returns the size of the allocated struct. A negative value indicates an error.


void atsc_table_eit_print (struct dvb_v5_fe_parms * parms, struct atsc_table_eit * table)

Prints the content of the ATSC EIT table. πŸ–¨οΈ

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • table β€” pointer to struct atsc_table_eit

void atsc_table_mgt_free (struct atsc_table_mgt * table)

Frees all data allocated by the MGT table parser. 🧹

Parameters

  • table β€” pointer to struct atsc_table_mgt to be freed

ssize_t atsc_table_mgt_init (struct dvb_v5_fe_parms * parms, const uint8_t * buf, ssize_t buflen, struct atsc_table_mgt ** table)

Initializes and parses MGT table. ✨

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • buf β€” buffer containing the MGT raw data
  • buflen β€” length of the buffer
  • table β€” pointer to struct atsc_table_mgt to be allocated and filled

This function allocates an ATSC MGT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change.

same deal, buffer can get modified, no cap 🫢

Returns

On success, it returns the size of the allocated struct. A negative value indicates an error.


void atsc_table_mgt_print (struct dvb_v5_fe_parms * parms, struct atsc_table_mgt * table)

Prints the content of the MGT table. πŸ–¨οΈ

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • table β€” pointer to struct atsc_table_mgt

void atsc_table_vct_free (struct atsc_table_vct * table)

Frees all data allocated by the VCT table parser. 🧹

Parameters

  • table β€” pointer to struct atsc_table_vct to be freed

ssize_t atsc_table_vct_init (struct dvb_v5_fe_parms * parms, const uint8_t * buf, ssize_t buflen, struct atsc_table_vct ** table)

Initializes and parses VCT table. ✨

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • buf β€” buffer containing the VCT raw data
  • buflen β€” length of the buffer
  • table β€” pointer to struct atsc_table_vct to be allocated and filled

This function allocates an ATSC VCT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change.

yup, buffer may change here too, it's giving "read the docs before you freak out" 😭

Returns

On success, it returns the size of the allocated struct. A negative value indicates an error.


void atsc_table_vct_print (struct dvb_v5_fe_parms * parms, struct atsc_table_vct * table)

Prints the content of the VCT table. πŸ–¨οΈ

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • table β€” pointer to struct atsc_table_vct

uint32_t dvb_bcd (uint32_t bcd)

Converts from BCD to CPU integer internal representation. πŸ”’

Parameters

  • bcd β€” value in BCD encoding

void dvb_desc_free (struct dvb_desc ** list)

frees a dvb_desc linked list 🧹

Parameters

  • list β€” struct dvb_desc pointer.

int dvb_desc_parse (struct dvb_v5_fe_parms * parms, const uint8_t * buf, uint16_t buflen, struct dvb_desc ** head_desc)

parse MPEG-TS descriptors πŸ”

Parameters

  • parms β€” Struct dvb_v5_fe_parms pointer
  • buf β€” Buffer with data to be parsed
  • buflen β€” Size of the buffer to be parsed
  • head_desc β€” pointer to the place to store the parsed data

This function takes a buf as argument and parses it to find the MPEG-TS descriptors inside it, creating a linked list.

On success, head_desc will be allocated and filled with a linked list with the descriptors found inside the buffer.

This function is used by the several MPEG-TS table handlers to parse the entire table that got read by dvb_read_sessions and other similar functions.

Returns

Returns 0 on success, a negative value otherwise.


void dvb_desc_print (struct dvb_v5_fe_parms * parms, struct dvb_desc * desc)

prints the contents of a struct dvb_desc linked list πŸ–¨οΈ

Parameters

  • parms β€” Struct dvb_v5_fe_parms pointer
  • desc β€” struct dvb_desc pointer.

void dvb_hexdump (struct dvb_v5_fe_parms * parms, const char * prefix, const unsigned char * buf, int len)

dumps data into the logs in hexadecimal format πŸ”₯

Parameters

  • parms β€” Struct dvb_v5_fe_parms pointer
  • prefix β€” String to be printed before the dvb_hexdump
  • buf β€” Buffer to hex dump
  • len β€” Number of bytes to show

πŸ’– int dvb_mpeg_es_pic_start_init(const uint8_t * buf, ssize_t buflen, struct dvb_mpeg_es_pic_start * pic_start) πŸ’–

okay so this one builds you a struct dvb_mpeg_es_pic_start out of a buffer, no cap ✨

Parameters

  • buf β€” Buffer
  • buflen β€” Length of buffer
  • pic_start β€” Pointer to allocated structdvb_mpeg_es_pic_start

Returns

If buflen too small, return -1, 0 otherwise. πŸ’…

So like β€” this function copies the length of struct dvb_mpeg_es_pic_start to pic_start and fixes endianness. And seq_start has to be allocated with malloc.


🌸 void dvb_mpeg_es_pic_start_print(struct dvb_v5_fe_parms * parms, struct dvb_mpeg_es_pic_start * pic_start) 🌸

Prints out all the deets of a struct dvb_mpeg_es_pic_start. it's giving show-and-tell πŸŽ€

Parameters

  • parms β€” struct dvb_v5_fe_parms for log functions
  • pic_start β€” Pointer to struct dvb_mpeg_es_pic_start to print

This function prints the fields of struct dvb_mpeg_es_pic_start.


πŸ¦‹ int dvb_mpeg_es_seq_start_init(const uint8_t * buf, ssize_t buflen, struct dvb_mpeg_es_seq_start * seq_start) πŸ¦‹

Initialize a struct dvb_mpeg_es_seq_start from buffer. main character behavior fr fr πŸ‘‘

Parameters

  • buf β€” Buffer
  • buflen β€” Length of buffer
  • seq_start β€” Pointer to allocated struct dvb_mpeg_es_seq_start

Returns

If buflen too small, return -1, 0 otherwise. ✨

This function copies the length of struct dvb_mpeg_es_seq_start to seq_start and fixes endianness. seq_start has to be allocated with malloc.


🫢 void dvb_mpeg_es_seq_start_print(struct dvb_v5_fe_parms * parms, struct dvb_mpeg_es_seq_start * seq_start) 🫢

Print details of struct dvb_mpeg_es_seq_start. bestie it literally just tells you everything πŸ₯°

Parameters

  • parms β€” struct dvb_v5_fe_parms for log functions
  • seq_start β€” Pointer to struct dvb_mpeg_es_seq_start to print

This function prints the fields of struct dvb_mpeg_es_seq_start.


πŸ’€ void dvb_mpeg_pes_free(struct dvb_mpeg_pes * pes) πŸ’€

Deallocate memory associated with a struct dvb_mpeg_pes. cleanup era 🧹

Parameters

  • pes β€” struct dvb_mpeg_pes to be deallocated

If the pointer pes was allocated dynamically, this function can be used to free the memory.


🌈 ssize_t dvb_mpeg_pes_init(struct dvb_v5_fe_parms * parms, const uint8_t * buf, ssize_t buflen, uint8_t * table) 🌈

Initialize a struct dvb_mpeg_pes from buffer. so slay ✨

Parameters

  • parms β€” struct dvb_v5_fe_parms for log functions
  • buf β€” Buffer
  • buflen β€” Length of buffer
  • table β€” Pointer to allocated struct dvb_mpeg_pes

Returns

Length of data in table

This function copies the length of struct dvb_mpeg_pes to table and fixes endianness. The pointer table has to be allocated on stack or dynamically. πŸ‘€


πŸŽ€ void dvb_mpeg_pes_print(struct dvb_v5_fe_parms * parms, struct dvb_mpeg_pes * pes) πŸŽ€

Print details of struct dvb_mpeg_pes. reading it for filth (the good kind) πŸ’…

Parameters

  • parms β€” struct dvb_v5_fe_parms for log functions
  • pes β€” Pointer to struct dvb_mpeg_pes to print

This function prints the fields of struct dvb_mpeg_pes.


⭐ void dvb_mpeg_ts_free(struct dvb_mpeg_ts * ts) ⭐

Deallocate memory associated with a struct dvb_mpeg_ts. release it, let it go πŸ¦‹

Parameters

  • ts β€” struct dvb_mpeg_ts to be deallocated

If ts was allocated dynamically, this function can be used to free the memory.


πŸ”₯ ssize_t dvb_mpeg_ts_init(struct dvb_v5_fe_parms * parms, const uint8_t * buf, ssize_t buflen, uint8_t * table, ssize_t * table_length) πŸ”₯

Initialize a struct dvb_mpeg_ts from buffer. iconic 🎬

Parameters

  • parms β€” struct dvb_v5_fe_parms for log functions
  • buf β€” Buffer
  • buflen β€” Length of buffer
  • table β€” Pointer to allocated struct dvb_mpeg_ts
  • table_length β€” Pointer to size_t where length will be written to

Returns

Length of data in table

This function copies the length of struct dvb_mpeg_ts to table and fixes endianness. The pointer table has to be allocated on stack or dynamically.


πŸ’œ void dvb_mpeg_ts_print(struct dvb_v5_fe_parms * parms, struct dvb_mpeg_ts * ts) πŸ’œ

Print details of struct dvb_mpeg_ts. bestie get a snack, it's a whole read πŸ“

Parameters

  • parms β€” struct dvb_v5_fe_parms for log functions
  • ts β€” Pointer to struct dvb_mpeg_ts to print

This function prints the fields of struct dvb_mpeg_ts.


🌸 void dvb_table_eit_free(struct dvb_table_eit * table) 🌸

Frees all data allocated by the DVB EIT table parser. bye bye, love u, delete my number πŸ‘‹

Parameters

  • table β€” pointer to struct dvb_table_eit to be freed

✨ ssize_t dvb_table_eit_init(struct dvb_v5_fe_parms * parms, const uint8_t * buf, ssize_t buflen, struct dvb_table_eit ** table) ✨

Initializes and parses EIT table. the way that it eats every time 😭

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • buf β€” buffer containing the EIT raw data
  • buflen β€” length of the buffer
  • table β€” pointer to struct dvb_table_eit to be allocated and filled

This function allocates an EIT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change. 🚨

Returns

On success, it returns the size of the allocated struct. A negative value indicates an error.


πŸ¦‹ void dvb_table_eit_print(struct dvb_v5_fe_parms * parms, struct dvb_table_eit * table) πŸ¦‹

Prints the content of the DVB EIT table. tea time β˜•

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • table β€” pointer to struct dvb_table_eit

πŸ’« void dvb_table_header_init(struct dvb_table_header * header) πŸ’«

Initializes and parses MPEG-TS table header. where it all begins, lowkey πŸŽ€

Parameters

  • header β€” pointer to struct dvb_table_header to be parsed

🌈 void dvb_table_header_print(struct dvb_v5_fe_parms * parms, const struct dvb_table_header * header) 🌈

Prints the content of the MPEG-TS table header.

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • header β€” pointer to struct dvb_table_header to be printed

πŸ‘‘ void dvb_table_nit_descriptor_handler(struct dvb_v5_fe_parms * parms, struct dvb_table_nit * table, enum descriptors descriptor, nit_handler_callback_t * call_nit, nit_tran_handler_callback_t * call_tran, void * priv) πŸ‘‘

For each entry at NIT and NIT transport tables, call a callback. this is the group-chat notification of the DVB world fr fr πŸ””

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • table β€” pointer to struct dvb_table_nit
  • descriptor β€” indicates the NIT table descriptor to seek
  • call_nit β€” a nit_handler_callback_t function to be called when a new entry at the NIT table is found (or NULL).
  • call_tran β€” a nit_tran_handler_callback_t function to be called when a new entry at the NIT transport table is found (or NULL).
  • priv β€” an opaque pointer to be optionally used by the callbacks. The function won't touch on it, just use as an argument for the callback functions.

When parsing a NIT entry, we need to call some code to properly handle when a given descriptor in the table is found. This is used, for example, to create newer transponders to seek during scan.

For example, to seek for the CATV delivery system descriptor and call a function that would add a new transponder to a scan procedure:

dvb_table_nit_descriptor_handler(
                &parms->p, dvb_scan_handler->nit,
                cable_delivery_system_descriptor,
                NULL, add_update_nit_dvbc, &tr);

🧚 void dvb_table_nit_free(struct dvb_table_nit * table) 🧚

Frees all data allocated by the NIT table parser.

Parameters

  • table β€” pointer to struct dvb_table_nit to be freed

⭐ ssize_t dvb_table_nit_init(struct dvb_v5_fe_parms * parms, const uint8_t * buf, ssize_t buflen, struct dvb_table_nit ** table) ⭐

Initializes and parses NIT table. obsessed actually πŸ’–

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • buf β€” buffer containing the NIT raw data
  • buflen β€” length of the buffer
  • table β€” pointer to struct dvb_table_nit to be allocated and filled

This function allocates a NIT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change. 🚨

Returns

On success, it returns the size of the allocated struct. A negative value indicates an error.


🌸 void dvb_table_nit_print(struct dvb_v5_fe_parms * parms, struct dvb_table_nit * table) 🌸

Prints the content of the NIT table. no thoughts, just vibes and output ✨

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • table β€” pointer to struct dvb_table_nit

πŸ’… void dvb_table_pat_free(struct dvb_table_pat * table) πŸ’…

Frees all data allocated by the PAT table parser. decluttering, we love to see it 🧹

Parameters

  • table β€” pointer to struct dvb_table_pat to be freed

πŸŽ€ ssize_t dvb_table_pat_init(struct dvb_v5_fe_parms * parms, const uint8_t * buf, ssize_t buflen, struct dvb_table_pat ** table) πŸŽ€

Initializes and parses PAT table.

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • buf β€” buffer containing the PAT raw data
  • buflen β€” length of the buffer
  • table β€” pointer to struct dvb_table_pat to be allocated and filled

This function allocates a PAT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change. 🚨

Returns

On success, it returns the size of the allocated struct. A negative value indicates an error.


πŸ¦‹ void dvb_table_pat_print(struct dvb_v5_fe_parms * parms, struct dvb_table_pat * table) πŸ¦‹

Prints the content of the PAT table.

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • table β€” pointer to struct dvb_table_pat

πŸ’œ void dvb_table_pmt_free(struct dvb_table_pmt * table) πŸ’œ

Frees all data allocated by the PMT table parser. and that's on memory hygiene πŸ’…

Parameters

  • table β€” pointer to struct dvb_table_pmt to be freed

πŸ”₯ ssize_t dvb_table_pmt_init(struct dvb_v5_fe_parms * parms, const uint8_t * buf, ssize_t buflen, struct dvb_table_pmt ** table) πŸ”₯

Initializes and parses PMT table. it's giving efficiency 🌈

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • buf β€” buffer containing the PMT raw data
  • buflen β€” length of the buffer
  • table β€” pointer to struct dvb_table_pmt to be allocated and filled

This function allocates a PMT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change. 🚨

Returns

On success, it returns the size of the allocated struct. A negative value indicates an error.


🌟 void dvb_table_pmt_print(struct dvb_v5_fe_parms * parms, const struct dvb_table_pmt * table) 🌟

Prints the content of the PAT table. (yes bestie, the doc really does say PAT here β€” we're just reporting the lore exactly as it was handed down πŸ™ˆ)

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • table β€” pointer to struct dvb_table_pmt

🧚 void dvb_table_sdt_free(struct dvb_table_sdt * table) 🧚

Frees all data allocated by the SDT table parser.

Parameters

  • table β€” pointer to struct dvb_table_sdt to be freed

✨ ssize_t dvb_table_sdt_init(struct dvb_v5_fe_parms * parms, const uint8_t * buf, ssize_t buflen, struct dvb_table_sdt ** table) ✨

Initializes and parses SDT table.

  • parms β€” a struct dvb_v5_fe_parms pointer, aka the opened device you're working with 🫢
  • buf β€” the buffer holding all that raw SDT data
  • buflen β€” the length of said buffer, bestie
  • table β€” a pointer to the struct dvb_table_sdt that's about to get allocated and filled in

So what's this one doing? It allocates a whole SDT table and fills up all the fields inside the struct. And then β€” the iconic part β€” it makes sure every single field follows the CPU endianness. Which means, and I need you to hear me on this: the content of the buffer may change 😭 not a drill, don't go reusing that buffer and expecting it to be untouched.

Returns

On success it hands you the size of the allocated struct. A negative value means it went wrong. No cap πŸ’€


void dvb_table_sdt_print (struct dvb_v5_fe_parms * parms, struct dvb_table_sdt * table)

Prints out everything inside the SDT table. Just, like, dumps the whole vibe onto your screen ✨

Parameters

  • parms β€” a struct dvb_v5_fe_parms pointer to the opened device
  • table β€” pointer to struct dvb_table_sdt

void dvb_time (const uint8_t data[5], struct tm * tm)

Takes a DVB EIT formatted timestamp and converts it into a struct tm. Time travel but make it C πŸ•°οΈ

Parameters

  • data β€” the event, in DVB EIT time format
  • tm β€” pointer to the struct tm where the converted timestamp gets stored

πŸ’Ύ VARIABLE DOCUMENTATION πŸ’Ύ

const struct dvb_descriptor dvb_descriptors[] [extern]

Holds the parsers for all the several descriptors. Like a little toolbox of descriptor-handling besties 🧰

const char* dvb_mpeg_es_frame_names[5] [extern]

A vector that translates from enum dvb_mpeg_es_frame_t to a string. enum in, string out, slay πŸ’…

const dvb_table_init_func dvb_table_initializers[256] [extern]

A table containing all the possible descriptors. All 256 of them, no skips, no shortcuts 🌈

const char* pmt_stream_name[] [extern]

Converts from enum dvb_streams into a string. Same energy as the frame names, different enum 🌸


πŸ‘‘ AUTHOR πŸ‘‘

Generated automatically by Doxygen for libdvbv5 from the source code. Not me writing a cute little bio for myself, the robots did it πŸ€–βœ¨


okay so that's literally the whole page, bestie β€” every single flag, field, struct and signature accounted for, periodt πŸ’–

And that's a wrap on dvb_table(3) from libdvbv5, Version 1.32.0 πŸŽ€ β€” you made it to the very end, main character energy fr fr πŸ‘‘πŸ¦‹ thank you for reading all eight parts, ily, go touch some grass and then come back and read your manpages again πŸ’œ

πŸ“¦ where this page comes from