Skip to content

Commit

Permalink
MMovie_FFmpeg refactored
Browse files Browse the repository at this point in the history
- MTrack is reimplemented with FFTrack, ...
- FFIndexer added for rebuilding index.
- some bugs remained: moosoy will fix them :)

preferences updated
- file-binding tab is currently hidden.
- some prefs moved from advanced-details to other tab-panes.
- some advanced-details settings added.
  - subtitle-info-display-mode
  - action-on-dragging-movie-area

control panel updated
- tab merged to 2 tabs: av-control, properties.
- play-rate slider tick updated.
- subtitle filename added.
- data size/bps added.
- fps added & updated in real-time.
- codec column added to track table view.

digital-audio management enhanced
- it works only for movie with digital-audio-track.
- volume slider enable bug fixed

a52codec/perian-subtitle management enhanced
- these are managed before/after with QuickTime.

file-extensions updated
- 3gp, 3gpp, 3g2, 3gp2, m2ts, trp, skm, dv, dif added
- idx, sub added

audio-codec added

some bug fixed

Copyright years updated
- 2006, 2007 => 2006 ~ 2008



git-svn-id: http://movist.googlecode.com/svn/trunk@155 9988c26d-9134-0410-b5bb-5778289bb252
  • Loading branch information
cocoable committed Apr 6, 2008
1 parent 3b2cde4 commit 3e78f97
Show file tree
Hide file tree
Showing 113 changed files with 4,003 additions and 2,890 deletions.
26 changes: 17 additions & 9 deletions AppController.h
@@ -1,7 +1,7 @@
//
// Movist
//
// Copyright 2006, 2007 Yong-Hoe Kim. All rights reserved.
// Copyright 2006 ~ 2008 Yong-Hoe Kim. All rights reserved.
// Yong-Hoe Kim <cocoable@gmail.com>
//
// This file is part of Movist.
Expand Down Expand Up @@ -56,9 +56,6 @@
PlaylistController* _playlistController;
NSUserDefaults* _defaults;
BOOL _quitWhenWindowClose;
BOOL _supportDigitalAudio;
BOOL _disablePerianSubtitle;
BOOL _perianSubtitleEnabled;
NSTimer* _updateSystemActivityTimer;

// movie & subtitle
Expand All @@ -79,6 +76,15 @@
float _lastPlayedMovieTime;
NSRange _lastPlayedMovieRepeatRange;

// digital-audio-out
BOOL _a52CodecInstalled;
BOOL _a52CodecAttemptPassthrough;
BOOL _audioDeviceSupportsDigital;

// perian subtitle
BOOL _perianInstalled;
BOOL _perianSubtitleEnabled;

// main-menu
IBOutlet NSMenuItem* _reopenWithMenuItem;
IBOutlet NSMenuItem* _altCopyImageMenuItem;
Expand Down Expand Up @@ -135,6 +141,8 @@
IBOutlet NSTextField* _repeatBeginningTextField;
IBOutlet NSTextField* _repeatEndTextField;
IBOutlet NSButton* _controlPanelDecoderButton;
IBOutlet NSTextField* _dataSizeBpsTextField;
IBOutlet NSTextField* _fpsTextField;

// full-screen & navigation
NSLock* _fullScreenLock;
Expand All @@ -158,7 +166,7 @@

- (void)updateUI;
- (void)setQuitWhenWindowClose:(BOOL)quitWhenClose;
- (void)setCaptureIncludingLetterBox:(BOOL)includingLetterBox;
- (void)setIncludeLetterBoxOnCapture:(BOOL)includeLetterBox;
- (void)checkForUpdatesOnStartup;
- (void)checkForUpdates:(BOOL)manual;

Expand All @@ -185,6 +193,7 @@
- (void)closeMovie;

- (void)updateDecoderUI;
- (void)updateDataSizeBpsUI;

- (IBAction)openFileAction:(id)sender;
- (IBAction)openURLAction:(id)sender;
Expand Down Expand Up @@ -315,10 +324,9 @@

@interface AppController (AudioDigital)

- (BOOL)supportDigitalAudio;
- (void)initDigitalAudio;
- (void)updateDigitalAudio;
- (BOOL)updateAudioOutput:(id)sender;
- (BOOL)digitalAudioOut;
- (void)initDigitalAudioOut;
- (BOOL)updateDigitalAudioOut:(id)sender;

@end

Expand Down
33 changes: 22 additions & 11 deletions AppController.m
@@ -1,7 +1,7 @@
//
// Movist
//
// Copyright 2006, 2007 Yong-Hoe Kim. All rights reserved.
// Copyright 2006 ~ 2008 Yong-Hoe Kim. All rights reserved.
// Yong-Hoe Kim <cocoable@gmail.com>
//
// This file is part of Movist.
Expand Down Expand Up @@ -60,9 +60,18 @@ - (id)init

_defaults = [NSUserDefaults standardUserDefaults];

// check if kor-/capri- perian supports external subtitles.
_disablePerianSubtitle = [_defaults boolForKey:MDisablePerianSubtitleKey];
_perianSubtitleEnabled = [_defaults isPerianSubtitleEnabled];
NSString* root, *home;
NSFileManager* fm = [NSFileManager defaultManager];
root = @"/Library/Audio/Plug-Ins/Components/A52Codec.component";
home = [[@"~" stringByExpandingTildeInPath] stringByAppendingString:root];
_a52CodecInstalled = [fm fileExistsAtPath:root] || [fm fileExistsAtPath:home];

root = @"/Library/QuickTime/Perian.component";
home = [[@"~" stringByExpandingTildeInPath] stringByAppendingString:root];
_perianInstalled = [fm fileExistsAtPath:root] || [fm fileExistsAtPath:home];

