dvb: rename dvb_config_t to dvb_state_t, keep config and state there.

The state-struct now contains everything which can be kept after initial initialization.
This includes the channel-lists, configuration, device-fds and also information like
current channel and current card.
The dvb_priv_t is kept containing the mp-options, a pointer to the state and to the logger.
After this restructuring, the state-struct contains all information which can be persisted
across channel switching.
This commit is contained in:
Oliver Freyermuth
2016-01-07 23:30:46 +01:00
committed by wm4
parent 9a88b118b4
commit 4c3f95708f
3 changed files with 127 additions and 116 deletions

View File

@@ -90,23 +90,24 @@ typedef struct {
typedef struct {
int count;
dvb_card_config_t *cards;
void *priv;
} dvb_config_t;
typedef struct dvb_params {
struct mp_log *log;
int card;
int fe_fd;
int dvr_fd;
int demux_fd[3], demux_fds[DMX_FILTER_SIZE], demux_fds_cnt;
dvb_config_t *config;
dvb_channels_list *list;
int tuner_type;
int is_on;
int retry;
int timeout;
int last_freq;
} dvb_state_t;
typedef struct dvb_params {
struct mp_log *log;
dvb_state_t *state;
char *cfg_prog;
int cfg_card;
@@ -123,7 +124,7 @@ typedef struct dvb_params {
int dvb_step_channel(stream_t *, int);
int dvb_set_channel(stream_t *, int, int);
dvb_config_t *dvb_get_config(stream_t *);
void dvb_free_config(dvb_config_t *config);
dvb_state_t *dvb_get_state(stream_t *);
void dvb_free_state(dvb_state_t *);
#endif /* MPLAYER_DVBIN_H */