Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e71af2a7
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
大约 1 年 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e71af2a7
编写于
8月 24, 2021
作者:
O
openharmony_ci
提交者:
Gitee
8月 24, 2021
浏览文件
操作
浏览文件
下载
差异文件
!462 L1 轻鸿蒙多媒体子系统 OpenHarmony 3.0.0.3 转测版本测试用例新增接口(7个)代码修改
Merge pull request !462 from apperception/master
上级
682b115b
e56f3a64
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
1732 addition
and
511 deletion
+1732
-511
multimedia_lite/camera_lite_posix/camera_native/BUILD.gn
multimedia_lite/camera_lite_posix/camera_native/BUILD.gn
+5
-0
multimedia_lite/camera_lite_posix/camera_native/src/ActsMediaCameraTest.cpp
...mera_lite_posix/camera_native/src/ActsMediaCameraTest.cpp
+1693
-443
multimedia_lite/camera_lite_posix/camera_native/src/ActsMediaCameraTest.h
...camera_lite_posix/camera_native/src/ActsMediaCameraTest.h
+32
-66
multimedia_lite/media_lite_posix/recorder_native/src/testcase/ActsMediaRecorderNDKTest.cpp
...recorder_native/src/testcase/ActsMediaRecorderNDKTest.cpp
+2
-2
未找到文件。
multimedia_lite/camera_lite_posix/camera_native/BUILD.gn
浏览文件 @
e71af2a7
...
...
@@ -23,6 +23,9 @@ hcpptest_suite("ActsMediaCameraTest") {
include_dirs = [
"src",
"//test/xts/acts/multimedia_lite/utils_posix/common/include",
"//foundation/multimedia/camera_lite/interfaces/kits",
"//foundation/multimedia/media_lite/interfaces/kits/recorder_lite",
"//foundation/multimedia/camera_lite/test/unittest",
]
ldflags = [ "-lstdc++" ]
ldflags += [ "-lm" ]
...
...
@@ -32,6 +35,8 @@ hcpptest_suite("ActsMediaCameraTest") {
ldflags += [ "-Wl,-rpath-link=$ohos_root_path/$root_out_dir" ]
deps = [
"//foundation/graphic/surface:lite_surface",
"//foundation/graphic/ui:lite_ui",
"//foundation/multimedia/camera_lite/frameworks:camera_lite",
"//foundation/multimedia/media_lite/frameworks/recorder_lite:recorder_lite",
]
...
...
multimedia_lite/camera_lite_posix/camera_native/src/ActsMediaCameraTest.cpp
浏览文件 @
e71af2a7
此差异已折叠。
点击以展开。
multimedia_lite/camera_lite_posix/camera_native/src/ActsMediaCameraTest.h
浏览文件 @
e71af2a7
/*
* Copyright (
c)
2021 Huawei Device Co., Ltd.
* Copyright (
C) 2020-
2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
...
...
@@ -13,19 +13,15 @@
* limitations under the License.
*/
#ifndef CAMERA_
DEMO
_TEST_H
#define CAMERA_
DEMO
_TEST_H
#ifndef CAMERA_
LITE
_TEST_H
#define CAMERA_
LITE
_TEST_H
#include "gtest/gtest.h"
#include <fstream>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <sys/time.h>
#include "camera_kit.h"
#include "recorder.h"
namespace
OHOS
{
const
int32_t
RET_OK
=
0
;
const
int32_t
RET_ERR
=
-
1
;
const
int32_t
FRAME_RATE_DEFAULT
=
30
;
const
int32_t
OK
=
0
;
const
int32_t
FAIL
=
-
1
;
...
...
@@ -34,11 +30,29 @@ const int32_t BUFFER_SIZE = 1024;
static
std
::
string
g_filePath
=
"/test_root/multimedia/"
;
std
::
string
g_testPath
;
// CallBack Flag
enum
TestCallBackFlag
{
FLAG0
=
0
,
FLAG1
=
1
,
};
bool
g_onGetCameraAbilityFlag
;
bool
g_onConfigureFlag
;
bool
g_onGetSupportedSizesFlag
;
// CameraDeviceCallBack Flag
bool
g_onCameraAvailableFlag
;
bool
g_onCameraUnavailableFlag
;
// CameraStateCallback
bool
g_onCreatedFlag
;
bool
g_onCreateFailedFlag
;
bool
g_onReleasedFlag
;
bool
g_onConfiguredFlag
;
bool
g_onConfigureFailedFlag
;
// FrameStateCallback
bool
g_onCaptureTriggerAbortedFlag
;
bool
g_onCaptureTriggerCompletedFlag
;
bool
g_onCaptureTriggerStartedFlag
;
bool
g_onGetFrameConfigureType
;
bool
g_onFrameFinishedFlag
;
bool
g_onFrameErrorFlag
;
bool
g_onFrameProgressedFlag
;
bool
g_onFrameStartedFlag
;
bool
g_onRecorderFlag
;
bool
g_onPreviewFlag
;
// VideoSize
enum
TestVideoSize
{
...
...
@@ -46,7 +60,7 @@ enum TestVideoSize {
HEIGHT
=
1080
,
};
class
ActsMediaCamera
Test
:
public
testing
::
Test
{
class
CameraLite
Test
:
public
testing
::
Test
{
public:
// SetUpTestCase: before all testcasee
static
void
SetUpTestCase
(
void
);
...
...
@@ -57,53 +71,5 @@ public:
// TearDown
void
TearDown
(
void
);
};
class
CameraFlag
{
public:
// CameraSetupFlag
static
int32_t
g_onGetCameraAbilityFlag
;
static
int32_t
g_onConfigureFlag
;
static
int32_t
g_onGetSupportedSizesFlag
;
// CameraDeviceCallBack Flag
static
int32_t
g_onCameraAvailableFlag
;
static
int32_t
g_onCameraUnavailableFlag
;
// CameraStateCallback
static
int32_t
g_onCreatedFlag
;
static
int32_t
g_onCreateFailedFlag
;
static
int32_t
g_onReleasedFlag
;
static
int32_t
g_onConfiguredFlag
;
static
int32_t
g_onConfigureFailedFlag
;
// FrameStateCallback
static
int32_t
g_onCaptureTriggerAbortedFlag
;
static
int32_t
g_onCaptureTriggerCompletedFlag
;
static
int32_t
g_onCaptureTriggerStartedFlag
;
static
int32_t
g_onGetFrameConfigureType
;
static
int32_t
g_onFrameFinishedFlag
;
static
int32_t
g_onFrameErrorFlag
;
static
int32_t
g_onFrameProgressedFlag
;
static
int32_t
g_onFrameStartedFlag
;
};
// CameraSetup
int32_t
CameraFlag
::
g_onGetCameraAbilityFlag
=
FLAG0
;
int32_t
CameraFlag
::
g_onConfigureFlag
=
FLAG0
;
int32_t
CameraFlag
::
g_onGetSupportedSizesFlag
=
FLAG0
;
// CameraDeviceCallBack
int32_t
CameraFlag
::
g_onCameraAvailableFlag
=
FLAG0
;
int32_t
CameraFlag
::
g_onCameraUnavailableFlag
=
FLAG0
;
// CameraStateCallback
int32_t
CameraFlag
::
g_onCreatedFlag
=
FLAG0
;
int32_t
CameraFlag
::
g_onCreateFailedFlag
=
FLAG0
;
int32_t
CameraFlag
::
g_onConfiguredFlag
=
FLAG0
;
int32_t
CameraFlag
::
g_onConfigureFailedFlag
=
FLAG0
;
int32_t
CameraFlag
::
g_onReleasedFlag
=
FLAG0
;
// FrameStateCallback
int32_t
CameraFlag
::
g_onCaptureTriggerAbortedFlag
=
FLAG0
;
int32_t
CameraFlag
::
g_onCaptureTriggerCompletedFlag
=
FLAG0
;
int32_t
CameraFlag
::
g_onCaptureTriggerStartedFlag
=
FLAG0
;
int32_t
CameraFlag
::
g_onGetFrameConfigureType
=
FLAG0
;
int32_t
CameraFlag
::
g_onFrameFinishedFlag
=
FLAG0
;
int32_t
CameraFlag
::
g_onFrameErrorFlag
=
FLAG0
;
int32_t
CameraFlag
::
g_onFrameProgressedFlag
=
FLAG0
;
int32_t
CameraFlag
::
g_onFrameStartedFlag
=
FLAG0
;
#endif
\ No newline at end of file
}
// namespace OHOS
#endif // CAMERA_LITE_TEST_H
\ No newline at end of file
multimedia_lite/media_lite_posix/recorder_native/src/testcase/ActsMediaRecorderNDKTest.cpp
浏览文件 @
e71af2a7
...
...
@@ -1006,7 +1006,7 @@ HWTEST_F(ActsMediaRecorderNDKTest, Test_SetMaxFileSize2, Function | MediumTest |
HWTEST_F
(
ActsMediaRecorderNDKTest
,
Test_SetOutputFile1
,
Function
|
MediumTest
|
Level0
)
{
Recorder
*
recorder
=
new
Recorder
();
int32_t
ret
=
recorder
->
SetOutputFile
(
-
1
);
int32_t
ret
=
recorder
->
SetOutputFile
(
1
);
EXPECT_EQ
(
ERR_INVALID_PARAM
,
ret
);
delete
recorder
;
recorder
=
NULL
;
...
...
@@ -1020,7 +1020,7 @@ HWTEST_F(ActsMediaRecorderNDKTest, Test_SetOutputFile1, Function | MediumTest |
HWTEST_F
(
ActsMediaRecorderNDKTest
,
Test_SetNextOutputFile1
,
Function
|
MediumTest
|
Level0
)
{
Recorder
*
recorder
=
new
Recorder
();
int32_t
ret
=
recorder
->
SetNextOutputFile
(
-
1
);
int32_t
ret
=
recorder
->
SetNextOutputFile
(
1
);
EXPECT_EQ
(
ERR_INVALID_PARAM
,
ret
);
delete
recorder
;
recorder
=
NULL
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录