tsdemux: disentangle requested program number from active program number
authorDouglas Bagnall <douglas@paradise.net.nz>
Sat, 9 Mar 2013 23:07:40 +0000 (12:07 +1300)
committerEdward Hervey <edward@collabora.com>
Mon, 22 Jul 2013 07:53:46 +0000 (09:53 +0200)
commitdfb101e0edf16733997dd33e4fb43071dc26d7b8
treed1cef5879bfcc665abef1bd8f65f80c935adc658
parent8e4f966018409592eca28014bdafaffb4ef59d0a
tsdemux: disentangle requested program number from active program number

The program_number attribute was overloaded, trying to indicate both
the currently playing program, and the program requested via the
"program-number" property.  The end result was that setting the
property didn't work (see #690934).

I added a new requested_program_number field rather than reviving the
current_program_number field because it seemed this would result in
fewer changes overall and be less confusing.  It breaks symmetry with
the "program-number" property, but it retains parallels with the likes
of program->program_number.

Because gst_ts_demux_reset is called after the properties have been
parsed, requested_program_number is initialised in gst_ts_demux_init.
Whether this is exactly the right place, I don't know.
gst/mpegtsdemux/tsdemux.c
gst/mpegtsdemux/tsdemux.h