This commit is contained in:
parent
f047cd3139
commit
c09f307a79
|
|
@ -178,15 +178,19 @@ namespace JianGongYun.TRTC.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static object ScreenListLock = new object();
|
||||||
private SIZE thumbSize = new SIZE { cx = 300, cy = 200 };
|
private SIZE thumbSize = new SIZE { cx = 300, cy = 200 };
|
||||||
private SIZE iconSize = new SIZE { cx = 50, cy = 50 };
|
private SIZE iconSize = new SIZE { cx = 50, cy = 50 };
|
||||||
private ObservableCollection<TRTCScreenEntity> _LiveScreens = new ObservableCollection<TRTCScreenEntity>();
|
private ObservableCollection<TRTCScreenEntity> _LiveScreens;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 可分享桌面
|
/// 可分享桌面
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ObservableCollection<TRTCScreenEntity> LiveScreens
|
public ObservableCollection<TRTCScreenEntity> LiveScreens
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
{
|
||||||
|
lock (ScreenListLock)
|
||||||
{
|
{
|
||||||
_LiveScreens.Clear();
|
_LiveScreens.Clear();
|
||||||
var temp = LiveClassroom.lTRTCCloud.getScreenCaptureSources(ref thumbSize, ref iconSize);
|
var temp = LiveClassroom.lTRTCCloud.getScreenCaptureSources(ref thumbSize, ref iconSize);
|
||||||
|
|
@ -199,6 +203,7 @@ namespace JianGongYun.TRTC.ViewModels
|
||||||
_LiveScreens.Add(new TRTCScreenEntity { SourceId = info.sourceId, SourceName = info.sourceName, Type = info.type, Thumb = thumb, Info = info });
|
_LiveScreens.Add(new TRTCScreenEntity { SourceId = info.sourceId, SourceName = info.sourceName, Type = info.type, Thumb = thumb, Info = info });
|
||||||
}
|
}
|
||||||
temp.release();
|
temp.release();
|
||||||
|
}
|
||||||
return _LiveScreens;
|
return _LiveScreens;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue