I'm developing a live video program on Google glass. I send video data with google glass wifi. But when i send packets with sockets, eithter udp or tcp, the program will block randomly at the send or sendto function 5 seconds or more. This situation become more serious when the temprature of the glass goes up. But when i use the NOBlock method, the send or sendto function returns fail. So, the video data can not be send out smoothly. Are there anybody has the experience to solve this problem.
1 Answers
Deep in the Glass android Kernel there is code that slows the Omap4 processor down when Glass gets hot. This is an important bit of code that prevents Glass from turning into molten plastic on your face. Unfortunately this also limits the ability to do intensive of long running actions.
There are five things you can adjust in your code to try to workaround the overheat issue.
1-Put a black overlay on the preview to hide it and reduce screen io. Note this is against the Glassware submission guidelines so if you are looking to go beyond sideloading don't do it.
2-Reduce your video capture frame size. Default 720p video is a lot of data. You can reduce it to much smaller.
3-Reduce the video capture frame rate. For the same reasons as 3.
4-Do not manipulate the video stream on Glass. For example if you are converting the video to your own codec, detecting objects or adding effects move that process to a cloud based service. Don't do any more computation on Glass than the minimum.
5-Examine how you are doing network io and try to reduce the impact and usage. Consider connecting Glass to another Android device via a USB On the ago adapter and then streaming from your Glass via that device.

- 1,019
- 9
- 14