mirror of
https://github.com/openharmony/third_party_openh264.git
synced 2026-07-22 23:55:28 -04:00
34 lines
907 B
C++
34 lines
907 B
C++
#include <gtest/gtest.h>
|
|
|
|
#include "utils/DataGenerator.h"
|
|
#include "encoder_context.h"
|
|
#include "wels_task_management.h"
|
|
|
|
using namespace WelsEnc;
|
|
|
|
|
|
TEST (EncoderTaskManagement, CWelsTaskManageBase) {
|
|
sWelsEncCtx sCtx;
|
|
SWelsSvcCodingParam sWelsSvcCodingParam;
|
|
|
|
sCtx.pSvcParam = &sWelsSvcCodingParam;
|
|
sWelsSvcCodingParam.iMultipleThreadIdc = 4;
|
|
sCtx.iMaxSliceCount = 35;
|
|
IWelsTaskManage* pTaskManage = IWelsTaskManage::CreateTaskManage (&sCtx, false);
|
|
ASSERT_TRUE (NULL != pTaskManage);
|
|
|
|
delete pTaskManage;
|
|
}
|
|
|
|
TEST (EncoderTaskManagement, CWelsTaskManageParallel) {
|
|
sWelsEncCtx sCtx;
|
|
SWelsSvcCodingParam sWelsSvcCodingParam;
|
|
|
|
sCtx.pSvcParam = &sWelsSvcCodingParam;
|
|
sWelsSvcCodingParam.iMultipleThreadIdc = 4;
|
|
sCtx.iMaxSliceCount = 35;
|
|
IWelsTaskManage* pTaskManage = IWelsTaskManage::CreateTaskManage (&sCtx, true);
|
|
ASSERT_TRUE (NULL != pTaskManage);
|
|
|
|
delete pTaskManage;
|
|
} |