title: Google glass video stream
body: <p>I'm trying to create an app for Glass to stream video using GDK.
  I found nice example with libstreaming (<a href="https://github.com/fyhertz/libstreaming" rel="nofollow noreferrer">https://github.com/fyhertz/libstreaming</a>) there:
  <a href="https://stackoverflow.com/questions/21223277/google-glass-stream-video-to-server">Google Glass stream video to server</a></p>
  
  <p>The solution there creates stream server on the phone. VLC might be used to connect to it. If receive buffer = 0, then I could get up to 0.1 sec delay sacrificing quality.</p>
  
  <p>I was able to run example on my Note2 with maximum resolution 320x240 30fps 500kbps.
  When I'm trying to run it on Glass, I have 176x144 maximum and "Fail to connect to camera service" error.</p>
  
  <p>I'm curious, could I get more than 176x144 over h.264 or other protocols?
  I completely stuck on "Fail to connect to camera service" error.</p>
  
  <p>My code is pretty much the same as here: 
  <a href="https://stackoverflow.com/questions/21223277/google-glass-stream-video-to-server">Google Glass stream video to server</a></p>
  
  <p>except:</p>
  
  <p>in MainActivity:</p>
  
  <pre><code>SessionBuilder.getInstance()
              .setSurfaceView((SurfaceView) findViewById(R.id.surface))
              .setCallback(this)
              .setPreviewOrientation(90)
              .setContext(getApplicationContext())
              .setAudioEncoder(SessionBuilder.AUDIO_NONE)
              .setVideoEncoder(SessionBuilder.VIDEO_H264)
              .setVideoQuality(new VideoQuality(176, 144, 12, 24000));
  </code></pre>
  
  <p>in Manifest:</p>
  
  <pre><code>&lt;uses-permission android:name="com.google.android.glass.permission.DEVELOPMENT"/&gt;
  
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt;
  &lt;uses-permission android:name="android.permission.CAMERA" /&gt;
  &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
  
  &lt;uses-feature android:name="android.hardware.camera" /&gt;
  &lt;uses-feature android:name="android.hardware.camera.autofocus" /&gt;
  </code></pre>
  
  <p>Any help or fresh ideas are much appreciated. 
  I heard, Mirror API could be used to stream video, Unfortunately didn't investigated that yet.</p>