container/mts: get PIDs from PMT

Issue #97 resolved
Saxon Milton created an issue

If we wish to be able to process MTS not created by us, we will need to be able to read PAT and PMT to be able obtain information such as the programs involved, and also the PIDs for which media is assigned to., as these are not constant.

Comments (8)

  1. Alan Noble

    @Saxon Milton Any chance we could bump up the priority on this? I would like to get rid of all of the PID handling code in VidGrind.

  2. Alan Noble

    BTW, how likely is it to have multiple PIDs of the same media type in the same MTS container, i.e. multiple video streams or multiple audio streams or a mix of both?

    Revid does not yet produce such MTS but it might one day.

  3. Saxon Milton reporter

    From 3rd party video, I suspect unlikely, but we could certainly do it.
    I’m thinking I’ll first write a func to extract PMT PID from a PAT and then, a function that returns a map with PIDs and their media types from a PMT. Then to simplify things further for vidgrind, I’ll wrap these two in a function that will process PSI (PAT, then PMT) and return the same stuff. So, you should really only need one call on vidgrinds end to work out which PID is video.

  4. Saxon Milton reporter

    Actually I can simplify things further…. Ii’ll look at writing a func VideoPIDs that will just return the PIDs of any video streams.

  5. Alan Noble

    SGTM, but keep in mind we’ll have audio as well as video, so MediaPIDs might be a better name.

  6. Log in to comment