minor fixes

This commit is contained in:
Thibault Deckers 2021-07-19 10:37:01 +09:00
parent 0fd4ea8698
commit ca221635e9
3 changed files with 12 additions and 11 deletions

View file

@ -22,13 +22,9 @@ class PanoramaInfo {
final projectionType = map['projectionType'] as String?;
// handle missing `fullPanoHeight` (e.g. Samsung camera app panorama mode)
if (fHeight == null && cWidth != null && cHeight != null) {
// assume the cropped area is actually covering 360 degrees horizontally
// even when `croppedAreaLeft` is non zero
fWidth = cWidth;
if (fHeight == null && fWidth != null && cHeight != null) {
fHeight = (fWidth / 2).round();
cTop = ((fHeight - cHeight) / 2).round();
cLeft = 0;
}
Rect? croppedAreaRect;

View file

@ -279,10 +279,10 @@ class Constants {
sourceUrl: 'https://github.com/dart-lang/intl',
),
Dependency(
name: 'LatLong',
name: 'LatLong2',
license: 'Apache 2.0',
licenseUrl: 'https://github.com/MikeMitterer/dart-latlong/blob/master/LICENSE',
sourceUrl: 'https://github.com/MikeMitterer/dart-latlong',
licenseUrl: 'https://github.com/jifalops/dart-latlong/blob/master/LICENSE',
sourceUrl: 'https://github.com/jifalops/dart-latlong',
),
Dependency(
name: 'PDF for Dart and Flutter',

View file

@ -213,18 +213,23 @@ class IjkPlayerAvesVideoController extends AvesVideoController {
allStreams.forEach((stream) {
final type = ExtraStreamType.fromTypeString(stream[Keys.streamType]);
if (type != null) {
final width = stream[Keys.width] as int?;
final height = stream[Keys.height] as int?;
_streams.add(StreamSummary(
type: type,
index: stream[Keys.index],
codecName: stream[Keys.codecName],
language: stream[Keys.language],
title: stream[Keys.title],
width: stream[Keys.width] as int?,
height: stream[Keys.height] as int?,
width: width,
height: height,
));
switch (type) {
case StreamType.video:
videoStreamCount++;
// check width/height to exclude image streams (that are included among video streams)
if (width != null && height != null) {
videoStreamCount++;
}
break;
case StreamType.audio:
audioStreamCount++;