]> granicus.if.org Git - handbrake/commitdiff
MacGui: remapped lavcOption to VideoOptionExtra.
authorritsuka <damiog@gmail.com>
Thu, 21 Aug 2014 18:08:23 +0000 (18:08 +0000)
committerritsuka <damiog@gmail.com>
Thu, 21 Aug 2014 18:08:23 +0000 (18:08 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6337 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/Controller.m
macosx/HBPresetsManager.m
macosx/HBQueueController.mm
macosx/HBVideoController.m

index d9327b0a10b996531a91c5321eea839182ee464f..97e5f08db11a57ecc575382eae0411f07ea2be0f 100644 (file)
@@ -3418,7 +3418,7 @@ fWorkingCount = 0;
     else if (job->vcodec & HB_VCODEC_FFMPEG_MASK)
     {
         hb_job_set_encoder_options(job,
-                                   [[queueToApply objectForKey:@"lavcOption"]
+                                   [[queueToApply objectForKey:@"VideoOptionExtra"]
                                     UTF8String]);
     }
 
index 1384a7438acabeb489be5696883cee911fb8d782..86bd7f4fa113dde174997c60d733b3707fa919f7 100644 (file)
@@ -432,7 +432,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
     
     /* Video encoder and advanced options */
     preset[@"VideoEncoder"] = @"H.264 (x264)";
-    preset[@"lavcOption"] = @"";
     preset[@"x264Option"] = @"";
     preset[@"x264UseAdvancedOptions"] = @0;
     preset[@"VideoPreset"] = @"fast";
@@ -547,7 +546,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
     
     /* Video encoder and advanced options */
     preset[@"VideoEncoder"] = @"H.264 (x264)";
-    preset[@"lavcOption"] = @"";
     preset[@"x264Option"] = @"";
     preset[@"x264UseAdvancedOptions"] = @0;
     preset[@"VideoPreset"] = @"medium";
@@ -651,7 +649,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
     
     /* Video encoder and advanced options */
     preset[@"VideoEncoder"] = @"H.264 (x264)";
-    preset[@"lavcOption"] = @"";
     preset[@"x264Option"] = @"";
     preset[@"x264UseAdvancedOptions"] = @0;
     preset[@"VideoPreset"] = @"medium";
@@ -755,7 +752,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
     
     /* Video encoder and advanced options */
     preset[@"VideoEncoder"] = @"H.264 (x264)";
-    preset[@"lavcOption"] = @"";
     preset[@"x264Option"] = @"";
     preset[@"x264UseAdvancedOptions"] = @0;
     preset[@"VideoPreset"] = @"medium";
@@ -859,7 +855,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
     
     /* Video encoder and advanced options */
     preset[@"VideoEncoder"] = @"H.264 (x264)";
-    preset[@"lavcOption"] = @"";
     preset[@"x264Option"] = @"";
     preset[@"x264UseAdvancedOptions"] = @0;
     preset[@"VideoPreset"] = @"medium";
@@ -974,7 +969,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
     
     /* Video encoder and advanced options */
     preset[@"VideoEncoder"] = @"H.264 (x264)";
-    preset[@"lavcOption"] = @"";
     preset[@"x264Option"] = @"";
     preset[@"x264UseAdvancedOptions"] = @0;
     preset[@"VideoPreset"] = @"medium";
@@ -1089,7 +1083,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
     
     /* Video encoder and advanced options */
     preset[@"VideoEncoder"] = @"H.264 (x264)";
-    preset[@"lavcOption"] = @"";
     preset[@"x264Option"] = @"";
     preset[@"x264UseAdvancedOptions"] = @0;
     preset[@"VideoPreset"] = @"medium";
@@ -1204,7 +1197,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
     
     /* Video encoder and advanced options */
     preset[@"VideoEncoder"] = @"H.264 (x264)";
-    preset[@"lavcOption"] = @"";
     preset[@"x264Option"] = @"";
     preset[@"x264UseAdvancedOptions"] = @0;
     preset[@"VideoPreset"] = @"medium";
@@ -1308,7 +1300,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
     
     /* Video encoder and advanced options */
     preset[@"VideoEncoder"] = @"H.264 (x264)";
-    preset[@"lavcOption"] = @"";
     preset[@"x264Option"] = @"";
     preset[@"x264UseAdvancedOptions"] = @0;
     preset[@"VideoPreset"] = @"medium";
@@ -1412,7 +1403,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
     
     /* Video encoder and advanced options */
     preset[@"VideoEncoder"] = @"H.264 (x264)";
-    preset[@"lavcOption"] = @"";
     preset[@"x264Option"] = @"";
     preset[@"x264UseAdvancedOptions"] = @0;
     preset[@"VideoPreset"] = @"medium";
@@ -1516,7 +1506,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
     
     /* Video encoder and advanced options */
     preset[@"VideoEncoder"] = @"H.264 (x264)";
-    preset[@"lavcOption"] = @"";
     preset[@"x264Option"] = @"";
     preset[@"x264UseAdvancedOptions"] = @0;
     preset[@"VideoPreset"] = @"veryfast";
@@ -1620,7 +1609,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
     
     /* Video encoder and advanced options */
     preset[@"VideoEncoder"] = @"H.264 (x264)";
-    preset[@"lavcOption"] = @"";
     preset[@"x264Option"] = @"";
     preset[@"x264UseAdvancedOptions"] = @0;
     preset[@"VideoPreset"] = @"medium";
index 9fedcf9433e51ce87aa5cd9f80580e152ed92347..3635ce2967baa76f5e46c435ab31dc55a38fbc94 100644 (file)
         {
             /* we are using libavcodec */
             NSString *lavcInfo = @"";
-            if (item[@"lavcOption"] &&
-                [item[@"lavcOption"] length])
+            if (item[@"VideoOptionExtra"] &&
+                [item[@"VideoOptionExtra"] length])
             {
-                lavcInfo = [lavcInfo stringByAppendingString: item[@"lavcOption"]];
+                lavcInfo = [lavcInfo stringByAppendingString: item[@"VideoOptionExtra"]];
             }
             else
             {
                 lavcInfo = [lavcInfo stringByAppendingString: @"default settings"];
             }
-            [finalString appendString: @"ffmpeg: " withAttributes:detailBoldAttr];
+            [finalString appendString: @"Encoder Options: " withAttributes:detailBoldAttr];
             [finalString appendString: lavcInfo withAttributes:detailAttr];
             [finalString appendString:@"\n" withAttributes:detailAttr];
         }
index af2c6c0db3171c6397a190c35254dc1f7719a0c0..325145969bee347d9e3cd52fdfdb9f6d017620e1 100644 (file)
@@ -281,8 +281,6 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
     /* video encoder */
     self.codec = [queueToApply[@"JobVideoEncoderVcodec"] intValue];
 
-    self.lavcOptions = queueToApply[@"lavcOption"];
-
     /* advanced x264 options */
     if ([queueToApply[@"x264UseAdvancedOptions"] intValue])
     {
@@ -298,7 +296,7 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
         [fX264UseAdvancedOptionsCheck setState:NSOnState];
         [self updateEncoderOptionsWidgets:nil];
     }
-    else
+    else if (self.codec == HB_VCODEC_X264 || self.codec == HB_VCODEC_X265)
     {
         // we are using the x264 preset system
         [self setPreset:     queueToApply[@"VideoPreset"]];
@@ -312,6 +310,10 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
         [fX264UseAdvancedOptionsCheck setState:NSOffState];
         [self updateEncoderOptionsWidgets:nil];
     }
+    else
+    {
+        self.lavcOptions = queueToApply[@"VideoOptionExtra"];
+    }
 
     /* Lets run through the following functions to get variables set there */
     [self videoEncoderPopUpChanged:nil];
@@ -445,9 +447,11 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
             [self updateEncoderOptionsWidgets:nil];
         }
     }
