title: how can android play video by inputstream
body: <p>I got an input stream from socket about CCTV,but i do not know how to display it as video,is there any APIs?In another words,how can android display CCTV???</p>
  
  <p>my question:I have used a video framework to display a video,which is display by String path.
  but what i want is displaying by stream...how can i figure it out???</p>
  
  <p>help me....</p>
  
  <pre><code>`void playfunction(){
       String path = "";
       VideoView mVideoView;
       EditText mEditText;
      mEditText = (EditText) findViewById(R.id.url);
      mVideoView = (VideoView) findViewById(R.id.surface_view);
  
  //      path="http://dlqncdn.miaopai.com/stream/MVaux41A4lkuWloBbGUGaQ__.mp4";
      path = Environment.getExternalStorageDirectory().getAbsolutePath() + "/cctvwatch.mp4";
    if (path == "") {
          // Tell the user to provide a media file URL/path.
          Toast.makeText(VideoViewDemo.this, "Please edit VideoViewDemo Activity, and set path" + " variable to your media file URL/path", Toast.LENGTH_LONG).show();
          return;
      } else {
          /*
           * Alternatively,for streaming media you can use
           * mVideoView.setVideoURI(Uri.parse(URLstring));
           */
  
          mVideoView.setVideoPath(path);
          mVideoView.setMediaController(new MediaController(this));
          mVideoView.requestFocus();
  
          mVideoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
              @Override
              public void onPrepared(MediaPlayer mediaPlayer) {
                  // optional need Vitamio 4.0
                  mediaPlayer.setPlaybackSpeed(1.0f);
              }
          });
      }
  }
  </code></pre>
  
  <p>}`</p>