summaryrefslogtreecommitdiffstats
path: root/libhb/internal.h
diff options
context:
space:
mode:
authorvan <[email protected]>2008-11-25 07:55:51 +0000
committervan <[email protected]>2008-11-25 07:55:51 +0000
commit98d6ebb52840ae25250364cdc002a97560d6c3f1 (patch)
treea57f6161cc638bbfa13d03d9a36940ea4256cf34 /libhb/internal.h
parent46d2066439531f530ddff7fa3e4bb7a2b003f704 (diff)
- 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
Diffstat (limited to 'libhb/internal.h')
-rw-r--r--libhb/internal.h21
1 files changed, 21 insertions, 0 deletions
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
**********************************************************************/