-
-    // Apply the lavcOption
-    self.lavcOptions = preset[@"lavcOption"];
+    else
+    {
+        // Apply the lavcOption
+        self.lavcOptions = preset[@"VideoOptionExtra"];
+    }
 
     int qualityType = [preset[@"VideoQualityType"] intValue] - 1;
     /* Note since the removal of Target Size encoding, the possible values for VideoQuality type are 0 - 1.
@@ -536,7 +540,7 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
         queueFileJob[@"x264UseAdvancedOptions"] = @1;
         queueFileJob[@"x264Option"] = [self.fAdvancedOptions optionsString];
     }
-    else
+    else if (self.codec == HB_VCODEC_X264 || self.codec == HB_VCODEC_X265)
     {
         // we are using the x264/x265 preset system
         queueFileJob[@"x264UseAdvancedOptions"] = @0;
@@ -546,9 +550,11 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
         queueFileJob[@"VideoProfile"] = [self profile];
         queueFileJob[@"VideoLevel"] = [self level];
     }
-
-    /* FFmpeg (lavc) Option String */
-    queueFileJob[@"lavcOption"] = self.lavcOptions;
+    else
+    {
+        /* FFmpeg (lavc) Option String */
+        queueFileJob[@"VideoOptionExtra"] = self.lavcOptions;
+    }
 
        queueFileJob[@"VideoQualityType"] = @(self.qualityType + 1);
        queueFileJob[@"VideoAvgBitrate"] = [fVidBitrateField stringValue];
@@ -708,7 +714,7 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
         preset[@"x264UseAdvancedOptions"] = @1;
         preset[@"x264Option"] = [self.fAdvancedOptions optionsString];
     }
-    else
+    else if (self.codec == HB_VCODEC_X264 || self.codec == HB_VCODEC_X265)
     {
         /* use the x264 preset system */
         preset[@"x264UseAdvancedOptions"] = @0;
@@ -731,9 +737,11 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
             preset[@"x264Option"] = @"";
         }
     }
-
-    /* FFmpeg (lavc) Option String */
-    preset[@"lavcOption"] = self.lavcOptions;
+    else
+    {
+        /* FFmpeg (lavc) Option String */
+        preset[@"VideoOptionExtra"] = self.lavcOptions;
+    }
 
     /* though there are actually only 0 - 1 types available in the ui we need to map to the old 0 - 2
      * set of indexes from when we had 0 == Target , 1 == Abr and 2 == Constant Quality for presets