aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@linuxtv.org>2008-04-22 13:45:47 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:07:48 -0400
commit4a24ce3a17ee713056db0a24cf558bd595211302 (patch)
tree0eeb14ce7a66a1c6a34fb353f3c7f1a63d9230d3
parenta9317abfba0850b006aed000e2acc4bee150410a (diff)
V4L/DVB (7329): add flag to allow software demux to recognize the output type
Previously, the macro DVR_FEED, which is used to recognize and filter out duplicate packets going to the DVR device, used the TS_PAYLOAD_ONLY flag to identify a packet's destination. This kind of filtering was introduced by the following two changesets: Now, that it is possible to record TS PIDs using the demux device by setting the output type to DMX_OUT_TSDEMUX_TAP, checking TS_PAYLOAD_ONLY is not sufficient anymore. Therefore another flag, TS_DEMUX, is added to specify the output type of a feed. This allows multiple clients to filter the same TS PID on a demux device simultaneously. Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/dvb/dvb-core/demux.h2
-rw-r--r--drivers/media/dvb/dvb-core/dmxdev.c9
-rw-r--r--drivers/media/dvb/dvb-core/dvb_demux.c2
3 files changed, 8 insertions, 5 deletions
diff --git a/drivers/media/dvb/dvb-core/demux.h b/drivers/media/dvb/dvb-core/demux.h
index 0c1d87c5227a..b0d347daae47 100644
--- a/drivers/media/dvb/dvb-core/demux.h
+++ b/drivers/media/dvb/dvb-core/demux.h
@@ -80,6 +80,8 @@ enum dmx_success {
80#define TS_PAYLOAD_ONLY 2 /* in case TS_PACKET is set, only send the TS 80#define TS_PAYLOAD_ONLY 2 /* in case TS_PACKET is set, only send the TS
81 payload (<=184 bytes per packet) to callback */ 81 payload (<=184 bytes per packet) to callback */
82#define TS_DECODER 4 /* send stream to built-in decoder (if present) */ 82#define TS_DECODER 4 /* send stream to built-in decoder (if present) */
83#define TS_DEMUX 8 /* in case TS_PACKET is set, send the TS to
84 the demux device, not to the dvr device */
83 85
84/* PES type for filters which write to built-in decoder */ 86/* PES type for filters which write to built-in decoder */
85/* these should be kept identical to the types in dmx.h */ 87/* these should be kept identical to the types in dmx.h */
diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c
index e7f7aef862a8..716735f03f55 100644
--- a/drivers/media/dvb/dvb-core/dmxdev.c
+++ b/drivers/media/dvb/dvb-core/dmxdev.c
@@ -619,11 +619,12 @@ static int dvb_dmxdev_filter_start(struct dmxdev_filter *filter)
619 else 619 else
620 ts_type = 0; 620 ts_type = 0;
621 621
622 if (otype == DMX_OUT_TS_TAP || otype == DMX_OUT_TSDEMUX_TAP) 622 if (otype == DMX_OUT_TS_TAP)
623 ts_type |= TS_PACKET; 623 ts_type |= TS_PACKET;
624 624 else if (otype == DMX_OUT_TSDEMUX_TAP)
625 if (otype == DMX_OUT_TAP) 625 ts_type |= TS_PACKET | TS_DEMUX;
626 ts_type |= TS_PAYLOAD_ONLY | TS_PACKET; 626 else if (otype == DMX_OUT_TAP)
627 ts_type |= TS_PACKET | TS_DEMUX | TS_PAYLOAD_ONLY;
627 628
628 ret = dmxdev->demux->allocate_ts_feed(dmxdev->demux, 629 ret = dmxdev->demux->allocate_ts_feed(dmxdev->demux,
629 tsfeed, 630 tsfeed,
diff --git a/drivers/media/dvb/dvb-core/dvb_demux.c b/drivers/media/dvb/dvb-core/dvb_demux.c
index 7959020f9317..988d14302cb1 100644
--- a/drivers/media/dvb/dvb-core/dvb_demux.c
+++ b/drivers/media/dvb/dvb-core/dvb_demux.c
@@ -368,7 +368,7 @@ static inline void dvb_dmx_swfilter_packet_type(struct dvb_demux_feed *feed,
368#define DVR_FEED(f) \ 368#define DVR_FEED(f) \
369 (((f)->type == DMX_TYPE_TS) && \ 369 (((f)->type == DMX_TYPE_TS) && \
370 ((f)->feed.ts.is_filtering) && \ 370 ((f)->feed.ts.is_filtering) && \
371 (((f)->ts_type & (TS_PACKET|TS_PAYLOAD_ONLY)) == TS_PACKET)) 371 (((f)->ts_type & (TS_PACKET | TS_DEMUX)) == TS_PACKET))
372 372
373static void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf) 373static void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf)
374{ 374{