diff options
author | Damiano Galassi <[email protected]> | 2016-05-03 18:47:14 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2016-05-03 18:47:14 +0200 |
commit | e53308f9342d911a9d3e8f4d1eeba6e53fabc0ab (patch) | |
tree | f65f5390d9174276022790a308660e17d7a3601f /macosx/QTKit+HBQTMovieExtensions.m | |
parent | 4ab21a0ca630dc4bac79149a6eec598921899fe5 (diff) |
MacGui: use AVFoundation as the first option for the preview playback. Add volume and tracks controls to the player hud.
Diffstat (limited to 'macosx/QTKit+HBQTMovieExtensions.m')
-rw-r--r-- | macosx/QTKit+HBQTMovieExtensions.m | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/macosx/QTKit+HBQTMovieExtensions.m b/macosx/QTKit+HBQTMovieExtensions.m deleted file mode 100644 index 903659ec9..000000000 --- a/macosx/QTKit+HBQTMovieExtensions.m +++ /dev/null @@ -1,49 +0,0 @@ -/* QTKit+HBQTMovieExtensions.m - - This file is part of the HandBrake source code. - Homepage: <http://handbrake.fr/>. - It may be used under the terms of the GNU General Public License. */ - -#import "QTKit+HBQTMovieExtensions.h" - -@implementation QTMovieView (HBQTMovieViewExtensions) - -- (void)mouseMoved:(NSEvent *)theEvent -{ - [super mouseMoved:theEvent]; -} - -@end - -@implementation QTMovie (HBQTMovieExtensions) - -- (BOOL)isPlaying -{ - if (self.rate > 0) - { - return YES; - } - else - { - return NO; - } -} - -- (NSString *)timecode -{ - QTTime time = [self currentTime]; - double timeInSeconds = (double)time.timeValue / time.timeScale; - UInt16 seconds = (UInt16)fmod(timeInSeconds, 60.0); - UInt16 minutes = (UInt16)fmod(timeInSeconds / 60.0, 60.0); - UInt16 hours = (UInt16)(timeInSeconds / (60.0 * 60.0)); - UInt16 milliseconds = (UInt16)(timeInSeconds - (int) timeInSeconds) * 1000; - return [NSString stringWithFormat:@"%02d:%02d:%02d.%03d", hours, minutes, seconds, milliseconds]; -} - -- (void)setCurrentTimeDouble:(double)value -{ - long timeScale = [[self attributeForKey:QTMovieTimeScaleAttribute] longValue]; - [self setCurrentTime:QTMakeTime((long long)value * timeScale, timeScale)]; -} - -@end
\ No newline at end of file |