1

タブレットの IP カメラからライブ ビデオ ストリームを取得するアプリケーションを構築したいと考えています。私はたくさんグーグルで検索しましたが、これを行う実用的な方法を見つけることができませんでした。このコードを見つけました

  [Activity(Label = "CameraTest1", MainLauncher = true, Icon = "@drawable/icon")]
    public class Activity1 : Activity
    {
        int count = 1;

        VideoView videoView;

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            // Get our button from the layout resource,
            // and attach an event to it
            Button button = FindViewById<Button>(Resource.Id.MyButton);
            videoView = FindViewById<VideoView>(Resource.Id.videoView1);
            button.Click += button_Click;
        }

        void button_Click(object sender, EventArgs e)
        {
            videoView.SetVideoURI(Uri.Parse("rtsp://192.168.1.3/mjpeg"));
            videoView.SetMediaController(new MediaController(this));
            videoView.RequestFocus();
            videoView.Start();


        }
    }

しかし、エラーが表示されます (このビデオを再生できません)。

4

0 に答える 0