summaryrefslogtreecommitdiffstats
path: root/libhb/declpcm.c
diff options
context:
space:
mode:
authortiter <[email protected]>2006-03-16 06:58:39 +0000
committertiter <[email protected]>2006-03-16 06:58:39 +0000
commit47765593ae5f554e3e6e0e41d32c3d300bf537d3 (patch)
tree94ac3874dde28294fbab23ba101daa8f2892fe5a /libhb/declpcm.c
parenta024a7dcf406dbc621c0765469a61dbc1983e0ed (diff)
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
Diffstat (limited to 'libhb/declpcm.c')
-rw-r--r--libhb/declpcm.c44
1 files changed, 18 insertions, 26 deletions
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;
-}
-