This commit is contained in:
Damiano Galassi committed 2019-10-25 09:08:11 +02:00
1 parent b6c9972cb8
commit 8cbbfc41d4
2 files changed
+5 -2

No files matched your search

+1 -1
View File
@@ -133,7 +133,7 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
default: default:
if metadataViewController == nil { if metadataViewController == nil {
metadataViewController = MovieViewController(metadata: mp4.metadata) metadataViewController = MovieViewController(mp4: mp4, metadata: mp4.metadata)
} }
return metadataViewController! return metadataViewController!
} }
+4 -1
View File
@@ -21,11 +21,14 @@ extension MP42File {
enum TrackHDType : Int { enum TrackHDType : Int {
case hd720p = 1 case hd720p = 1
case hd1080p = 2 case hd1080p = 2
case hd4k = 3
} }
var hdType: TrackHDType? { var hdType: TrackHDType? {
for track in tracks(withMediaType: kMP42MediaType_Video) as! [MP42VideoTrack] { for track in tracks(withMediaType: kMP42MediaType_Video) as! [MP42VideoTrack] {
if (track.width > 1280 || track.height > 720) && track.width <= 1920 && track.height <= 1088 { if (track.width > 1920 && track.height > 1088) {
return .hd4k
} else if (track.width > 1280 || track.height > 720) && track.width <= 1920 && track.height <= 1088 {
return .hd1080p return .hd1080p
} else if track.width >= 960 && track.height >= 720 || track.width >= 1280 { } else if track.width >= 960 && track.height >= 720 || track.width >= 1280 {
return .hd720p return .hd720p