]> granicus.if.org Git - handbrake/commitdiff
libhb: remove hb_job_reset
authorjstebbins <jstebbins.hb@gmail.com>
Mon, 22 Dec 2014 17:07:28 +0000 (17:07 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Mon, 22 Dec 2014 17:07:28 +0000 (17:07 +0000)
It is no longer needed by the mac ui

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6641 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/common.c
libhb/hb.h

index 0206b99ac0f1ce7e485c480e483b8370d968a03c..4a807fcda4d012054d934c6501dc8b8031cf4b55 100644 (file)
@@ -2969,41 +2969,6 @@ void hb_title_close( hb_title_t ** _t )
     *_t = NULL;
 }
 
-// The mac ui expects certain fields of the job struct to be cleaned up
-// and others to remain untouched.
-// e.g. picture settings like cropping, width, height, should remain untouched.
-//
-// So only initialize job elements that we know get set up by prepareJob and
-// prepareJobForPreview.
-//
-// This should all get resolved in some future mac ui refactoring.
-static void job_reset_for_mac_ui( hb_job_t * job, hb_title_t * title )
-{
-    if ( job == NULL || title == NULL )
-        return;
-
-    job->title = title;
-
-    /* Set defaults settings */
-    job->chapter_start = 1;
-    job->chapter_end   = hb_list_count( title->list_chapter );
-    job->list_chapter = hb_chapter_list_copy( title->list_chapter );
-
-    job->vcodec     = HB_VCODEC_FFMPEG_MPEG4;
-    job->vquality   = -1.0;
-    job->vbitrate   = 1000;
-    job->pass       = 0;
-    job->vrate      = title->vrate;
-
-    job->list_audio = hb_list_init();
-    job->list_subtitle = hb_list_init();
-    job->list_filter = hb_list_init();
-
-    job->list_attachment = hb_attachment_list_copy( title->list_attachment );
-    job->metadata = hb_metadata_copy( title->metadata );
-}
-
-
 static void job_setup(hb_job_t * job, hb_title_t * title)
 {
     if ( job == NULL || title == NULL )
@@ -3188,25 +3153,6 @@ hb_job_t * hb_job_init( hb_title_t * title )
     return job;
 }
 
-/**
- * Clean up the job structure so that is is ready for setting up a new job.
- * Should be called by front-ends after hb_add().
- */
-/**********************************************************************
- * hb_job_reset
- **********************************************************************
- *
- *********************************************************************/
-void hb_job_reset( hb_job_t * job )
-{
-    if ( job )
-    {
-        hb_title_t * title = job->title;
-        job_clean(job);
-        job_reset_for_mac_ui(job, title);
-    }
-}
-
 /**********************************************************************
  * hb_job_close
  **********************************************************************
index dfbcc25a0e94e8b43963f93748f78a5e41f10d44..8706a6c25a5dd22ef534fa841ad8f517266f93bc 100644 (file)
@@ -88,7 +88,6 @@ void          hb_rem( hb_handle_t *, hb_job_t * );
 hb_title_t  * hb_find_title_by_index( hb_handle_t *h, int title_index );
 hb_job_t    * hb_job_init_by_index( hb_handle_t *h, int title_index );
 hb_job_t    * hb_job_init( hb_title_t * title );
-void          hb_job_reset( hb_job_t * job );
 void          hb_job_close( hb_job_t ** job );
 
 void          hb_start( hb_handle_t * );