diff --git a/Tech/Presenter/PlayerPresenter.cs b/Tech/Presenter/PlayerPresenter.cs index 6eb4b14..d184451 100644 --- a/Tech/Presenter/PlayerPresenter.cs +++ b/Tech/Presenter/PlayerPresenter.cs @@ -15,7 +15,7 @@ namespace Tech_Demo.Presenter public string GetEquipmentUrl() { - var equipment = new Equipment {Id = 1, Name = "设备1", Ip = "192.168.1.110", Url = @"rtsp://10.211.55.2:8554/rains", Type = 1}; + var equipment = new Equipment {Id = 1, Name = "设备1", Ip = "192.168.1.110", Url = @"rtsp://admin:abc123456@192.168.1.233:554/h264/ch33/main/av_stream", Type = 1}; return equipment.Url; } } diff --git a/Tech/Program.cs b/Tech/Program.cs index 1f82f71..9b4f58d 100644 --- a/Tech/Program.cs +++ b/Tech/Program.cs @@ -25,6 +25,9 @@ namespace Tech_Demo var mainView = new MainView(); mainView.Presenter = new MainPresenter(mainView, null); Application.Run(mainView); + // var startNew = Task.Factory.StartNew(() => ("Hello Task"), TaskCreationOptions.LongRunning); + // Console.WriteLine(startNew.Result); + } } } \ No newline at end of file diff --git a/Tech/Tech.csproj b/Tech/Tech.csproj index 2390d87..6297726 100644 --- a/Tech/Tech.csproj +++ b/Tech/Tech.csproj @@ -100,6 +100,7 @@ + diff --git a/Tech/Util/HttpUtil.cs b/Tech/Util/HttpUtil.cs new file mode 100644 index 0000000..78e0c96 --- /dev/null +++ b/Tech/Util/HttpUtil.cs @@ -0,0 +1,24 @@ +using System; +using System.Net.Http; +using System.Runtime.CompilerServices; +using System.Threading.Tasks; + +namespace Tech_Demo.Util +{ + public class HttpUtil + { + private readonly HttpClient _httpClient = new HttpClient(); + private static HttpUtil _instance; + private HttpUtil(){} + + public static HttpUtil GetInstance() + { + if (_instance == null) + { + _instance = new HttpUtil(); + } + + return _instance; + } + } +} \ No newline at end of file diff --git a/Tech/View/Impl/PlayerView.cs b/Tech/View/Impl/PlayerView.cs index ab795be..6f0b92f 100644 --- a/Tech/View/Impl/PlayerView.cs +++ b/Tech/View/Impl/PlayerView.cs @@ -109,6 +109,11 @@ namespace Tech_Demo private void button1_Click_1(object sender, EventArgs e) { + // 添加录制参数 :sout=#duplicate{dst=display, dst=standard{access=file,mux=flv,dst=D:\work\xzl\teching\playback}} + + // this.videoView.MediaPlayer.Media.AddOption(":sout=#duplicate{dst=display, dst=standard{access=file,mux=flv,dst=D:/work/xzl/teching/playback/1.flv}}"); + MessageBox.Show(@"开始录制", @"提示", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Information); + } private void button4_Click(object sender, EventArgs e)