[self initDigitalAudioOut];
[self initRemoteControl];
}
return self;
}
Expand Down Expand Up @@ -91,6 +100,7 @@ - (void)awakeFromNib

_decoderButton = [_mainWindow createDecoderButton];
[self updateDecoderUI];
[self updateDataSizeBpsUI];

initSubtitleEncodingMenu(_subtitleEncodingMenu, @selector(reopenSubtitleAction:));

Expand Down Expand Up @@ -178,10 +188,9 @@ - (void)applicationWillFinishLaunching:(NSNotification*)aNotification

// initial update preferences: advanced details
[_movieView setActivateOnDragging:[_defaults boolForKey:MActivateOnDraggingKey]];
[self setCaptureIncludingLetterBox:[_defaults boolForKey:MCaptureIncludingLetterBoxKey]];
[_movieView setActionOnDragging:[_defaults integerForKey:MActionOnDraggingMovieAreaKey]];
[self setIncludeLetterBoxOnCapture:[_defaults boolForKey:MIncludeLetterBoxOnCaptureKey]];

[self initDigitalAudio];
[self initRemoteControl];
[self updateUI];

[self checkForUpdatesOnStartup];
Expand Down Expand Up @@ -307,6 +316,7 @@ - (void)updateUI
[_mainWindow setMovieURL:movieURL];
[_fullScreener setMovieURL:movieURL];
[_controlPanel setMovieURL:movieURL];
[_controlPanel setSubtitleURL:[self subtitleURL]];
[_propertiesView reloadData];
[self updatePrevNextMovieButtons];
[self updateAspectRatioMenu];
Expand All @@ -319,6 +329,7 @@ - (void)updateUI
[self updateTimeUI];
[self updatePlayUI];
[self updateDecoderUI];
[self updateDataSizeBpsUI];
[_playlistController updateUI];
}

Expand All @@ -328,14 +339,14 @@ - (void)setQuitWhenWindowClose:(BOOL)quitWhenWindowClose
_quitWhenWindowClose = quitWhenWindowClose;
}

- (void)setCaptureIncludingLetterBox:(BOOL)includingLetterBox
- (void)setIncludeLetterBoxOnCapture:(BOOL)includeLetterBox
{
[_movieView setCaptureIncludingLetterBox:includingLetterBox];
[_movieView setIncludeLetterBoxOnCapture:includeLetterBox];

[_altCopyImageMenuItem setTitle:(includingLetterBox) ?
[_altCopyImageMenuItem setTitle:(includeLetterBox) ?
NSLocalizedString(@"Copy (Excluding Letter Box)", nil) :
NSLocalizedString(@"Copy (Including Letter Box)", nil)];
[_altSaveImageMenuItem setTitle:(includingLetterBox) ?
[_altSaveImageMenuItem setTitle:(includeLetterBox) ?
NSLocalizedString(@"Save Current Image (Excluding Letter Box)", nil) :
NSLocalizedString(@"Save Current Image (Including Letter Box)", nil)];
}
Expand Down
20 changes: 8 additions & 12 deletions AppController_Audio.m
@@ -1,7 +1,7 @@
//
// Movist
//
// Copyright 2006, 2007 Yong-Hoe Kim. All rights reserved.
// Copyright 2006 ~ 2008 Yong-Hoe Kim. All rights reserved.
// Yong-Hoe Kim <cocoable@gmail.com>
//
// This file is part of Movist.
Expand Down Expand Up @@ -29,7 +29,7 @@ @implementation AppController (Audio)

- (float)preferredVolume:(float)volume
{
return (_supportDigitalAudio) ? 1.0 : // always 1.0 for digital-audio
return [self digitalAudioOut] ? 1.0 : // always 1.0 for digital-audio
normalizedVolume(MIN(MAX(0.0, volume), MAX_VOLUME));
}

Expand All @@ -44,7 +44,7 @@ - (void)setVolume:(float)volume
}
volume = [self preferredVolume:volume];
[_movie setVolume:volume];
if (_supportDigitalAudio) {
if ([self digitalAudioOut]) {
[_movieView setMessage:NSLocalizedString(
@"Volume cannot be changed in Digital-Out", nil)];
}
Expand Down Expand Up @@ -110,14 +110,10 @@ - (void)updateVolumeUI
[_volumeSlider setFloatValue:volume];
[_panelVolumeSlider setFloatValue:volume];
}
if ([_volumeSlider isEnabled] != !muted) {
[_volumeSlider setEnabled:!muted];
[_panelVolumeSlider setEnabled:!muted];
}

if (_supportDigitalAudio) {
[_volumeSlider setEnabled:FALSE];
[_panelVolumeSlider setEnabled:FALSE];
BOOL enabled = !(muted || [self digitalAudioOut]);
if ([_volumeSlider isEnabled] != enabled) {
[_volumeSlider setEnabled:enabled];
[_panelVolumeSlider setEnabled:enabled];
}
}

Expand Down Expand Up @@ -155,7 +151,7 @@ - (void)autoenableAudioTracks
}
}
else if (0 < [_audioTrackIndexSet count]) {
if (_supportDigitalAudio && 1 < [_audioTrackIndexSet count]) {
if ([self digitalAudioOut] && 1 < [_audioTrackIndexSet count]) {
// only one audio track should be enabled for digial audio.
unsigned int index = [_audioTrackIndexSet firstIndex];
[_audioTrackIndexSet removeAllIndexes];
Expand Down

0 comments on commit 3e78f97

Please sign in to comment.