From 24d2785ae92568533caed9528944167ca27e8905 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Sat, 19 Mar 2011 20:58:01 +0000 Subject: Add mpeg-2 encoding support to libhb, cli, and lingui git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3853 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/work.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'libhb/work.c') diff --git a/libhb/work.c b/libhb/work.c index c8caff7b8..e8c2a4e1e 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -264,8 +264,12 @@ void hb_display_job_info( hb_job_t * job ) /* Video encoder */ switch( job->vcodec ) { - case HB_VCODEC_FFMPEG: - hb_log( " + encoder: FFmpeg" ); + case HB_VCODEC_FFMPEG_MPEG4: + hb_log( " + encoder: FFmpeg MPEG-4" ); + break; + + case HB_VCODEC_FFMPEG_MPEG2: + hb_log( " + encoder: FFmpeg MPEG-2" ); break; case HB_VCODEC_X264: @@ -452,7 +456,7 @@ static void do_job( hb_job_t * job ) { hb_set_anamorphic_size(job, &job->width, &job->height, &job->anamorphic.par_width, &job->anamorphic.par_height); - if( job->vcodec == HB_VCODEC_FFMPEG ) + if( job->vcodec & HB_VCODEC_FFMPEG_MASK ) { /* Just to make working with ffmpeg even more fun, lavc's MPEG-4 encoder can't handle PAR values >= 255, @@ -722,8 +726,13 @@ static void do_job( hb_job_t * job ) /* Video encoder */ switch( job->vcodec ) { - case HB_VCODEC_FFMPEG: + case HB_VCODEC_FFMPEG_MPEG4: w = hb_get_work( WORK_ENCAVCODEC ); + w->codec_param = CODEC_ID_MPEG4; + break; + case HB_VCODEC_FFMPEG_MPEG2: + w = hb_get_work( WORK_ENCAVCODEC ); + w->codec_param = CODEC_ID_MPEG2VIDEO; break; case HB_VCODEC_X264: w = hb_get_work( WORK_ENCX264 ); @@ -993,7 +1002,7 @@ static void do_job( hb_job_t * job ) w = muxer; } - hb_buffer_t * buf_in, * buf_out; + hb_buffer_t * buf_in, * buf_out = NULL; while ( !*job->die && !*w->done && w->status != HB_WORK_DONE ) { -- cgit v1.2.3