X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;ds=sidebyside;f=libhb%2Finternal.h;h=135d73fcc328e5b7e818d8fafef9d41ed87b39f4;hb=9972486f44c586225d98967441dcd3f3fd920636;hp=7672c7311471d563a41a7a1dbe86f2fe779ab797;hpb=a71ca004fca2bbd8a8d7bcb65c4928a0b1f65084;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/libhb/internal.h b/libhb/internal.h index 7672c731..135d73fc 100644 --- a/libhb/internal.h +++ b/libhb/internal.h @@ -38,19 +38,36 @@ void hb_set_state( hb_handle_t *, hb_state_t * ); /*********************************************************************** * fifo.c **********************************************************************/ +/* + * Holds a packet of data that is moving through the transcoding process. + * + * May have metadata associated with it via extra fields + * that are conditionally used depending on the type of packet. + */ struct hb_buffer_s { - int size; - int alloc; - uint8_t * data; - int cur; - + int size; // size of this packet + int alloc; // used internally by the packet allocator (hb_buffer_init) + uint8_t * data; // packet data + int cur; // used internally by packet lists (hb_list_t) + + /* + * Corresponds to the order that this packet was read from the demuxer. + * + * It is important that video decoder work-objects pass this value through + * from their input packets to the output packets they generate. Otherwise + * RENDERSUB subtitles (especially VOB subtitles) will break. + * + * Subtitle decoder work-objects that output a renderable subtitle + * format (ex: PICTURESUB) must also be careful to pass the sequence number + * through for the same reason. + */ int64_t sequence; - int id; - int64_t start; - int64_t stop; - int new_chap; + int id; // ID of the track that the packet comes from + int64_t start; // Video and subtitle packets: start time of frame/subtitle + int64_t stop; // Video and subtitle packets: stop time of frame/subtitle + int new_chap; // Video packets: if non-zero, is the index of the chapter whose boundary was crossed #define HB_FRAME_IDR 0x01 #define HB_FRAME_I 0x02 @@ -66,13 +83,20 @@ struct hb_buffer_s /* Holds the output PTS from x264, for use by b-frame offsets in muxmp4.c */ int64_t renderOffset; + // VOB subtitle packets: + // Location and size of the subpicture. int x; int y; int width; int height; + // Video packets (after processing by the hb_sync_video work-object): + // A (copy of a) VOB subtitle packet that needs to be burned into this video packet by the hb_render work-object. + // Subtitles that are simply passed thru are NOT attached to the associated video packets. hb_buffer_t * sub; + // Packets in a list: + // the next packet in the list hb_buffer_t * next; }; @@ -152,7 +176,7 @@ hb_work_object_t * hb_codec_encoder( int ); /*********************************************************************** * sync.c **********************************************************************/ -int hb_sync_init( hb_job_t * job ); +hb_work_object_t * hb_sync_init( hb_job_t * job ); /*********************************************************************** * mpegdemux.c @@ -205,6 +229,7 @@ int hb_dvd_is_break( hb_dvd_t * d ); void hb_dvd_close( hb_dvd_t ** ); int hb_dvd_angle_count( hb_dvd_t * d ); void hb_dvd_set_angle( hb_dvd_t * d, int angle ); +int hb_dvd_main_feature( hb_dvd_t * d, hb_list_t * list_title ); hb_stream_t * hb_stream_open( char * path, hb_title_t *title ); void hb_stream_close( hb_stream_t ** ); @@ -284,6 +309,9 @@ enum WORK_DECCC608, WORK_DECVOBSUB, WORK_DECSRTSUB, + WORK_DECUTF8SUB, + WORK_DECTX3GSUB, + WORK_DECSSASUB, WORK_ENCVOBSUB, WORK_RENDER, WORK_ENCAVCODEC,