From 98d6ebb52840ae25250364cdc002a97560d6c3f1 Mon Sep 17 00:00:00 2001 From: van Date: Tue, 25 Nov 2008 07:55:51 +0000 Subject: - add John A. Stebbins' changes to handle TrueHD and DTS-HD multiplexed streams. - give transport streams their own demuxer rather than constructing fake PS packets to use the DVD demuxer. - start re-doing the transport stream code so it does fewer memory to memory copies. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1953 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/internal.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'libhb/internal.h') diff --git a/libhb/internal.h b/libhb/internal.h index 3ae1dad79..cc888b121 100644 --- a/libhb/internal.h +++ b/libhb/internal.h @@ -111,6 +111,22 @@ static inline hb_buffer_t * hb_video_buffer_init( int width, int height ) ( ( height+1 ) >> 1 ) * 2 ); } +// this routine 'moves' data from src to dst by interchanging 'data', +// 'size' & 'alloc' between them and copying the rest of the fields +// from src to dst. +static inline void hb_buffer_swap_copy( hb_buffer_t *src, hb_buffer_t *dst ) +{ + uint8_t *data = dst->data; + int size = dst->size; + int alloc = dst->alloc; + + *dst = *src; + + src->data = data; + src->size = size; + src->alloc = alloc; +} + /*********************************************************************** * Threads: update.c, scan.c, work.c, reader.c, muxcommon.c **********************************************************************/ @@ -135,9 +151,14 @@ typedef struct { int dts_drops; /* number of drops because DTS too far from SCR */ } hb_psdemux_t; +typedef int (*hb_muxer_t)(hb_buffer_t *, hb_list_t *, hb_psdemux_t*); + int hb_demux_ps( hb_buffer_t * ps_buf, hb_list_t * es_list, hb_psdemux_t * ); +int hb_demux_ss( hb_buffer_t * ps_buf, hb_list_t * es_list, hb_psdemux_t * ); int hb_demux_null( hb_buffer_t * ps_buf, hb_list_t * es_list, hb_psdemux_t * ); +extern const hb_muxer_t hb_demux[]; + /*********************************************************************** * dvd.c **********************************************************************/ -- cgit v1.2.3