diff --git a/JianGongYun/TRTC/LiveClassroom.cs b/JianGongYun/TRTC/LiveClassroom.cs
index 0bcc90d..c88b502 100644
--- a/JianGongYun/TRTC/LiveClassroom.cs
+++ b/JianGongYun/TRTC/LiveClassroom.cs
@@ -82,6 +82,7 @@ namespace JianGongYun.TRTC
CurrentLiveWindow.Closed += CurrentLiveWindow_Closed;
lTRTCCloud = ITRTCCloud.getTRTCShareInstance();//创建TRTC实例
+ lTRTCCloud.addCallback(TRTCCloudCallback);//注册回调
var roomPars = new TRTCParams
{
sdkAppId = SDKAppID,
@@ -116,7 +117,6 @@ namespace JianGongYun.TRTC
//liveWinMode.LoadAllScreen();
_RecoderDir = $"{classroomEntity.ClassHead}_{classroomEntity.ClassSubHead}";
- lTRTCCloud.addCallback(TRTCCloudCallback);//注册回调
callerWindow.Hide();//隐藏调用窗口
CurrentLiveWindow.Show();
@@ -371,7 +371,7 @@ namespace JianGongYun.TRTC
int runFps = 0;//实时帧
Timer timer = new Timer((a) =>
{
- Debug.Print($"runFps {runFps}. leavingsMat {mats.Count}.");
+ //Debug.Print($"runFps {runFps}. leavingsMat {mats.Count}.");
Interlocked.Exchange(ref runFps, 0);
}, null, 0, 1000);
@@ -454,7 +454,7 @@ namespace JianGongYun.TRTC
}
}
- Skip1:
+ Skip1:
if (liveWinMode.CameraRunning)//摄像头分享中
{
@@ -482,7 +482,7 @@ namespace JianGongYun.TRTC
}
}
- Skip2:
+ Skip2:
mats.Enqueue(BackgroundFrame.CvtColor(ColorConversionCodes.BGRA2BGR));
Interlocked.Increment(ref runFps);
@@ -551,14 +551,6 @@ namespace JianGongYun.TRTC
Process prc = new Process { StartInfo = new ProcessStartInfo { FileName = Path.Combine(Environment.CurrentDirectory, "ffmpeg.exe"), Arguments = arguments, CreateNoWindow = true, UseShellExecute = false } };
prc.Start();
prc.WaitForExit();
- if (File.Exists(VideoTempPath))
- {
- File.Delete(VideoTempPath);
- }
- if (File.Exists(AudioTempPath))
- {
- File.Delete(AudioTempPath);
- }
CurrentLiveWindow.Dispatcher.Invoke(new Action(() =>
{
NoticeManager.NotifiactionShow.AddNotifiaction(new NotifiactionModel()
@@ -567,6 +559,27 @@ namespace JianGongYun.TRTC
Content = $"成功保存直播视频,路径:{ResultFilePath}。",
NotifiactionType = AduSkin.Controls.EnumPromptType.Success
});
+ var res= AduMessageBox.ShowYesNoCancel("是否删除音视频源文件?", "提醒", "删除", "保留", "浏览");
+ if (res== MessageBoxResult.Cancel)
+ {
+ var process = new Process
+ {
+ StartInfo = new ProcessStartInfo { FileName = "explorer.exe", Arguments = RecoderDir }
+ };
+ process.Start();
+ process.WaitForExit();
+ }
+ else if (res== MessageBoxResult.Yes)
+ {
+ if (File.Exists(VideoTempPath))
+ {
+ File.Delete(VideoTempPath);
+ }
+ if (File.Exists(AudioTempPath))
+ {
+ File.Delete(AudioTempPath);
+ }
+ }
}));
Debug.Print("结束写入视频线程");
}, TaskCreationOptions.LongRunning);
diff --git a/JianGongYun/TRTC/ViewModels/LiveWindowViewModel.cs b/JianGongYun/TRTC/ViewModels/LiveWindowViewModel.cs
index 0340684..5fae0a2 100644
--- a/JianGongYun/TRTC/ViewModels/LiveWindowViewModel.cs
+++ b/JianGongYun/TRTC/ViewModels/LiveWindowViewModel.cs
@@ -27,7 +27,7 @@ namespace JianGongYun.TRTC.ViewModels
///
/// 学生总数
///
- private int _StudentCount = 0;
+ private int _StudentCount = 1;
public int StudentCount
{
set
diff --git a/JianGongYun/TRTC/Windows/LiveWindow.xaml b/JianGongYun/TRTC/Windows/LiveWindow.xaml
index 3c9560b..8467fc9 100644
--- a/JianGongYun/TRTC/Windows/LiveWindow.xaml
+++ b/JianGongYun/TRTC/Windows/LiveWindow.xaml
@@ -37,6 +37,12 @@
+
+
+
+
+
+