Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Multimedia Utils Lite
提交
b7456178
M
Multimedia Utils Lite
项目概览
OpenHarmony
/
Multimedia Utils Lite
10 个月 前同步成功
通知
1
Star
20
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
Multimedia Utils Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b7456178
编写于
9月 17, 2020
作者:
G
Gymee
提交者:
openharmony_ci
9月 17, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
!2 【轻量级 PR】:define error codes with enum instead of const for simplicity and uniformity
Merge pull request !2 from Gymee/N/A
上级
8bfbd9c6
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
30 addition
and
39 deletion
+30
-39
include/media_errors.h
include/media_errors.h
+30
-39
未找到文件。
include/media_errors.h
浏览文件 @
b7456178
...
@@ -41,12 +41,12 @@
...
@@ -41,12 +41,12 @@
namespace
OHOS
{
namespace
OHOS
{
namespace
Media
{
namespace
Media
{
constexpr
int
MODULE_MEDIA
=
1
;
constexpr
int
32_t
MODULE_MEDIA
=
1
;
constexpr
int
SUBSYS_MEDIA
=
30
;
constexpr
int
32_t
SUBSYS_MEDIA
=
30
;
using
ErrCode
=
int32_t
;
using
ErrCode
=
int32_t
;
constexpr
int
SUBSYSTEM_BIT_NUM
=
21
;
constexpr
int
32_t
SUBSYSTEM_BIT_NUM
=
21
;
constexpr
int
MODULE_BIT_NUM
=
16
;
constexpr
int
32_t
MODULE_BIT_NUM
=
16
;
/**
/**
* @brief Generates a start error code with a unique identifier based on specified subsystem and module bit numbers.
* @brief Generates a start error code with a unique identifier based on specified subsystem and module bit numbers.
...
@@ -64,41 +64,32 @@ constexpr ErrCode ErrCodeOffset(unsigned int subsystem, unsigned int module = 0)
...
@@ -64,41 +64,32 @@ constexpr ErrCode ErrCodeOffset(unsigned int subsystem, unsigned int module = 0)
constexpr
int32_t
BASE_MEDIA_ERR_OFFSET
=
ErrCodeOffset
(
SUBSYS_MEDIA
,
MODULE_MEDIA
);
constexpr
int32_t
BASE_MEDIA_ERR_OFFSET
=
ErrCodeOffset
(
SUBSYS_MEDIA
,
MODULE_MEDIA
);
/** Invalid data size that has been read */
enum
MediaErrorCode
:
int32_t
{
const
int32_t
ERR_INVALID_READ
=
-
1
;
/** Invalid data size that has been read */
ERR_INVALID_READ
=
-
1
,
/** Success */
/** Success */
const
int32_t
SUCCESS
=
0
;
SUCCESS
=
0
,
/** Fail */
/** Fail */
ERROR
=
BASE_MEDIA_ERR_OFFSET
,
const
int32_t
ERROR
=
BASE_MEDIA_ERR_OFFSET
;
/** Status error */
ERR_ILLEGAL_STATE
=
BASE_MEDIA_ERR_OFFSET
+
1
,
/** Status error */
/** Invalid parameter */
const
int32_t
ERR_ILLEGAL_STATE
=
BASE_MEDIA_ERR_OFFSET
+
1
;
ERR_INVALID_PARAM
=
BASE_MEDIA_ERR_OFFSET
+
2
,
/** Early media preparation */
/** Invalid parameter */
ERR_EARLY_PREPARE
=
BASE_MEDIA_ERR_OFFSET
+
3
,
const
int32_t
ERR_INVALID_PARAM
=
BASE_MEDIA_ERR_OFFSET
+
2
;
/** No media source */
ERR_SOURCE_NOT_SET
=
BASE_MEDIA_ERR_OFFSET
+
4
,
/** Early media preparation */
/** Invalid operation */
const
int32_t
ERR_EARLY_PREPARE
=
BASE_MEDIA_ERR_OFFSET
+
3
;
ERR_INVALID_OPERATION
=
BASE_MEDIA_ERR_OFFSET
+
5
,
/** No idle channel */
/** No media source */
ERR_NOFREE_CHANNEL
=
BASE_MEDIA_ERR_OFFSET
+
6
,
const
int32_t
ERR_SOURCE_NOT_SET
=
BASE_MEDIA_ERR_OFFSET
+
4
;
/** Buffer reading failed */
ERR_READ_BUFFER
=
BASE_MEDIA_ERR_OFFSET
+
7
,
/** Invalid operation */
/** Device not started */
const
int32_t
ERR_INVALID_OPERATION
=
BASE_MEDIA_ERR_OFFSET
+
5
;
ERR_NOT_STARTED
=
BASE_MEDIA_ERR_OFFSET
+
8
,
/** Unknown error */
/** No idle channel */
ERR_UNKNOWN
=
BASE_MEDIA_ERR_OFFSET
+
200
,
const
int32_t
ERR_NOFREE_CHANNEL
=
BASE_MEDIA_ERR_OFFSET
+
6
;
};
/** Buffer reading failed */
const
int32_t
ERR_READ_BUFFER
=
BASE_MEDIA_ERR_OFFSET
+
7
;
/** Device not started */
const
int32_t
ERR_NOT_STARTED
=
BASE_MEDIA_ERR_OFFSET
+
8
;
/** Unknown error */
const
int32_t
ERR_UNKNOWN
=
BASE_MEDIA_ERR_OFFSET
+
200
;
}
// namespace Media
}
// namespace Media
}
// namespace OHOS
}
// namespace OHOS
#endif // MEDIA_ERRORS_H
#endif // MEDIA_ERRORS_H
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录