diff options
author | Oliver Freyermuth <o.freyermuth@googlemail.com> | 2015-01-05 23:41:54 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-06 19:52:27 +0100 |
commit | ca32a15a22b3bffa7f62bec81141d96850887fdf (patch) | |
tree | 88de23f517f72a30f363bc769a92cf97976e4746 | |
parent | 545a657ab7389eb1e40aa1b2c4b5634fd89d784b (diff) | |
download | mpv-ca32a15a22b3bffa7f62bec81141d96850887fdf.tar.bz2 mpv-ca32a15a22b3bffa7f62bec81141d96850887fdf.tar.xz |
stream_dvb: Add possibility to dump a full transponder.
Was already possible before by injecting the magic PID
8192 into channels.conf, the flag makes this much more
useable and we also have it documented.
Useful not only for debugging, but also for incomplete
channels.conf (mplayer format...), multi-channel
recording, or channels which do dynamic PID switchng.
full-transponder is also useful for channels which switch PIDs on-the-fly.
ffmpeg can handle this, but it needs the full stream with all PIDs.
-rw-r--r-- | DOCS/man/options.rst | 11 | ||||
-rw-r--r-- | stream/dvbin.h | 2 | ||||
-rw-r--r-- | stream/stream_dvb.c | 13 |
3 files changed, 22 insertions, 4 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 0006cff6cd..8fdd0c83e3 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -3135,11 +3135,22 @@ DVB Classic mplayer format channel lists are still supported (without these improvements), and for other card types, only limited VDR format channel list support is implemented (patches welcome). + For channels with dynamic PID switching or incomplete + ``channels.conf``, ``--dvbin-full-transponder`` or the magic PID + ``8192`` are recommended. ``--dvbin-timeout=<1-30>`` Maximum number of seconds to wait when trying to tune a frequency before giving up (default: 30). +``--dvbin-full-transponder=<yes|no>`` + Apply no filters on program PIDs, only tune to frequency and pass full + transponder to demuxer. This is useful to record multiple programs + on a single transponder, or to work around issues in the ``channels.conf``. + It is also recommended to use this for channels which switch PIDs + on-the-fly, e.g. for regional news. + + Default: ``no`` PVR --- diff --git a/stream/dvbin.h b/stream/dvbin.h index 2a9130e5aa..c475984450 100644 --- a/stream/dvbin.h +++ b/stream/dvbin.h @@ -115,6 +115,8 @@ typedef struct dvb_params { int cfg_card; int cfg_timeout; char *cfg_file; + + int cfg_full_transponder; } dvb_priv_t; diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c index e3503af697..a78ccd7eb3 100644 --- a/stream/stream_dvb.c +++ b/stream/stream_dvb.c @@ -78,6 +78,7 @@ const struct m_sub_options stream_dvb_conf = { OPT_INTRANGE("card", cfg_card, 0, 1, 4), OPT_INTRANGE("timeout", cfg_timeout, 0, 1, 30), OPT_STRING("file", cfg_file, 0), + OPT_FLAG("full-transponder", cfg_full_transponder, 0), {0} }, .size = sizeof(struct dvb_params), @@ -195,7 +196,7 @@ static bool parse_pid_string(struct mp_log *log, char* pid_string, dvb_channel_t return false; } -static dvb_channels_list *dvb_get_channels(struct mp_log *log, char *filename, int type) +static dvb_channels_list *dvb_get_channels(struct mp_log *log, int cfg_full_transponder, char *filename, int type) { dvb_channels_list *list; FILE *f; @@ -376,8 +377,12 @@ static dvb_channels_list *dvb_get_channels(struct mp_log *log, char *filename, i if(ptr->pids[cnt] == 0) has0 = 1; } - if(has8192) - { + /* 8192 is the pseudo-PID for full TP dump, + enforce that if requested. */ + if (!has8192 && cfg_full_transponder) { + has8192 = 1; + } + if(has8192) { ptr->pids[0] = 8192; ptr->pids_cnt = 1; } @@ -968,7 +973,7 @@ dvb_config_t *dvb_get_config(stream_t *stream) } } - list = dvb_get_channels(log, conf_file, type); + list = dvb_get_channels(log, priv->cfg_full_transponder, conf_file, type); talloc_free(talloc_ctx); if(list == NULL) |