We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All
ReferencesMediaAVSession KitC APIsHeader Filesnative_avqueueitem.h

native_avqueueitem.h

Content overview
Expand

Overview

PhonePC/2in1TabletTVWearable

Declares the definitions of audio and video queue items.

File to include: <multimedia/av_session/native_avqueueitem.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
OH_AVSession_AVQueueItem OH_AVSession_AVQueueItem Defines a struct for the audio and video queue item.
OH_AVSession_AVMediaDescription OH_AVSession_AVMediaDescription Defines a struct for the AVMediaDescription. It is the audio and video media description instance set by the application for the current resource.
OH_AVSession_AVMediaDescriptionBuilder OH_AVSession_AVMediaDescriptionBuilder Defines a struct for the audio and video media description builder. The builder instance is used to create media description information.

Functions

PhonePC/2in1TabletTVWearable
Expand
Name Description
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_Create(OH_AVSession_AVMediaDescriptionBuilder** builder) Creates an OH_AVSession_AVMediaDescriptionBuilder instance. When the instance is no longer used, call OH_AVSession_AVMediaDescriptionBuilder_Destroy to release the builder object.
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_Destroy(OH_AVSession_AVMediaDescriptionBuilder* builder) Destroys a builder.
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetAssetId(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* assetId) Sets the current asset ID of the media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetTitle(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* title) Sets the title of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetSubTitle(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* subtitle) Sets the subtitle of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetArtist(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* artist) Sets the artist information of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetAlbumCoverUri(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* albumCoverUri) Sets the media image URL of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetMediaType(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* mediaType) Sets the media type of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetLyricContent(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* lyricContent) Sets the lyrics content of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetDuration(OH_AVSession_AVMediaDescriptionBuilder* builder, const int32_t duration) Sets the duration of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetMediaUri(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* mediaUri) Sets the media URI of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetStartPosition(OH_AVSession_AVMediaDescriptionBuilder* builder, const int32_t startPosition) Sets the start position of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetMediaSize(OH_AVSession_AVMediaDescriptionBuilder* builder, const int32_t mediaSize) Sets the size of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetAlbumTitle(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* albumTitle) Sets the album title of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetAppName(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* appName) Sets the name of the application that provides the media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescription_GetAssetId(OH_AVSession_AVMediaDescription* description, char** assetId) Obtains the current asset ID of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescription_GetTitle(OH_AVSession_AVMediaDescription* description, char** title) Obtains the title of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescription_GetSubtitle(OH_AVSession_AVMediaDescription* description, char** subtitle) Obtains the subtitle of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescription_GetArtist(OH_AVSession_AVMediaDescription* description, char** artist) Obtains the artist information of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescription_GetAlbumCoverUri(OH_AVSession_AVMediaDescription* description, char** albumCoverUri) Obtains the media image URL of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescription_GetMediaType(OH_AVSession_AVMediaDescription* description, char** mediaType) Obtains the media type information.
AVQueueItem_Result OH_AVSession_AVMediaDescription_GetLyricContent(OH_AVSession_AVMediaDescription* description, char** lyricContent) Obtains the lyrics content of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescription_GetDuration(OH_AVSession_AVMediaDescription* description, int32_t* duration) Obtains the duration of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescription_GetMediaUri(OH_AVSession_AVMediaDescription* description, char** mediaUri) Obtains the media URI of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescription_GetStartPosition(OH_AVSession_AVMediaDescription* description, int32_t* startPosition) Obtains the start position of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescription_GetMediaSize(OH_AVSession_AVMediaDescription* description, int32_t* mediaSize) Obtains the media size of a resource.
AVQueueItem_Result OH_AVSession_AVMediaDescription_GetAlbumTitle(OH_AVSession_AVMediaDescription* description, char** albumTitle) Obtains the album title of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescription_GetAppName(OH_AVSession_AVMediaDescription* description, char** appName) Obtains the application name of a media resource.
AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_GenerateAVMediaDescription(OH_AVSession_AVMediaDescriptionBuilder* builder, OH_AVSession_AVMediaDescription** avMediaDescription) Creates an avMediaDescription object. When the object is no longer used, call OH_AVSession_AVMediaDescription_Destroy to release the avMediaDescription object.
AVQueueItem_Result OH_AVSession_AVMediaDescription_Destroy(OH_AVSession_AVMediaDescription* avMediaDescription) Releases an avMediaDescription object.

