summaryrefslogtreecommitdiffstats
path: root/libhb/internal.h
diff options
context:
space:
mode:
authordynaflash <[email protected]>2010-05-04 16:56:43 +0000
committerdynaflash <[email protected]>2010-05-04 16:56:43 +0000
commit15aa5c37af71153316adcd7d56dbe7d12ad895c2 (patch)
tree87a38102ec17ffbc9af3329a5641417c5c379474 /libhb/internal.h
parent5a0738fc0c12c7ce73346b8e7c06d67a28fdcbfa (diff)
Universal Text Subtitle Support Initial Implementation
- Patch by davidfstr ... Thanks! - Adds support for reading TEXT subtitle tracks from file inputs - Tested combinations: -- MKV UTF-8 -> MKV UTF-8 (passthru) -- MKV UTF-8 -> MP4 TX3G (upconvert) -- MP4 TX3G -> MKV UTF-8 (downconvert) -- MP4 TX3G -> MP4 TX3G (downconvert to UTF-8 then upconvert) - Further explained here http://forum.handbrake.fr/viewtopic.php?f=4&t=16099 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3283 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/internal.h')
-rw-r--r--libhb/internal.h31
1 files changed, 23 insertions, 8 deletions
diff --git a/libhb/internal.h b/libhb/internal.h
index dd922dc46..dd217507d 100644
--- a/libhb/internal.h
+++ b/libhb/internal.h
@@ -38,19 +38,25 @@ 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)
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: ???
#define HB_FRAME_IDR 0x01
#define HB_FRAME_I 0x02
@@ -66,13 +72,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;
};
@@ -285,6 +298,8 @@ enum
WORK_DECCC608,
WORK_DECVOBSUB,
WORK_DECSRTSUB,
+ WORK_DECUTF8SUB,
+ WORK_DECTX3GSUB,
WORK_ENCVOBSUB,
WORK_RENDER,
WORK_ENCAVCODEC,