Monday, December 17, 2007

Web cam button.

I spend a bit of the morning hacking a patch to translate the button event of the webcam to the kernel input system. Now one can use a script to toggle the video send pressing the button


out_connection = remote_bus.get_object('com.Skype.API', '/com/Skype')

out_connection.Invoke('NAME mySkypeController')
out_connection.Invoke('PROTOCOL 5')

answer= out_connection.Invoke('SEARCH ACTIVECALLS')
vid = out_connection.Invoke('GET CALL ' + answer.split()[1] + ' VIDEO_SEND_STATUS')
if vid.split()[3] == 'RUNNING':
print out_connection.Invoke('ALTER CALL ' + answer.split()[1] + ' STOP_VIDEO_SEND')
else:
print out_connection.Invoke('ALTER CALL ' + answer.split()[1] + ' START_VIDEO_SEND')

No comments: