uvoice_player.h
浏览该文件的文档.
1 /*
2  * Copyright (C) 2015-2020 Alibaba Group Holding Limited
3  *
4  */
5 
6 #ifndef __UVOICE_PLAYER_H__
7 #define __UVOICE_PLAYER_H__
8 
9 #include "uvoice_types.h"
10 
17 typedef enum {
33 
35 typedef struct {
36  int (*start)(void);
37  int (*stop)(void);
38  int (*pause)(void);
39  int (*resume)(void);
40  int (*complete)(void);
41  int (*stop_async)(void);
42  int (*pause_async)(void);
43  int (*resume_async)(void);
44  int (*set_source)(char *source);
45  int (*clr_source)(void);
46  int (*set_stream)(media_format_t format, int cache_enable, int cache_size);
47  int (*put_stream)(const uint8_t *buffer, int nbytes);
48  int (*clr_stream)(int immediate);
49  int (*play_list)(char **list);
50  int (*set_pcminfo)(int rate, int channels, int bits, int frames);
51  int (*get_duration)(int *duration);
52  int (*get_position)(int *position);
53  int (*set_volume)(int volume);
54  int (*get_volume)(int *volume);
55  int (*volume_range)(int *max, int *min);
56  int (*seek)(int second);
57  int (*playback)(char *source);
58  int (*wait_complete)(void);
59  int (*download)(char *name);
60  int (*download_abort)(void);
61  int (*cache_config)(cache_config_t *config);
62  int (*set_fade)(int out_period, int in_period);
63  int (*set_format)(media_format_t format);
64  int (*set_out_device)(audio_out_device_t device);
65  int (*set_external_pa)(audio_extpa_info_t *info);
66  int (*set_standby)(int msec);
67  int (*eq_enable)(int enable);
68  int (*state_dump)(void);
69  int (*pcmdump_enable)(int enable);
70  int (*get_state)(player_state_t *state);
71  int (*get_delay)(int *delay_ms);
72  int (*get_mediainfo)(media_info_t *info);
73  int (*get_cacheinfo)(int *cache_size);
74  int (*format_support)(media_format_t format);
75  void *priv;
77 
84 
93 
98 #endif /* __UVOICE_PLAYER_H__ */
player_state_t
播放状态
Definition: uvoice_player.h:17
int uvoice_player_release(uvoice_player_t *mplayer)
uvoice_player_t * uvoice_player_create(void)
@ PLAYER_STAT_RESUME
Definition: uvoice_player.h:22
@ PLAYER_STAT_MEDIA_INFO
Definition: uvoice_player.h:26
@ PLAYER_STAT_READY
Definition: uvoice_player.h:19
@ PLAYER_STAT_RUNNING
Definition: uvoice_player.h:20
@ PLAYER_STAT_PAUSED
Definition: uvoice_player.h:21
@ PLAYER_STAT_LIST_PLAY_START
Definition: uvoice_player.h:29
@ PLAYER_STAT_IDLE
Definition: uvoice_player.h:18
@ PLAYER_STAT_LIST_PLAY_STOP
Definition: uvoice_player.h:30
@ PLAYER_STAT_SEEK_CPLT
Definition: uvoice_player.h:25
@ PLAYER_STAT_COMPLETE
Definition: uvoice_player.h:24
@ PLAYER_STAT_ERROR
Definition: uvoice_player.h:31
@ PLAYER_STAT_SOURCE_INVALID
Definition: uvoice_player.h:27
@ PLAYER_STAT_STOP
Definition: uvoice_player.h:23
@ PLAYER_STAT_FORMAT_UNSUPPORT
Definition: uvoice_player.h:28
audio_out_device_t
Definition: uvoice_types.h:39
media_format_t
Definition: uvoice_types.h:22
播放接口
Definition: uvoice_player.h:35