Files
CodeRepository/Projects/App_S3313/Src/gdParty/include/RtspApi.h
2026-02-01 22:23:06 +08:00

46 lines
1.7 KiB
C

#pragma once
//#define GDImageDeal_LIBRARY
#if defined(GDImageDeal_LIBRARY)
# define GDIMAGESHARED_EXPORT Q_DECL_EXPORT
#else
# define GDIMAGESHARED_EXPORT Q_DECL_IMPORT
#endif
#ifdef __cplusplus
extern "C"
{
#endif
typedef void* media_handle;
typedef void (*RTSP_IFRAME_CB)(void * user_data);
typedef void (*RTSP_LOG_CB)(char * str);
typedef enum
{
media_type_es = 2,
media_type_ps = 0,
media_type_ts = 1,
media_type_h265 = 3
} media_type;
int GDIMAGESHARED_EXPORT media_rtsp_init_server(int port);
int GDIMAGESHARED_EXPORT media_rtsp_init_server2(int port, RTSP_LOG_CB log_cb);
int GDIMAGESHARED_EXPORT media_rtsp_close_server();
media_handle GDIMAGESHARED_EXPORT media_rtsp_add_service(const char* name, int type, int size);
int GDIMAGESHARED_EXPORT media_rtsp_remove_service(media_handle handle);
int GDIMAGESHARED_EXPORT media_rtsp_add_rtp_destination(media_handle handle, const char* ip, int port);
int GDIMAGESHARED_EXPORT media_rtsp_remove_rtp_destination(media_handle handle, const char* ip, int port);
int GDIMAGESHARED_EXPORT media_rtsp_write_packet(media_handle handle, const unsigned char* buf, int size, int i_frame);
int GDIMAGESHARED_EXPORT media_rtsp_get_free_space(media_handle handle);
int GDIMAGESHARED_EXPORT media_rtsp_auth_enable(int enable);
int GDIMAGESHARED_EXPORT media_rtsp_auth_add_user(const char* name, const char* pwd);
int GDIMAGESHARED_EXPORT media_rtsp_auth_remove_user(const char* name);
int GDIMAGESHARED_EXPORT flash_auth_users();
int GDIMAGESHARED_EXPORT rtsp_set_framerate( media_handle handle, unsigned int frameRate );
int GDIMAGESHARED_EXPORT rtsp_set_iframe_cb(media_handle handle, RTSP_IFRAME_CB cb, void * user_data);
#ifdef __cplusplus
}
#endif