OSDN Git Service

Clean up subtitles at end of encode if not consumed and free fifo.
[handbrake-jp/handbrake-jp-git.git] / libhb / common.h
index 60ba93e..81877d6 100644 (file)
@@ -213,11 +213,9 @@ struct hb_job_s
     /* List of audio settings. */
     hb_list_t     * list_audio;
 
-    /* Subtitle settings:
-         subtitle: index in hb_title_t's subtitles list, starting
-         from 0. -1 means no subtitle */
-    int             subtitle;
-    int             subtitleSmartAdjust;
+    /* Subtitles
+     */
+    hb_list_t     * list_subtitle;
 
     /* Muxer settings
          mux:  output file format
@@ -442,7 +440,11 @@ struct hb_chapter_s
 
 struct hb_subtitle_s
 {
+    int track;
     int  id;
+    enum subtype { PICTURESUB, TEXTSUB } format;
+    enum subsource { VOBSUB, SRTSUB, CCSUB } source;
+    enum subdest { RENDERSUB, PASSTHRUSUB } dest;
     char lang[1024];
     char iso639_2[4];
     uint8_t type; /* Closed Caption, Childrens, Directors etc */
@@ -453,7 +455,8 @@ struct hb_subtitle_s
 #ifdef __LIBHB__
     /* Internal data */
     hb_fifo_t * fifo_in;  /* SPU ES */
-    hb_fifo_t * fifo_raw; /* Decodec SPU */
+    hb_fifo_t * fifo_raw; /* Decoded SPU */
+    hb_fifo_t * fifo_out; /* Correct Timestamps, ready to be muxed */
 #endif
 };
 
@@ -632,7 +635,7 @@ struct hb_work_object_s
     hb_esconfig_t     * config;
 
     /* Pointer hb_audio_t so we have access to the info in the audio worker threads. */
-    hb_audio_t *audio;
+    hb_audio_t        * audio;
 
     hb_work_private_t * private_data;
 
@@ -640,9 +643,10 @@ struct hb_work_object_s
     volatile int      * done;
     int                 status;
     int                 codec_param;
+    hb_title_t        * title;
 
     hb_work_object_t  * next;
-       int                               thread_sleep_interval;
+    int                 thread_sleep_interval;
 #endif
 };