X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fdriver%2Favswitch.cpp;fp=lib%2Fdriver%2Favswitch.cpp;h=a936aa543dd6cb8678b59e19a310b8d893e5a159;hp=d582db81ae3ca90bf33b25158e2e75f616b4af60;hb=d89be097be4a9ac52166c5f47cc189c5522d3441;hpb=ec200e0207d0a5ddb91c9c6c4ab8ae1c8f33ecea diff --git a/lib/driver/avswitch.cpp b/lib/driver/avswitch.cpp index d582db8..a936aa5 100644 --- a/lib/driver/avswitch.cpp +++ b/lib/driver/avswitch.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -81,6 +82,19 @@ eAVSwitch *eAVSwitch::getInstance() return instance; } +bool eAVSwitch::haveScartSwitch() +{ + char tmp[255]; + int fd = open("/proc/stb/avs/0/input_choices", O_RDONLY); + if(fd < 0) { + eDebug("cannot open /proc/stb/avs/0/input_choices"); + return false; + } + read(fd, tmp, 255); + close(fd); + return !!strstr(tmp, "scart"); +} + void eAVSwitch::setInput(int val) { /*