harmony 鸿蒙native_avsession.h
native_avsession.h
Overview
The native_avsession.h file declares the AVSession definition, which can be used to set metadata, playback state, and other information.
Library: libohavsession.so
File to include: <multimedia/av_session/native_avsession.h>
System capability: SystemCapability.Multimedia.AVSession.Core
Since: 13
Related module: OHAVSession
Summary
Structs
Name | Description |
---|---|
struct AVSession_PlaybackPosition | Describes the information related to the playback position. |
Types
Name | Description |
---|---|
typedef struct AVSession_PlaybackPosition AVSession_PlaybackPosition | Defines a struct for the information related to the playback position. |
typedef enum AVSession_ControlCommand AVSession_ControlCommand | Defines an enum for the playback control commands. |
typedef AVSessionCallback_Result(* OH_AVSessionCallback_OnCommand) (OH_AVSession *session, AVSession_ControlCommand command, void *userData) | Defines a callback for a common playback control command. |
typedef AVSessionCallback_Result(* OH_AVSessionCallback_OnFastForward) (OH_AVSession *session, uint32_t seekTime, void *userData) | Defines a callback for the fast-forward operation. |
typedef AVSessionCallback_Result(* OH_AVSessionCallback_OnRewind) (OH_AVSession *session, uint32_t seekTime, void *userData) | Defines a callback for the rewind operation. |
typedef AVSessionCallback_Result(* OH_AVSessionCallback_OnSeek) (OH_AVSession *session, uint64_t seekTime, void *userData) | Defines a callback for the seek operation. |
typedef AVSessionCallback_Result(* OH_AVSessionCallback_OnSetLoopMode) (OH_AVSession *session, AVSession_LoopMode curLoopMode, void *userData) | Defines a callback for the operation of setting the loop mode. |
typedef AVSessionCallback_Result(* OH_AVSessionCallback_OnToggleFavorite) (OH_AVSession *session, const char *assetId, void *userData) | Defines a callback for the operation of favoriting a media asset. |
typedef struct OH_AVSession OH_AVSession | Defines a struct for the playback control session object. |
Enums
Name | Description |
---|---|
AVSession_Type { SESSION_TYPE_AUDIO = 0, SESSION_TYPE_VIDEO = 1, SESSION_TYPE_VOICE_CALL = 2, SESSION_TYPE_VIDEO_CALL = 3 } |
Enumerates the session types. |
AVSession_PlaybackState { PLAYBACK_STATE_INITIAL = 0, PLAYBACK_STATE_PREPARING = 1, PLAYBACK_STATE_PLAYING = 2, PLAYBACK_STATE_PAUSED = 3, PLAYBACK_STATE_FAST_FORWARDING = 4, PLAYBACK_STATE_REWINDED = 5, PLAYBACK_STATE_STOPPED = 6, PLAYBACK_STATE_COMPLETED = 7, PLAYBACK_STATE_RELEASED = 8, PLAYBACK_STATE_ERROR = 9, PLAYBACK_STATE_IDLE = 10, PLAYBACK_STATE_BUFFERING = 11, PLAYBACK_STATE_MAX = 12 } |
Enumerates the media playback states. |
AVSession_LoopMode { LOOP_MODE_SEQUENCE = 0, LOOP_MODE_SINGLE = 1, LOOP_MODE_LIST = 2, LOOP_MODE_SHUFFLE = 3, LOOP_MODE_CUSTOM = 4 } |
Enumerates the loop modes of media playback. |
AVSession_ControlCommand { CONTROL_CMD_INVALID = -1, CONTROL_CMD_PLAY = 0, CONTROL_CMD_PAUSE = 1, CONTROL_CMD_STOP = 2, CONTROL_CMD_PLAY_NEXT = 3, CONTROL_CMD_PLAY_PREVIOUS = 4 } |
Enumerates the playback control commands. |
AVSessionCallback_Result { AVSESSION_CALLBACK_RESULT_SUCCESS = 0, AVSESSION_CALLBACK_RESULT_FAILURE = -1 } |
Enumerates the callback execution results. |
Functions
你可能感兴趣的鸿蒙文章
harmony 鸿蒙AVSession_PlaybackPosition
harmony 鸿蒙AVSession Management Error Codes
harmony 鸿蒙@ohos.multimedia.avCastPickerParam (AVCastPicker Parameters)
harmony 鸿蒙@ohos.multimedia.avsession (AVSession Management) (System API)
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