mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 03:52:22 +02:00
stream_dvb: restore --dvbin-file option
Got lost some time ago. Although I'm not sure if it actually does anything on MPlayer (it exists there, but might broken, not sure). Fixes #988 (untested).
This commit is contained in:
parent
796db66174
commit
3234f5a123
@ -95,6 +95,7 @@ typedef struct dvb_params {
|
||||
char *cfg_prog;
|
||||
int cfg_card;
|
||||
int cfg_timeout;
|
||||
char *cfg_file;
|
||||
} dvb_priv_t;
|
||||
|
||||
|
||||
|
@ -77,6 +77,7 @@ const struct m_sub_options stream_dvb_conf = {
|
||||
OPT_STRING("prog", cfg_prog, 0),
|
||||
OPT_INTRANGE("card", cfg_card, 0, 1, 4),
|
||||
OPT_INTRANGE("timeout", cfg_timeout, 0, 1, 30),
|
||||
OPT_STRING("file", cfg_file, 0),
|
||||
{0}
|
||||
},
|
||||
.size = sizeof(struct dvb_params),
|
||||
@ -717,8 +718,9 @@ dvb_config_t *dvb_get_config(stream_t *stream)
|
||||
{
|
||||
struct mp_log *log = stream->log;
|
||||
struct mpv_global *global = stream->global;
|
||||
dvb_priv_t *priv = stream->priv;
|
||||
int i, fd, type, size;
|
||||
char filename[30], *conf_file, *name;
|
||||
char filename[30], *name;
|
||||
dvb_channels_list *list;
|
||||
dvb_card_config_t *cards = NULL, *tmp;
|
||||
dvb_config_t *conf = NULL;
|
||||
@ -750,7 +752,11 @@ dvb_config_t *dvb_get_config(stream_t *stream)
|
||||
}
|
||||
|
||||
void *talloc_ctx = talloc_new(NULL);
|
||||
switch(type) {
|
||||
char *conf_file = NULL;
|
||||
if (priv->cfg_file && priv->cfg_file[0]) {
|
||||
conf_file = priv->cfg_file;
|
||||
} else {
|
||||
switch(type) {
|
||||
case TUNER_TER:
|
||||
conf_file = mp_find_config_file(talloc_ctx, global, "channels.conf.ter");
|
||||
break;
|
||||
@ -763,11 +769,12 @@ dvb_config_t *dvb_get_config(stream_t *stream)
|
||||
case TUNER_ATSC:
|
||||
conf_file = mp_find_config_file(talloc_ctx, global, "channels.conf.atsc");
|
||||
break;
|
||||
}
|
||||
if (conf_file) {
|
||||
mp_verbose(log, "Ignoring other channels.conf files.\n");
|
||||
} else {
|
||||
conf_file = mp_find_config_file(talloc_ctx, global, "channels.conf");
|
||||
}
|
||||
if (conf_file) {
|
||||
mp_verbose(log, "Ignoring other channels.conf files.\n");
|
||||
} else {
|
||||
conf_file = mp_find_config_file(talloc_ctx, global, "channels.conf");
|
||||
}
|
||||
}
|
||||
|
||||
list = dvb_get_channels(log, conf_file, type);
|
||||
|
Loading…
Reference in New Issue
Block a user