コード例 #1
0
        private void but8_Click(object sender, EventArgs e)
        {
            GStreamer.StopAll();

            string ipaddr = "192.168.43.1";

            if (Settings.Instance["herelinkip"] != null)
            {
                ipaddr = Settings.Instance["herelinkip"].ToString();
            }

            InputBox.Show("herelink ip", "Enter herelink ip address", ref ipaddr);

            Settings.Instance["herelinkip"] = ipaddr;

            string url = String.Format(
                "rtspsrc location=rtsp://{0}:8554/fpv_stream1 latency=1 udp-reconnect=1 timeout=0 do-retransmission=false ! application/x-rtp ! decodebin3 ! queue max-size-buffers=1 leaky=2 ! videoconvert ! video/x-raw,format=BGRx ! appsink name=outsink",
                ipaddr);

            GStreamer.LookForGstreamer();

            if (!File.Exists(GStreamer.gstlaunch))
            {
                GStreamerUI.DownloadGStreamer();

                if (!File.Exists(GStreamer.gstlaunch))
                {
                    return;
                }
            }

            GStreamer.StartA(url);
        }
コード例 #2
0
 private void but_gstream_Click(object sender, EventArgs e)
 {
     try
     {
         GStreamer.gstlaunch = GStreamer.LookForGstreamer();
         if (File.Exists(GStreamer.gstlaunch))
         {
             GStreamer.Start();
         }
     }
     catch (Exception ex)
     {
         CustomMessageBox.Show(ex.ToString(), Strings.ERROR);
     }
 }