android_kernel_xiaomi_sm8350/drivers/media/dvb
Peter Hartley b01cd93789 V4L/DVB (7293): DMX_OUT_TSDEMUX_TAP: record two streams from same mux, resend
Currently (in linux-2.6.24, but linux-dvb hg looks similar), the
dmx_output_t in the dmx_pes_filter_params decides two things: whether
output is sent to demux0 or dvr0 (in dmxdev.c:dvb_dmxdev_ts_callback),
*and* whether to depacketise TS (in dmxdev.c:dvb_dmxdev_filter_start).
As it stands, those two things can't be set independently: output
destined for demux0 is depacketised, output for dvr0 isn't.

This is what you want for capturing multiple audio streams from the same
multiplex simultaneously: open demux0 several times and send
depacketised output there. And capturing a single video stream is fine
not what you want: you want multi-open (so demux0, not dvr0), but you
want the TS nature preserved (because that's what you want on output, as
you're going to re-multiplex it with the audio).

At least one existing solution -- GStreamer -- sends all its streams
simultaneously via dvr0 and demuxes again in userland, but it seems a
bit of a shame to pick out all the PIDs in kernel, stick them back
together in kernel, and send them to userland only to get unpicked
again, when the alternative is such a small API addition.

The attached patch adds a new value for dmx_output_t:
DMX_OUT_TSDEMUX_TAP, which sends TS to the demux0 device. With this
patch and a dvb-usb-dib0700 (and UK Freeview from Sandy Heath), I can
successfully capture an audio/video PID pair into a TS file that mplayer
can play back.

Signed-off-by: Peter Hartley <pdh@utter.chaos.org.uk>
Acked-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:46 -03:00
..
b2c2 V4L/DVB (7094): static memory 2008-04-24 13:42:20 -03:00
bt8xx V4L/DVB (7273): suppress compound statement warning in dvb-bt8xx.c 2008-04-24 14:07:45 -03:00
cinergyT2
dvb-core V4L/DVB (7293): DMX_OUT_TSDEMUX_TAP: record two streams from same mux, resend 2008-04-24 14:07:46 -03:00
dvb-usb V4L/DVB (7328): usb/opera1.c: fix a memory leak 2008-03-20 12:39:01 -03:00
frontends V4L/DVB (7261): Use the same callback argument as xc3028 and xc5000 2008-04-24 14:07:45 -03:00
pluto2
ttpci V4L/DVB (7094): static memory 2008-04-24 13:42:20 -03:00
ttusb-budget V4L/DVB (7140): constify function pointer tables 2008-04-24 14:07:15 -03:00
ttusb-dec
Kconfig
Makefile