Private Player As RTSPVideoPlayer
Dim v As View = Player.Initialize("RTSP")
If Player.IsInitialised Then
Dim Width,Height As Int
If p.Width>p.Height Then
Height =Ceil(p.Height / 2) * 2 - 2dip '一定要注意,宽高尺寸必须是2的倍数
Width = Ceil(p.Width/ 2) * 2 - 2dip
'Height =p.Height - 2dip '用这个会报错。
'Width = p.Width - 2dip
Log($"W:${Width},H:${Height}"$)
p.AddView(v,1dip,1dip,Width,Height)
End If
v.SendToBack
Player.SetMedia("rtsp://admin:xxxxxx@192.168.1.15:554/ch01.264","admin","xxxxxx","")
Player.Start(True,False)
End If