summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Farnsworth <simon.farnsworth@onelan.co.uk>2008-06-16 17:35:28 +0100
committerSimon Farnsworth <simon.farnsworth@onelan.co.uk>2008-06-16 17:35:28 +0100
commit859bf9631b2d1599c86131f71198e15647c7fa3b (patch)
tree9b2b9b00ecdf8ad6b25f95117aec0bd2676435c3
parentfce4e656ac01a7b0822f1efbae85cf6e50e8999e (diff)
downloadxine-lib-859bf9631b2d1599c86131f71198e15647c7fa3b.tar.gz
xine-lib-859bf9631b2d1599c86131f71198e15647c7fa3b.tar.bz2
input_dvb: Allow the user to configure the DVB GUI off.
When using Xine in a kiosk-type application, the DVB GUI presents messages onscreen that confuse the user; because there's no keyboard and mouse, there's no way to actually do anything useful with the GUI. Provide a configuration option to turn off the GUI --HG-- extra : transplant_source : c%F4%13I%97%3F%11%E8s%CCc%15%9F%AF%97%D7%13D%FC%AB
-rw-r--r--src/input/input_dvb.c36
1 files changed, 26 insertions, 10 deletions
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c
index 85246ea5c..5ea3e77ef 100644
--- a/src/input/input_dvb.c
+++ b/src/input/input_dvb.c
@@ -331,6 +331,9 @@ typedef struct {
/* scratch buffer for forward seeking */
char seek_buf[BUFSIZE];
+ /* Is the GUI enabled at all? */
+ int dvb_gui_enabled;
+
/* simple vcr-like functionality */
int record_fd;
int record_paused;
@@ -2492,7 +2495,8 @@ static off_t dvb_plugin_read (input_plugin_t *this_gen,
if (!this->tuned_in)
return 0;
- dvb_event_handler (this);
+ if (this->dvb_gui_enabled)
+ dvb_event_handler (this);
#ifdef LOG_READS
xprintf(this->class->xine,XINE_VERBOSITY_DEBUG,
"input_dvb: reading %" PRIdMAX " bytes...\n", (intmax_t)len);
@@ -2754,7 +2758,12 @@ static int dvb_plugin_open(input_plugin_t * this_gen)
xine_cfg_entry_t zoomdvb;
xine_cfg_entry_t adapter;
xine_cfg_entry_t lastchannel;
+ xine_cfg_entry_t gui_enabled;
+ xine_config_lookup_entry(this->stream->xine, "media.dvb.gui_enabled", &gui_enabled);
+ this->dvb_gui_enabled = gui_enabled.num_value;
+ xprintf(this->class->xine, XINE_VERBOSITY_LOG, _("input_dvb: DVB GUI %s\n"), this->dvb_gui_enabled ? "enabled" : "disabled");
+
xine_config_lookup_entry(this->stream->xine, "media.dvb.adapter", &adapter);
if (!(tuner = tuner_init(this->class->xine,adapter.num_value))) {
@@ -2980,15 +2989,16 @@ static int dvb_plugin_open(input_plugin_t * this_gen)
this->event_queue = xine_event_new_queue(this->stream);
#ifdef EPG_UPDATE_IN_BACKGROUND
- /* Start the EPG updater thread. */
- this->epg_updater_stop = 0;
- if (pthread_create(&this->epg_updater_thread, NULL,
- epg_data_updater, this) != 0) {
- xprintf(
- this->class->xine, XINE_VERBOSITY_LOG,
- _("input_dvb: cannot create EPG updater thread\n"));
- return 0;
-
+ if (this->dvb_gui_enabled) {
+ /* Start the EPG updater thread. */
+ this->epg_updater_stop = 0;
+ if (pthread_create(&this->epg_updater_thread, NULL,
+ epg_data_updater, this) != 0) {
+ xprintf(
+ this->class->xine, XINE_VERBOSITY_LOG,
+ _("input_dvb: cannot create EPG updater thread\n"));
+ return 0;
+ }
}
#endif
/*
@@ -3296,6 +3306,12 @@ static void *init_class (xine_t *xine, void *data) {
"in your system."),
0, NULL, (void *) this);
+ /* set to 0 to turn off the GUI built into this input plugin */
+ config->register_bool(config, "media.dvb.gui_enabled",
+ 1,
+ _("Enable the DVB GUI"),
+ _("Enable the DVB GUI, mouse controlled recording and channel switching."),
+ 21, NULL, NULL);
return this;
}