[mob][photos] Parse rotation also when parsing video properties using ffprobe

This commit is contained in:
ashilkn
2024-07-30 16:18:30 +05:30
parent 48e566ae68
commit b2556e893b
2 changed files with 6 additions and 1 deletions

View File

@@ -28,7 +28,7 @@ class FFProbeKeys {
static const date = 'date';
static const disposition = 'disposition';
static const duration = 'duration';
static const quickTimeLocation ="com.apple.quicktime.location.ISO6709";
static const quickTimeLocation = "com.apple.quicktime.location.ISO6709";
static const durationMicros = 'duration_us';
static const encoder = 'encoder';
static const extraDataSize = 'extradata_size';
@@ -70,6 +70,8 @@ class FFProbeKeys {
static const vendorId = 'vendor_id';
static const width = 'width';
static const xiaomiSlowMoment = 'com.xiaomi.slow_moment';
static const sideDataList = 'side_data_list';
static const rotation = 'rotation';
}
class MediaStreamTypes {

View File

@@ -20,6 +20,7 @@ class FFProbeProps {
String? fps;
String? codecWidth;
String? codecHeight;
int? rotation;
// dot separated bitrate, fps, codecWidth, codecHeight. Ignore null value
String get videoInfo {
@@ -137,6 +138,8 @@ class FFProbeProps {
} else if (key == FFProbeKeys.codedHeight) {
result.codecHeight = stream[key].toString();
parsedData[key] = result.codecHeight;
} else if (key == FFProbeKeys.sideDataList) {
result.rotation = stream[key][0][FFProbeKeys.rotation];
}
}
}