Skip to content

mpegtsmux: Allow attaching PCR to non-PES streams

Jordan Yelloz requested to merge jyelloz/gstreamer:pcr_on_non_pes_stream into main

This change is a continuation of !4874 to address comments and adapt to recent changes in the internal tsmux APIs.

The muxer currently allows customization of the PCR PID using an existing sinkpad's name at the key "PCR_%d" of a custom PMT where %d is the program number.

This change gives the user an alternative to supply an integer value at "PCR_%d" instead of a sinkpad name string which will be used as the PCR PID for a given program number.

Changes from the original:

  • When there is an integer PCR PID specified, it is stored in the TsMuxProgram during stream setup and referenced exclusively during streaming to avoid unpacking data from the prog_map GstStructure in when this mode is enabled. This also allows changes to the tsmux_write_stream_packet() signature to be reverted since all necessary information is now available using the original parameter set.

  • tsmux_program_set_pcr_pid() was implemented and is now used during stream setup when there is an integer value set for the current program's PCR PID

  • Fixed a leak of prop_name in gst_base_ts_mux_get_pmt_pcr_pid()

  • Fixed wrong GST_MAP

Edited by Jordan Yelloz

Merge request reports