Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
77161961
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
77161961
编写于
8月 31, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 31, 2023
浏览文件
操作
浏览文件
下载
差异文件
!23620 cameraFramework ArkTs整改
Merge pull request !23620 from 章超123/master
上级
a7fa2867
e141f94e
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
19 addition
and
19 deletion
+19
-19
zh-cn/application-dev/media/camera-device-input.md
zh-cn/application-dev/media/camera-device-input.md
+2
-2
zh-cn/application-dev/media/camera-metadata.md
zh-cn/application-dev/media/camera-metadata.md
+1
-1
zh-cn/application-dev/media/camera-mode.md
zh-cn/application-dev/media/camera-mode.md
+2
-2
zh-cn/application-dev/media/camera-performance-improvement.md
...n/application-dev/media/camera-performance-improvement.md
+7
-7
zh-cn/application-dev/media/camera-preview.md
zh-cn/application-dev/media/camera-preview.md
+1
-1
zh-cn/application-dev/media/camera-recording-case.md
zh-cn/application-dev/media/camera-recording-case.md
+2
-2
zh-cn/application-dev/media/camera-recording.md
zh-cn/application-dev/media/camera-recording.md
+1
-1
zh-cn/application-dev/media/camera-session-management.md
zh-cn/application-dev/media/camera-session-management.md
+2
-2
zh-cn/application-dev/media/camera-shooting.md
zh-cn/application-dev/media/camera-shooting.md
+1
-1
未找到文件。
zh-cn/application-dev/media/camera-device-input.md
浏览文件 @
77161961
...
...
@@ -10,8 +10,8 @@
```
ts
import
camera
from
'
@ohos.multimedia.camera
'
;
import
type
{
BusinessError
}
from
'
@ohos.base
'
;
import
type
featureAbility
from
'
@ohos.ability.featureAbility
'
;
import
{
BusinessError
}
from
'
@ohos.base
'
;
import
featureAbility
from
'
@ohos.ability.featureAbility
'
;
```
2.
通过getCameraManager()方法,获取cameraManager对象。
...
...
zh-cn/application-dev/media/camera-metadata.md
浏览文件 @
77161961
...
...
@@ -11,7 +11,7 @@ Metadata主要是通过一个TAG(Key),去找对应的Data,用于传递
1.
导入相关接口,导入方法如下。
```
ts
import
camera
from
'
@ohos.multimedia.camera
'
;
import
type
{
BusinessError
}
from
'
@ohos.base
'
;
import
{
BusinessError
}
from
'
@ohos.base
'
;
```
2.
调用CameraOutputCapability类中的supportedMetadataObjectTypes()方法,获取当前设备支持的元数据类型,并通过createMetadataOutput()方法创建元数据输出流。
...
...
zh-cn/application-dev/media/camera-mode.md
浏览文件 @
77161961
...
...
@@ -12,9 +12,9 @@
[
各类Context的获取方式
](
../application-models/application-context-stage.md
)
```
ts
import
camera
from
'
@ohos.multimedia.camera
'
;
import
type
{
BusinessError
}
from
'
@ohos.base
'
;
import
{
BusinessError
}
from
'
@ohos.base
'
;
import
image
from
'
@ohos.multimedia.image
'
;
import
type
featureAbility
from
'
@ohos.ability.featureAbility
'
;
import
featureAbility
from
'
@ohos.ability.featureAbility
'
;
async
function
cameraModeCase
(
context
:
featureAbility
.
Context
,
surfaceId
:
string
):
Promise
<
void
>
{
// 创建CameraManager对象
...
...
zh-cn/application-dev/media/camera-performance-improvement.md
浏览文件 @
77161961
...
...
@@ -35,7 +35,7 @@
```
js
import
camera
from
'
@ohos.multimedia.camera
'
;
import
type
featureAbility
from
'
@ohos.ability.featureAbility
'
;
import
featureAbility
from
'
@ohos.ability.featureAbility
'
;
async
function
preview
(
context
:
featureAbility
.
Context
,
cameraInfo
:
camera
.
CameraDevice
,
previewProfile
:
camera
.
Profile
,
photoProfile
:
camera
.
Profile
,
surfaceId
:
string
):
Promise
<
void
>
{
const
cameraManager
:
camera
.
CameraManager
=
camera
.
getCameraManager
(
context
);
...
...
@@ -85,9 +85,9 @@ async function preview(context: featureAbility.Context, cameraInfo: camera.Camer
[
各类Context的获取方式
](
../application-models/application-context-stage.md
)
```
js
import
camera
from
'
@ohos.multimedia.camera
'
;
import
type
{
BusinessError
}
from
'
@ohos.base
'
;
import
{
BusinessError
}
from
'
@ohos.base
'
;
import
image
from
'
@ohos.multimedia.image
'
;
import
type
featureAbility
from
'
@ohos.ability.featureAbility
'
;
import
featureAbility
from
'
@ohos.ability.featureAbility
'
;
async
function
enableQuickThumbnail
(
context
:
featureAbility
.
Context
,
surfaceId
:
string
,
photoProfile
:
camera
.
Profile
):
Promise
<
void
>
{
let
cameraManager
:
camera
.
CameraManager
=
camera
.
getCameraManager
(
context
);
...
...
@@ -154,8 +154,8 @@ function showOrSavePicture(pixelMap: image.PixelMap): void {
```
js
import
camera
from
'
@ohos.multimedia.camera
'
;
import
type
{
BusinessError
}
from
'
@ohos.base
'
;
import
type
featureAbility
from
'
@ohos.ability.featureAbility
'
;
import
{
BusinessError
}
from
'
@ohos.base
'
;
import
featureAbility
from
'
@ohos.ability.featureAbility
'
;
function
preLaunch
(
context
:
featureAbility
.
Context
):
void
{
let
cameraManager
:
camera
.
CameraManager
=
camera
.
getCameraManager
(
context
);
...
...
@@ -176,8 +176,8 @@ function showOrSavePicture(pixelMap: image.PixelMap): void {
```
js
import
camera
from
'
@ohos.multimedia.camera
'
;
import
type
{
BusinessError
}
from
'
@ohos.base
'
;
import
type
featureAbility
from
'
@ohos.ability.featureAbility
'
;
import
{
BusinessError
}
from
'
@ohos.base
'
;
import
featureAbility
from
'
@ohos.ability.featureAbility
'
;
function
setPreLaunchConfig
(
context
:
featureAbility
.
Context
):
void
{
let
cameraManager
:
camera
.
CameraManager
=
camera
.
getCameraManager
(
context
);
...
...
zh-cn/application-dev/media/camera-preview.md
浏览文件 @
77161961
...
...
@@ -10,7 +10,7 @@
```
ts
import
camera
from
'
@ohos.multimedia.camera
'
;
import
type
{
BusinessError
}
from
'
@ohos.base
'
;
import
{
BusinessError
}
from
'
@ohos.base
'
;
```
2.
创建Surface。
...
...
zh-cn/application-dev/media/camera-recording-case.md
浏览文件 @
77161961
...
...
@@ -11,9 +11,9 @@
[
各类Context的获取方式
](
../application-models/application-context-stage.md
)
```
ts
import
camera
from
'
@ohos.multimedia.camera
'
;
import
type
{
BusinessError
}
from
'
@ohos.base
'
;
import
{
BusinessError
}
from
'
@ohos.base
'
;
import
media
from
'
@ohos.multimedia.media
'
;
import
type
featureAbility
from
'
@ohos.ability.featureAbility
'
;
import
featureAbility
from
'
@ohos.ability.featureAbility
'
;
async
function
videoRecording
(
context
:
featureAbility
.
Context
,
surfaceId
:
string
):
Promise
<
void
>
{
// 创建CameraManager对象
...
...
zh-cn/application-dev/media/camera-recording.md
浏览文件 @
77161961
...
...
@@ -9,7 +9,7 @@
1.
导入media模块。创建拍照输出流的SurfaceId以及拍照输出的数据,都需要用到系统提供的
[
media接口
](
../reference/apis/js-apis-media.md
)
能力,导入media接口的方法如下。
```
ts
import
type
{
BusinessError
}
from
'
@ohos.base
'
;
import
{
BusinessError
}
from
'
@ohos.base
'
;
import
media
from
'
@ohos.multimedia.media
'
;
```
...
...
zh-cn/application-dev/media/camera-session-management.md
浏览文件 @
77161961
...
...
@@ -18,8 +18,8 @@
```
ts
import
camera
from
'
@ohos.multimedia.camera
'
;
import
type
{
BusinessError
}
from
'
@ohos.base
'
;
import
type
featureAbility
from
'
@ohos.ability.featureAbility
'
;
import
{
BusinessError
}
from
'
@ohos.base
'
;
import
featureAbility
from
'
@ohos.ability.featureAbility
'
;
```
2.
调用cameraManager类中的createCaptureSession()方法创建一个会话。
...
...
zh-cn/application-dev/media/camera-shooting.md
浏览文件 @
77161961
...
...
@@ -11,7 +11,7 @@
```
ts
import
image
from
'
@ohos.multimedia.image
'
;
import
camera
from
'
@ohos.multimedia.camera
'
;
import
type
{
BusinessError
}
from
'
@ohos.base
'
;
import
{
BusinessError
}
from
'
@ohos.base
'
;
```
2.
获取SurfaceId。
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录