Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

How to switch from HDMI to composite on XBMC exit
Thank you for your donation

Thread Closed 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
How to switch from HDMI to composite on XBMC exit
29th Jan, 2013, 12:28 PM
Post: #5
udrnovsek Offline
Registered
Posts: 6
Joined: Jan 2013
Reputation: 0
RE: How to switch from HDMI to composite on XBMC exit
This is the solution for me (at least first acceptable version)

Code:
# Test first run
FIRSTRUN=1

....

do_start()
{
    while :
    do
            #-------------------------------------------------------------
        # At first run we don't mess with changing video output
        if [ $FIRSTRUN -eq 0 ];
            then
        if [ $(($(tvservice -s | grep -c "HDMI off"))) -eq 1 ];
        then
            echo "...hdmi is OFF / start XBMCn HDMI output"
            sudo fbset -xres 1920 -yres 1080 -vxres 1920 -vyres 1080
            tvservice --explicit="CEA 16"
        else
            echo "...hdmi is ON / start XBMC on composite output"
            sudo fbset -xres 480 -yres 400 -vxres 480 -vyres 400
            tvservice --sdtv="PAL 16:9"
            fi
           else
                FIRSTRUN=0
       fi
       #--------------------------------------------------------------
       if [ $(($(ps -A | grep xbmc.bin | wc -l))) -eq 0 ]; then
        start-stop-daemon -c xbian -u xbian --start  --pidfile $PIDFILE --exec $DAEMON --test || return 1;
        echo $(chvt 1; start-stop-daemon -c xbian -u xbian -m --start  --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS; RETURN=$?; case $RETURN in 0 ) echo do loop.....; ;; 64 ) echo do power off.....; sudo halt ;; 66 ) echo do reboot.....; sudo reboot; ;; esac)
       fi
    done
}
Find all posts by this user
« Next Oldest | Next Newest »
Thread Closed 


Messages In This Thread
How to switch from HDMI to composite on XBMC exit - udrnovsek - 25th Jan, 2013, 10:27 AM
RE: How to switch from HDMI to composite on XBMC exit - CurlyMo - 25th Jan, 2013, 10:39 AM
RE: How to switch from HDMI to composite on XBMC exit - rikardo1979 - 25th Jan, 2013, 06:15 PM
RE: How to switch from HDMI to composite on XBMC exit - udrnovsek - 29th Jan, 2013, 07:47 AM
RE: How to switch from HDMI to composite on XBMC exit - udrnovsek - 29th Jan, 2013 12:28 PM
RE: How to switch from HDMI to composite on XBMC exit - CurlyMo - 29th Jan, 2013, 07:48 PM
RE: How to switch from HDMI to composite on XBMC exit - udrnovsek - 29th Jan, 2013, 09:25 PM
RE: How to switch from HDMI to composite on XBMC exit - CurlyMo - 29th Jan, 2013, 09:42 PM

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 21st May, 2025, 03:10 PM Powered By MyBB, © 2002-2025 MyBB Group.