Function Description

PhonePC/2in1TabletTVWearable

OH_AVSession_AVMediaDescriptionBuilder_Create()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_Create(OH_AVSession_AVMediaDescriptionBuilder** builder)

Description

Creates an OH_AVSession_AVMediaDescriptionBuilder instance. When the instance is no longer used, call OH_AVSession_AVMediaDescriptionBuilder_Destroy to release the builder object.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder** builder Double pointer to the builder object of the creation result.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM: The builder parameter is nullptr.

AVQUEUEITEM_ERROR_NO_MEMORY: Insufficient memory.

OH_AVSession_AVMediaDescriptionBuilder_Destroy()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_Destroy(OH_AVSession_AVMediaDescriptionBuilder* builder)

Description

Destroys a builder.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder* builder Pointer to the builder instance of the audio and video media description.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM: The builder parameter is nullptr.

OH_AVSession_AVMediaDescriptionBuilder_SetAssetId()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetAssetId(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* assetId)

Description

Sets the current asset ID of the media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder* builder Pointer to the builder instance of the audio and video media description.
const char* assetId Pointer to the current asset ID of the media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The builder parameter is nullptr.

2. The assetId parameter is nullptr.

OH_AVSession_AVMediaDescriptionBuilder_SetTitle()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetTitle(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* title)

Description

Sets the title of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder* builder Pointer to the builder instance of the audio and video media description.
const char* title Pointer to the title of the media asset.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The builder parameter is nullptr.

2. The title parameter is nullptr.

OH_AVSession_AVMediaDescriptionBuilder_SetSubTitle()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetSubTitle(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* subtitle)

Description

Sets the subtitle of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder* builder Pointer to the builder instance of the audio and video media description.
const char* subtitle Pointer to the subtitle of a media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The builder parameter is nullptr.

2. The subtitle parameter is nullptr.

OH_AVSession_AVMediaDescriptionBuilder_SetArtist()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetArtist(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* artist)

Description

Sets the artist information of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder* builder Pointer to the builder instance of the audio and video media description.
const char* artist Pointer to the artist information of the media asset.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The builder parameter is nullptr.

2. The artist parameter is nullptr.

OH_AVSession_AVMediaDescriptionBuilder_SetAlbumCoverUri()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetAlbumCoverUri(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* albumCoverUri)

Description

Sets the media image URL of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder* builder Pointer to the builder instance of the audio and video media description.
const char* albumCoverUri Pointer to the image URL of the resource displayed in the media center.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The builder parameter is nullptr.

2. The albumCoverUri parameter is nullptr.

OH_AVSession_AVMediaDescriptionBuilder_SetMediaType()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetMediaType(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* mediaType)

Description

Sets the media type of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder* builder Pointer to the builder instance of the audio and video media description.
const char* mediaType Pointer to the media type of a media resource. For example, VIDEO or AUDIO.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The builder parameter is nullptr.

2. The mediaType parameter is nullptr.

OH_AVSession_AVMediaDescriptionBuilder_SetLyricContent()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetLyricContent(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* lyricContent)

Description

Sets the lyrics content of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder* builder Pointer to the builder instance of the audio and video media description.
const char* lyricContent Pointer to the lyrics content of a media resource. The format is Lyric Reduced Codec (LRC).

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The builder parameter is nullptr.

2. The lyricContent parameter is nullptr.

OH_AVSession_AVMediaDescriptionBuilder_SetDuration()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetDuration(OH_AVSession_AVMediaDescriptionBuilder* builder, const int32_t duration)

Description

Sets the duration of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder* builder Pointer to the builder instance of the audio and video media description.
const int32_t duration Duration of a media resource. The unit is milliseconds.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The builder parameter is nullptr.

2. The duration parameter is nullptr.

OH_AVSession_AVMediaDescriptionBuilder_SetMediaUri()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetMediaUri(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* mediaUri)

