Hi there, 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 too: open dvr0. But for capturing multiple video streams, it's surely 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). The attached patch adds a new value for dmx_output_t: DMX_OUT_TSDEMUX_TAP, which sends TS to the demux0 device. The main question I have, is, seeing as this was such a simple change, why didn't it already work like that? Does everyone else who wants to capture multiple video streams, take the whole multiplex into userspace and demux it themselves? Or do they take PES from each demux0 device and re-multiplex that into PS, not TS? 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. Peter
--- include/linux/dvb/dmx.h~ 2008-01-24 22:58:37.000000000 +0000 +++ include/linux/dvb/dmx.h 2008-02-25 23:01:45.000000000 +0000 @@ -39,9 +39,10 @@ typedef enum DMX_OUT_DECODER, /* Streaming directly to decoder. */ DMX_OUT_TAP, /* Output going to a memory buffer */ /* (to be retrieved via the read command).*/ - DMX_OUT_TS_TAP /* Output multiplexed into a new TS */ + DMX_OUT_TS_TAP, /* Output multiplexed into a new TS */ /* (to be retrieved by reading from the */ /* logical DVR device). */ + DMX_OUT_TSDEMUX_TAP /* Like TS_TAP but retrieved from the DMX device */ } dmx_output_t; --- drivers/media/dvb/dvb-core/dmxdev.c~ 2008-01-24 22:58:37.000000000 +0000 +++ drivers/media/dvb/dvb-core/dmxdev.c 2008-02-25 23:02:29.000000000 +0000 @@ -374,7 +374,8 @@ static int dvb_dmxdev_ts_callback(const return 0; } - if (dmxdevfilter->params.pes.output == DMX_OUT_TAP) + if (dmxdevfilter->params.pes.output == DMX_OUT_TAP + || dmxdevfilter->params.pes.output == DMX_OUT_TSDEMUX_TAP) buffer = &dmxdevfilter->buffer; else buffer = &dmxdevfilter->dev->dvr_buffer; @@ -618,7 +619,7 @@ static int dvb_dmxdev_filter_start(struc else ts_type = 0; - if (otype == DMX_OUT_TS_TAP) + if (otype == DMX_OUT_TS_TAP || otype == DMX_OUT_TSDEMUX_TAP) ts_type |= TS_PACKET; if (otype == DMX_OUT_TAP)
_______________________________________________ linux-dvb mailing list linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb