AliyunPlayer  v5.2.0
Aliyun Player API Reference Manual for Windows Platforms
AVPDef.h
1 //
2 // AVPDef.h
3 //
4 // Created by shiping.csp on 2018/11/16.
5 // Copyright © 2018 com.alibaba.AliyunPlayer. All rights reserved.
6 //
7 
8 #ifndef AVPDef_h
9 #define AVPDef_h
10 
11 #ifdef WIN32
12 #ifdef ALIVC_STATIC
13 #define ALIVC_EXTERN
14 #else
15 /* Windows - set up .dll .so import/export decorators. */
16 #ifdef BUILD_ALIVC_DLL
17 /* Building library. */
18 #define ALIVC_EXTERN __declspec(dllexport)
19 #else
20 #define ALIVC_EXTERN __declspec(dllimport)
21 #endif
22 #endif
23 
24 #ifdef ALIVC_STATIC
25 #define ALIVC_EXTERN
26 #else
27 /* Windows - set up .dll .so import/export decorators. */
28 #ifdef BUILD_ALIVC_PLUGIN_DLL
29 /* Building library. */
30 #define ALIVC_PLUGIN_EXTERN __declspec(dllexport)
31 #else
32 #define ALIVC_PLUGIN_EXTERN __declspec(dllimport)
33 #endif
34 #endif
35 
36 #else
37 #define ALIVC_PLUGIN_EXTERN
38 #define ALIVC_EXTERN __attribute__ ((visibility("default")))
39 //#ifdef __GNUC__
40 //#define ALIVC_EXTERN __attribute__ ((visibility("default")))
41 //#else
42 //#define ALIVC_EXTERN __attribute__ ((visibility("default")))
43 //#endif
44 #endif
45 
46 #include "AVPErrorCode.h"
47 
48 namespace alivc_player {
49 
61  typedef bool (*PlayURLConvertCallback)(const char *srcURL, const char *srcFormat, char **destURL);
62 
63  typedef enum _AVPStatus {
64  AVPStatusIdle = 0,
65  AVPStatusInitialzed,
66  AVPStatusPrepared,
67  AVPStatusStarted,
68  AVPStatusPaused,
69  AVPStatusStopped,
70  AVPStatusCompletion,
71  AVPStatusError
72  } AVPStatus;
73 
74  typedef enum _AVPSeekMode {
75  AVP_SEEKMODE_ACCURATE = 0x01,
76  AVP_SEEKMODE_INACCURATE = 0x10,
77  } AVPSeekMode;
78 
79  typedef enum _AVPScalingMode {
80  AVP_SCALINGMODE_SCALETOFILL,
81  AVP_SCALINGMODE_SCALEASPECTFIT,
82  AVP_SCALINGMODE_SCALEASPECTFILL,
83  } AVPScalingMode;
84 
85  typedef enum AVPRotateMode {
86  AVP_ROTATE_0 = 0,
87  AVP_ROTATE_90 = 90,
88  AVP_ROTATE_180 = 180,
89  AVP_ROTATE_270 = 270
90  } AVPRotateMode;
91 
92  typedef enum _AVPMirrorMode {
93  AVP_MIRRORMODE_NONE,
94  AVP_MIRRORMODE_HORIZONTAL,
95  AVP_MIRRORMODE_VERTICAL,
96  } AVPMirrorMode;
97 
98  typedef enum _AVPEventType {
100  /****@brief Preparation completion event*/
101  AVPEventPrepareDone,
103  /****@brief Autoplay start event*/
104  AVPEventAutoPlayStart,
106  /****@brief First frame display event*/
107  AVPEventFirstRenderedStart,
109  /****@brief Playback completion event*/
110  AVPEventCompletion,
112  /****@brief Buffer start event*/
113  AVPEventLoadingStart,
115  /****@brief Buffer completion event*/
116  AVPEventLoadingEnd,
118  /****@brief Seeking completion event*/
119  AVPEventSeekEnd,
121  /****@brief Loop playback start event*/
122  AVPEventLoopingStart,
123  } AVPEventType;
124 
125  typedef enum _AVPLogLevel {
126  LOG_LEVEL_NONE = 0,
127  LOG_LEVEL_FATAL = 8,
128  LOG_LEVEL_ERROR = 16,
129  LOG_LEVEL_WARNING = 24,
130  LOG_LEVEL_INFO = 32,
131  LOG_LEVEL_DEBUG = 48,
132  LOG_LEVEL_TRACE = 56,
133  } AVPLogLevel;
134 
135  typedef struct _AVPErrorModel {
136  AVPErrorCode code;
137  char *message;
138  char *requestId;
139  char *videoId;
140  } AVPErrorModel;
141 };
142 
143 #endif /* AVPDef_h */
alivc_player::_AVPErrorModel
Definition: AVPDef.h:135