diff options
author | eddyg <[email protected]> | 2009-05-06 04:17:18 +0000 |
---|---|---|
committer | eddyg <[email protected]> | 2009-05-06 04:17:18 +0000 |
commit | 79e3ce78a5d733d559820949e0d43e9769b7dc75 (patch) | |
tree | ef16a4efdde7d8a8356e2165cac54a2e899c53b9 /libhb | |
parent | f79870292926127a3be70c072eca37f653957fc5 (diff) |
Missed file
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2390 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/encvobsub.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/libhb/encvobsub.c b/libhb/encvobsub.c new file mode 100644 index 000000000..e04fcd4fa --- /dev/null +++ b/libhb/encvobsub.c @@ -0,0 +1,61 @@ +/* $Id: envvobsub.c + + This file is part of the HandBrake source code. + Homepage: <http://handbrake.fr/>. + It may be used under the terms of the GNU General Public License. */ + +#include "hb.h" + +struct hb_work_private_s +{ + hb_job_t * job; +}; + +int encsubInit( hb_work_object_t * w, hb_job_t * job ) +{ + hb_work_private_t * pv; + + pv = calloc( 1, sizeof( hb_work_private_t ) ); + w->private_data = pv; + + pv->job = job; + + return 0; +} + +int encsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in, + hb_buffer_t ** buf_out ) +{ + hb_work_private_t * pv = w->private_data; + hb_buffer_t * in = *buf_in; + + if ( in->size <= 0 ) + { + /* EOF on input stream - send it downstream & say that we're done */ + *buf_out = in; + *buf_in = NULL; + return HB_WORK_DONE; + } + + /* + * Don't do anything at present, just pass the buffer on. + */ + *buf_out = in; + *buf_in = NULL; + + return HB_WORK_OK; +} + +void encsubClose( hb_work_object_t * w ) +{ + free( w->private_data ); +} + +hb_work_object_t hb_encsub = +{ + WORK_ENCSUB, + "VOBSUB encoder", + encsubInit, + encsubWork, + encsubClose +}; |