-1

I want to create application view RSTP multiple screen. I try Multiple RTSP Streaming not working is not working. I want to create application same this https://play.google.com/store/apps/details?id=com.mcu.iVMS&hl=th . Thank you.

package com.example.videoview;

import java.security.PublicKey;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.net.Uri;
import android.os.Bundle;
import android.view.Menu;
import android.view.Window;
import android.widget.MediaController;
import android.widget.VideoView;



public class MainActivity extends Activity {

String SrcPath = "rtsp://...";
String SrcPath1 = "rtsp://...";

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
     requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_main);

       VideoView myVideoView1 = (VideoView)findViewById(R.id.videoView1);
       myVideoView1.setVideoURI(Uri.parse(SrcPath));
       myVideoView1.setMediaController(new MediaController(this));
       myVideoView1.requestFocus();
       myVideoView1.start();

       VideoView myVideoView2 = (VideoView)findViewById(R.id.videoView2);
       myVideoView2.setVideoURI(Uri.parse(SrcPath1));
       myVideoView2.setMediaController(new MediaController(this));
       myVideoView2.requestFocus();
       myVideoView2.start();



}

@Override
public boolean onCreateOptionsMenu(Menu menu) {

    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.main, menu);
    return true;
}



}
Community
  • 1
  • 1

1 Answers1

0

This may be related to the linux kernel on the phone your testing with. Check out this link.

Although that is back in '11 it's likely the issue. Basically some versions of the linux kernel doesn't support multiple video decoding (2.6.35.7) while others do (2.6.37.6). If the kernel is working on decoding one stream, the other stream may be hanging in the mean time.

Community
  • 1
  • 1
Ryhan
  • 1,815
  • 1
  • 18
  • 22