My Project
zego-screencapture.h
浏览该文件的文档.
1 #ifndef ZEGO_SCREENCAPTURE_H_
2 #define ZEGO_SCREENCAPTURE_H_
3 
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
12 
15 
20 SCREENCAPTURE_API void zego_screencapture_set_log_level(enum ZegoScreenCaptureLogLevel log_level, const char *szLogDir);
21 
24 
27 
31 
35 
42 
46 
50 
58 
66 
72 
78 
86 SCREENCAPTURE_API int zego_screencapture_set_target_rect(ZegoScreenID screen, int left, int top, int width, int height);
87 
95 
99 
103 
109 SCREENCAPTURE_API void zego_screencapture_get_virtual_desktop_rect(int *left, int *top, int *width, int *height);
110 
116 
120 
127 SCREENCAPTURE_API const struct ZegoScreenCaptureWindowItem* zego_screencapture_enum_window_list(int isIncludeIconic, uint32_t *count);
128 
132 
137 
142 
150 
157 
162 
163 #ifdef __cplusplus
164 }
165 #endif
166 
167 #endif
unsigned int ZegoWindowHandle
macOS窗口ID
Definition: zego-screencapture-defines.h:20
SCREENCAPTURE_API const struct ZegoScreenCaptureScreenItem * zego_screencapture_enum_screen_list(uint32_t *count)
同步枚举屏幕列表,包括屏幕名,是否主屏
SCREENCAPTURE_API void zego_screencapture_free_screen_list(const struct ZegoScreenCaptureScreenItem *screen_list)
同步释放枚举到的屏幕列表
SCREENCAPTURE_API void zego_screencapture_stop_capture(void)
停止对目标的采集
SCREENCAPTURE_API void zego_screencapture_reg_captured_window_status_change_notify(zego_screencapture_captured_window_status_change_notify_func notify, void *data)
注册采集窗口状态变化通知
void(* zego_screencapture_captured_window_moved_notify_func)(ZegoWindowHandle handle, int left, int top, int width, int height, void *user_data)
采集目标窗口位置、大小发生改变(zego_screencapture_start_capture 之后生效)
Definition: zego-screencapture-defines.h:105
SCREENCAPTURE_API void zego_screencapture_set_cursor_visible(int visible)
设置是否显示光标
SCREENCAPTURE_API void zego_screencapture_enable_click_animation(int enable)
设置是否显示鼠标点击动画
int width
采集画面宽(像素)
Definition: zego-screencapture-defines.h:135
Definition: zego-screencapture-defines.h:82
SCREENCAPTURE_API void zego_screencapture_free_window_list(const struct ZegoScreenCaptureWindowItem *window_list)
同步释放枚举到的屏幕列表
SCREENCAPTURE_API void zego_screencapture_set_excluded_windows(ZegoWindowHandle *handle_list, int count, bool add)
指定窗口,在采集屏幕时将这些窗口过滤,不在画面中显示
SCREENCAPTURE_API void zego_screencapture_activate_window_when_capturing(int active)
在采集目标为窗口的情况下,初次采集时,设置是否激活窗口提升至前台显示
ZegoScreenCaptureVideoPixelFormat
Definition: zego-screencapture-defines.h:116
SCREENCAPTURE_API void zego_screencapture_set_fps(int fps)
设置采集回调的帧率
SCREENCAPTURE_API void zego_screencapture_reg_capture_error_notify(zego_screencapture_capture_error_notify_func notify, void *data)
注册采集异常通知
SCREENCAPTURE_API const char * zego_screencapture_get_window_screen(ZegoWindowHandle handle)
获取指定窗口所在屏幕(macOS没有实现)
Definition: zego-screencapture-defines.h:25
SCREENCAPTURE_API void zego_screencapture_init(void)
初始化屏幕采集模块,非线程安全,与UnInit配对使用
#define SCREENCAPTURE_API
Definition: zego-screencapture-defines.h:12
Definition: zego-screencapture-defines.h:88
SCREENCAPTURE_API void zego_screencapture_start_capture(void)
开始采集指定的目标
SCREENCAPTURE_API int zego_screencapture_set_target_window_mode(enum ZegoScreenCaptureWindowMode mode)
在采集目标为单个窗口的模式下,设置目标采集模式,比如是全部窗口内容还是窗口客户区内容 ...
void(* zego_screencapture_captured_frame_available_notify_func)(const void *data, uint32_t length, const struct ZegoScreenCaptureVideoCaptureFormat *video_frame_format, uint64_t reference_time, uint32_t reference_time_scale, void *user_data)
采集数据回调
Definition: zego-screencapture-defines.h:150
SCREENCAPTURE_API bool zego_screencapture_get_window_rect(ZegoWindowHandle handle, ZegoRect *rect)
获取指定窗口相对于屏幕坐标
SCREENCAPTURE_API const struct ZegoScreenCaptureWindowItem * zego_screencapture_enum_window_list(int isIncludeIconic, uint32_t *count)
同步枚举窗口列表,包括窗口标题、窗口对应可执行文件名
SCREENCAPTURE_API int zego_screencapture_set_target_window(ZegoWindowHandle handle)
指定采集目标为单个窗口
SCREENCAPTURE_API void zego_screencapture_set_capture_video_pixel_format(enum ZegoScreenCaptureVideoPixelFormat format)
设置视频采集的格式
SCREENCAPTURE_API void zego_screencapture_set_timestamp_offset(uint64_t offset)
设置时间戳偏移
void(* zego_screencapture_captured_window_status_change_notify_func)(enum ZegoScreenCaptureWindowStatus status_code, ZegoWindowHandle handle, struct ZegoRect rect, void *user_data)
采集目标窗口状态发生改变(zego_screencapture_start_capture 之后生效)
Definition: zego-screencapture-defines.h:114
SCREENCAPTURE_API int zego_screencapture_is_capturing(void)
是否正在采集
SCREENCAPTURE_API void zego_screencapture_uninit(void)
反初始化屏幕采集模块,非线程安全,与Init配对使用
void(* zego_screencapture_capture_error_notify_func)(enum ZegoScreenCaptureCaptureError error, void *data)
采集错误回调
Definition: zego-screencapture-defines.h:67
SCREENCAPTURE_API int zego_screencapture_set_target_rect(ZegoScreenID screen, int left, int top, int width, int height)
设置采集目标区域,单位为像素,支持高DPI及多屏坐标,左上角为坐标原点
SCREENCAPTURE_API void zego_screencapture_reg_captured_window_moved_notify(zego_screencapture_captured_window_moved_notify_func notify, void *data)
注册采集窗口移动通知(废弃 参考zego_screencapture_reg_captured_window_status_change_notify) ...
SCREENCAPTURE_API void zego_screencapture_reg_captured_frame_available_notify(zego_screencapture_captured_frame_available_notify_func notify, void *data)
注册采集数据通知
ZegoScreenName ZegoScreenID
macOS屏幕ID
Definition: zego-screencapture-defines.h:22
int height
采集画面高(像素)
Definition: zego-screencapture-defines.h:136
ZegoScreenCaptureLogLevel
Definition: zego-screencapture-defines.h:37
SCREENCAPTURE_API void zego_screencapture_set_log_level(enum ZegoScreenCaptureLogLevel log_level, const char *szLogDir)
设置log等级和路径
ZegoScreenCaptureWindowMode
Definition: zego-screencapture-defines.h:127
SCREENCAPTURE_API int zego_screencapture_set_target_screen(ZegoScreenID screen)
设置采集目标为指定屏幕
SCREENCAPTURE_API void zego_screencapture_get_virtual_desktop_rect(int *left, int *top, int *width, int *height)
获取虚拟桌面尺寸(多个屏幕合并后计算),单位为像素,支持高DPI及多屏坐标,原点坐标为主屏左上角 ...