public static Codec getEncoderByName ( String avCodecName ) throws JavaAVException { if ( avCodecName == null || avCodecName . isEmpty ( ) ) throw new NullPointerException ( "Codec name is null or empty." ) ; AVCodec avCodec = avcodec_find_encoder_by_name ( avCodecName ) ; if ( avCodec == null || avCodec . isNull ( ) ) throw new JavaAVException ( "Encoder not found: " + avCodecName ) ; Codec codec = new Codec ( ) ; codec . avCodec = avCodec ; return codec ; }
Create a new encoder with specified codec name .