diff options
author | jstebbins <[email protected]> | 2011-03-11 22:40:30 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-03-11 22:40:30 +0000 |
commit | d68cb8a25201663f832307990b2a98cc60d8ab14 (patch) | |
tree | 936279196cd07e6d68b19b6a79de61ec1e6acfbe /macosx | |
parent | 4aaed20c697c1a7e8fe7e039cf1949a320758286 (diff) |
Add parameter parsing and b-frame support to ffmpeg mpeg-4 encoder
The cli will now accept ':' separated parameters using the '-x' option
for ffmpeg mpeg-4. The linux gui has an entry box on the advanced tab
to add options. The option keys and values are the same as what the
ffmpeg command line allows.
Calculation of DTS timestamps was added to encavcodec.c in order to allow
out of order b-frames. The algorithm is similar to what x264 uses.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3839 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.m | 20 | ||||
-rw-r--r-- | macosx/HBPreviewController.m | 6 | ||||
-rw-r--r-- | macosx/InstantHandBrake/ExpressController.m | 4 |
3 files changed, 15 insertions, 15 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index 8d458b065..4bdc32895 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -2625,9 +2625,9 @@ fWorkingCount = 0; * which will determine which subtitles to enable, if any. */ job->pass = -1; - x264opts_tmp = job->x264opts; + x264opts_tmp = job->advanced_opts; - job->x264opts = NULL; + job->advanced_opts = NULL; job->indepth_scan = 1; @@ -2636,7 +2636,7 @@ fWorkingCount = 0; * Add the pre-scan job */ hb_add( fQueueEncodeLibhb, job ); - job->x264opts = x264opts_tmp; + job->advanced_opts = x264opts_tmp; } @@ -2652,8 +2652,8 @@ fWorkingCount = 0; job->pass = 2; - job->x264opts = (char *)calloc(1024, 1); /* Fixme, this just leaks */ - strcpy(job->x264opts, [[queueToApply objectForKey:@"x264Option"] UTF8String]); + job->advanced_opts = (char *)calloc(1024, 1); /* Fixme, this just leaks */ + strcpy(job->advanced_opts, [[queueToApply objectForKey:@"x264Option"] UTF8String]); hb_add( fQueueEncodeLibhb, job ); @@ -3026,9 +3026,9 @@ fWorkingCount = 0; /* Below Sends x264 options to the core library if x264 is selected*/ /* Lets use this as per Nyx, Thanks Nyx!*/ - job->x264opts = (char *)calloc(1024, 1); /* Fixme, this just leaks */ + job->advanced_opts = (char *)calloc(1024, 1); /* Fixme, this just leaks */ /* For previews we ignore the turbo option for the first pass of two since we only use 1 pass */ - strcpy(job->x264opts, [[fAdvancedOptions optionsString] UTF8String]); + strcpy(job->advanced_opts, [[fAdvancedOptions optionsString] UTF8String]); } @@ -3479,7 +3479,7 @@ bool one_burned = FALSE; /* Below Sends x264 options to the core library if x264 is selected*/ /* Lets use this as per Nyx, Thanks Nyx!*/ - job->x264opts = (char *)calloc(1024, 1); /* Fixme, this just leaks */ + job->advanced_opts = (char *)calloc(1024, 1); /* Fixme, this just leaks */ /* Turbo first pass if two pass and Turbo First pass is selected */ if( [[queueToApply objectForKey:@"VideoTwoPass"] intValue] == 1 && [[queueToApply objectForKey:@"VideoTurboTwoPass"] intValue] == 1 ) { @@ -3488,11 +3488,11 @@ bool one_burned = FALSE; /* append the "Turbo" string variable to the existing opts string. Note: the "Turbo" string must be appended, not prepended to work properly*/ NSString *firstPassOptStringCombined = [[queueToApply objectForKey:@"x264Option"] stringByAppendingString:firstPassOptStringTurbo]; - strcpy(job->x264opts, [firstPassOptStringCombined UTF8String]); + strcpy(job->advanced_opts, [firstPassOptStringCombined UTF8String]); } else { - strcpy(job->x264opts, [[queueToApply objectForKey:@"x264Option"] UTF8String]); + strcpy(job->advanced_opts, [[queueToApply objectForKey:@"x264Option"] UTF8String]); } } diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m index a4d8b8455..a674c58b5 100644 --- a/macosx/HBPreviewController.m +++ b/macosx/HBPreviewController.m @@ -893,15 +893,15 @@ * which will determine which subtitles to enable, if any. */ job->pass = -1; - x264opts_tmp = job->x264opts; + x264opts_tmp = job->advanced_opts; - job->x264opts = NULL; + job->advanced_opts = NULL; job->indepth_scan = 1; /* * Add the pre-scan job */ hb_add( fPreviewLibhb, job ); - job->x264opts = x264opts_tmp; + job->advanced_opts = x264opts_tmp; } /* Go ahead and perform the actual encoding preview scan */ job->indepth_scan = 0; diff --git a/macosx/InstantHandBrake/ExpressController.m b/macosx/InstantHandBrake/ExpressController.m index 37ab8b0ec..912df1ffa 100644 --- a/macosx/InstantHandBrake/ExpressController.m +++ b/macosx/InstantHandBrake/ExpressController.m @@ -387,8 +387,8 @@ job->mux = [currentPreset muxer]; job->vcodec = [currentPreset videoCodec]; - job->x264opts = (char *)calloc(1024, 1); /* Fixme, this just leaks */ - strcpy(job->x264opts, [[currentPreset videoCodecOptions] UTF8String]); + job->advanced_opts = (char *)calloc(1024, 1); /* Fixme, this just leaks */ + strcpy(job->advanced_opts, [[currentPreset videoCodecOptions] UTF8String]); job->chapter_markers = 1; job->vquality = -1.0; |