diff options
author | dynaflash <[email protected]> | 2008-09-16 20:57:13 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2008-09-16 20:57:13 +0000 |
commit | ab154ca5555a0b04a5ee4f00bf65b27a57f64471 (patch) | |
tree | 45d7fe81a0382edc928161028fe469142ef47474 /macosx/Controller.h | |
parent | f1809fae2b817c697ae663167f0ab31c2e0aa676 (diff) |
MacGui: Resilient Queue: Initial Implementation
- Completely overhauls how encodes are setup by the MacGui
- All encodes are now stored in an NSMutableArray (QueueFileArray) and saved in a plist (~/Library/Application Support/HandBrake/Queue.plist)
- A separate instance of libhb (fQueueEncodeLibhb) is used for queue processing (includes single encodes)
- fHandle still takes care of all user intiated scans and encode parameters
- libhb now only stores multiple passes for a single encode instead of storing the entire queue
- If HB crashes, or if you stop encoding while there are still pending encodes in your queue, upon next launch you will be prompted to reload the previous queue from the Queue.plist
- Removed the current encoding information at the top of the queue window to make room for a larger list as I thought it to be redundant
- The queue list is now re-arrangeable via drag-n-drop (pending encodes only)
- Known issues and bugs:
-- If you delete a previously cancelled encode then try to restart with a new encode, nothing happens. Throw off the sync of the currently encoding job.
-- Probably alot more since its a total overhaul of how the MacGui has handled encoding since titer originally wrote it :)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1703 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.h')
-rw-r--r-- | macosx/Controller.h | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h index 4df14f944..897d833a1 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -203,6 +203,11 @@ BOOL fIsDragging; IBOutlet NSProgressIndicator * fRipIndicator; BOOL fRipIndicatorShown; + /* Queue File variables */ + NSString * QueueFile; + NSMutableArray * QueueFileArray; + int currentQueueEncodeIndex; // Used to track the currently encoding queueu item + /* User Preset variables here */ HBPresets * fPresetsBuiltin; IBOutlet NSDrawer * fPresetDrawer; @@ -231,13 +236,24 @@ BOOL fIsDragging; IBOutlet NSPopUpButton * fPresetsActionButton; hb_handle_t * fHandle; + + hb_handle_t * fQueueEncodeLibhb; // libhb for HB Encoding hb_title_t * fTitle; + hb_title_t * fQueueEncodeTitle; + int fEncodingQueueItem; // corresponds to the index of fJobGroups encoding item + int fPendingCount; // Number of various kinds of job groups in fJobGroups. + int fCompletedCount; + int fCanceledCount; + int fWorkingCount; + + /* integer to set to determine the previous state of encode 0==idle, 1==encoding, 2==cancelled*/ int fEncodeState; int currentScanCount; int currentSuccessfulScanCount; BOOL SuccessfulScan; + BOOL applyQueueToScan; NSString * currentSource; NSString * browsedSourceDisplayName; } @@ -271,7 +287,7 @@ BOOL fIsDragging; - (IBAction) audioTrackPopUpChanged: (id) sender mixdownToUse: (int) mixdownToUse; - (IBAction) audioTrackMixdownChanged: (id) sender; - (IBAction) subtitleSelectionChanged: (id) sender; - +- (void) prepareJob; - (IBAction) browseFile: (id) sender; - (void) browseFileDone: (NSSavePanel *) sheet returnCode: (int) returnCode contextInfo: (void *) contextInfo; @@ -284,6 +300,19 @@ BOOL fIsDragging; - (IBAction) calculatePictureSizing: (id) sender; - (IBAction) openMainWindow: (id) sender; +/* Queue File Stuff */ +- (void) loadQueueFile; +- (NSDictionary *)createQueueFileItem; +- (void)saveQueueFileItem; +- (void) incrementQueueItemDone:(int) queueItemDoneIndexNum; +- (void) performNewQueueScan:(NSString *) scanPath scanTitleNum: (int) scanTitleNum; +- (void) processNewQueueEncode; +- (void) clearQueueEncodedItems; +- (IBAction)applyQueueSettings:(id)sender; +- (void) removeQueueFileItem:(int) queueItemToRemove; +- (void) clearQueueAllItems; +- (void)moveObjectsInQueueArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(unsigned)insertIndex; +- (void)getQueueStats; - (IBAction) addToQueue: (id) sender; - (void) overwriteAddToQueueAlertDone: (NSWindow *) sheet returnCode: (int) returnCode contextInfo: (void *) contextInfo; |