diff options
author | ritsuka <[email protected]> | 2014-12-21 13:08:20 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-12-21 13:08:20 +0000 |
commit | f258fb8da28967d8f2e2ddaf814233058197044f (patch) | |
tree | 409f34bde3375606b68e81fe4bb0d860c816dc00 /macosx/HBVideo.m | |
parent | 6305d5f38aa273b0e8269db050eb1e958b55bd26 (diff) |
MacGui: remove the last usage of title->job.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6636 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBVideo.m')
-rw-r--r-- | macosx/HBVideo.m | 112 |
1 files changed, 0 insertions, 112 deletions
diff --git a/macosx/HBVideo.m b/macosx/HBVideo.m index 1fbe684c2..48c5a8a15 100644 --- a/macosx/HBVideo.m +++ b/macosx/HBVideo.m @@ -700,118 +700,6 @@ queueFileJob[@"VideoTurboTwoPass"] = @(self.turboTwoPass); } -- (void)prepareVideoForJobPreview:(hb_job_t *)job andTitle:(hb_title_t *)title -{ - job->vcodec = self.encoder; - job->fastfirstpass = 0; - - job->chapter_markers = 0; - - if (job->vcodec == HB_VCODEC_X264) - { - /* advanced x264 options */ - NSString *tmpString; - // translate zero-length strings to NULL for libhb - const char *encoder_preset = NULL; - const char *encoder_tune = NULL; - const char *encoder_options = NULL; - const char *encoder_profile = NULL; - const char *encoder_level = NULL; - if (self.advancedOptions) - { - // we are using the advanced panel - if ([(tmpString = self.videoOptionExtra) length]) - { - encoder_options = [tmpString UTF8String]; - } - } - else - { - // we are using the x264 preset system - if ([(tmpString = self.tune) length]) - { - encoder_tune = [tmpString UTF8String]; - } - if ([(tmpString = self.videoOptionExtra) length]) - { - encoder_options = [tmpString UTF8String]; - } - if ([(tmpString = self.profile) length]) - { - encoder_profile = [tmpString UTF8String]; - } - if ([(tmpString = self.level) length]) - { - encoder_level = [tmpString UTF8String]; - } - encoder_preset = [self.preset UTF8String]; - } - hb_job_set_encoder_preset (job, encoder_preset); - hb_job_set_encoder_tune (job, encoder_tune); - hb_job_set_encoder_options(job, encoder_options); - hb_job_set_encoder_profile(job, encoder_profile); - hb_job_set_encoder_level (job, encoder_level); - } - else if (job->vcodec & HB_VCODEC_FFMPEG_MASK) - { - hb_job_set_encoder_options(job, [self.videoOptionExtra UTF8String]); - } - - /* Video settings */ - int fps_mode, fps_num, fps_den; - if (self.frameRate > 0 ) - { - /* a specific framerate has been chosen */ - fps_num = 27000000; - fps_den = (int)self.frameRate; - if (self.frameRateMode == 1) - { - // CFR - fps_mode = 1; - } - else - { - // PFR - fps_mode = 2; - } - } - else - { - /* same as source */ - fps_num = title->vrate.num; - fps_den = title->vrate.den; - if (self.frameRateMode == 1) - { - // CFR - fps_mode = 1; - } - else - { - // VFR - fps_mode = 0; - } - } - - switch (self.qualityType) - { - case 0: - /* ABR */ - job->vquality = -1.0; - job->vbitrate = self.avgBitrate; - break; - case 1: - /* Constant Quality */ - job->vquality = self.quality; - job->vbitrate = 0; - break; - } - - /* Add framerate shaping filter */ - hb_filter_object_t *filter = hb_filter_init(HB_FILTER_VFR); - hb_add_filter(job, filter, [[NSString stringWithFormat:@"%d:%d:%d", - fps_mode, fps_num, fps_den] UTF8String]); -} - @end #pragma mark - Value Trasformers |