|
|
|
@ -1529,6 +1529,7 @@ namespace OpenAuth.App.ServiceApp
|
|
|
|
|
.AsQueryable()
|
|
|
|
|
.Where(r => r.FlightId == flightId)
|
|
|
|
|
.Where(r => r.ObjectKey.Contains("/Remote-Control"))
|
|
|
|
|
.Where(r=>r.ObjectKey.Contains(".jpeg"))
|
|
|
|
|
.Where(r => r.CreateTime > DateTimeOffset.FromUnixTimeMilliseconds(timestamp))
|
|
|
|
|
.SingleAsync();
|
|
|
|
|
if (lasaMediaFile == null)
|
|
|
|
@ -1575,6 +1576,45 @@ namespace OpenAuth.App.ServiceApp
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<Response<CommandVideoResponse>> GetTaskVideoList(string flightId, long timestamp)
|
|
|
|
|
{
|
|
|
|
|
var lasaMediaFile = await Repository.ChangeRepository<SugarRepositiry<LasaMediaFile>>()
|
|
|
|
|
.AsQueryable()
|
|
|
|
|
.Where(r => r.FlightId == flightId)
|
|
|
|
|
.Where(r => r.ObjectKey.Contains("/Remote-Control"))
|
|
|
|
|
.Where(r=>r.ObjectKey.Contains("S.mp4"))
|
|
|
|
|
.Where(r => r.CreateTime > DateTimeOffset.FromUnixTimeMilliseconds(timestamp))
|
|
|
|
|
.SingleAsync();
|
|
|
|
|
if (lasaMediaFile == null)
|
|
|
|
|
{
|
|
|
|
|
return new Response<CommandVideoResponse>()
|
|
|
|
|
{
|
|
|
|
|
Result = new CommandVideoResponse()
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
return new Response<CommandVideoResponse>()
|
|
|
|
|
{
|
|
|
|
|
Result = new CommandVideoResponse()
|
|
|
|
|
{
|
|
|
|
|
videoLink = "http://" + _minioService.endPoint + "/" + _minioService._bucketName + "/" +
|
|
|
|
|
lasaMediaFile.ObjectKey,
|
|
|
|
|
spkzxx = new VideoExtData()
|
|
|
|
|
{
|
|
|
|
|
lon = lasaMediaFile.Lng,
|
|
|
|
|
lat = lasaMediaFile.Lat,
|
|
|
|
|
angle = lasaMediaFile.GimbalYawDegree,
|
|
|
|
|
height = lasaMediaFile.RelativeAltitude
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取图片信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="imagePath"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public (int width, int height) GetImageDimensions(string imagePath)
|
|
|
|
|
{
|
|
|
|
|
using (var bmp = new Bitmap(imagePath))
|
|
|
|
|