这是我的代码
x264_param_default(&m_X264Param) ;
nRet = x264_param_default_preset(&m_X264Param,"medium","zerolatency") ;
if (nRet)
{
return -1;
}
if (cpMain == Param.nProfile)
{
nRet = x264_param_apply_profile(&m_X264Param,"main") ;
}
else if (cpSimple == Param.nProfile)
{
nRet = x264_param_apply_profile(&m_X264Param,"baseline") ;
}
else if (cpComplex == Param.nProfile)
{
nRet = x264_param_apply_profile(&m_X264Param,"high");
}
if (nRet)
{
return -1;
}
m_X264Param.i_width = Param.nWidth ;
m_X264Param.i_height = Param.nHeight ;
m_X264Param.i_threads = X264_THREADS_AUTO ;
m_X264Param.i_log_level = X264_LOG_NONE ;
m_X264Param.rc.i_bitrate = Param.nBitRate ;
m_X264Param.rc.i_rc_method = X264_RC_ABR ;
m_X264Param.i_csp = X264_CSP_I420 ;
m_pX264Handle = x264_encoder_open(&m_X264Param) ;
但它总是返回 null 这是我第一次使用它我错过了一些关键参数吗?有谁能告诉我答案!非常感谢和最好的问候