Description

Sets the media URI of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder* builder Pointer to the builder instance of the audio and video media description.
const char* mediaUri Pointer to the URI of the media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The builder parameter is nullptr.

2. The mediaUri parameter is nullptr.

OH_AVSession_AVMediaDescriptionBuilder_SetStartPosition()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetStartPosition(OH_AVSession_AVMediaDescriptionBuilder* builder, const int32_t startPosition)

Description

Sets the start position of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder* builder Pointer to the builder instance of the audio and video media description.
const int32_t startPosition Start position of a media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The builder parameter is nullptr.

2. The startPosition parameter is invalid.

OH_AVSession_AVMediaDescriptionBuilder_SetMediaSize()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetMediaSize(OH_AVSession_AVMediaDescriptionBuilder* builder, const int32_t mediaSize)

Description

Sets the size of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder* builder Pointer to the builder instance of the audio and video media description.
const int32_t mediaSize Size of a media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The builder parameter is nullptr.

2. The mediaSize parameter is invalid.

OH_AVSession_AVMediaDescriptionBuilder_SetAlbumTitle()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetAlbumTitle(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* albumTitle)

Description

Sets the album title of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder* builder Pointer to the builder instance of the audio and video media description.
const char* albumTitle Pointer to the album title of a media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The builder parameter is nullptr.

2. The albumTitle parameter is nullptr.

OH_AVSession_AVMediaDescriptionBuilder_SetAppName()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_SetAppName(OH_AVSession_AVMediaDescriptionBuilder* builder, const char* appName)

Description

Sets the name of the application that provides the media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder* builder Pointer to the builder instance of the audio and video media description.
const char* appName Pointer to the name of the application that provides the media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The builder parameter is nullptr.

2. The appName parameter is nullptr.

OH_AVSession_AVMediaDescription_GetAssetId()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescription_GetAssetId(OH_AVSession_AVMediaDescription* description, char** assetId)

Description

Obtains the current asset ID of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescription* description Pointer to the audio and video media description instance.
char** assetId Double pointer to the current asset ID of the media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The description parameter is nullptr.

2. assetId is nullptr.

OH_AVSession_AVMediaDescription_GetTitle()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescription_GetTitle(OH_AVSession_AVMediaDescription* description, char** title)

Description

Obtains the title of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescription* description Pointer to the audio and video media description instance.
char** title Double pointer to the title of the current media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The description parameter is nullptr.

2. The title parameter is nullptr.

OH_AVSession_AVMediaDescription_GetSubtitle()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescription_GetSubtitle(OH_AVSession_AVMediaDescription* description, char** subtitle)

Description

Obtains the subtitle of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescription* description Pointer to the audio and video media description instance.
char** subtitle Double pointer to the subtitle of the current media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The description parameter is nullptr.

2. The subtitle parameter is nullptr.

OH_AVSession_AVMediaDescription_GetArtist()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescription_GetArtist(OH_AVSession_AVMediaDescription* description, char** artist)

Description

Obtains the artist information of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescription* description Pointer to the audio and video media description instance.
char** artist Double pointer to the artist information of the current media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The description parameter is nullptr.

2. The artist parameter is nullptr.

OH_AVSession_AVMediaDescription_GetAlbumCoverUri()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescription_GetAlbumCoverUri(OH_AVSession_AVMediaDescription* description, char** albumCoverUri)

Description

Obtains the media image URL of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescription* description Pointer to the audio and video media description instance.
char** albumCoverUri Double pointer to the media image URL of the resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The description parameter is nullptr.

2. The albumCoverUri parameter is nullptr.

OH_AVSession_AVMediaDescription_GetMediaType()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescription_GetMediaType(OH_AVSession_AVMediaDescription* description, char** mediaType)

Description

Obtains the media type information.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescription* description Pointer to the audio and video media description instance.
char** mediaType Double pointer to the current media type.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The description parameter is nullptr.

2. The mediaType parameter is nullptr.

OH_AVSession_AVMediaDescription_GetLyricContent()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescription_GetLyricContent(OH_AVSession_AVMediaDescription* description, char** lyricContent)

