From 47765593ae5f554e3e6e0e41d32c3d300bf537d3 Mon Sep 17 00:00:00 2001 From: titer Date: Thu, 16 Mar 2006 06:58:39 +0000 Subject: Structural changes, in order to eventually be able to compile HB without certain encoders git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@34 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/declpcm.c | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) (limited to 'libhb/declpcm.c') diff --git a/libhb/declpcm.c b/libhb/declpcm.c index 5b9d5a3b6..f6a703d38 100644 --- a/libhb/declpcm.c +++ b/libhb/declpcm.c @@ -6,15 +6,25 @@ #include "hb.h" -struct hb_work_object_s -{ - HB_WORK_COMMON; - - hb_job_t * job; - hb_audio_t * audio; +int declpcmInit( hb_work_object_t *, hb_job_t * ); +int declpcmWork( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** ); +void declpcmClose( hb_work_object_t * ); + +hb_work_object_t hb_declpcm = +{ + WORK_DECLPCM, + "LPCM decoder", + declpcmInit, + declpcmWork, + declpcmClose }; -static int Work( hb_work_object_t * w, hb_buffer_t ** buf_in, +int declpcmInit( hb_work_object_t * w, hb_job_t * job ) +{ + return 0; +} + +int declpcmWork( hb_work_object_t * w, hb_buffer_t ** buf_in, hb_buffer_t ** buf_out ) { hb_buffer_t * in = *buf_in, * out; @@ -75,24 +85,6 @@ static int Work( hb_work_object_t * w, hb_buffer_t ** buf_in, return HB_WORK_OK; } -static void Close( hb_work_object_t ** _w ) +void declpcmClose( hb_work_object_t * w ) { - hb_work_object_t * w = *_w; - free( w->name ); - free( w ); - *_w = NULL; } - -hb_work_object_t * hb_work_declpcm_init( hb_job_t * job, hb_audio_t * audio ) -{ - hb_work_object_t * w = calloc( sizeof( hb_work_object_t ), 1 ); - w->name = strdup( "LPCM decoder" ); - w->work = Work; - w->close = Close; - - w->job = job; - w->audio = audio; - - return w; -} - -- cgit v1.2.3