Changeset 1955df2


Ignore:
Timestamp:
01/30/15 11:23:04 (5 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.1.2
Children:
f5baa83
Parents:
5b402f8
Message:

Change around the audio-cd detection routine to one that is non-invasive, and very fast.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pcbsd-utils/pc-sysconfig/daemon/Backend-remdev.cpp

    r5b402f8 r1955df2  
    219219    }else{ 
    220220      //No filesystem, so it must be either nothing or an audio CD 
    221       if( QFile::exists("/usr/local/bin/cdparanoia") ){ 
     221     /*if( QFile::exists("/usr/local/bin/cdparanoia") ){ 
    222222        //cdparanoia is much better about not disturbing the cd if it is running than cd-info 
    223223        QStringList cdinfo = runShellCommand("cdparanoia -Q -d /dev/"+node); 
    224224        if( !cdinfo.filter("(audio tracks only)").isEmpty() ){ type = "CD-AUDIO"; } 
    225225        else{ type = "CD-NONE"; }              
    226       }else{ 
    227         QStringList cdinfo = runShellCommand("cd-info -T --no-cddb --no-device-info  --no-disc-mode --dvd --no-header -q /dev/"+node); 
     226      }else{*/ 
     227        QStringList cdinfo = runShellCommand("cdcontrol -f "+node+" status audio"); 
     228        if( !cdinfo.filter("Audio status =").isEmpty() ){ type = "CD-AUDIO"; } 
     229        else{ type = "CD-NONE"; } 
     230         
     231        //The cd-info method is rather invasive, and takes a while to read the disk (causing delays in any app currently using it) 
     232        /*QStringList cdinfo = runShellCommand("cd-info -T --no-cddb --no-device-info  --no-disc-mode --dvd --no-header -q /dev/"+node); 
    228233        if( !cdinfo.filter("TRACK").filter("1").isEmpty() ){type = "CD-AUDIO"; } 
    229         else{ type = "CD-NONE"; }              
    230       } 
     234        else{ type = "CD-NONE"; }*/ 
     235      //} 
    231236 
    232237    } 
Note: See TracChangeset for help on using the changeset viewer.