Description

Obtains the lyrics content of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescription* description Pointer to the audio and video media description instance.
char** lyricContent Double pointer to the current media lyrics content.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The description parameter is nullptr.

2. The lyricContent parameter is nullptr.

OH_AVSession_AVMediaDescription_GetDuration()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescription_GetDuration(OH_AVSession_AVMediaDescription* description, int32_t* duration)

Description

Obtains the duration of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescription* description Pointer to the audio and video media description instance.
int32_t* duration Pointer to the total duration of the current media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The description parameter is nullptr.

2. The duration parameter is nullptr.

OH_AVSession_AVMediaDescription_GetMediaUri()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescription_GetMediaUri(OH_AVSession_AVMediaDescription* description, char** mediaUri)

Description

Obtains the media URI of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescription* description Pointer to the audio and video media description instance.
char** mediaUri Double pointer to the media URI of the media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The description parameter is nullptr.

2. The mediaUri parameter is nullptr.

OH_AVSession_AVMediaDescription_GetStartPosition()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescription_GetStartPosition(OH_AVSession_AVMediaDescription* description, int32_t* startPosition)

Description

Obtains the start position of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescription* description Pointer to the audio and video media description instance.
int32_t* startPosition Pointer to the start position of the media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The description parameter is nullptr.

2. The startPosition parameter is nullptr.

OH_AVSession_AVMediaDescription_GetMediaSize()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescription_GetMediaSize(OH_AVSession_AVMediaDescription* description, int32_t* mediaSize)

Description

Obtains the media size of a resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescription* description Pointer to the audio and video media description instance.
int32_t* mediaSize Pointer to the size of the media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The description parameter is nullptr.

2. The mediaSize parameter is nullptr.

OH_AVSession_AVMediaDescription_GetAlbumTitle()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescription_GetAlbumTitle(OH_AVSession_AVMediaDescription* description, char** albumTitle)

Description

Obtains the album title of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescription* description Pointer to the audio and video media description instance.
char** albumTitle Double pointer to the album title of the current media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The description parameter is nullptr.

2. The albumTitle parameter is nullptr.

OH_AVSession_AVMediaDescription_GetAppName()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescription_GetAppName(OH_AVSession_AVMediaDescription* description, char** appName)

Description

Obtains the application name of a media resource.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescription* description Pointer to the audio and video media description instance.
char** appName Double pointer to the application name of the media resource.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The description parameter is nullptr.

2. The appName parameter is nullptr.

OH_AVSession_AVMediaDescriptionBuilder_GenerateAVMediaDescription()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescriptionBuilder_GenerateAVMediaDescription(OH_AVSession_AVMediaDescriptionBuilder* builder, OH_AVSession_AVMediaDescription** avMediaDescription)

Description

Creates an avMediaDescription object. When the object is no longer used, call OH_AVSession_AVMediaDescription_Destroy to release the avMediaDescription object.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescriptionBuilder* builder Pointer to the builder instance of the audio and video media description.
OH_AVSession_AVMediaDescription** avMediaDescription Double pointer to the avMediaDescription object.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_NO_MEMORY: Insufficient memory.

AVQUEUEITEM_ERROR_INVALID_PARAM:

1. The builder parameter is nullptr.

2. The avMediaDescription parameter is nullptr.

OH_AVSession_AVMediaDescription_Destroy()

PhonePC/2in1TabletTVWearable
Collapse
Word wrap
Dark theme
Copy code
  1. AVQueueItem_Result OH_AVSession_AVMediaDescription_Destroy(OH_AVSession_AVMediaDescription* avMediaDescription)

Description

Releases an avMediaDescription object.

Since: 23

Parameters

Expand
Name Description
OH_AVSession_AVMediaDescription* avMediaDescription Pointer to the avMediaDescription object.

Return value

Expand
Type Description
AVQueueItem_Result

AVQUEUEITEM_SUCCESS: The function is executed successfully.

AVQUEUEITEM_ERROR_INVALID_PARAM: The avMediaDescription parameter is nullptr.

Search in References
Enter a keyword.