diff options
Diffstat (limited to 'libmpcodecs/ve_lavc.c')
-rw-r--r-- | libmpcodecs/ve_lavc.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c index e2ad55d0e0..3062d9ca5d 100644 --- a/libmpcodecs/ve_lavc.c +++ b/libmpcodecs/ve_lavc.c @@ -325,9 +325,9 @@ struct vf_priv_s { #define mux_v (vf->priv->mux) #define lavc_venc_context (vf->priv->context) -static int encode_frame(struct vf_instance_s* vf, AVFrame *pic, double pts); +static int encode_frame(struct vf_instance* vf, AVFrame *pic, double pts); -static int config(struct vf_instance_s* vf, +static int config(struct vf_instance* vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ int size, i; @@ -531,7 +531,7 @@ static int config(struct vf_instance_s* vf, lavc_venc_context->flags = 0; if (lavc_param_mb_decision) { - mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_MPCODECS_HighQualityEncodingSelected); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "[VE_LAVC] High quality encoding selected (non-realtime)!\n"); lavc_venc_context->mb_decision= lavc_param_mb_decision; } @@ -683,7 +683,7 @@ static int config(struct vf_instance_s* vf, /* fixed qscale :p */ if (lavc_param_vqscale >= 0.0) { - mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_MPCODECS_UsingConstantQscale, lavc_param_vqscale); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "[VE_LAVC] Using constant qscale = %f (VBR).\n", lavc_param_vqscale); lavc_venc_context->flags |= CODEC_FLAG_QSCALE; lavc_venc_context->global_quality= vf->priv->pic->quality = (int)(FF_QP2LAMBDA * lavc_param_vqscale + 0.5); @@ -693,7 +693,7 @@ static int config(struct vf_instance_s* vf, avcodec_thread_init(lavc_venc_context, lavc_param_threads); if (avcodec_open(lavc_venc_context, vf->priv->codec) != 0) { - mp_msg(MSGT_MENCODER,MSGL_ERR,MSGTR_CantOpenCodec); + mp_tmsg(MSGT_MENCODER,MSGL_ERR,"Could not open codec.\n"); return 0; } @@ -717,7 +717,7 @@ static int config(struct vf_instance_s* vf, return 1; } -static int control(struct vf_instance_s* vf, int request, void* data){ +static int control(struct vf_instance* vf, int request, void* data){ switch(request){ case VFCTRL_FLUSH_FRAMES: @@ -729,7 +729,7 @@ static int control(struct vf_instance_s* vf, int request, void* data){ } } -static int query_format(struct vf_instance_s* vf, unsigned int fmt){ +static int query_format(struct vf_instance* vf, unsigned int fmt){ switch(fmt){ case IMGFMT_YV12: case IMGFMT_IYUV: @@ -766,7 +766,7 @@ static double psnr(double d){ return -10.0*log(d)/log(10); } -static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ AVFrame *pic= vf->priv->pic; pic->data[0]=mpi->planes[0]; @@ -789,7 +789,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ return encode_frame(vf, pic, pts) >= 0; } -static int encode_frame(struct vf_instance_s* vf, AVFrame *pic, double pts){ +static int encode_frame(struct vf_instance* vf, AVFrame *pic, double pts){ const char pict_type_char[5]= {'?', 'I', 'P', 'B', 'S'}; int out_size; double dts; @@ -894,7 +894,7 @@ static int encode_frame(struct vf_instance_s* vf, AVFrame *pic, double pts){ return out_size; } -static void uninit(struct vf_instance_s* vf){ +static void uninit(struct vf_instance* vf){ if(lavc_param_psnr){ double f= lavc_venc_context->width*lavc_venc_context->height*255.0*255.0; @@ -1042,7 +1042,7 @@ static int vf_open(vf_instance_t *vf, char* args){ vf->priv->codec = (AVCodec *)avcodec_find_encoder_by_name(lavc_param_vcodec); if (!vf->priv->codec) { - mp_msg(MSGT_MENCODER,MSGL_ERR,MSGTR_MissingLAVCcodec, lavc_param_vcodec); + mp_tmsg(MSGT_MENCODER,MSGL_ERR,"Cannot find codec '%s' in libavcodec...\n", lavc_param_vcodec); return 0; } |