native_deviceinfo.h

Overview

PhonePC/2in1TabletTVWearable

Declares the definitions of playback control device information.

File to include: <multimedia/av_session/native_deviceinfo.h>

Library: libohavsession.so

System capability: SystemCapability.Multimedia.AVSession.Core

Since: 23

Related module: OHAVSession

Summary

PhonePC/2in1TabletTVWearable

Structs

PhonePC/2in1TabletTVWearable
Expand
Name typedef Keyword Description
AVSession_OutputDeviceInfo AVSession_OutputDeviceInfo Defines a struct for the target device information.
AVSession_DeviceInfo AVSession_DeviceInfo Defines a struct for the device information. This instance is used to obtain more device information and its detailed properties.

Function Description

PhonePC/2in1TabletTVWearable

OH_DeviceInfo_GetAVCastCategory()

PhonePC/2in1TabletTVWearable
AVSession_ErrCode OH_DeviceInfo_GetAVCastCategory(AVSession_DeviceInfo *deviceInfo, AVSession_AVCastCategory *aVCastCategory)

Description

Obtains the cast category of the target device.

Since: 23

Parameters

Expand
Name Description
AVSession_DeviceInfo *deviceInfo Pointer to the device information instance.
AVSession_AVCastCategory *aVCastCategory Pointer to the aVCastCategory value.

Return value

Expand
Type Description
AVSession_ErrCode

AV_SESSION_ERR_SUCCESS: The function is executed successfully.

AV_SESSION_ERR_INVALID_PARAMETER:

1. The deviceInfo parameter is nullptr.

2. The aVCastCategory parameter is nullptr.

OH_DeviceInfo_GetDeviceId()

PhonePC/2in1TabletTVWearable
AVSession_ErrCode OH_DeviceInfo_GetDeviceId(AVSession_DeviceInfo *deviceInfo, char **deviceId)

Description

Obtains the device ID of the target device.

Since: 23

Parameters

Expand
Name Description
AVSession_DeviceInfo *deviceInfo Pointer to the device information instance.
char **deviceId Double pointer to the device ID.

Return value

Expand
Type Description
AVSession_ErrCode

AV_SESSION_ERR_SUCCESS: The function is executed successfully.

AV_SESSION_ERR_INVALID_PARAMETER:

1. The deviceInfo parameter is nullptr.

2. The deviceId parameter is nullptr.

OH_DeviceInfo_GetDeviceName()

PhonePC/2in1TabletTVWearable
AVSession_ErrCode OH_DeviceInfo_GetDeviceName(AVSession_DeviceInfo *deviceInfo, char **deviceName)

Description

Obtains the name of the target device.

Since: 23

Parameters

Expand
Name Description
AVSession_DeviceInfo *deviceInfo Pointer to the device information instance.
char **deviceName Double pointer to the device name.

Return value

Expand
Type Description
AVSession_ErrCode

AV_SESSION_ERR_SUCCESS: The function is executed successfully.

AV_SESSION_ERR_INVALID_PARAMETER:

1. The deviceInfo parameter is nullptr.

2. The deviceName parameter is nullptr.

OH_DeviceInfo_GetDeviceType()

PhonePC/2in1TabletTVWearable
AVSession_ErrCode OH_DeviceInfo_GetDeviceType(AVSession_DeviceInfo *deviceInfo, AVSession_DeviceType *deviceType)

Description

Obtains the type of the target device.

Since: 23

Parameters

Expand
Name Description
AVSession_DeviceInfo *deviceInfo Pointer to the device information instance.
AVSession_DeviceType *deviceType Double pointer to the device type.

Return value

Expand
Type Description
AVSession_ErrCode

AV_SESSION_ERR_SUCCESS: The function is executed successfully.

AV_SESSION_ERR_INVALID_PARAMETER:

1. The deviceInfo parameter is nullptr.

2. The deviceType parameter is nullptr.

OH_DeviceInfo_GetSupportedProtocols()

PhonePC/2in1TabletTVWearable
AVSession_ErrCode OH_DeviceInfo_GetSupportedProtocols(AVSession_DeviceInfo *deviceInfo, uint32_t *deviceProtocolType)

Description

Obtains the protocols supported by the target device.

Since: 23

Parameters

Expand
Name Description
AVSession_DeviceInfo *deviceInfo Pointer to the device information instance.
uint32_t *deviceProtocolType Pointer to the protocol supported by the device.

Return value

Expand
Type Description
AVSession_ErrCode

AV_SESSION_ERR_SUCCESS: The function is executed successfully.

AV_SESSION_ERR_INVALID_PARAMETER:

1. The deviceInfo parameter is nullptr.

2. The deviceProtocolType parameter is nullptr.

Search
Enter a keyword.