diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-09-20 08:13:58 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-09-20 08:13:58 +0200 |
commit | ea16a7ef13a902793a5c2626b0cefc4d956147f3 (patch) | |
tree | 262767f1c0dc8e06110d1bc760ccc1e2bfd4db3b | |
parent | cfdaff0fe2f11ede4ac57d600d95b2ff945239ca (diff) |
dvbv5-zap: allow recording also the SDT table
The SDT table can contain useful information required by
players for listening some programs. It seems that VLC
requires that, in order to properly detect programs with
SMPTE 302m.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r-- | utils/dvb/dvbv5-zap.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/dvb/dvbv5-zap.c b/utils/dvb/dvbv5-zap.c index 0b8f98c9..8420d99d 100644 --- a/utils/dvb/dvbv5-zap.c +++ b/utils/dvb/dvbv5-zap.c @@ -1028,6 +1028,7 @@ int main(int argc, char **argv) int vpid = -1, apid = -1, sid = -1; int pmtpid = 0; struct dvb_open_descriptor *pat_fd = NULL, *pmt_fd = NULL; + struct dvb_open_descriptor *sdt_fd = NULL; struct dvb_open_descriptor *sid_fd = NULL, *dvr_fd = NULL; struct dvb_open_descriptor *audio_fd = NULL, *video_fd = NULL; int file_fd = -1; @@ -1228,6 +1229,19 @@ int main(int argc, char **argv) args.dvr ? DMX_OUT_TS_TAP : DMX_OUT_DECODER, args.dvr ? 64 * 1024 : 0) < 0) goto err; + + /* + * SDT may also be needed in order to play some streams + */ + sdt_fd = dvb_dev_open(dvb, args.demux_dev, O_RDWR); + if (!sdt_fd) { + ERROR("opening sdt demux failed"); + goto err; + } + if (dvb_dev_dmx_set_pesfilter(sdt_fd, 0x0011, DMX_PES_OTHER, + args.dvr ? DMX_OUT_TS_TAP : DMX_OUT_DECODER, + args.dvr ? 64 * 1024 : 0) < 0) + goto err; } if (args.all_pids++) { |