summaryrefslogtreecommitdiff
path: root/dvb-spec
diff options
context:
space:
mode:
authorjs <devnull@localhost>2002-10-29 10:09:27 -0300
committerjs <devnull@localhost>2002-10-29 10:09:27 -0300
commit731ce4b117fe41c6b57bad827652cdd0a8ad882c (patch)
treeff1143005a2c8be42b467861b602e97c136c35e5 /dvb-spec
parentdfcfc66af625ee81810782a807632a265df83254 (diff)
downloadmediapointer-dvb-s2-731ce4b117fe41c6b57bad827652cdd0a8ad882c.tar.gz
mediapointer-dvb-s2-731ce4b117fe41c6b57bad827652cdd0a8ad882c.tar.bz2
my 2ยข
Diffstat (limited to 'dvb-spec')
-rw-r--r--dvb-spec/HOWTO-use-the-demux-api35
1 files changed, 26 insertions, 9 deletions
diff --git a/dvb-spec/HOWTO-use-the-demux-api b/dvb-spec/HOWTO-use-the-demux-api
index 2f1fe8c3d..ee782db6d 100644
--- a/dvb-spec/HOWTO-use-the-demux-api
+++ b/dvb-spec/HOWTO-use-the-demux-api
@@ -3,10 +3,12 @@
What has changed since the old Nokia OST API?
- file naming:
+ device node naming:
- /dev/ost directory is now called /dev/dvb
- each DVB adapter has it's own directory /dev/dvb/adapterX
- - here you'll find a number of frontend devices /dev/dvb/adapterX/dmxY
+ - the devfs devices names are identical to those
+ creatd by the makedev.napi script on non-devfs systems
+ - here you'll find a number of demux devices /dev/dvb/adapterX/dmxY
- driver header directory is located now in /usr/include/linux/dvb/
- we have a linux/dvb/version.h file, this is included by all headers which
don't use the original OST API anymore
@@ -45,7 +47,7 @@ What is a demultiplexer?
I have set up the frontend and now I want to see some video!
What do I have to do?
- When you have an MPEG video decoder on board we can set up the demultiplexer
+ When you have an MPEG video decoder on board you can set up the demultiplexer
to feed the related PES packets into the MPEG decoder:
#include <linux/dvb/dmx.h>
@@ -69,15 +71,20 @@ What do I have to do?
}
This will unpack the payload from all transport stream packets with
- payload ID <pid> and feed it into the MPEG decoder. When pes_type is set
+ packet ID <pid> and feed it into the MPEG decoder. When pes_type is set
to DMX_PES_VIDEO it will be handled as video data. Other types are
DMX_PES_AUDIO, DMX_PES_TELETEXT, DMX_PES_SUBTITLE which will be fed into
- the corresponding decoders.
+ the corresponding decoders (if these deocders exist in hardware or firmware).
+ DMX_PES_TELETEXT usually means VBI insertion by the PAL/NTSC encoder for display
+ on a connected TV set. If you want to avoid sending the data to one of the
+ decoders, use pes_type = DMX_PES_OTHER.
- Open such a PES filter for each substream you want to decode.
+ You must open the demux device once for each PES filter you want to set.
+ E.g. if you want audio and video, you must have two distinct file descriptors
+ for the two filters.
DMX_PES_PCR is used by the decoder to achieve a correct timing syncronisation
- for the partial audio/video/... substreams.
+ between the audio/video/... substreams.
Note that you have to keep the frontend and demux filedescriptor open until
you are not interested in the stream anymore. Old API versions did not shut
@@ -90,10 +97,17 @@ I want to record a stream to disk! How?
Set up a filter for each substream you want to record as above but set
the pesfilter.output field to DMX_OUT_TAP. Then you can use read() calls
- to receive the PES packets.
+ to receive PES data.
When you want to receive transport stream packets use DMX_OUT_TS_TAP and
- read the stream from /dev/dvb/adapter0/dvr0.
+ read the stream from /dev/dvb/adapterX/dvrY. The dvr device gives you
+ a multiplex of all filtered PES data with DMX_OUT_TS_TAP. E.g. if you
+ want to record video and audio, open demuxX twice and set two PEs filters
+ with DMX_OUT_TS_TAP, and open dvrX once to read the TS.
+
+ [ The current API does not allow you to specify you an input/output
+ routing for section filters. So you can't get multiplexed section
+ data from the dvr device. ]
Don't forget to keep all device filedescriptors you use open.
@@ -177,6 +191,9 @@ How to do table id filtering?
Then submit the DMX_SET_FILTER ioctl.
+ The filter comprises 16 bytes covering byte 0 and byte 3..17 in a section,
+ thus excluding bytes 1 and 2 (the length field of a section).
+
-------------------------------------------------------------------------------
What are not-equal filters?