[vlc-devel] [PATCH] WIP: add VideoToolbox based decoder

Rémi Denis-Courmont remi at remlab.net
Sun Oct 19 20:24:24 CEST 2014


Le lundi 13 octobre 2014, 22:32:30 Felix Paul Kühne a écrit :
> +    /* check for the codec we can and want to decode */
> +    switch (p_dec->fmt_in.i_codec) {
> +        case VLC_CODEC_H264:
> +            codec = kCMVideoCodecType_H264;
> +
> +            h264_get_profile_level(&p_dec->fmt_in, &i_profile, &i_level,
> NULL);
> +            if (i_profile > 100)
> +                return VLC_EGENERIC;

Checking the profile is necessary for obvious reasons such as output chroma. 
But if you don´t  also check the level, you have no warranties that the 
decoder will be fast enough.

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list