update android project
This commit is contained in:
@@ -59,14 +59,20 @@ bool MP4Encoder::init(int width, int height, int fps, int bitrate) noexcept
|
||||
|
||||
param.uiMaxNalSize = 1500;
|
||||
param.iTargetBitrate *= param.iSpatialLayerNum;
|
||||
m_encoder->InitializeExt(¶m);
|
||||
if (m_encoder->InitializeExt(¶m) != 0)
|
||||
{
|
||||
LOG("Error initializing the encoder");
|
||||
return false;
|
||||
}
|
||||
|
||||
int trace_level = WELS_LOG_ERROR;
|
||||
m_encoder->SetOption(ENCODER_OPTION_TRACE_LEVEL, &trace_level);
|
||||
m_encoder->SetOption(ENCODER_OPTION_TRACE_CALLBACK, encoder_trace_callback);
|
||||
m_encoder->SetOption(ENCODER_OPTION_TRACE_CALLBACK, (void*)encoder_trace_callback);
|
||||
m_encoder->SetOption(ENCODER_OPTION_TRACE_CALLBACK_CONTEXT, this);
|
||||
int videoFormat = videoFormatI420;
|
||||
m_encoder->SetOption(ENCODER_OPTION_DATAFORMAT, &videoFormat);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MP4Encoder::encode(const Image& rgba) noexcept
|
||||
|
||||
Reference in New Issue
Block a user