/***********************************************************************
* 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
/* 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;
};
hb_fifo_t * hb_fifo_init( int capacity, int thresh );
int hb_fifo_size( hb_fifo_t * );
+int hb_fifo_size_bytes( hb_fifo_t * );
int hb_fifo_is_full( hb_fifo_t * );
float hb_fifo_percent_full( hb_fifo_t * f );
hb_buffer_t * hb_fifo_get( hb_fifo_t * );
/***********************************************************************
* sync.c
**********************************************************************/
-int hb_sync_init( hb_job_t * job );
+hb_work_object_t * hb_sync_init( hb_job_t * job );
/***********************************************************************
* mpegdemux.c
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 ** );
WORK_DECCC608,
WORK_DECVOBSUB,
WORK_DECSRTSUB,
+ WORK_DECUTF8SUB,
+ WORK_DECTX3GSUB,
+ WORK_DECSSASUB,
WORK_ENCVOBSUB,
WORK_RENDER,
WORK_ENCAVCODEC,