diff options
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/input_dvb.c | 7 | ||||
-rw-r--r-- | src/input/input_v4l.c | 31 |
2 files changed, 22 insertions, 16 deletions
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index baf6b3780..e36ec14e7 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -373,6 +373,7 @@ static const Param bw_list [] = { { "BANDWIDTH_6_MHZ", BANDWIDTH_6_MHZ }, { "BANDWIDTH_7_MHZ", BANDWIDTH_7_MHZ }, { "BANDWIDTH_8_MHZ", BANDWIDTH_8_MHZ }, + { "BANDWIDTH_AUTO", BANDWIDTH_AUTO }, { NULL, 0 } }; @@ -395,6 +396,7 @@ static const Param guard_list [] = { {"GUARD_INTERVAL_1_32", GUARD_INTERVAL_1_32}, {"GUARD_INTERVAL_1_4", GUARD_INTERVAL_1_4}, {"GUARD_INTERVAL_1_8", GUARD_INTERVAL_1_8}, + {"GUARD_INTERVAL_AUTO", GUARD_INTERVAL_AUTO}, { NULL, 0 } }; @@ -403,6 +405,7 @@ static const Param hierarchy_list [] = { { "HIERARCHY_2", HIERARCHY_2 }, { "HIERARCHY_4", HIERARCHY_4 }, { "HIERARCHY_NONE", HIERARCHY_NONE }, + { "HIERARCHY_AUTO", HIERARCHY_AUTO }, { NULL, 0 } }; @@ -421,12 +424,14 @@ static const Param qam_list [] = { { "QAM_256", QAM_256 }, { "QAM_32", QAM_32 }, { "QAM_64", QAM_64 }, + { "QAM_AUTO", QAM_AUTO }, { NULL, 0 } }; static const Param transmissionmode_list [] = { { "TRANSMISSION_MODE_2K", TRANSMISSION_MODE_2K }, { "TRANSMISSION_MODE_8K", TRANSMISSION_MODE_8K }, + { "TRANSMISSION_MODE_AUTO", TRANSMISSION_MODE_AUTO }, { NULL, 0 } }; @@ -2750,7 +2755,7 @@ static int dvb_plugin_open(input_plugin_t * this_gen) 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))) { diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c index bbd594418..302b96b57 100644 --- a/src/input/input_v4l.c +++ b/src/input/input_v4l.c @@ -110,9 +110,6 @@ static const resolution_t resolutions[] = { { 160, 120 } }; -static const char *const tv_standard_names[] = { "PAL", "NTSC", "SECAM", NULL }; -static const int tv_standard_values[] = { VIDEO_MODE_PAL, VIDEO_MODE_NTSC, VIDEO_MODE_SECAM }; - #define NUM_RESOLUTIONS (sizeof(resolutions)/sizeof(resolutions[0])) #define RADIO_DEV "/dev/radio0" #define VIDEO_DEV "/dev/video0" @@ -120,6 +117,9 @@ static const int tv_standard_values[] = { VIDEO_MODE_PAL, VIDEO_MODE_NTSC, VIDEO #define AUDIO_DEV "plughw:0,0" #endif +static const char *const tv_standard_names[] = { "AUTO", "PAL", "NTSC", "SECAM", "OLD", NULL }; +static const int tv_standard_values[] = { VIDEO_MODE_AUTO, VIDEO_MODE_PAL, VIDEO_MODE_NTSC, VIDEO_MODE_SECAM, -1 }; + #if !defined(NDELAY) && defined(O_NDELAY) #define FNDELAY O_NDELAY #endif @@ -694,11 +694,14 @@ static int search_by_channel(v4l_input_plugin_t *this, char *input_source) tv_standard_entry = this->stream->xine->config->lookup_entry(this->stream->xine->config, "media.video4linux.tv_standard"); this->tuner_name = input_source; - this->video_channel.norm = tv_standard_values[ tv_standard_entry->num_value ]; - xprintf(this->stream->xine, XINE_VERBOSITY_LOG, - "input_v4l: TV Standard configured as STD %s (%d)\n", - tv_standard_names[ tv_standard_entry->num_value ], this->video_channel.norm ); - ret = ioctl(fd, VIDIOCSCHAN, &this->video_channel); + if (tv_standard_entry->num_value != 0) { + this->video_channel.norm = tv_standard_values[ tv_standard_entry->num_value ]; + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, + "input_v4l: TV Standard configured as STD %s (%d)\n", + tv_standard_names[ tv_standard_entry->num_value ], this->video_channel.norm ); + ret = ioctl(fd, VIDIOCSCHAN, &this->video_channel); + } else + ret = ioctl(fd, VIDIOCSCHAN, &this->input); lprintf("(%d) Set channel to %d\n", ret, this->input); @@ -1912,12 +1915,6 @@ static void *init_video_class (xine_t *xine, void *data) _("v4l video device"), _("The path to your Video4Linux video device."), 10, NULL, NULL); - - config->register_enum (config, "media.video4linux.tv_standard", 0, - tv_standard_names, _("v4l TV standard"), - _("Selects the TV standard of the input signals. " - "Either: PAL, NTSC and SECAM. "), 20, NULL, NULL); - #ifdef HAVE_ALSA config->register_filename (config, "media.video4linux.audio_device", AUDIO_DEV, 0, @@ -1925,7 +1922,11 @@ static void *init_video_class (xine_t *xine, void *data) _("The name of the audio device which corresponds " "to your Video4Linux video device."), 10, NULL, NULL); -#endif +#endif + config->register_enum (config, "media.video4linux.tv_standard", 0 /* auto */, + tv_standard_names, _("v4l TV standard"), + _("Selects the TV standard of the input signals. " + "Either: AUTO, PAL, NTSC or SECAM. "), 20, NULL, NULL); return this; } |