when starting tvtime from the menu tvtime will usually not work because the 
first device usually is a webcam.
please replace videoinput_new() in tvtime.c with following implementation, it 
will search /dev for alternative video devices if the default videodevice is 
inappropriate 

    /* something else than default is given */
    if (strcmp(config_get_v4l_device ( ct ), "/dev/video0")!=0) {
       vidin = videoinput_new( config_get_v4l_device( ct ),
                               config_get_inputwidth( ct ),
                               config_get_audio_boost( ct ),
                               norm, verbose, error_string2 );
    } else {
       vidin = videoinput_new( config_get_v4l_device( ct ),
                               config_get_inputwidth( ct ),
                               config_get_audio_boost( ct ),
                               norm, verbose, error_string2 );
       if (!vidin) {
           DIR *dirp;
           struct dirent *dp;

           dirp = opendir("/dev");
           if (dirp) {
              while(vidin == NULL && (dp=readdir(dirp))!=NULL) {
                 if (strncmp(dp->d_name, "video", 5)==0) {
                   char vidpath[21];
                   memset(vidpath, 0x0, sizeof(vidpath));
                   snprintf(vidpath, 20, "/dev/%s", dp->d_name);

                   lfprintf( stderr, _("retrying with: %s\n"), vidpath);
                   vidin = videoinput_new( vidpath,
                                           config_get_inputwidth( ct ),
                                           config_get_audio_boost( ct ),
                                           norm, verbose, error_string2 );
                 }
              }
              closedir(dirp);
           }
       }
    }

-- 
tvtime crashes when no device is attached/tvtime does not work when handset is 
attached
https://bugs.launchpad.net/bugs/575938
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to