1 Replies - 596 Views - Last Post: 30 April 2013 - 07:33 AM

#1 yougeshwar  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 29-April 13

how to transmit video Via JMF to Android phone

Posted 29 April 2013 - 01:55 AM

I want to see my webcam preview in my android app. I'm using JMF which is detecting my webcam and also I'm transmitting the video but how to receive at android phone.

I google it alot but didn't get any response.

At server side i"m transmitting webcam at this url (rtp://192.168.1.2:7777/video) And at android phone i"m using this code for receiving:

this.videoView = (VideoView) this.findViewById(R.id.videoView);
this.mediaController = new MediaController(this);

this.mediaController.setAnchorView(videoView);
this.mediaController.setMediaPlayer(videoView);
this.videoView.setMediaController(this.mediaController);

String uri = "rtsp://192.168.1.2:7777/video";
this.videoView.setVideoURI(Uri.parse(uri));
this.videoView.requestFocus();
this.videoView.start();



but this code not working for me, i think there is a problem in it,
Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: how to transmit video Via JMF to Android phone

#2 Luckless  Icon User is offline

  • </luck>
  • member icon

Reputation: 292
  • View blog
  • Posts: 1,146
  • Joined: 31-August 09

Re: how to transmit video Via JMF to Android phone

Posted 30 April 2013 - 07:33 AM

I found this example online, but it's not much different from yours. Are you getting any errors in the logcat with your URI?

package com.AnVideoView;
 
import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;
 
public class AnVideoView extends Activity {
 
String SrcPath = "rtsp://192.168.1.2:7777/video";
 
   /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.main);
       VideoView myVideoView = (VideoView)findViewById(R.id.myvideoview);
       myVideoView.setVideoURI(Uri.parse(SrcPath));
       myVideoView.setMediaController(new MediaController(this));
       myVideoView.requestFocus();
       myVideoView.start();
   }
}


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1