[vlc-commits] vda: add debug messages (refs #8440)
Felix Paul Kühne
git at videolan.org
Thu Apr 25 19:05:52 CEST 2013
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Apr 25 19:05:07 2013 +0200| [5f9a4c4ff36f7d1096182fd1ea72f7856e90fd96] | committer: Felix Paul Kühne
vda: add debug messages (refs #8440)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5f9a4c4ff36f7d1096182fd1ea72f7856e90fd96
---
modules/codec/avcodec/vda.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/modules/codec/avcodec/vda.c b/modules/codec/avcodec/vda.c
index 403ab57..48075aa 100644
--- a/modules/codec/avcodec/vda.c
+++ b/modules/codec/avcodec/vda.c
@@ -169,12 +169,14 @@ static int Setup( vlc_va_t *p_external, void **pp_hw_ctx, vlc_fourcc_t *pi_chrom
case 1 :
p_va->hw_ctx.cv_pix_fmt_type = kCVPixelFormatType_422YpCbCr8;
p_va->i_chroma = VLC_CODEC_UYVY;
+ msg_Dbg(p_va->p_log, "using pixel format 422YpCbCr8");
break;
case 0 :
default :
p_va->hw_ctx.cv_pix_fmt_type = kCVPixelFormatType_420YpCbCr8Planar;
p_va->i_chroma = VLC_CODEC_I420;
CopyInitCache( &p_va->image_cache, i_width );
+ msg_Dbg(p_va->p_log, "using pixel format 420YpCbCr8Planar");
}
ok:
@@ -188,9 +190,11 @@ ok:
p_va->i_extradata );
if( status )
{
- msg_Err( p_va->p_log, "Failed to create the decoder : %i", status );
+ msg_Err( p_va->p_log, "Failed to create decoder: %i", status );
return VLC_EGENERIC;
}
+ else
+ msg_Dbg( p_va->p_log, "VDA decoder created");
return VLC_SUCCESS;
}
@@ -253,6 +257,8 @@ static void Close( vlc_va_t *p_external )
{
vlc_va_vda_t *p_va = vlc_va_vda_Get( p_external );
+ msg_Dbg(p_va->p_log, "destroying VDA decoder");
+
ff_vda_destroy_decoder( &p_va->hw_ctx ) ;
if( p_va->hw_ctx.cv_pix_fmt_type == kCVPixelFormatType_420YpCbCr8Planar )
@@ -263,8 +269,12 @@ static void Close( vlc_va_t *p_external )
static int Open( vlc_va_t *external, int i_codec_id, const es_format_t *fmt )
{
+ msg_Dbg( external, "opening VDA module" );
if( i_codec_id != AV_CODEC_ID_H264 )
+ {
+ msg_Warn( external, "input codec isn't H264, canceling VDA decoding" );
return VLC_EGENERIC;
+ }
if( fmt->p_extra == NULL || fmt->i_extra < 7 )
{
More information about the vlc-commits
mailing list