summaryrefslogtreecommitdiffstats
path: root/macosx/HBPreviewController.h
diff options
context:
space:
mode:
authorritsuka <[email protected]>2013-11-04 07:09:50 +0000
committerritsuka <[email protected]>2013-11-04 07:09:50 +0000
commit85df20369cf73f5115a1707a47a7ac52f2881efb (patch)
tree65f37715730a25b1a4456e0c1930bbc28c8bc2e5 /macosx/HBPreviewController.h
parentd0bfc7cd9a4df6c6277f78161241ec8b93cac8f5 (diff)
MacGUI: Refactor HBPreviewController. Rename the actual class to HBPreviewController, and move the image and video creation code to a separate HBPreviewGenerator class. Update the preview duration list as Rodeo suggested.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5874 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPreviewController.h')
-rw-r--r--macosx/HBPreviewController.h127
1 files changed, 10 insertions, 117 deletions
diff --git a/macosx/HBPreviewController.h b/macosx/HBPreviewController.h
index 99a8c3393..ed7fd19ab 100644
--- a/macosx/HBPreviewController.h
+++ b/macosx/HBPreviewController.h
@@ -1,130 +1,23 @@
/* $Id: HBPreviewController.h,v 1.6 2005/04/14 20:40:05 titer Exp $
- 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. */
+ 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 <Cocoa/Cocoa.h>
-
#include "hb.h"
-/* Needed for Quicktime movie previews */
-#import <QTKit/QTKit.h>
@class HBController;
-@interface PreviewController : NSWindowController <NSWindowDelegate>
-{
- hb_handle_t * fHandle;
- hb_title_t * fTitle;
-
- HBController * fHBController; // reference to HBController
-
- NSMutableDictionary * fPicturePreviews; // NSImages, one for each preview libhb creates, created lazily
- int fPicture;
-
- CALayer * fWhiteBackground;
- CALayer * fPictureLayer;
- IBOutlet NSBox * fPictureControlBox;
- IBOutlet NSBox * fEncodingControlBox;
- IBOutlet NSBox * fMoviePlaybackControlBox;
-
- IBOutlet NSSlider * fPictureSlider;
- IBOutlet NSTextField * fInfoField;
- IBOutlet NSTextField * fscaleInfoField;
-
- CGFloat backingScaleFactor;
-
- /* Hud Control Overlay */
- NSTimer * fHudTimer;
- int hudTimerSeconds;
-
- /* Full Screen Mode Toggle */
- BOOL scaleToScreen;
- IBOutlet NSButton * fScaleToScreenToggleButton;
- IBOutlet NSButton * fPictureSettingsToggleButton;
-
- /* Movie Previews */
- QTMovie * aMovie;
- IBOutlet QTMovieView * fMovieView;
- /* Playback Panel Controls */
- IBOutlet NSButton * fPlayPauseButton;
- IBOutlet NSButton * fGoToBeginningButton;
- IBOutlet NSButton * fGoToEndButton;
- IBOutlet NSButton * fGoForwardOneFrameButton;
- IBOutlet NSButton * fGoBackwardOneFrameButton;
- IBOutlet NSSlider * fMovieScrubberSlider;
- IBOutlet NSButton * fGoToStillPreviewButton;
- IBOutlet NSTextField * fMovieInfoField;
- NSTimer * fMovieTimer;
-
- IBOutlet NSButton * fCreatePreviewMovieButton;
- IBOutlet NSButton * fCancelPreviewMovieButton;
- IBOutlet NSButton * fShowPreviewMovieButton;
- NSString * fPreviewMoviePath;
- IBOutlet NSProgressIndicator * fMovieCreationProgressIndicator;
- hb_handle_t * fPreviewLibhb; // private libhb for creating previews
- NSInteger fEncodeState;
- NSTimer * fLibhbTimer; // timer for retrieving state from libhb
- IBOutlet NSTextField * fPreviewMovieStatusField;
- IBOutlet NSPopUpButton * fPreviewMovieLengthPopUp; // popup of choices for length of preview in seconds
-}
-
-@property (nonatomic, readwrite) BOOL deinterlacePreview;
-
-- (void) SetHandle: (hb_handle_t *) handle;
-- (void) SetTitle: (hb_title_t *) title;
-- (void) setHBController: (HBController *)controller;
-- (void) displayPreview;
-
-- (IBAction) settingsChanged: (id) sender;
-- (IBAction) pictureSliderChanged: (id) sender;
-- (IBAction) showPictureSettings:(id)sender;
-- (NSString*) pictureSizeInfoString;
-
-- (IBAction) toggleScaleToScreen:(id)sender;
+@interface HBPreviewController : NSWindowController <NSWindowDelegate>
-/* HUD overlay */
-- (void) enableHudControls;
-- (void) disableHudControls;
+@property (nonatomic) BOOL deinterlacePreview;
+@property (nonatomic, readonly) NSString *pictureSizeInfoString;
-- (void) startHudTimer;
-- (void) stopHudTimer;
+@property (nonatomic, assign) HBController *delegate;
+@property (nonatomic, assign) hb_handle_t *handle;
+@property (nonatomic, assign) hb_title_t *title;
-/* Movie Previews */
-- (void) startReceivingLibhbNotifications;
-- (void) stopReceivingLibhbNotifications;
+- (void) reload;
-- (void) installMovieCallbacks;
-- (void) removeMovieCallbacks;
-
-- (IBAction) cancelCreateMoviePreview: (id) sender;
-- (IBAction) createMoviePreview: (id) sender;
-- (void) libhbStateChanged: (hb_state_t ) state;
-- (IBAction) showMoviePreview: (NSString *) path;
-- (IBAction) showPicturesPreview: (id) sender;
-- (IBAction) toggleMoviePreviewPlayPause: (id) sender;
-- (IBAction) moviePlaybackGoToBeginning: (id) sender;
-- (IBAction) moviePlaybackGoToEnd: (id) sender;
-- (IBAction) moviePlaybackGoBackwardOneFrame: (id) sender;
-- (IBAction) moviePlaybackGoForwardOneFrame: (id) sender;
-
-- (void) initPreviewScrubberForMovie;
-- (void) adjustPreviewScrubberForCurrentMovieTime;
-- (IBAction) previewScrubberChanged: (id) sender;
-- (BOOL) isPlaying;
-
-- (void) startMovieTimer;
-- (void) stopMovieTimer;
-
-- (NSString*) SMTPETimecode: (QTTime)time;
-- (QTTime)SliderToQTTime:(double)time;
-
-- (IBAction) previewDurationPopUpChanged: (id) sender;
-
-- (NSImage *) makeImageForPicture: (NSInteger)pictureIndex
- libhb:(hb_handle_t*)handle
- title:(hb_title_t*)title;
-- (NSImage *) imageForPicture: (NSInteger) pictureIndex;
-- (void) purgeImageCache;
@end
-