├── Hi3516a_hdmi_rtsp ├── Debug │ ├── Hi3516a_hdmi_rtsp │ ├── hi_sdk_50 │ │ └── include │ │ │ ├── sample_comm_vo.d │ │ │ └── subdir.mk │ ├── makefile │ ├── objects.mk │ ├── sources.mk │ └── src │ │ ├── CAudioAac.d │ │ ├── StartLiveSrc.d │ │ ├── V3516A.d │ │ ├── cJSON.d │ │ ├── g711.d │ │ ├── main.d │ │ └── subdir.mk ├── curl │ ├── include │ │ ├── curl.h │ │ ├── curlver.h │ │ ├── easy.h │ │ ├── mprintf.h │ │ ├── multi.h │ │ ├── stdcheaders.h │ │ ├── system.h │ │ ├── typecheck-gcc.h │ │ └── urlapi.h │ └── lib │ │ ├── libcurl.a │ │ ├── libcurl.la │ │ ├── libcurl.so │ │ ├── libcurl.so.4 │ │ └── libcurl.so.4.5.0 ├── hi_sdk_50 │ ├── include │ │ ├── acodec.h │ │ ├── dictionary.h │ │ ├── hi_ae_comm.h │ │ ├── hi_af_comm.h │ │ ├── hi_awb_comm.h │ │ ├── hi_comm_3a.h │ │ ├── hi_comm_adec.h │ │ ├── hi_comm_aenc.h │ │ ├── hi_comm_ai.h │ │ ├── hi_comm_aio.h │ │ ├── hi_comm_ao.h │ │ ├── hi_comm_fisheye.h │ │ ├── hi_comm_isp.h │ │ ├── hi_comm_ive.h │ │ ├── hi_comm_pciv.h │ │ ├── hi_comm_rc.h │ │ ├── hi_comm_region.h │ │ ├── hi_comm_sns.h │ │ ├── hi_comm_sys.h │ │ ├── hi_comm_vb.h │ │ ├── hi_comm_vda.h │ │ ├── hi_comm_vdec.h │ │ ├── hi_comm_venc.h │ │ ├── hi_comm_vgs.h │ │ ├── hi_comm_vi.h │ │ ├── hi_comm_video.h │ │ ├── hi_comm_vo.h │ │ ├── hi_comm_vpss.h │ │ ├── hi_common.h │ │ ├── hi_debug.h │ │ ├── hi_defines.h │ │ ├── hi_errno.h │ │ ├── hi_i2c.h │ │ ├── hi_io.h │ │ ├── hi_isp_bin.h │ │ ├── hi_isp_debug.h │ │ ├── hi_ive.h │ │ ├── hi_math.h │ │ ├── hi_mipi.h │ │ ├── hi_sns_ctrl.h │ │ ├── hi_spi.h │ │ ├── hi_tde_api.h │ │ ├── hi_tde_errcode.h │ │ ├── hi_tde_type.h │ │ ├── hi_type.h │ │ ├── hi_vreg.h │ │ ├── hifb.h │ │ ├── himedia.h │ │ ├── iniparser.h │ │ ├── list.h │ │ ├── mpi_adec.h │ │ ├── mpi_ae.h │ │ ├── mpi_aenc.h │ │ ├── mpi_af.h │ │ ├── mpi_ai.h │ │ ├── mpi_ao.h │ │ ├── mpi_awb.h │ │ ├── mpi_fisheye.h │ │ ├── mpi_isp.h │ │ ├── mpi_ive.h │ │ ├── mpi_pciv.h │ │ ├── mpi_region.h │ │ ├── mpi_sys.h │ │ ├── mpi_vb.h │ │ ├── mpi_vda.h │ │ ├── mpi_vdec.h │ │ ├── mpi_venc.h │ │ ├── mpi_vgs.h │ │ ├── mpi_vi.h │ │ ├── mpi_vo.h │ │ ├── mpi_vpss.h │ │ ├── sample_comm.h │ │ ├── sample_comm_vo.c │ │ └── strlib.h │ └── lib │ │ ├── libVoiceEngine.a │ │ ├── libdnvqe.a │ │ ├── libive.a │ │ ├── libmpi.a │ │ ├── libtde.a │ │ └── libupvqe.a ├── src │ ├── CAudioAac.cpp │ ├── CAudioAac.h │ ├── CInterfaceUrls.cpp │ ├── CInterfaceUrls.h │ ├── HttpRequestTool.h │ ├── V3516A.cpp │ ├── V3516A.h │ ├── cJSON.cpp │ ├── cJSON.h │ ├── g711.cpp │ ├── g711.h │ ├── main.cpp │ ├── param.ini │ ├── send_searchIp.h │ ├── shared_buffer.hpp │ ├── swap.h │ ├── testJni.c │ ├── udptcp.h │ ├── users.h │ └── v_ini.h └── third_lib │ ├── include │ ├── CChatroomManager.h │ ├── CLiveParam.h │ ├── CLogin.h │ ├── CSrcManager.h │ ├── CUserManager.h │ ├── ChatroomInfo.h │ ├── IChatroomGetListListener.h │ ├── ISrcListener.h │ ├── IStarIMChatroomListener.h │ ├── RtspCaster.h │ ├── StarRtcCore.h │ ├── XHChatroomType.h │ ├── XHLiveManager.h │ ├── aac_encode.h │ ├── chp_comdef.h │ ├── chp_memory.h │ ├── codec.h │ └── fdk-aac │ │ ├── FDK_audio.h │ │ ├── aacdecoder_lib.h │ │ ├── aacenc_lib.h │ │ ├── genericStds.h │ │ └── machine_type.h │ └── lib │ ├── libRtspCaster.so │ ├── libaac_enc.a │ ├── libfdk-aac.a │ ├── libfdk-aac.la │ ├── libfdk-aac.so │ ├── libfdk-aac.so.1 │ ├── libstarRTC.so │ └── libstarRTCCore.so ├── README.md └── starrtc ├── include ├── CChatroomManager.h ├── CLiveParam.h ├── CLogin.h ├── CSrcManager.h ├── CUserManager.h ├── ChatroomInfo.h ├── IChatroomGetListListener.h ├── ISrcListener.h ├── IStarIMChatroomListener.h ├── StarRtcCore.h ├── XHChatroomType.h └── XHLiveManager.h └── lib ├── libstarRTC.so └── libstarRTCCore.so /Hi3516a_hdmi_rtsp/Debug/Hi3516a_hdmi_rtsp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/Debug/Hi3516a_hdmi_rtsp -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/Debug/hi_sdk_50/include/sample_comm_vo.d: -------------------------------------------------------------------------------- 1 | hi_sdk_50/include/sample_comm_vo.d: ../hi_sdk_50/include/sample_comm_vo.c \ 2 | ../hi_sdk_50/include/sample_comm.h ../hi_sdk_50/include/hi_common.h \ 3 | ../hi_sdk_50/include/hi_type.h ../hi_sdk_50/include/hi_math.h \ 4 | ../hi_sdk_50/include/hi_defines.h ../hi_sdk_50/include/hi_comm_video.h \ 5 | ../hi_sdk_50/include/hi_comm_sys.h ../hi_sdk_50/include/hi_errno.h \ 6 | ../hi_sdk_50/include/hi_debug.h ../hi_sdk_50/include/hi_comm_vb.h \ 7 | ../hi_sdk_50/include/hi_comm_isp.h ../hi_sdk_50/include/hi_isp_debug.h \ 8 | ../hi_sdk_50/include/hi_comm_vi.h ../hi_sdk_50/include/hi_comm_vo.h \ 9 | ../hi_sdk_50/include/hi_comm_venc.h ../hi_sdk_50/include/hi_comm_rc.h \ 10 | ../hi_sdk_50/include/hi_comm_vpss.h ../hi_sdk_50/include/hi_comm_vdec.h \ 11 | ../hi_sdk_50/include/hi_comm_vda.h ../hi_sdk_50/include/hi_comm_region.h \ 12 | ../hi_sdk_50/include/hi_comm_adec.h ../hi_sdk_50/include/hi_comm_aio.h \ 13 | ../hi_sdk_50/include/hi_comm_aenc.h ../hi_sdk_50/include/hi_comm_ai.h \ 14 | ../hi_sdk_50/include/hi_comm_ao.h ../hi_sdk_50/include/mpi_sys.h \ 15 | ../hi_sdk_50/include/mpi_vb.h ../hi_sdk_50/include/mpi_vi.h \ 16 | ../hi_sdk_50/include/mpi_vo.h ../hi_sdk_50/include/mpi_venc.h \ 17 | ../hi_sdk_50/include/mpi_vpss.h ../hi_sdk_50/include/mpi_vdec.h \ 18 | ../hi_sdk_50/include/mpi_vda.h ../hi_sdk_50/include/mpi_region.h \ 19 | ../hi_sdk_50/include/mpi_adec.h ../hi_sdk_50/include/mpi_aenc.h \ 20 | ../hi_sdk_50/include/mpi_ai.h ../hi_sdk_50/include/mpi_ao.h \ 21 | ../hi_sdk_50/include/mpi_isp.h ../hi_sdk_50/include/hi_comm_sns.h \ 22 | ../hi_sdk_50/include/hi_comm_3a.h ../hi_sdk_50/include/mpi_ae.h \ 23 | ../hi_sdk_50/include/hi_ae_comm.h ../hi_sdk_50/include/mpi_awb.h \ 24 | ../hi_sdk_50/include/hi_awb_comm.h ../hi_sdk_50/include/mpi_af.h \ 25 | ../hi_sdk_50/include/hi_af_comm.h ../hi_sdk_50/include/hi_vreg.h \ 26 | ../hi_sdk_50/include/hi_sns_ctrl.h 27 | 28 | ../hi_sdk_50/include/sample_comm.h: 29 | 30 | ../hi_sdk_50/include/hi_common.h: 31 | 32 | ../hi_sdk_50/include/hi_type.h: 33 | 34 | ../hi_sdk_50/include/hi_math.h: 35 | 36 | ../hi_sdk_50/include/hi_defines.h: 37 | 38 | ../hi_sdk_50/include/hi_comm_video.h: 39 | 40 | ../hi_sdk_50/include/hi_comm_sys.h: 41 | 42 | ../hi_sdk_50/include/hi_errno.h: 43 | 44 | ../hi_sdk_50/include/hi_debug.h: 45 | 46 | ../hi_sdk_50/include/hi_comm_vb.h: 47 | 48 | ../hi_sdk_50/include/hi_comm_isp.h: 49 | 50 | ../hi_sdk_50/include/hi_isp_debug.h: 51 | 52 | ../hi_sdk_50/include/hi_comm_vi.h: 53 | 54 | ../hi_sdk_50/include/hi_comm_vo.h: 55 | 56 | ../hi_sdk_50/include/hi_comm_venc.h: 57 | 58 | ../hi_sdk_50/include/hi_comm_rc.h: 59 | 60 | ../hi_sdk_50/include/hi_comm_vpss.h: 61 | 62 | ../hi_sdk_50/include/hi_comm_vdec.h: 63 | 64 | ../hi_sdk_50/include/hi_comm_vda.h: 65 | 66 | ../hi_sdk_50/include/hi_comm_region.h: 67 | 68 | ../hi_sdk_50/include/hi_comm_adec.h: 69 | 70 | ../hi_sdk_50/include/hi_comm_aio.h: 71 | 72 | ../hi_sdk_50/include/hi_comm_aenc.h: 73 | 74 | ../hi_sdk_50/include/hi_comm_ai.h: 75 | 76 | ../hi_sdk_50/include/hi_comm_ao.h: 77 | 78 | ../hi_sdk_50/include/mpi_sys.h: 79 | 80 | ../hi_sdk_50/include/mpi_vb.h: 81 | 82 | ../hi_sdk_50/include/mpi_vi.h: 83 | 84 | ../hi_sdk_50/include/mpi_vo.h: 85 | 86 | ../hi_sdk_50/include/mpi_venc.h: 87 | 88 | ../hi_sdk_50/include/mpi_vpss.h: 89 | 90 | ../hi_sdk_50/include/mpi_vdec.h: 91 | 92 | ../hi_sdk_50/include/mpi_vda.h: 93 | 94 | ../hi_sdk_50/include/mpi_region.h: 95 | 96 | ../hi_sdk_50/include/mpi_adec.h: 97 | 98 | ../hi_sdk_50/include/mpi_aenc.h: 99 | 100 | ../hi_sdk_50/include/mpi_ai.h: 101 | 102 | ../hi_sdk_50/include/mpi_ao.h: 103 | 104 | ../hi_sdk_50/include/mpi_isp.h: 105 | 106 | ../hi_sdk_50/include/hi_comm_sns.h: 107 | 108 | ../hi_sdk_50/include/hi_comm_3a.h: 109 | 110 | ../hi_sdk_50/include/mpi_ae.h: 111 | 112 | ../hi_sdk_50/include/hi_ae_comm.h: 113 | 114 | ../hi_sdk_50/include/mpi_awb.h: 115 | 116 | ../hi_sdk_50/include/hi_awb_comm.h: 117 | 118 | ../hi_sdk_50/include/mpi_af.h: 119 | 120 | ../hi_sdk_50/include/hi_af_comm.h: 121 | 122 | ../hi_sdk_50/include/hi_vreg.h: 123 | 124 | ../hi_sdk_50/include/hi_sns_ctrl.h: 125 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/Debug/hi_sdk_50/include/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../hi_sdk_50/include/sample_comm_vo.c 8 | 9 | OBJS += \ 10 | ./hi_sdk_50/include/sample_comm_vo.o 11 | 12 | C_DEPS += \ 13 | ./hi_sdk_50/include/sample_comm_vo.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | hi_sdk_50/include/%.o: ../hi_sdk_50/include/%.c 18 | @echo 'Building file: $<' 19 | @echo 'Invoking: Cross GCC Compiler' 20 | arm-hisiv300-linux-gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 21 | @echo 'Finished building: $<' 22 | @echo ' ' 23 | 24 | 25 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/Debug/makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | -include ../makefile.init 6 | 7 | RM := rm -rf 8 | 9 | # All of the sources participating in the build are defined here 10 | -include sources.mk 11 | -include src/subdir.mk 12 | -include hi_sdk_50/include/subdir.mk 13 | -include subdir.mk 14 | -include objects.mk 15 | 16 | ifneq ($(MAKECMDGOALS),clean) 17 | ifneq ($(strip $(C++_DEPS)),) 18 | -include $(C++_DEPS) 19 | endif 20 | ifneq ($(strip $(C_DEPS)),) 21 | -include $(C_DEPS) 22 | endif 23 | ifneq ($(strip $(CC_DEPS)),) 24 | -include $(CC_DEPS) 25 | endif 26 | ifneq ($(strip $(CPP_DEPS)),) 27 | -include $(CPP_DEPS) 28 | endif 29 | ifneq ($(strip $(CXX_DEPS)),) 30 | -include $(CXX_DEPS) 31 | endif 32 | ifneq ($(strip $(C_UPPER_DEPS)),) 33 | -include $(C_UPPER_DEPS) 34 | endif 35 | endif 36 | 37 | -include ../makefile.defs 38 | 39 | # Add inputs and outputs from these tool invocations to the build variables 40 | 41 | # All Target 42 | all: Hi3516a_hdmi_rtsp 43 | 44 | starrtc_so=/root/starrtc_libs/jni 45 | ffmpeg_libs=/root/ffmpeg-build 46 | # Tool invocations 47 | Hi3516a_hdmi_rtsp: $(OBJS) $(USER_OBJS) 48 | @echo 'Building target: $@' 49 | @echo 'Invoking: Cross G++ Linker' 50 | arm-hisiv300-linux-g++ -L"../third_lib/lib" -L"../hi_sdk_50/lib" -L"$(ffmpeg_libs)/lib" -L"$(starrtc_so)/" -o "Hi3516a_hdmi_rtsp" $(OBJS) $(USER_OBJS) $(LIBS) 51 | @echo 'Finished building target: $@' 52 | @echo ' ' 53 | $(MAKE) --no-print-directory post-build 54 | 55 | # Other Targets 56 | clean: 57 | -$(RM) $(C++_DEPS)$(OBJS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS) Hi3516a_hdmi_rtsp 58 | -@echo ' ' 59 | 60 | post-build: 61 | -cp Hi3516a_hdmi_rtsp /opt/nginx/html 62 | -@echo ' ' 63 | 64 | .PHONY: all clean dependents 65 | .SECONDARY: post-build 66 | 67 | -include ../makefile.targets 68 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/Debug/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | #LIBS := -lmpi -ldnvqe -ldl -lpthread -lRtspCaster -lupvqe -lfdk-aac -lVoiceEngine -lstarRTC -lm -lz -lc -lm -ldl -lgcc 8 | LIBS := -lmpi -ldnvqe -ldl -lpthread -lRtspCaster -lupvqe -lfdk-aac -lVoiceEngine -lstarRTC -lstarRTCCore -lm -lz -lm -ldl -lcurl 9 | 10 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/Debug/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | O_SRCS := 6 | CPP_SRCS := 7 | C_UPPER_SRCS := 8 | C_SRCS := 9 | S_UPPER_SRCS := 10 | OBJ_SRCS := 11 | ASM_SRCS := 12 | CXX_SRCS := 13 | C++_SRCS := 14 | CC_SRCS := 15 | C++_DEPS := 16 | OBJS := 17 | C_DEPS := 18 | CC_DEPS := 19 | CPP_DEPS := 20 | EXECUTABLES := 21 | CXX_DEPS := 22 | C_UPPER_DEPS := 23 | 24 | # Every subdirectory with source files must be described here 25 | SUBDIRS := \ 26 | src \ 27 | hi_sdk_50/include \ 28 | 29 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/Debug/src/CAudioAac.d: -------------------------------------------------------------------------------- 1 | src/CAudioAac.d: ../src/CAudioAac.cpp ../src/CAudioAac.h \ 2 | ../third_lib/include/fdk-aac/aacdecoder_lib.h \ 3 | ../third_lib/include/fdk-aac/machine_type.h \ 4 | ../third_lib/include/fdk-aac/FDK_audio.h \ 5 | ../third_lib/include/fdk-aac/genericStds.h \ 6 | ../third_lib/include/fdk-aac/aacenc_lib.h \ 7 | ../third_lib/include/fdk-aac/FDK_audio.h \ 8 | ../third_lib/include/fdk-aac/genericStds.h \ 9 | ../third_lib/include/fdk-aac/machine_type.h 10 | 11 | ../src/CAudioAac.h: 12 | 13 | ../third_lib/include/fdk-aac/aacdecoder_lib.h: 14 | 15 | ../third_lib/include/fdk-aac/machine_type.h: 16 | 17 | ../third_lib/include/fdk-aac/FDK_audio.h: 18 | 19 | ../third_lib/include/fdk-aac/genericStds.h: 20 | 21 | ../third_lib/include/fdk-aac/aacenc_lib.h: 22 | 23 | ../third_lib/include/fdk-aac/FDK_audio.h: 24 | 25 | ../third_lib/include/fdk-aac/genericStds.h: 26 | 27 | ../third_lib/include/fdk-aac/machine_type.h: 28 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/Debug/src/StartLiveSrc.d: -------------------------------------------------------------------------------- 1 | src/StartLiveSrc.d: ../src/StartLiveSrc.cpp ../src/StartLiveSrc.h \ 2 | ../src/v_ini.h ../src/cJSON.h \ 3 | /home/ray/work/jni/liveVideo/interface_starLiveVideo.h \ 4 | /home/ray/work/jni/platform.h /home/ray/work/jni/autils.h \ 5 | /home/ray/work/jni/platform.h /home/ray/work/jni/star_log.h \ 6 | /home/ray/work/jni/star_log.h /home/ray/work/jni/liveVideo/starANR.h \ 7 | /home/ray/work/jni/liveVideo/starDrawoff.h \ 8 | /home/ray/work/jni/liveVideo/ikcp.h \ 9 | /home/ray/work/jni/liveVideo/InterArrival.h \ 10 | /home/ray/work/jni/liveVideo/AArray.h \ 11 | /home/ray/work/jni/liveVideo/TrendlineEstimator.h \ 12 | /home/ray/work/jni/liveVideo/AimdRateControl.h ../src/HttpRequestTool.h \ 13 | /home/ray/work/cross_compile/usr/include/curl/curl.h \ 14 | /home/ray/work/cross_compile/usr/include/curl/curlver.h \ 15 | /home/ray/work/cross_compile/usr/include/curl/system.h \ 16 | /home/ray/work/cross_compile/usr/include/curl/easy.h \ 17 | /home/ray/work/cross_compile/usr/include/curl/multi.h \ 18 | /home/ray/work/cross_compile/usr/include/curl/curl.h \ 19 | /home/ray/work/cross_compile/usr/include/curl/urlapi.h 20 | 21 | ../src/StartLiveSrc.h: 22 | 23 | ../src/v_ini.h: 24 | 25 | ../src/cJSON.h: 26 | 27 | /home/ray/work/jni/liveVideo/interface_starLiveVideo.h: 28 | 29 | /home/ray/work/jni/platform.h: 30 | 31 | /home/ray/work/jni/autils.h: 32 | 33 | /home/ray/work/jni/platform.h: 34 | 35 | /home/ray/work/jni/star_log.h: 36 | 37 | /home/ray/work/jni/star_log.h: 38 | 39 | /home/ray/work/jni/liveVideo/starANR.h: 40 | 41 | /home/ray/work/jni/liveVideo/starDrawoff.h: 42 | 43 | /home/ray/work/jni/liveVideo/ikcp.h: 44 | 45 | /home/ray/work/jni/liveVideo/InterArrival.h: 46 | 47 | /home/ray/work/jni/liveVideo/AArray.h: 48 | 49 | /home/ray/work/jni/liveVideo/TrendlineEstimator.h: 50 | 51 | /home/ray/work/jni/liveVideo/AimdRateControl.h: 52 | 53 | ../src/HttpRequestTool.h: 54 | 55 | /home/ray/work/cross_compile/usr/include/curl/curl.h: 56 | 57 | /home/ray/work/cross_compile/usr/include/curl/curlver.h: 58 | 59 | /home/ray/work/cross_compile/usr/include/curl/system.h: 60 | 61 | /home/ray/work/cross_compile/usr/include/curl/easy.h: 62 | 63 | /home/ray/work/cross_compile/usr/include/curl/multi.h: 64 | 65 | /home/ray/work/cross_compile/usr/include/curl/curl.h: 66 | 67 | /home/ray/work/cross_compile/usr/include/curl/urlapi.h: 68 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/Debug/src/V3516A.d: -------------------------------------------------------------------------------- 1 | src/V3516A.d: ../src/V3516A.cpp ../src/V3516A.h \ 2 | ../hi_sdk_50/include/sample_comm.h ../hi_sdk_50/include/hi_common.h \ 3 | ../hi_sdk_50/include/hi_type.h ../hi_sdk_50/include/hi_math.h \ 4 | ../hi_sdk_50/include/hi_defines.h ../hi_sdk_50/include/hi_comm_video.h \ 5 | ../hi_sdk_50/include/hi_comm_sys.h ../hi_sdk_50/include/hi_errno.h \ 6 | ../hi_sdk_50/include/hi_debug.h ../hi_sdk_50/include/hi_comm_vb.h \ 7 | ../hi_sdk_50/include/hi_comm_isp.h ../hi_sdk_50/include/hi_isp_debug.h \ 8 | ../hi_sdk_50/include/hi_comm_vi.h ../hi_sdk_50/include/hi_comm_vo.h \ 9 | ../hi_sdk_50/include/hi_comm_venc.h ../hi_sdk_50/include/hi_comm_rc.h \ 10 | ../hi_sdk_50/include/hi_comm_vpss.h ../hi_sdk_50/include/hi_comm_vdec.h \ 11 | ../hi_sdk_50/include/hi_comm_vda.h ../hi_sdk_50/include/hi_comm_region.h \ 12 | ../hi_sdk_50/include/hi_comm_adec.h ../hi_sdk_50/include/hi_comm_aio.h \ 13 | ../hi_sdk_50/include/hi_comm_aenc.h ../hi_sdk_50/include/hi_comm_ai.h \ 14 | ../hi_sdk_50/include/hi_comm_ao.h ../hi_sdk_50/include/mpi_sys.h \ 15 | ../hi_sdk_50/include/mpi_vb.h ../hi_sdk_50/include/mpi_vi.h \ 16 | ../hi_sdk_50/include/mpi_vo.h ../hi_sdk_50/include/mpi_venc.h \ 17 | ../hi_sdk_50/include/mpi_vpss.h ../hi_sdk_50/include/mpi_vdec.h \ 18 | ../hi_sdk_50/include/mpi_vda.h ../hi_sdk_50/include/mpi_region.h \ 19 | ../hi_sdk_50/include/mpi_adec.h ../hi_sdk_50/include/mpi_aenc.h \ 20 | ../hi_sdk_50/include/mpi_ai.h ../hi_sdk_50/include/mpi_ao.h \ 21 | ../hi_sdk_50/include/mpi_isp.h ../hi_sdk_50/include/hi_comm_sns.h \ 22 | ../hi_sdk_50/include/hi_comm_3a.h ../hi_sdk_50/include/mpi_ae.h \ 23 | ../hi_sdk_50/include/hi_ae_comm.h ../hi_sdk_50/include/mpi_awb.h \ 24 | ../hi_sdk_50/include/hi_awb_comm.h ../hi_sdk_50/include/mpi_af.h \ 25 | ../hi_sdk_50/include/hi_af_comm.h ../hi_sdk_50/include/hi_vreg.h \ 26 | ../hi_sdk_50/include/hi_sns_ctrl.h ../src/v_ini.h ../src/StartLiveSrc.h \ 27 | ../hi_sdk_50/include/hi_mipi.h ../hi_sdk_50/include/hi_common.h \ 28 | ../src/users.h ../src/udptcp.h ../hi_sdk_50/include/acodec.h \ 29 | ../third_lib/include/RtspCaster.h ../src/g711.h ../src/CAudioAac.h \ 30 | ../third_lib/include/fdk-aac/aacdecoder_lib.h \ 31 | ../third_lib/include/fdk-aac/machine_type.h \ 32 | ../third_lib/include/fdk-aac/FDK_audio.h \ 33 | ../third_lib/include/fdk-aac/genericStds.h \ 34 | ../third_lib/include/fdk-aac/aacenc_lib.h \ 35 | ../third_lib/include/fdk-aac/FDK_audio.h \ 36 | ../third_lib/include/fdk-aac/genericStds.h \ 37 | ../third_lib/include/fdk-aac/machine_type.h 38 | 39 | ../src/V3516A.h: 40 | 41 | ../hi_sdk_50/include/sample_comm.h: 42 | 43 | ../hi_sdk_50/include/hi_common.h: 44 | 45 | ../hi_sdk_50/include/hi_type.h: 46 | 47 | ../hi_sdk_50/include/hi_math.h: 48 | 49 | ../hi_sdk_50/include/hi_defines.h: 50 | 51 | ../hi_sdk_50/include/hi_comm_video.h: 52 | 53 | ../hi_sdk_50/include/hi_comm_sys.h: 54 | 55 | ../hi_sdk_50/include/hi_errno.h: 56 | 57 | ../hi_sdk_50/include/hi_debug.h: 58 | 59 | ../hi_sdk_50/include/hi_comm_vb.h: 60 | 61 | ../hi_sdk_50/include/hi_comm_isp.h: 62 | 63 | ../hi_sdk_50/include/hi_isp_debug.h: 64 | 65 | ../hi_sdk_50/include/hi_comm_vi.h: 66 | 67 | ../hi_sdk_50/include/hi_comm_vo.h: 68 | 69 | ../hi_sdk_50/include/hi_comm_venc.h: 70 | 71 | ../hi_sdk_50/include/hi_comm_rc.h: 72 | 73 | ../hi_sdk_50/include/hi_comm_vpss.h: 74 | 75 | ../hi_sdk_50/include/hi_comm_vdec.h: 76 | 77 | ../hi_sdk_50/include/hi_comm_vda.h: 78 | 79 | ../hi_sdk_50/include/hi_comm_region.h: 80 | 81 | ../hi_sdk_50/include/hi_comm_adec.h: 82 | 83 | ../hi_sdk_50/include/hi_comm_aio.h: 84 | 85 | ../hi_sdk_50/include/hi_comm_aenc.h: 86 | 87 | ../hi_sdk_50/include/hi_comm_ai.h: 88 | 89 | ../hi_sdk_50/include/hi_comm_ao.h: 90 | 91 | ../hi_sdk_50/include/mpi_sys.h: 92 | 93 | ../hi_sdk_50/include/mpi_vb.h: 94 | 95 | ../hi_sdk_50/include/mpi_vi.h: 96 | 97 | ../hi_sdk_50/include/mpi_vo.h: 98 | 99 | ../hi_sdk_50/include/mpi_venc.h: 100 | 101 | ../hi_sdk_50/include/mpi_vpss.h: 102 | 103 | ../hi_sdk_50/include/mpi_vdec.h: 104 | 105 | ../hi_sdk_50/include/mpi_vda.h: 106 | 107 | ../hi_sdk_50/include/mpi_region.h: 108 | 109 | ../hi_sdk_50/include/mpi_adec.h: 110 | 111 | ../hi_sdk_50/include/mpi_aenc.h: 112 | 113 | ../hi_sdk_50/include/mpi_ai.h: 114 | 115 | ../hi_sdk_50/include/mpi_ao.h: 116 | 117 | ../hi_sdk_50/include/mpi_isp.h: 118 | 119 | ../hi_sdk_50/include/hi_comm_sns.h: 120 | 121 | ../hi_sdk_50/include/hi_comm_3a.h: 122 | 123 | ../hi_sdk_50/include/mpi_ae.h: 124 | 125 | ../hi_sdk_50/include/hi_ae_comm.h: 126 | 127 | ../hi_sdk_50/include/mpi_awb.h: 128 | 129 | ../hi_sdk_50/include/hi_awb_comm.h: 130 | 131 | ../hi_sdk_50/include/mpi_af.h: 132 | 133 | ../hi_sdk_50/include/hi_af_comm.h: 134 | 135 | ../hi_sdk_50/include/hi_vreg.h: 136 | 137 | ../hi_sdk_50/include/hi_sns_ctrl.h: 138 | 139 | ../src/v_ini.h: 140 | 141 | ../src/StartLiveSrc.h: 142 | 143 | ../hi_sdk_50/include/hi_mipi.h: 144 | 145 | ../hi_sdk_50/include/hi_common.h: 146 | 147 | ../src/users.h: 148 | 149 | ../src/udptcp.h: 150 | 151 | ../hi_sdk_50/include/acodec.h: 152 | 153 | ../third_lib/include/RtspCaster.h: 154 | 155 | ../src/g711.h: 156 | 157 | ../src/CAudioAac.h: 158 | 159 | ../third_lib/include/fdk-aac/aacdecoder_lib.h: 160 | 161 | ../third_lib/include/fdk-aac/machine_type.h: 162 | 163 | ../third_lib/include/fdk-aac/FDK_audio.h: 164 | 165 | ../third_lib/include/fdk-aac/genericStds.h: 166 | 167 | ../third_lib/include/fdk-aac/aacenc_lib.h: 168 | 169 | ../third_lib/include/fdk-aac/FDK_audio.h: 170 | 171 | ../third_lib/include/fdk-aac/genericStds.h: 172 | 173 | ../third_lib/include/fdk-aac/machine_type.h: 174 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/Debug/src/cJSON.d: -------------------------------------------------------------------------------- 1 | src/cJSON.d: ../src/cJSON.cpp ../src/cJSON.h 2 | 3 | ../src/cJSON.h: 4 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/Debug/src/g711.d: -------------------------------------------------------------------------------- 1 | src/g711.d: ../src/g711.cpp ../src/g711.h 2 | 3 | ../src/g711.h: 4 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/Debug/src/main.d: -------------------------------------------------------------------------------- 1 | src/main.d: ../src/main.cpp ../src/V3516A.h \ 2 | ../hi_sdk_50/include/sample_comm.h ../hi_sdk_50/include/hi_common.h \ 3 | ../hi_sdk_50/include/hi_type.h ../hi_sdk_50/include/hi_math.h \ 4 | ../hi_sdk_50/include/hi_defines.h ../hi_sdk_50/include/hi_comm_video.h \ 5 | ../hi_sdk_50/include/hi_comm_sys.h ../hi_sdk_50/include/hi_errno.h \ 6 | ../hi_sdk_50/include/hi_debug.h ../hi_sdk_50/include/hi_comm_vb.h \ 7 | ../hi_sdk_50/include/hi_comm_isp.h ../hi_sdk_50/include/hi_isp_debug.h \ 8 | ../hi_sdk_50/include/hi_comm_vi.h ../hi_sdk_50/include/hi_comm_vo.h \ 9 | ../hi_sdk_50/include/hi_comm_venc.h ../hi_sdk_50/include/hi_comm_rc.h \ 10 | ../hi_sdk_50/include/hi_comm_vpss.h ../hi_sdk_50/include/hi_comm_vdec.h \ 11 | ../hi_sdk_50/include/hi_comm_vda.h ../hi_sdk_50/include/hi_comm_region.h \ 12 | ../hi_sdk_50/include/hi_comm_adec.h ../hi_sdk_50/include/hi_comm_aio.h \ 13 | ../hi_sdk_50/include/hi_comm_aenc.h ../hi_sdk_50/include/hi_comm_ai.h \ 14 | ../hi_sdk_50/include/hi_comm_ao.h ../hi_sdk_50/include/mpi_sys.h \ 15 | ../hi_sdk_50/include/mpi_vb.h ../hi_sdk_50/include/mpi_vi.h \ 16 | ../hi_sdk_50/include/mpi_vo.h ../hi_sdk_50/include/mpi_venc.h \ 17 | ../hi_sdk_50/include/mpi_vpss.h ../hi_sdk_50/include/mpi_vdec.h \ 18 | ../hi_sdk_50/include/mpi_vda.h ../hi_sdk_50/include/mpi_region.h \ 19 | ../hi_sdk_50/include/mpi_adec.h ../hi_sdk_50/include/mpi_aenc.h \ 20 | ../hi_sdk_50/include/mpi_ai.h ../hi_sdk_50/include/mpi_ao.h \ 21 | ../hi_sdk_50/include/mpi_isp.h ../hi_sdk_50/include/hi_comm_sns.h \ 22 | ../hi_sdk_50/include/hi_comm_3a.h ../hi_sdk_50/include/mpi_ae.h \ 23 | ../hi_sdk_50/include/hi_ae_comm.h ../hi_sdk_50/include/mpi_awb.h \ 24 | ../hi_sdk_50/include/hi_awb_comm.h ../hi_sdk_50/include/mpi_af.h \ 25 | ../hi_sdk_50/include/hi_af_comm.h ../hi_sdk_50/include/hi_vreg.h \ 26 | ../hi_sdk_50/include/hi_sns_ctrl.h ../src/v_ini.h ../src/StartLiveSrc.h \ 27 | ../src/send_searchIp.h ../src/swap.h ../third_lib/include/RtspCaster.h 28 | 29 | ../src/V3516A.h: 30 | 31 | ../hi_sdk_50/include/sample_comm.h: 32 | 33 | ../hi_sdk_50/include/hi_common.h: 34 | 35 | ../hi_sdk_50/include/hi_type.h: 36 | 37 | ../hi_sdk_50/include/hi_math.h: 38 | 39 | ../hi_sdk_50/include/hi_defines.h: 40 | 41 | ../hi_sdk_50/include/hi_comm_video.h: 42 | 43 | ../hi_sdk_50/include/hi_comm_sys.h: 44 | 45 | ../hi_sdk_50/include/hi_errno.h: 46 | 47 | ../hi_sdk_50/include/hi_debug.h: 48 | 49 | ../hi_sdk_50/include/hi_comm_vb.h: 50 | 51 | ../hi_sdk_50/include/hi_comm_isp.h: 52 | 53 | ../hi_sdk_50/include/hi_isp_debug.h: 54 | 55 | ../hi_sdk_50/include/hi_comm_vi.h: 56 | 57 | ../hi_sdk_50/include/hi_comm_vo.h: 58 | 59 | ../hi_sdk_50/include/hi_comm_venc.h: 60 | 61 | ../hi_sdk_50/include/hi_comm_rc.h: 62 | 63 | ../hi_sdk_50/include/hi_comm_vpss.h: 64 | 65 | ../hi_sdk_50/include/hi_comm_vdec.h: 66 | 67 | ../hi_sdk_50/include/hi_comm_vda.h: 68 | 69 | ../hi_sdk_50/include/hi_comm_region.h: 70 | 71 | ../hi_sdk_50/include/hi_comm_adec.h: 72 | 73 | ../hi_sdk_50/include/hi_comm_aio.h: 74 | 75 | ../hi_sdk_50/include/hi_comm_aenc.h: 76 | 77 | ../hi_sdk_50/include/hi_comm_ai.h: 78 | 79 | ../hi_sdk_50/include/hi_comm_ao.h: 80 | 81 | ../hi_sdk_50/include/mpi_sys.h: 82 | 83 | ../hi_sdk_50/include/mpi_vb.h: 84 | 85 | ../hi_sdk_50/include/mpi_vi.h: 86 | 87 | ../hi_sdk_50/include/mpi_vo.h: 88 | 89 | ../hi_sdk_50/include/mpi_venc.h: 90 | 91 | ../hi_sdk_50/include/mpi_vpss.h: 92 | 93 | ../hi_sdk_50/include/mpi_vdec.h: 94 | 95 | ../hi_sdk_50/include/mpi_vda.h: 96 | 97 | ../hi_sdk_50/include/mpi_region.h: 98 | 99 | ../hi_sdk_50/include/mpi_adec.h: 100 | 101 | ../hi_sdk_50/include/mpi_aenc.h: 102 | 103 | ../hi_sdk_50/include/mpi_ai.h: 104 | 105 | ../hi_sdk_50/include/mpi_ao.h: 106 | 107 | ../hi_sdk_50/include/mpi_isp.h: 108 | 109 | ../hi_sdk_50/include/hi_comm_sns.h: 110 | 111 | ../hi_sdk_50/include/hi_comm_3a.h: 112 | 113 | ../hi_sdk_50/include/mpi_ae.h: 114 | 115 | ../hi_sdk_50/include/hi_ae_comm.h: 116 | 117 | ../hi_sdk_50/include/mpi_awb.h: 118 | 119 | ../hi_sdk_50/include/hi_awb_comm.h: 120 | 121 | ../hi_sdk_50/include/mpi_af.h: 122 | 123 | ../hi_sdk_50/include/hi_af_comm.h: 124 | 125 | ../hi_sdk_50/include/hi_vreg.h: 126 | 127 | ../hi_sdk_50/include/hi_sns_ctrl.h: 128 | 129 | ../src/v_ini.h: 130 | 131 | ../src/StartLiveSrc.h: 132 | 133 | ../src/send_searchIp.h: 134 | 135 | ../src/swap.h: 136 | 137 | ../third_lib/include/RtspCaster.h: 138 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/Debug/src/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | CPP_SRCS += \ 7 | ../src/CAudioAac.cpp \ 8 | ../src/V3516A.cpp \ 9 | ../src/g711.cpp \ 10 | ../src/cJSON.cpp \ 11 | ../src/CInterfaceUrls.cpp \ 12 | ../src/main.cpp 13 | 14 | OBJS += \ 15 | ./src/CAudioAac.o \ 16 | ./src/V3516A.o \ 17 | ./src/g711.o \ 18 | ./src/cJSON.o \ 19 | ./src/CInterfaceUrls.o \ 20 | ./src/main.o 21 | 22 | CPP_DEPS += \ 23 | ./src/CAudioAac.d \ 24 | ./src/V3516A.d \ 25 | ./src/g711.d \ 26 | ./src/cJSON.d \ 27 | ./src/CInterfaceUrls.d \ 28 | ./src/main.d 29 | 30 | starrtc_include=/root/starrtc_libs/jni 31 | ffmpeg_include=/root/ffmpeg-build 32 | # Each subdirectory must supply rules for building sources it contributes 33 | src/%.o: ../src/%.cpp 34 | @echo 'Building file: $<' 35 | @echo 'Invoking: Cross G++ Compiler' 36 | arm-hisiv300-linux-g++ -I"../src" -I"../hi_sdk_50/include" -I"../third_lib/include/fdk-aac" -I"../third_lib/include" -I"$(ffmpeg_include)/include/" -O0 -g3 -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 37 | #arm-hisiv300-linux-g++ -I"../src" -I"../hi_sdk_50/include" -I"../third_lib/include/fdk-aac" -I"../third_lib/include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 38 | @echo 'Finished building: $<' 39 | @echo ' ' 40 | 41 | 42 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/curl/include/curlver.h: -------------------------------------------------------------------------------- 1 | #ifndef __CURL_CURLVER_H 2 | #define __CURL_CURLVER_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | /* This header file contains nothing but libcurl version info, generated by 26 | a script at release-time. This was made its own header file in 7.11.2 */ 27 | 28 | /* This is the global package copyright */ 29 | #define LIBCURL_COPYRIGHT "1996 - 2019 Daniel Stenberg, ." 30 | 31 | /* This is the version number of the libcurl package from which this header 32 | file origins: */ 33 | #define LIBCURL_VERSION "7.65.2-DEV" 34 | 35 | /* The numeric version number is also available "in parts" by using these 36 | defines: */ 37 | #define LIBCURL_VERSION_MAJOR 7 38 | #define LIBCURL_VERSION_MINOR 65 39 | #define LIBCURL_VERSION_PATCH 2 40 | 41 | /* This is the numeric version of the libcurl version number, meant for easier 42 | parsing and comparions by programs. The LIBCURL_VERSION_NUM define will 43 | always follow this syntax: 44 | 45 | 0xXXYYZZ 46 | 47 | Where XX, YY and ZZ are the main version, release and patch numbers in 48 | hexadecimal (using 8 bits each). All three numbers are always represented 49 | using two digits. 1.2 would appear as "0x010200" while version 9.11.7 50 | appears as "0x090b07". 51 | 52 | This 6-digit (24 bits) hexadecimal number does not show pre-release number, 53 | and it is always a greater number in a more recent release. It makes 54 | comparisons with greater than and less than work. 55 | 56 | Note: This define is the full hex number and _does not_ use the 57 | CURL_VERSION_BITS() macro since curl's own configure script greps for it 58 | and needs it to contain the full number. 59 | */ 60 | #define LIBCURL_VERSION_NUM 0x074102 61 | 62 | /* 63 | * This is the date and time when the full source package was created. The 64 | * timestamp is not stored in git, as the timestamp is properly set in the 65 | * tarballs by the maketgz script. 66 | * 67 | * The format of the date follows this template: 68 | * 69 | * "2007-11-23" 70 | */ 71 | #define LIBCURL_TIMESTAMP "[unreleased]" 72 | 73 | #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z)) 74 | #define CURL_AT_LEAST_VERSION(x,y,z) \ 75 | (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) 76 | 77 | #endif /* __CURL_CURLVER_H */ 78 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/curl/include/easy.h: -------------------------------------------------------------------------------- 1 | #ifndef __CURL_EASY_H 2 | #define __CURL_EASY_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | CURL_EXTERN CURL *curl_easy_init(void); 29 | CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); 30 | CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); 31 | CURL_EXTERN void curl_easy_cleanup(CURL *curl); 32 | 33 | /* 34 | * NAME curl_easy_getinfo() 35 | * 36 | * DESCRIPTION 37 | * 38 | * Request internal information from the curl session with this function. The 39 | * third argument MUST be a pointer to a long, a pointer to a char * or a 40 | * pointer to a double (as the documentation describes elsewhere). The data 41 | * pointed to will be filled in accordingly and can be relied upon only if the 42 | * function returns CURLE_OK. This function is intended to get used *AFTER* a 43 | * performed transfer, all results from this function are undefined until the 44 | * transfer is completed. 45 | */ 46 | CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); 47 | 48 | 49 | /* 50 | * NAME curl_easy_duphandle() 51 | * 52 | * DESCRIPTION 53 | * 54 | * Creates a new curl session handle with the same options set for the handle 55 | * passed in. Duplicating a handle could only be a matter of cloning data and 56 | * options, internal state info and things like persistent connections cannot 57 | * be transferred. It is useful in multithreaded applications when you can run 58 | * curl_easy_duphandle() for each new thread to avoid a series of identical 59 | * curl_easy_setopt() invokes in every thread. 60 | */ 61 | CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl); 62 | 63 | /* 64 | * NAME curl_easy_reset() 65 | * 66 | * DESCRIPTION 67 | * 68 | * Re-initializes a CURL handle to the default values. This puts back the 69 | * handle to the same state as it was in when it was just created. 70 | * 71 | * It does keep: live connections, the Session ID cache, the DNS cache and the 72 | * cookies. 73 | */ 74 | CURL_EXTERN void curl_easy_reset(CURL *curl); 75 | 76 | /* 77 | * NAME curl_easy_recv() 78 | * 79 | * DESCRIPTION 80 | * 81 | * Receives data from the connected socket. Use after successful 82 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 83 | */ 84 | CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, 85 | size_t *n); 86 | 87 | /* 88 | * NAME curl_easy_send() 89 | * 90 | * DESCRIPTION 91 | * 92 | * Sends data over the connected socket. Use after successful 93 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 94 | */ 95 | CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, 96 | size_t buflen, size_t *n); 97 | 98 | 99 | /* 100 | * NAME curl_easy_upkeep() 101 | * 102 | * DESCRIPTION 103 | * 104 | * Performs connection upkeep for the given session handle. 105 | */ 106 | CURL_EXTERN CURLcode curl_easy_upkeep(CURL *curl); 107 | 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | 112 | #endif 113 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/curl/include/mprintf.h: -------------------------------------------------------------------------------- 1 | #ifndef __CURL_MPRINTF_H 2 | #define __CURL_MPRINTF_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include 26 | #include /* needed for FILE */ 27 | #include "curl.h" /* for CURL_EXTERN */ 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | CURL_EXTERN int curl_mprintf(const char *format, ...); 34 | CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); 35 | CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); 36 | CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, 37 | const char *format, ...); 38 | CURL_EXTERN int curl_mvprintf(const char *format, va_list args); 39 | CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); 40 | CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); 41 | CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, 42 | const char *format, va_list args); 43 | CURL_EXTERN char *curl_maprintf(const char *format, ...); 44 | CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif /* __CURL_MPRINTF_H */ 51 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/curl/include/stdcheaders.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDC_HEADERS_H 2 | #define __STDC_HEADERS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include 26 | 27 | size_t fread(void *, size_t, size_t, FILE *); 28 | size_t fwrite(const void *, size_t, size_t, FILE *); 29 | 30 | int strcasecmp(const char *, const char *); 31 | int strncasecmp(const char *, const char *, size_t); 32 | 33 | #endif /* __STDC_HEADERS_H */ 34 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/curl/include/urlapi.h: -------------------------------------------------------------------------------- 1 | #ifndef __CURL_URLAPI_H 2 | #define __CURL_URLAPI_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2018 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl.h" 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | /* the error codes for the URL API */ 32 | typedef enum { 33 | CURLUE_OK, 34 | CURLUE_BAD_HANDLE, /* 1 */ 35 | CURLUE_BAD_PARTPOINTER, /* 2 */ 36 | CURLUE_MALFORMED_INPUT, /* 3 */ 37 | CURLUE_BAD_PORT_NUMBER, /* 4 */ 38 | CURLUE_UNSUPPORTED_SCHEME, /* 5 */ 39 | CURLUE_URLDECODE, /* 6 */ 40 | CURLUE_OUT_OF_MEMORY, /* 7 */ 41 | CURLUE_USER_NOT_ALLOWED, /* 8 */ 42 | CURLUE_UNKNOWN_PART, /* 9 */ 43 | CURLUE_NO_SCHEME, /* 10 */ 44 | CURLUE_NO_USER, /* 11 */ 45 | CURLUE_NO_PASSWORD, /* 12 */ 46 | CURLUE_NO_OPTIONS, /* 13 */ 47 | CURLUE_NO_HOST, /* 14 */ 48 | CURLUE_NO_PORT, /* 15 */ 49 | CURLUE_NO_QUERY, /* 16 */ 50 | CURLUE_NO_FRAGMENT /* 17 */ 51 | } CURLUcode; 52 | 53 | typedef enum { 54 | CURLUPART_URL, 55 | CURLUPART_SCHEME, 56 | CURLUPART_USER, 57 | CURLUPART_PASSWORD, 58 | CURLUPART_OPTIONS, 59 | CURLUPART_HOST, 60 | CURLUPART_PORT, 61 | CURLUPART_PATH, 62 | CURLUPART_QUERY, 63 | CURLUPART_FRAGMENT, 64 | CURLUPART_ZONEID /* added in 7.65.0 */ 65 | } CURLUPart; 66 | 67 | #define CURLU_DEFAULT_PORT (1<<0) /* return default port number */ 68 | #define CURLU_NO_DEFAULT_PORT (1<<1) /* act as if no port number was set, 69 | if the port number matches the 70 | default for the scheme */ 71 | #define CURLU_DEFAULT_SCHEME (1<<2) /* return default scheme if 72 | missing */ 73 | #define CURLU_NON_SUPPORT_SCHEME (1<<3) /* allow non-supported scheme */ 74 | #define CURLU_PATH_AS_IS (1<<4) /* leave dot sequences */ 75 | #define CURLU_DISALLOW_USER (1<<5) /* no user+password allowed */ 76 | #define CURLU_URLDECODE (1<<6) /* URL decode on get */ 77 | #define CURLU_URLENCODE (1<<7) /* URL encode on set */ 78 | #define CURLU_APPENDQUERY (1<<8) /* append a form style part */ 79 | #define CURLU_GUESS_SCHEME (1<<9) /* legacy curl-style guessing */ 80 | 81 | typedef struct Curl_URL CURLU; 82 | 83 | /* 84 | * curl_url() creates a new CURLU handle and returns a pointer to it. 85 | * Must be freed with curl_url_cleanup(). 86 | */ 87 | CURL_EXTERN CURLU *curl_url(void); 88 | 89 | /* 90 | * curl_url_cleanup() frees the CURLU handle and related resources used for 91 | * the URL parsing. It will not free strings previously returned with the URL 92 | * API. 93 | */ 94 | CURL_EXTERN void curl_url_cleanup(CURLU *handle); 95 | 96 | /* 97 | * curl_url_dup() duplicates a CURLU handle and returns a new copy. The new 98 | * handle must also be freed with curl_url_cleanup(). 99 | */ 100 | CURL_EXTERN CURLU *curl_url_dup(CURLU *in); 101 | 102 | /* 103 | * curl_url_get() extracts a specific part of the URL from a CURLU 104 | * handle. Returns error code. The returned pointer MUST be freed with 105 | * curl_free() afterwards. 106 | */ 107 | CURL_EXTERN CURLUcode curl_url_get(CURLU *handle, CURLUPart what, 108 | char **part, unsigned int flags); 109 | 110 | /* 111 | * curl_url_set() sets a specific part of the URL in a CURLU handle. Returns 112 | * error code. The passed in string will be copied. Passing a NULL instead of 113 | * a part string, clears that part. 114 | */ 115 | CURL_EXTERN CURLUcode curl_url_set(CURLU *handle, CURLUPart what, 116 | const char *part, unsigned int flags); 117 | 118 | 119 | #ifdef __cplusplus 120 | } /* end of extern "C" */ 121 | #endif 122 | 123 | #endif 124 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/curl/lib/libcurl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/curl/lib/libcurl.a -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/curl/lib/libcurl.la: -------------------------------------------------------------------------------- 1 | # libcurl.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libcurl.so.4' 9 | 10 | # Names of this library. 11 | library_names='libcurl.so.4.5.0 libcurl.so.4 libcurl.so' 12 | 13 | # The name of the static archive. 14 | old_library='libcurl.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags=' -pthread' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -L/root/ffmpeg-build/lib -L/root/ffmpeg-build//lib -lssl -lz -lcrypto -ldl' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libcurl. 26 | current=9 27 | age=5 28 | revision=0 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/root/ffmpeg-build/lib' 42 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/curl/lib/libcurl.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/curl/lib/libcurl.so -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/curl/lib/libcurl.so.4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/curl/lib/libcurl.so.4 -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/curl/lib/libcurl.so.4.5.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/curl/lib/libcurl.so.4.5.0 -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_af_comm.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_af_comm.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2012/12/20 10 | Description : 11 | History : 12 | 1.Date : 2012/12/20 13 | Author : n00168968 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | #ifndef __HI_AF_COMM_H__ 18 | #define __HI_AF_COMM_H__ 19 | 20 | #include "hi_type.h" 21 | 22 | #ifdef __cplusplus 23 | #if __cplusplus 24 | extern "C"{ 25 | #endif 26 | #endif /* End of #ifdef __cplusplus */ 27 | 28 | #define HI_AF_LIB_NAME "hisi_af_lib" 29 | 30 | #ifdef __cplusplus 31 | #if __cplusplus 32 | } 33 | #endif 34 | #endif /* End of #ifdef __cplusplus */ 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_awb_comm.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_awb_comm.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2012/12/19 10 | Description : 11 | History : 12 | 1.Date : 2012/12/19 13 | Author : n00168968 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | #ifndef __HI_AWB_COMM_H__ 18 | #define __HI_AWB_COMM_H__ 19 | 20 | #include "hi_type.h" 21 | 22 | #ifdef __cplusplus 23 | #if __cplusplus 24 | extern "C"{ 25 | #endif 26 | #endif /* End of #ifdef __cplusplus */ 27 | 28 | #define HI_AWB_LIB_NAME "hisi_awb_lib" 29 | 30 | /************************** isp ctrl cmd *************************************/ 31 | typedef enum hiAWB_CTRL_CMD_E 32 | { 33 | AWB_SATURATION_SET, 34 | AWB_SATURATION_GET, 35 | 36 | AWB_DEBUG_ATTR_SET, 37 | AWB_DEBUG_ATTR_GET, 38 | 39 | AWB_CTRL_BUTT, 40 | } AWB_CTRL_CMD_E; 41 | 42 | typedef struct hiAWB_DBG_ATTR_S 43 | { 44 | HI_U16 u16WhiteLevel; 45 | HI_U16 u16BlackLevel; 46 | HI_U16 u16CrMax; 47 | HI_U16 u16CrMin; 48 | HI_U16 u16CbMax; 49 | HI_U16 u16CbMin; 50 | HI_U16 u16CrHigh; 51 | HI_U16 u16CrLow; 52 | HI_U16 u16CbHigh; 53 | HI_U16 u16CbLow; 54 | HI_U16 u16RawWhiteLevel; 55 | HI_U16 u16RawBlackLevel; 56 | HI_U16 u16RawCrMax; 57 | HI_U16 u16RawCrMin; 58 | HI_U16 u16RawCbMax; 59 | HI_U16 u16RawCbMin; 60 | HI_U16 u16RawCrHigh; 61 | HI_U16 u16RawCrLow; 62 | HI_U16 u16RawCbHigh; 63 | HI_U16 u16RawCbLow; 64 | 65 | HI_U16 u16WDRMode; 66 | HI_U16 u16Enable; 67 | HI_U16 u16ManualEnable; 68 | HI_U16 u16Zone; 69 | HI_U16 u16HighTemp; 70 | HI_U16 u16LowTemp; 71 | HI_U16 u16RefTemp; 72 | HI_U16 u16RgainBase; 73 | HI_U16 u16GgainBase; 74 | HI_U16 u16BgainBase; 75 | HI_S32 s32p1; 76 | HI_S32 s32p2; 77 | HI_S32 s32q; 78 | HI_S32 s32a; 79 | HI_S32 s32c; 80 | 81 | HI_U16 u16ManSatEnable; 82 | HI_U16 u16SatTarget; 83 | } AWB_DBG_ATTR_S; 84 | 85 | typedef struct hiAWB_ZONE_DBG_S 86 | { 87 | HI_U16 u16Sum; 88 | HI_U16 u16Rg; 89 | HI_U16 u16Bg; 90 | HI_U16 u16CountAll; 91 | HI_U16 u16CountMin; 92 | HI_U16 u16CountMax; 93 | HI_U16 u16RawRAvg; 94 | HI_U16 u16RawGAvg; 95 | HI_U16 u16RawBAvg; 96 | HI_U16 u16TK; 97 | HI_U16 u16Weight; 98 | HI_S16 s16Shift; 99 | }AWB_ZONE_DBG_S; 100 | 101 | typedef struct hiAWB_DBG_STATUS_S 102 | { 103 | HI_U32 u32FrmNumBgn; 104 | HI_U32 u32GlobalSum; 105 | HI_U16 u16GlobalRgSta; 106 | HI_U16 u16GlobalBgSta; 107 | HI_U16 u16GlobalCountAll; 108 | HI_U16 u16GlobalCountMin; 109 | HI_U16 u16GlobalCountMax; 110 | HI_U16 u16GlobalRAvg; 111 | HI_U16 u16GlobalGAvg; 112 | HI_U16 u16GlobalBAvg; 113 | HI_U16 u16TK; 114 | HI_U16 u16Rgain; 115 | HI_U16 u16Ggain; 116 | HI_U16 u16Bgain; 117 | HI_U16 au16CCM[9]; 118 | 119 | HI_U32 au32HistInfo[256]; 120 | AWB_ZONE_DBG_S astZoneDebug[AWB_ZONE_ROW * AWB_ZONE_COLUMN]; 121 | 122 | HI_U32 u32FrmNumEnd; 123 | } AWB_DBG_STATUS_S; 124 | 125 | /************************** sensor's interface to awb *********************/ 126 | typedef struct hiAWB_CCM_S 127 | { 128 | HI_U16 u16HighColorTemp; /* D50 lighting source is recommended */ 129 | HI_U16 au16HighCCM[9]; 130 | HI_U16 u16MidColorTemp; /* D32 lighting source is recommended */ 131 | HI_U16 au16MidCCM[9]; 132 | HI_U16 u16LowColorTemp; /* A lighting source is recommended */ 133 | HI_U16 au16LowCCM[9]; 134 | }AWB_CCM_S; 135 | 136 | typedef struct hiAWB_AGC_TABLE_S 137 | { 138 | HI_BOOL bValid; 139 | 140 | HI_U8 au8Saturation[16]; /* adjust saturation, different iso with different saturation */ 141 | } AWB_AGC_TABLE_S; 142 | 143 | typedef struct hiAWB_SENSOR_DEFAULT_S 144 | { 145 | HI_U16 u16WbRefTemp; /* reference color temperature for WB */ 146 | HI_U16 au16GainOffset[4]; /* gain offset for white balance */ 147 | HI_S32 as32WbPara[6]; /* parameter for wb curve,p1,p2,q1,a1,b1,c1 */ 148 | 149 | AWB_AGC_TABLE_S stAgcTbl; 150 | AWB_CCM_S stCcm; 151 | } AWB_SENSOR_DEFAULT_S; 152 | 153 | typedef struct hiAWB_SENSOR_EXP_FUNC_S 154 | { 155 | HI_S32(*pfn_cmos_get_awb_default)(AWB_SENSOR_DEFAULT_S *pstAwbSnsDft); 156 | } AWB_SENSOR_EXP_FUNC_S; 157 | 158 | typedef struct hiAWB_SENSOR_REGISTER_S 159 | { 160 | AWB_SENSOR_EXP_FUNC_S stSnsExp; 161 | } AWB_SENSOR_REGISTER_S; 162 | 163 | #ifdef __cplusplus 164 | #if __cplusplus 165 | } 166 | #endif 167 | #endif /* End of #ifdef __cplusplus */ 168 | 169 | #endif 170 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_comm_aenc.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_comm_aenc.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2006/12/15 10 | Last Modified : 11 | Description : 12 | Function List : 13 | History : 14 | 1.Date : 2006/12/15 15 | Author : z50825 16 | Modification : Created file 17 | 2.Date : 2007/5/10 18 | Author : z50825 19 | Modification : add err code 20 | ******************************************************************************/ 21 | 22 | 23 | #ifndef __HI_COMM_AENC_H__ 24 | #define __HI_COMM_AENC_H__ 25 | 26 | #include "hi_type.h" 27 | #include "hi_common.h" 28 | #include "hi_comm_aio.h" 29 | 30 | 31 | #ifdef __cplusplus 32 | #if __cplusplus 33 | extern "C"{ 34 | #endif 35 | #endif /* End of #ifdef __cplusplus */ 36 | 37 | typedef struct hiAENC_ATTR_G711_S 38 | { 39 | HI_U32 resv; /*reserve item*/ 40 | }AENC_ATTR_G711_S; 41 | 42 | typedef struct hiAENC_ATTR_G726_S 43 | { 44 | G726_BPS_E enG726bps; 45 | }AENC_ATTR_G726_S; 46 | 47 | typedef struct hiAENC_ATTR_ADPCM_S 48 | { 49 | ADPCM_TYPE_E enADPCMType; 50 | }AENC_ATTR_ADPCM_S; 51 | 52 | typedef struct hiAENC_ATTR_LPCM_S 53 | { 54 | HI_U32 resv; /*reserve item*/ 55 | }AENC_ATTR_LPCM_S; 56 | 57 | typedef struct hiAENC_ENCODER_S 58 | { 59 | PAYLOAD_TYPE_E enType; 60 | HI_U32 u32MaxFrmLen; 61 | HI_CHAR aszName[16]; /* encoder type,be used to print proc information */ 62 | HI_S32 (*pfnOpenEncoder)(HI_VOID *pEncoderAttr, HI_VOID **ppEncoder); /* pEncoder is the handle to control the encoder */ 63 | HI_S32 (*pfnEncodeFrm)(HI_VOID *pEncoder, const AUDIO_FRAME_S *pstData, 64 | HI_U8 *pu8Outbuf,HI_U32 *pu32OutLen); 65 | HI_S32 (*pfnCloseEncoder)(HI_VOID *pEncoder); 66 | } AENC_ENCODER_S; 67 | 68 | typedef struct hiAENC_CHN_ATTR_S 69 | { 70 | PAYLOAD_TYPE_E enType; /*payload type ()*/ 71 | HI_U32 u32PtNumPerFrm; 72 | HI_U32 u32BufSize; /*buf size [2~MAX_AUDIO_FRAME_NUM]*/ 73 | HI_VOID *pValue; /*point to attribute of definite audio encoder*/ 74 | }AENC_CHN_ATTR_S; 75 | 76 | typedef enum hiEN_AENC_ERR_CODE_E 77 | { 78 | AENC_ERR_ENCODER_ERR = 64 , 79 | AENC_ERR_VQE_ERR = 65 , 80 | 81 | } EN_AENC_ERR_CODE_E; 82 | 83 | 84 | /* invlalid device ID */ 85 | #define HI_ERR_AENC_INVALID_DEVID HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_DEVID) 86 | /* invlalid channel ID */ 87 | #define HI_ERR_AENC_INVALID_CHNID HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_CHNID) 88 | /* at lease one parameter is illagal ,eg, an illegal enumeration value */ 89 | #define HI_ERR_AENC_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM) 90 | /* channel exists */ 91 | #define HI_ERR_AENC_EXIST HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_EXIST) 92 | /* channel unexists */ 93 | #define HI_ERR_AENC_UNEXIST HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_UNEXIST) 94 | /* using a NULL point */ 95 | #define HI_ERR_AENC_NULL_PTR HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR) 96 | /* try to enable or initialize system,device or channel, before configing attribute */ 97 | #define HI_ERR_AENC_NOT_CONFIG HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_CONFIG) 98 | /* operation is not supported by NOW */ 99 | #define HI_ERR_AENC_NOT_SUPPORT HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT) 100 | /* operation is not permitted ,eg, try to change static attribute */ 101 | #define HI_ERR_AENC_NOT_PERM HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM) 102 | /* failure caused by malloc memory */ 103 | #define HI_ERR_AENC_NOMEM HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM) 104 | /* failure caused by malloc buffer */ 105 | #define HI_ERR_AENC_NOBUF HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_NOBUF) 106 | /* no data in buffer */ 107 | #define HI_ERR_AENC_BUF_EMPTY HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_EMPTY) 108 | /* no buffer for new data */ 109 | #define HI_ERR_AENC_BUF_FULL HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_FULL) 110 | /* system is not ready,had not initialed or loaded*/ 111 | #define HI_ERR_AENC_SYS_NOTREADY HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY) 112 | /* encoder internal err */ 113 | #define HI_ERR_AENC_ENCODER_ERR HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, AENC_ERR_ENCODER_ERR) 114 | /* vqe internal err */ 115 | #define HI_ERR_AENC_VQE_ERR HI_DEF_ERR(HI_ID_AENC, EN_ERR_LEVEL_ERROR, AENC_ERR_VQE_ERR) 116 | 117 | 118 | #ifdef __cplusplus 119 | #if __cplusplus 120 | } 121 | #endif 122 | #endif /* End of #ifdef __cplusplus */ 123 | 124 | #endif/* End of #ifndef __HI_COMM_AENC_H__*/ 125 | 126 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_comm_ai.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_comm_ai.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/5/5 10 | Description : 11 | History : 12 | 1.Date : 2009/5/5 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | 17 | 18 | #ifndef __HI_COMM_AI_H__ 19 | #define __HI_COMM_AI_H__ 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | extern "C"{ 24 | #endif 25 | #endif /* End of #ifdef __cplusplus */ 26 | 27 | 28 | 29 | #ifdef __cplusplus 30 | #if __cplusplus 31 | } 32 | #endif 33 | #endif /* End of #ifdef __cplusplus */ 34 | 35 | #endif /* End of #ifndef __HI_COMM_AI_H__ */ 36 | 37 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_comm_aio.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_comm_aio.h -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_comm_ao.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_comm_ao.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/5/5 10 | Description : 11 | History : 12 | 1.Date : 2009/5/5 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | 17 | 18 | #ifndef __HI_COMM_AO_H__ 19 | #define __HI_COMM_AO_H__ 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | extern "C"{ 24 | #endif 25 | #endif /* End of #ifdef __cplusplus */ 26 | 27 | 28 | 29 | 30 | #ifdef __cplusplus 31 | #if __cplusplus 32 | } 33 | #endif 34 | #endif /* End of #ifdef __cplusplus */ 35 | 36 | #endif /* End of #ifndef __HI_COMM_AO_H__ */ 37 | 38 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_comm_fisheye.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2013-2033, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_comm_fisheye.h 7 | Version : 8 | Author : Hisilicon Hi35xx MPP Team 9 | Created : 2015/06/15 10 | Last Modified : 11 | Description : common struct definition for FISHEYE 12 | Function List : 13 | History : 14 | ******************************************************************************/ 15 | #ifndef __HI_COMM_FISHEYE_H__ 16 | #define __HI_COMM_FISHEYE_H__ 17 | 18 | #ifdef __cplusplus 19 | #if __cplusplus 20 | extern "C" { 21 | #endif 22 | #endif /* __cplusplus */ 23 | 24 | #include "hi_type.h" 25 | #include "hi_common.h" 26 | #include "hi_errno.h" 27 | #include "hi_comm_video.h" 28 | 29 | #define MAKE_DWORD(high,low) (((low)&0x0000ffff)|((high)<<16)) 30 | #define HIGH_WORD(x) (((x)&0xffff0000)>>16) 31 | #define LOW_WORD(x) ((x)&0x0000ffff) 32 | 33 | /* failure caused by malloc buffer */ 34 | #define HI_ERR_FISHEYE_NOBUF HI_DEF_ERR(HI_ID_FISHEYE, EN_ERR_LEVEL_ERROR, EN_ERR_NOBUF) 35 | #define HI_ERR_FISHEYE_BUF_EMPTY HI_DEF_ERR(HI_ID_FISHEYE, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_EMPTY) 36 | #define HI_ERR_FISHEYE_NULL_PTR HI_DEF_ERR(HI_ID_FISHEYE, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR) 37 | #define HI_ERR_FISHEYE_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_FISHEYE, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM) 38 | #define HI_ERR_FISHEYE_BUF_FULL HI_DEF_ERR(HI_ID_FISHEYE, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_FULL) 39 | #define HI_ERR_FISHEYE_SYS_NOTREADY HI_DEF_ERR(HI_ID_FISHEYE, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY) 40 | #define HI_ERR_FISHEYE_NOT_SUPPORT HI_DEF_ERR(HI_ID_FISHEYE, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT) 41 | #define HI_ERR_FISHEYE_NOT_PERMITTED HI_DEF_ERR(HI_ID_FISHEYE, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM) 42 | 43 | typedef HI_S32 FISHEYE_HANDLE; 44 | 45 | typedef struct hiFISHEYE_TASK_ATTR_S 46 | { 47 | VIDEO_FRAME_INFO_S stImgIn; /* input picture */ 48 | VIDEO_FRAME_INFO_S stImgOut; /* output picture */ 49 | HI_U32 au32privateData[4]; /* task's private data */ 50 | HI_U32 reserved; /* save current picture's state while debug */ 51 | } FISHEYE_TASK_ATTR_S; 52 | 53 | typedef struct hiFISHEYE_ADD_PMF_S 54 | { 55 | HI_S32 as32PMFCoef[9]; 56 | } FISHEYE_ADD_PMF_S; 57 | 58 | 59 | #ifdef __cplusplus 60 | #if __cplusplus 61 | } 62 | #endif 63 | #endif /* __cplusplus */ 64 | 65 | #endif /* __HI_COMM_FISHEYE_H__ */ 66 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_comm_sys.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 3 | ****************************************************************************** 4 | File Name : hi3511_sys.h 5 | Version : Initial Draft 6 | Author : Hi3511 MPP Team 7 | Created : 2007/1/30 8 | Last Modified : 9 | Description : Hi3511 chip specific configure data structure 10 | Function List : 11 | History : 12 | 1.Date : 2007/1/30 13 | Author : c42025 14 | Modification: Created file 15 | 16 | 2.Date : 2007/11/30 17 | Author : c42025 18 | Modification: modify according review comments 19 | 20 | 3.Date : 2008/03/03 21 | Author : c42025 22 | Modification: modify HI_TRACE_SYS 23 | 24 | 4.Date : 2008/03/05 25 | Author : c42025 26 | Modification: modify 'HI_LOG_LEVEL_ERROR' to 'EN_ERR_LEVEL_ERROR' 27 | 28 | ******************************************************************************/ 29 | #ifndef __HI_COMM_SYS_H__ 30 | #define __HI_COMM_SYS_H__ 31 | 32 | #include "hi_type.h" 33 | #include "hi_errno.h" 34 | #include "hi_debug.h" 35 | 36 | #ifdef __cplusplus 37 | #if __cplusplus 38 | extern "C" { 39 | #endif 40 | #endif /* End of #ifdef __cplusplus */ 41 | 42 | #define HI_TRACE_SYS(level, fmt...) HI_TRACE(level, HI_ID_SYS,##fmt) 43 | typedef struct hiMPP_SYS_CONF_S 44 | { 45 | /* stride of picture buffer must be aligned with this value. 46 | * you can choose a value from 1 to 1024, and it must be multiple of 16. 47 | */ 48 | HI_U32 u32AlignWidth; 49 | 50 | } MPP_SYS_CONF_S; 51 | 52 | typedef struct hiSYS_VIRMEM_INFO_S 53 | { 54 | HI_U32 u32PhyAddr; 55 | HI_BOOL bCached; 56 | } SYS_VIRMEM_INFO_S; 57 | 58 | 59 | #define HI_ERR_SYS_NULL_PTR HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR) 60 | #define HI_ERR_SYS_NOTREADY HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY) 61 | #define HI_ERR_SYS_NOT_PERM HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM) 62 | #define HI_ERR_SYS_NOMEM HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM) 63 | #define HI_ERR_SYS_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM) 64 | #define HI_ERR_SYS_BUSY HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_BUSY) 65 | #define HI_ERR_SYS_NOT_SUPPORT HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT) 66 | 67 | 68 | #ifdef __cplusplus 69 | #if __cplusplus 70 | } 71 | #endif 72 | #endif /* __cplusplus */ 73 | 74 | #endif /* __HI_COMM_SYS_H__ */ 75 | 76 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_comm_vb.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 3 | ****************************************************************************** 4 | File Name : hi_common.h 5 | Version : Initial Draft 6 | Author : Hi3511 MPP Team 7 | Created : 2006/11/09 8 | Last Modified : 9 | Description : The common data type defination for VB module. 10 | Function List : 11 | History : 12 | 1.Date : 2006/11/03 13 | Author : c42025 14 | Modification: Created file 15 | 16 | 2.Date : 2007/11/30 17 | Author : c42025 18 | Modification: modify according review comments 19 | 20 | 3.Date : 2008/06/18 21 | Author : c42025 22 | Modification: add VB_UID_PCIV 23 | 24 | 4.Date : 2008/10/31 25 | Author : z44949 26 | Modification : Translate the chinese comment 27 | 28 | 5.Date : 2008/10/31 29 | Author : p00123320 30 | Modification : change commentary of u32MaxPoolCnt in VB_CONF_S 31 | ******************************************************************************/ 32 | #ifndef __HI_COMM_VB_H__ 33 | #define __HI_COMM_VB_H__ 34 | 35 | #include "hi_type.h" 36 | #include "hi_errno.h" 37 | #include "hi_debug.h" 38 | 39 | #ifdef __cplusplus 40 | #if __cplusplus 41 | extern "C"{ 42 | #endif 43 | #endif /* End of #ifdef __cplusplus */ 44 | 45 | #define VB_MAX_POOLS 256 46 | #define VB_MAX_COMM_POOLS 16 47 | #define VB_MAX_MOD_COMM_POOLS 16 48 | 49 | 50 | /* user ID for VB */ 51 | #define VB_MAX_USER 23 52 | 53 | typedef enum hiVB_UID_E 54 | { 55 | VB_UID_VIU = 0, 56 | VB_UID_VOU = 1, 57 | VB_UID_VGS = 2, 58 | VB_UID_VENC = 3, 59 | VB_UID_VDEC = 4, 60 | VB_UID_VDA = 5, 61 | VB_UID_H264E = 6, 62 | VB_UID_JPEGE = 7, 63 | VB_UID_MPEG4E = 8, 64 | VB_UID_H264D = 9, 65 | VB_UID_JPEGD = 10, 66 | VB_UID_MPEG4D = 11, 67 | VB_UID_VPSS = 12, 68 | VB_UID_GRP = 13, 69 | VB_UID_MPI = 14, 70 | VB_UID_PCIV = 15, 71 | VB_UID_AI = 16, 72 | VB_UID_AENC = 17, 73 | VB_UID_RC = 18, 74 | VB_UID_VFMW = 19, 75 | VB_UID_USER = 20, 76 | VB_UID_H265E = 21, 77 | VB_UID_FISHEYE = 22, 78 | VB_UID_BUTT 79 | 80 | } VB_UID_E; 81 | 82 | #define VB_INVALID_POOLID (-1UL) 83 | #define VB_INVALID_HANDLE (-1UL) 84 | 85 | /* Generall common pool use this owner id, module common pool use VB_UID as owner id */ 86 | #define POOL_OWNER_COMMON -1 87 | 88 | /* Private pool use this owner id */ 89 | #define POOL_OWNER_PRIVATE -2 90 | 91 | typedef enum hiPOOL_TYPE_E 92 | { 93 | POOL_TYPE_COMMON = 0, 94 | POOL_TYPE_PRIVATE = 1, 95 | POOL_TYPE_MODULE_COMMON = 2, 96 | POOL_TYPE_BUTT 97 | } POOL_TYPE_E; 98 | 99 | typedef HI_U32 VB_POOL; 100 | typedef HI_U32 VB_BLK; 101 | 102 | #define RESERVE_MMZ_NAME "window" 103 | 104 | typedef struct hiVB_CONF_S 105 | { 106 | HI_U32 u32MaxPoolCnt; /* max count of pools, (0,VB_MAX_POOLS] */ 107 | struct hiVB_CPOOL_S 108 | { 109 | HI_U32 u32BlkSize; 110 | HI_U32 u32BlkCnt; 111 | HI_CHAR acMmzName[MAX_MMZ_NAME_LEN]; 112 | }astCommPool[VB_MAX_COMM_POOLS]; 113 | } VB_CONF_S; 114 | 115 | typedef struct hiVB_POOL_STATUS_S 116 | { 117 | HI_U32 bIsCommPool; 118 | HI_U32 u32BlkCnt; 119 | HI_U32 u32FreeBlkCnt; 120 | }VB_POOL_STATUS_S; 121 | 122 | #define VB_SUPPLEMENT_JPEG_MASK 0x1 123 | 124 | typedef struct hiVB_SUPPLEMENT_CONF_S 125 | { 126 | HI_U32 u32SupplementConf; 127 | }VB_SUPPLEMENT_CONF_S; 128 | 129 | 130 | #define HI_ERR_VB_NULL_PTR HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR) 131 | #define HI_ERR_VB_NOMEM HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM) 132 | #define HI_ERR_VB_NOBUF HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_NOBUF) 133 | #define HI_ERR_VB_UNEXIST HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_UNEXIST) 134 | #define HI_ERR_VB_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM) 135 | #define HI_ERR_VB_NOTREADY HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY) 136 | #define HI_ERR_VB_BUSY HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_BUSY) 137 | #define HI_ERR_VB_NOT_PERM HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM) 138 | 139 | #define HI_ERR_VB_2MPOOLS HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_BUTT + 1) 140 | 141 | #define HI_TRACE_VB(level,fmt...) HI_TRACE(level, HI_ID_VB,##fmt) 142 | 143 | #ifdef __cplusplus 144 | #if __cplusplus 145 | } 146 | #endif 147 | #endif /* __cplusplus */ 148 | 149 | #endif /* __HI_COMM_VB_H_ */ 150 | 151 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_comm_venc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_comm_venc.h -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_comm_vgs.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2013-2033, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_comm_vgs.h 7 | Version : 8 | Author : Hisilicon Hi35xx MPP Team 9 | Created : 2013/07/24 10 | Last Modified : 11 | Description : common struct definition for VGS 12 | Function List : 13 | History : 14 | ******************************************************************************/ 15 | #ifndef __HI_COMM_VGS_H__ 16 | #define __HI_COMM_VGS_H__ 17 | 18 | #ifdef __cplusplus 19 | #if __cplusplus 20 | extern "C" { 21 | #endif 22 | #endif /* __cplusplus */ 23 | 24 | #include "hi_type.h" 25 | #include "hi_common.h" 26 | #include "hi_errno.h" 27 | #include "hi_comm_video.h" 28 | 29 | /* failure caused by malloc buffer */ 30 | #define HI_ERR_VGS_NOBUF HI_DEF_ERR(HI_ID_VGS, EN_ERR_LEVEL_ERROR, EN_ERR_NOBUF) 31 | #define HI_ERR_VGS_BUF_EMPTY HI_DEF_ERR(HI_ID_VGS, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_EMPTY) 32 | #define HI_ERR_VGS_NULL_PTR HI_DEF_ERR(HI_ID_VGS, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR) 33 | #define HI_ERR_VGS_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_VGS, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM) 34 | #define HI_ERR_VGS_BUF_FULL HI_DEF_ERR(HI_ID_VGS, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_FULL) 35 | #define HI_ERR_VGS_SYS_NOTREADY HI_DEF_ERR(HI_ID_VGS, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY) 36 | #define HI_ERR_VGS_NOT_SUPPORT HI_DEF_ERR(HI_ID_VGS, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT) 37 | #define HI_ERR_VGS_NOT_PERMITTED HI_DEF_ERR(HI_ID_VGS, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM) 38 | 39 | typedef HI_S32 VGS_HANDLE; 40 | 41 | typedef struct hiVGS_TASK_ATTR_S 42 | { 43 | VIDEO_FRAME_INFO_S stImgIn; /* input picture */ 44 | VIDEO_FRAME_INFO_S stImgOut; /* output picture */ 45 | HI_U32 au32privateData[4]; /* task's private data */ 46 | HI_U32 reserved; /* save current picture's state while debug */ 47 | } VGS_TASK_ATTR_S; 48 | 49 | typedef struct hiVGS_DRAW_LINE_S 50 | { 51 | POINT_S stStartPoint; /* line start point */ 52 | POINT_S stEndPoint; /* line end point */ 53 | 54 | HI_U32 u32Thick; /* width of line */ 55 | HI_U32 u32Color; /* color of line */ 56 | } VGS_DRAW_LINE_S; 57 | 58 | typedef enum hiVGS_COVER_TYPE_E 59 | { 60 | COVER_RECT = 0, /* retangle cover */ 61 | COVER_QUAD_RANGLE, /* quadrangle cover */ 62 | COVER_BUTT 63 | } VGS_COVER_TYPE_E; 64 | 65 | typedef struct hiVGS_QUADRANGLE_COVER_S 66 | { 67 | HI_BOOL bSolid; /* solid or hollow */ 68 | HI_U32 u32Thick; /* The thick of the hollow quadrangle */ 69 | POINT_S stPoint[4]; /* four points of the quadrangle */ 70 | } VGS_QUADRANGLE_COVER_S; 71 | 72 | typedef struct hiVGS_ADD_COVER_S 73 | { 74 | VGS_COVER_TYPE_E enCoverType; /* the cover type */ 75 | union 76 | { 77 | RECT_S stDstRect; /* the rectangle attribute */ 78 | VGS_QUADRANGLE_COVER_S stQuadRangle; /* the quadrangle attribute */ 79 | }; 80 | 81 | HI_U32 u32Color; /* color of cover */ 82 | } VGS_ADD_COVER_S; 83 | 84 | typedef struct hiVGS_ADD_OSD_S 85 | { 86 | RECT_S stRect; /* start point, width and height of osd */ 87 | HI_U32 u32BgColor; /* background color of osd */ 88 | PIXEL_FORMAT_E enPixelFmt; /* pixel format of osd */ 89 | HI_U32 u32PhyAddr; /* physical address of osd */ 90 | HI_U32 u32Stride; /* stride of osd */ 91 | HI_U32 u32BgAlpha; /* background alpha of osd */ 92 | HI_U32 u32FgAlpha; /* foreground alpha of osd */ 93 | } VGS_ADD_OSD_S; 94 | 95 | 96 | #ifdef __cplusplus 97 | #if __cplusplus 98 | } 99 | #endif 100 | #endif /* __cplusplus */ 101 | 102 | #endif /* __HI_COMM_VGS_H__ */ 103 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_comm_vi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_comm_vi.h -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_comm_vpss.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_comm_vpss.h -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_debug.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 3 | ****************************************************************************** 4 | File Name : hi_debug.h 5 | Version : Initial Draft 6 | Author : Hisilicon multimedia software group 7 | Created : 2006/12/09 8 | Last Modified : 9 | Description : all struct and maro definition for debug 10 | Function List : 11 | History : 12 | 1.Date : 2006/11/03 13 | Author : c42025 14 | Modification: Created file 15 | 16 | 2.Date : 2008/03/03 17 | Author : c42025 18 | Modification: 1. mv definition LOG_ERRLEVEL_E to here form file "hi_errno.h", 19 | but it will be obsolete in next version. 20 | 2. add new macro definition for debug levle. 21 | 3. change macro defintion HI_TRACE 22 | 23 | 3.Date : 2008/03/05 24 | Author : c42025 25 | Modification: Change the definition of LOG_ERRLEVEL_E 26 | 27 | 4.Date : 2008/10/31 28 | Author : z44949 29 | Modification: Delete the definition of LOG_ERRLEVEL_E 30 | 31 | 5.Date : 2010/11/03 32 | Author : z44949 33 | Modification: Remove some unnecessary typedef 34 | 35 | ******************************************************************************/ 36 | #ifndef __HI_DEBUG_H__ 37 | #define __HI_DEBUG_H__ 38 | 39 | #ifndef __KERNEL__ 40 | #include 41 | #endif 42 | 43 | #include "hi_type.h" 44 | #include "hi_common.h" 45 | 46 | #ifdef __cplusplus 47 | #if __cplusplus 48 | extern "C"{ 49 | #endif 50 | #endif /* __cplusplus */ 51 | 52 | #define _EX__FILE_LINE(fxx,lxx) "[File]:"fxx"\n[Line]:"#lxx"\n[Info]:" 53 | #define EX__FILE_LINE(fxx,lxx) _EX__FILE_LINE(fxx,lxx) 54 | #define __FILE_LINE__ EX__FILE_LINE(__FILE__, __LINE__) 55 | 56 | #define HI_DBG_EMERG 0 /* system is unusable */ 57 | #define HI_DBG_ALERT 1 /* action must be taken immediately */ 58 | #define HI_DBG_CRIT 2 /* critical conditions */ 59 | #define HI_DBG_ERR 3 /* error conditions */ 60 | #define HI_DBG_WARN 4 /* warning conditions */ 61 | #define HI_DBG_NOTICE 5 /* normal but significant condition */ 62 | #define HI_DBG_INFO 6 /* informational */ 63 | #define HI_DBG_DEBUG 7 /* debug-level messages */ 64 | 65 | typedef struct hiLOG_LEVEL_CONF_S 66 | { 67 | MOD_ID_E enModId; 68 | HI_S32 s32Level; 69 | HI_CHAR cModName[16]; 70 | } LOG_LEVEL_CONF_S; 71 | 72 | #ifndef __KERNEL__ 73 | /****************************************************************************** 74 | ** For User Mode : HI_PRINT, HI_ASSERT, HI_TRACE 75 | ******************************************************************************/ 76 | 77 | #define HI_PRINT printf 78 | 79 | /* #ifdef HI_DEBUG */ 80 | #if 1 81 | /* Using samples: HI_ASSERT(x>y); */ 82 | #define HI_ASSERT(expr) \ 83 | do{ \ 84 | if (!(expr)) { \ 85 | printf("\nASSERT failed at:\n"\ 86 | " >File name: %s\n" \ 87 | " >Function : %s\n" \ 88 | " >Line No. : %d\n" \ 89 | " >Condition: %s\n", \ 90 | __FILE__,__FUNCTION__, __LINE__, #expr);\ 91 | _exit(-1);\ 92 | } \ 93 | }while(0) 94 | 95 | /* Using samples: 96 | ** HI_TRACE(HI_DBG_DEBUG, HI_ID_CMPI, "Test %d, %s\n", 12, "Test"); 97 | **/ 98 | #define HI_TRACE(level, enModId, fmt...) fprintf(stderr,##fmt) 99 | #else 100 | #define HI_ASSERT(expr) 101 | #define HI_TRACE(level, enModId, fmt...) 102 | #endif 103 | 104 | #else 105 | /****************************************************************************** 106 | ** For Linux Kernel : HI_PRINT, HI_ASSERT, HI_TRACE 107 | ******************************************************************************/ 108 | 109 | #define HI_PRINT printk 110 | 111 | extern HI_S32 HI_ChkLogLevel(HI_S32 s32Levle, MOD_ID_E enModId); 112 | asmlinkage int HI_LOG(HI_S32 level, MOD_ID_E enModId,const char *fmt, ...); 113 | 114 | /* #ifdef HI_DEBUG */ 115 | #if 1 116 | /* Using samples: HI_ASSERT(x>y); */ 117 | #define HI_ASSERT(expr) \ 118 | do{ \ 119 | if (!(expr)) { \ 120 | panic("\nASSERT failed at:\n" \ 121 | " >File name: %s\n" \ 122 | " >Function : %s\n" \ 123 | " >Line No. : %d\n" \ 124 | " >Condition: %s\n", \ 125 | __FILE__,__FUNCTION__, __LINE__, #expr);\ 126 | } \ 127 | }while(0) 128 | 129 | /* Using samples: 130 | ** HI_TRACE(HI_DBG_DEBUG, HI_ID_CMPI, "Test %d, %s\n", 12, "Test"); 131 | **/ 132 | #define HI_TRACE HI_LOG 133 | #else 134 | #define HI_ASSERT(expr) 135 | #define HI_TRACE(level, enModId, fmt...) 136 | #endif 137 | 138 | #endif /* end of __KERNEL__ */ 139 | 140 | #ifdef __cplusplus 141 | #if __cplusplus 142 | } 143 | #endif 144 | #endif /* __cplusplus */ 145 | 146 | #endif /* __HI_DEBUG_H__ */ 147 | 148 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_i2c.h: -------------------------------------------------------------------------------- 1 | #ifndef _HI_I2C_H 2 | #define _HI_I2C_H 3 | 4 | 5 | 6 | /* /dev/i2c-X ioctl commands. The ioctl's parameter is always an 7 | * unsigned long, except for: 8 | * - I2C_FUNCS, takes pointer to an unsigned long 9 | * - I2C_RDWR, takes pointer to struct i2c_rdwr_ioctl_data 10 | * - I2C_SMBUS, takes pointer to struct i2c_smbus_ioctl_data 11 | */ 12 | #define I2C_RETRIES 0x0701 /* number of times a device address should 13 | be polled when not acknowledging */ 14 | #define I2C_TIMEOUT 0x0702 /* set timeout in units of 10 ms */ 15 | 16 | /* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses 17 | * are NOT supported! (due to code brokenness) 18 | */ 19 | #define I2C_SLAVE 0x0703 /* Use this slave address */ 20 | #define I2C_SLAVE_FORCE 0x0706 /* Use this slave address, even if it 21 | is already in use by a driver! */ 22 | #define I2C_TENBIT 0x0704 /* 0 for 7 bit addrs, != 0 for 10 bit */ 23 | 24 | #define I2C_FUNCS 0x0705 /* Get the adapter functionality mask */ 25 | 26 | #define I2C_RDWR 0x0707 /* Combined R/W transfer (one STOP only) */ 27 | 28 | #define I2C_PEC 0x0708 /* != 0 to use PEC with SMBus */ 29 | #define I2C_SMBUS 0x0720 /* SMBus transfer */ 30 | #define I2C_16BIT_REG 0x0709 /* 16BIT REG WIDTH */ 31 | #define I2C_16BIT_DATA 0x070a /* 16BIT DATA WIDTH */ 32 | 33 | typedef struct hiI2C_DATA_S 34 | { 35 | unsigned char dev_addr; 36 | unsigned int reg_addr; 37 | unsigned int addr_byte_num; 38 | unsigned int data; 39 | unsigned int data_byte_num; 40 | }I2C_DATA_S; 41 | 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_io.h: -------------------------------------------------------------------------------- 1 | #ifndef __HI_IO_H__ 2 | #define __HI_IO_H__ 3 | 4 | #include "hi_type.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" 8 | { 9 | #endif /* __cplusplus */ 10 | 11 | /* user and kernel are different. */ 12 | HI_U8 IO_READ8(HI_U32 u32Addr); 13 | HI_S32 IO_WRITE8(HI_U32 u32Addr, HI_U32 u32Value); 14 | HI_U16 IO_READ16(HI_U32 u32Addr); 15 | HI_S32 IO_WRITE16(HI_U32 u32Addr, HI_U32 u32Value); 16 | HI_U32 IO_READ32(HI_U32 u32Addr); 17 | HI_S32 IO_WRITE32(HI_U32 u32Addr, HI_U32 u32Value); 18 | HI_U32 ISP_Mmap(void); 19 | HI_U32 ISP_Munmap(void); 20 | HI_U32 ISP_GetExtRegAddr(void); 21 | //HI_VOID HI_RegSetBitEx(unsigned long value, unsigned long offset, 22 | // unsigned long length, unsigned long addr); 23 | //HI_VOID HI_RegRead(unsigned long *pvalue, unsigned long addr); 24 | 25 | static __inline HI_VOID HI_RegWrite32(unsigned long value, unsigned long mask, 26 | HI_U32 addr) 27 | { 28 | unsigned long t; 29 | 30 | t = readl(addr); 31 | t &= ~mask; 32 | t |= value & mask; 33 | writel(t, addr); 34 | } 35 | 36 | static __inline HI_VOID HI_RegSetBitEx(unsigned long value, unsigned long offset, 37 | unsigned long length, unsigned long addr) 38 | { 39 | unsigned long mask; 40 | mask = ((1 << length) - 1) << offset; 41 | value = value << offset; 42 | HI_RegWrite32(value, mask, addr); 43 | } 44 | 45 | static __inline HI_VOID HI_RegRead(unsigned long *pvalue, unsigned long addr) 46 | { 47 | *pvalue = readl(addr); 48 | } 49 | 50 | #define REG_ACCESS_WIDTH 0 // 1: 16bit 2: 8bit 51 | #define EXT_REG_BASE 0x10200 52 | #define ISP_REG_BASE_ADDR 0x205a0000 53 | 54 | #define EXT_REG_BASE_ISP 0x8000 55 | #define EXT_REG_BASE_VIU 0x8400 56 | #define EXT_REG_BASE_VPP 0x8600 57 | #define EXT_REG_BASE_VEDU 0x8800 58 | #define EXT_REG_BASE_VOU 0x8A00 59 | 60 | /* Dynamic bus access functions, 4 byte align access */ 61 | //TODO: allocate dev addr (such as ISP_REG_BASE_ADDR) according to devId. 62 | #define __IO_CALC_ADDRESS_DYNAMIC(BASE, OFFSET) ((HI_U32)(((BASE >= EXT_REG_BASE)? 0 : ISP_REG_BASE_ADDR) + ((((BASE >= EXT_REG_BASE)? (BASE - EXT_REG_BASE) : BASE) + OFFSET)< 11 | */ 12 | 13 | #define SPI_CPHA 0x01 14 | #define SPI_CPOL 0x02 15 | 16 | #define SPI_MODE_0 (0|0) 17 | #define SPI_MODE_1 (0|SPI_CPHA) 18 | #define SPI_MODE_2 (SPI_CPOL|0) 19 | #define SPI_MODE_3 (SPI_CPOL|SPI_CPHA) 20 | 21 | #define SPI_CS_HIGH 0x04 22 | #define SPI_LSB_FIRST 0x08 23 | #define SPI_3WIRE 0x10 24 | #define SPI_LOOP 0x20 25 | #define SPI_NO_CS 0x40 26 | #define SPI_READY 0x80 27 | 28 | /*---------------------------------------------------------------------------*/ 29 | 30 | /* IOCTL commands */ 31 | 32 | #define SPI_IOC_MAGIC 'k' 33 | 34 | /** 35 | * struct spi_ioc_transfer - describes a single SPI transfer 36 | * @tx_buf: Holds pointer to userspace buffer with transmit data, or null. 37 | * If no data is provided, zeroes are shifted out. 38 | * @rx_buf: Holds pointer to userspace buffer for receive data, or null. 39 | * @len: Length of tx and rx buffers, in bytes. 40 | * @speed_hz: Temporary override of the device's bitrate. 41 | * @bits_per_word: Temporary override of the device's wordsize. 42 | * @delay_usecs: If nonzero, how long to delay after the last bit transfer 43 | * before optionally deselecting the device before the next transfer. 44 | * @cs_change: True to deselect device before starting the next transfer. 45 | * 46 | * This structure is mapped directly to the kernel spi_transfer structure; 47 | * the fields have the same meanings, except of course that the pointers 48 | * are in a different address space (and may be of different sizes in some 49 | * cases, such as 32-bit i386 userspace over a 64-bit x86_64 kernel). 50 | * Zero-initialize the structure, including currently unused fields, to 51 | * accommodate potential future updates. 52 | * 53 | * SPI_IOC_MESSAGE gives userspace the equivalent of kernel spi_sync(). 54 | * Pass it an array of related transfers, they'll execute together. 55 | * Each transfer may be half duplex (either direction) or full duplex. 56 | * 57 | * struct spi_ioc_transfer mesg[4]; 58 | * ... 59 | * status = ioctl(fd, SPI_IOC_MESSAGE(4), mesg); 60 | * 61 | * So for example one transfer might send a nine bit command (right aligned 62 | * in a 16-bit word), the next could read a block of 8-bit data before 63 | * terminating that command by temporarily deselecting the chip; the next 64 | * could send a different nine bit command (re-selecting the chip), and the 65 | * last transfer might write some register values. 66 | */ 67 | struct spi_ioc_transfer { 68 | __u64 tx_buf; 69 | __u64 rx_buf; 70 | 71 | __u32 len; 72 | __u32 speed_hz; 73 | 74 | __u16 delay_usecs; 75 | __u8 bits_per_word; 76 | __u8 cs_change; 77 | __u32 pad; 78 | 79 | /* If the contents of 'struct spi_ioc_transfer' ever change 80 | * incompatibly, then the ioctl number (currently 0) must change; 81 | * ioctls with constant size fields get a bit more in the way of 82 | * error checking than ones (like this) where that field varies. 83 | * 84 | * NOTE: struct layout is the same in 64bit and 32bit userspace. 85 | */ 86 | }; 87 | 88 | /* not all platforms use or _IOC_TYPECHECK() ... */ 89 | #define SPI_MSGSIZE(N) \ 90 | ((((N)*(sizeof (struct spi_ioc_transfer))) < (1 << _IOC_SIZEBITS)) \ 91 | ? ((N)*(sizeof (struct spi_ioc_transfer))) : 0) 92 | #define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N)]) 93 | 94 | 95 | /* Read / Write of SPI mode (SPI_MODE_0..SPI_MODE_3) */ 96 | #define SPI_IOC_RD_MODE _IOR(SPI_IOC_MAGIC, 1, __u8) 97 | #define SPI_IOC_WR_MODE _IOW(SPI_IOC_MAGIC, 1, __u8) 98 | 99 | /* Read / Write SPI bit justification */ 100 | #define SPI_IOC_RD_LSB_FIRST _IOR(SPI_IOC_MAGIC, 2, __u8) 101 | #define SPI_IOC_WR_LSB_FIRST _IOW(SPI_IOC_MAGIC, 2, __u8) 102 | 103 | /* Read / Write SPI device word length (1..N) */ 104 | #define SPI_IOC_RD_BITS_PER_WORD _IOR(SPI_IOC_MAGIC, 3, __u8) 105 | #define SPI_IOC_WR_BITS_PER_WORD _IOW(SPI_IOC_MAGIC, 3, __u8) 106 | 107 | /* Read / Write SPI device default max speed hz */ 108 | #define SPI_IOC_RD_MAX_SPEED_HZ _IOR(SPI_IOC_MAGIC, 4, __u32) 109 | #define SPI_IOC_WR_MAX_SPEED_HZ _IOW(SPI_IOC_MAGIC, 4, __u32) 110 | 111 | 112 | 113 | #endif /* __HI_SPI_H__ */ 114 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_tde_errcode.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 3 | ****************************************************************************** 4 | File Name : tde_errcode.h 5 | Version : Initial Draft 6 | Author : Hisilicon multimedia software group 7 | Created : 2005/4/23 8 | Last Modified : 9 | Description : err code define 10 | Function List : 11 | History : May modify the code to errcode.h FOR hi3110 12 | ******************************************************************************/ 13 | #ifndef __TDE_ERRCODE_H__ 14 | #define __TDE_ERRCODE_H__ 15 | 16 | //#include "hi_debug.h" 17 | #include "hi_type.h" 18 | 19 | #ifdef __cplusplus 20 | #if __cplusplus 21 | extern "C"{ 22 | #endif 23 | #endif /* __cplusplus */ 24 | 25 | //#define HI_ID_TDE 100 26 | /* tde start err no. */ 27 | #define HI_ERR_TDE_BASE ((HI_S32)( ((0x80UL + 0x20UL)<<24) | (100 << 16 ) | (4 << 13) | 1 )) 28 | 29 | enum 30 | { 31 | HI_ERR_TDE_DEV_NOT_OPEN = HI_ERR_TDE_BASE, /**< tde device not open yet */ 32 | HI_ERR_TDE_DEV_OPEN_FAILED, /**< open tde device failed */ 33 | HI_ERR_TDE_NULL_PTR, /**< input parameters contain null ptr */ 34 | HI_ERR_TDE_NO_MEM, /**< malloc failed */ 35 | HI_ERR_TDE_INVALID_HANDLE, /**< invalid job handle */ 36 | HI_ERR_TDE_INVALID_PARA, /**< invalid parameter */ 37 | HI_ERR_TDE_NOT_ALIGNED, /**< aligned error for position, stride, width */ 38 | HI_ERR_TDE_MINIFICATION, /**< invalid minification */ 39 | HI_ERR_TDE_CLIP_AREA, /**< clip area and operation area have no intersection */ 40 | HI_ERR_TDE_JOB_TIMEOUT, /**< blocked job wait timeout */ 41 | HI_ERR_TDE_UNSUPPORTED_OPERATION, /**< unsupported operation */ 42 | HI_ERR_TDE_QUERY_TIMEOUT, /**< query time out */ 43 | HI_ERR_TDE_INTERRUPT /**< blocked job was interrupted */ 44 | }; 45 | 46 | 47 | #ifdef __cplusplus 48 | #if __cplusplus 49 | } 50 | #endif 51 | #endif /* __cplusplus */ 52 | 53 | #endif /* __TDE_ERRCODE_H__*/ 54 | 55 | 56 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_tde_type.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_tde_type.h -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_type.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_type.h -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/hi_vreg.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_vreg.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2013/01/09 10 | Description : 11 | History : 12 | 1.Date : 2013/01/09 13 | Author : n00168968 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | 18 | #ifndef __HI_VREG_H__ 19 | #define __HI_VREG_H__ 20 | 21 | #include "hi_type.h" 22 | #include "hi_comm_isp.h" 23 | 24 | #ifdef __cplusplus 25 | #if __cplusplus 26 | extern "C"{ 27 | #endif 28 | #endif /* End of #ifdef __cplusplus */ 29 | 30 | #define REG_ACCESS_WIDTH_1 0 31 | #define REG_ACCESS_WIDTH 0 /* 1: 16bit 2: 8bit */ 32 | 33 | /* Vreg is a blok of memory alloced to simulate the regs. 34 | * We try to differentiate vregs by baseaddr. Each vreg 35 | * block's size should at least 4k bytes. 36 | */ 37 | /*---------------------------------------------------------------------------------------------------------* 38 | *| 0x205A0000 | 0x10000 | 0x20000 | 0x21000 | ... | 0x30000 | ... | 0x40000 | ... | 0x80000 | ...|* 39 | *|------------|-----------|----------|----------|-----|-----------|-----|----------|-----|----------|----|* 40 | *| ISP_REG | ISP_VREG | AE1_VREG | AE2_VREG | ... | AWB1_VREG | ... | AF1_VREG | ... | VIU_VREG | ...|* 41 | *---------------------------------------------------------------------------------------------------------*/ 42 | 43 | #define ISP_REG_BASE 0x205A0000 44 | #define ISP_REG_SIZE 0xffff 45 | 46 | #define VI_REG_BASE 0x20580000 47 | #define VI_REG_SIZE 0x20000 48 | 49 | #define VREG_SIZE_ALIGN 0x1000 50 | 51 | #define EXT_REG_BASE 0x10000 52 | 53 | #define ISP_VREG_BASE 0x10000 54 | #define ISP_VREG_SIZE (VREG_SIZE_ALIGN << 4) 55 | 56 | #define AE_LIB_VREG_BASE(id) (0x20000 + VREG_SIZE_ALIGN * (id)) 57 | #define AWB_LIB_VREG_BASE(id) (0x30000 + VREG_SIZE_ALIGN * (id)) 58 | #define AF_LIB_VREG_BASE(id) (0x40000 + VREG_SIZE_ALIGN * (id)) 59 | #define ALG_LIB_VREG_SIZE (VREG_SIZE_ALIGN) 60 | #define MAX_ALG_LIB_VREG_NUM (1 << 4) 61 | 62 | #define HISI_AE_LIB_EXTREG_ID_0 0 63 | #define HISI_AE_LIB_EXTREG_ID_1 1 64 | 65 | #define HISI_AWB_LIB_EXTREG_ID_0 0 66 | #define HISI_AWB_LIB_EXTREG_ID_1 1 67 | 68 | #define VIU_VREG_BASE 0x80000 69 | #define VPP_VREG_BASE 0x90000 70 | #define VEDU_VREG_BASE 0xa0000 71 | #define VOU_VREG_BASE 0xb0000 72 | 73 | HI_S32 VReg_Init(HI_U32 u32BaseAddr, HI_U32 u32Size); 74 | HI_S32 VReg_Exit(HI_U32 u32BaseAddr, HI_U32 u32Size); 75 | HI_S32 VReg_ReleaseAll(HI_VOID); 76 | HI_U32 VReg_GetVirtAddr(HI_U32 u32BaseAddr); 77 | HI_VOID VReg_Munmap(HI_VOID); 78 | HI_U32 IO_READ32(HI_U32 u32Addr); 79 | HI_S32 IO_WRITE32(HI_U32 u32Addr, HI_U32 u32Value); 80 | HI_U16 IO_READ16(HI_U32 u32Addr); 81 | HI_S32 IO_WRITE16(HI_U32 u32Addr, HI_U32 u32Value); 82 | HI_U8 IO_READ8(HI_U32 u32Addr); 83 | HI_S32 IO_WRITE8(HI_U32 u32Addr, HI_U32 u32Value); 84 | 85 | /* Dynamic bus access functions, 4 byte align access */ 86 | //TODO: allocate dev addr (such as ISP_REG_BASE_ADDR) according to devId. 87 | #define __IO_CALC_ADDRESS_DYNAMIC(BASE) (HI_U32)(((BASE >= EXT_REG_BASE) ? 0 : ISP_REG_BASE) + (BASE)) 88 | 89 | #define IORD_32DIRECT(BASE) IO_READ32(__IO_CALC_ADDRESS_DYNAMIC(BASE)) 90 | #define IORD_16DIRECT(BASE) IO_READ16(__IO_CALC_ADDRESS_DYNAMIC(BASE)) 91 | #define IORD_8DIRECT(BASE) IO_READ8(__IO_CALC_ADDRESS_DYNAMIC(BASE)) 92 | 93 | #define IOWR_32DIRECT(BASE, DATA) IO_WRITE32(__IO_CALC_ADDRESS_DYNAMIC(BASE), (DATA)) 94 | #define IOWR_16DIRECT(BASE, DATA) IO_WRITE16(__IO_CALC_ADDRESS_DYNAMIC(BASE), (DATA)) 95 | #define IOWR_8DIRECT(BASE, DATA) IO_WRITE8(__IO_CALC_ADDRESS_DYNAMIC(BASE), (DATA)) 96 | 97 | 98 | /*--------------------------------------------------------------------------------------*/ 99 | /* write or read vi reg */ 100 | HI_U32 IO_READ32_VI(HI_U32 u32Addr); 101 | HI_S32 IO_WRITE32_VI(HI_U32 u32Addr, HI_U32 u32Value); 102 | 103 | #define __IO_CALC_ADDRESS_DYNAMIC_VI(BASE) (HI_U32)((VI_REG_BASE) + (BASE)) 104 | #define IORD_32DIRECT_VI(BASE) IO_READ32_VI(__IO_CALC_ADDRESS_DYNAMIC_VI(BASE)) 105 | #define IOWR_32DIRECT_VI(BASE, DATA) IO_WRITE32_VI(__IO_CALC_ADDRESS_DYNAMIC_VI(BASE), (DATA)) 106 | /*--------------------------------------------------------------------------------------*/ 107 | 108 | #ifdef __cplusplus 109 | #if __cplusplus 110 | } 111 | #endif 112 | #endif /* End of #ifdef __cplusplus */ 113 | 114 | #endif 115 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/himedia.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_HIMEDIA_DEVICE_H_ 2 | #define _LINUX_HIMEDIA_DEVICE_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #define HIMEDIA_DEVICE_MAJOR 218 9 | #define HIMEDIA_DYNAMIC_MINOR 255 10 | 11 | struct himedia_device; 12 | 13 | struct himedia_ops { 14 | //pm methos 15 | int (*pm_prepare)(struct himedia_device *); 16 | void (*pm_complete)(struct himedia_device *); 17 | 18 | int (*pm_suspend)(struct himedia_device *); 19 | int (*pm_resume)(struct himedia_device *); 20 | 21 | int (*pm_freeze)(struct himedia_device *); 22 | int (*pm_thaw)(struct himedia_device *); 23 | int (*pm_poweroff)(struct himedia_device *); 24 | int (*pm_restore)(struct himedia_device *); 25 | 26 | int (*pm_suspend_late)(struct himedia_device *); 27 | int (*pm_resume_early)(struct himedia_device *); 28 | int (*pm_freeze_late)(struct himedia_device *); 29 | int (*pm_thaw_early)(struct himedia_device *); 30 | int (*pm_poweroff_late)(struct himedia_device *); 31 | int (*pm_restore_early)(struct himedia_device *); 32 | 33 | int (*pm_suspend_noirq)(struct himedia_device *); 34 | int (*pm_resume_noirq)(struct himedia_device *); 35 | 36 | int (*pm_freeze_noirq)(struct himedia_device *); 37 | int (*pm_thaw_noirq)(struct himedia_device *); 38 | int (*pm_poweroff_noirq)(struct himedia_device *); 39 | int (*pm_restore_noirq)(struct himedia_device *); 40 | }; 41 | 42 | struct himedia_driver{ 43 | struct device_driver driver; 44 | struct himedia_ops *ops; 45 | char name[1]; 46 | }; 47 | 48 | #define to_himedia_driver(drv) \ 49 | container_of((drv), struct himedia_driver, driver) 50 | 51 | struct himedia_device { 52 | struct list_head list; 53 | 54 | #define MAX_LEN 32 55 | char devfs_name[MAX_LEN]; 56 | 57 | int minor; 58 | 59 | struct device device; 60 | 61 | struct module *owner; 62 | 63 | const struct file_operations *fops; 64 | 65 | struct himedia_ops *drvops; 66 | 67 | /*for internal use*/ 68 | struct himedia_driver *driver; 69 | }; 70 | 71 | 72 | #define to_himedia_device(dev) \ 73 | container_of((dev), struct himedia_device, device) 74 | 75 | int himedia_register(struct himedia_device *pdev); 76 | 77 | int himedia_unregister(struct himedia_device *pdev); 78 | 79 | #define MODULE_ALIAS_HIMEDIA(minor) \ 80 | MODULE_ALIAS("himedia-char-major-" __stringify(HIMEDIA_DEVICE_MAJOR) \ 81 | "-" __stringify(minor)) 82 | 83 | #endif /*_LINUX_HIMEDIA_DEVICE_H_*/ 84 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/list.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) HighPoint Technologies, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 | * SUCH DAMAGE. 25 | * 26 | * $FreeBSD: src/sys/dev/hptrr/list.h,v 1.2.2.1.4.1 2010/06/14 02:09:06 kensmith Exp $ 27 | */ 28 | /* 29 | * $Id: list.h,v 1.6 2006/10/31 06:25:28 gmm Exp $ 30 | * Copyright (C) 2004-2005 HighPoint Technologies, Inc. All rights reserved. 31 | */ 32 | #ifndef _HPT_LIST_H_ 33 | #define _HPT_LIST_H_ 34 | 35 | #ifndef _LINUX_LIST_H 36 | 37 | #ifndef HPT_INLINE 38 | #define HPT_INLINE __inline 39 | #endif 40 | 41 | typedef unsigned long HPT_UPTR; 42 | 43 | struct list_head { 44 | struct list_head *next, *prev; 45 | }; 46 | 47 | #define LIST_HEAD_INIT(name) { &(name), &(name) } 48 | 49 | #define INIT_LIST_HEAD(ptr) do { (ptr)->next = (ptr); (ptr)->prev = (ptr); } while (0) 50 | 51 | static HPT_INLINE void __list_add(struct list_head * _new, struct list_head * prev, struct list_head * next) 52 | { 53 | next->prev = _new; 54 | _new->next = next; 55 | _new->prev = prev; 56 | prev->next = _new; 57 | } 58 | 59 | static HPT_INLINE void list_add(struct list_head *_new, struct list_head *head) 60 | { 61 | __list_add(_new, head, head->next); 62 | } 63 | 64 | static HPT_INLINE void list_add_tail(struct list_head *_new, struct list_head *head) 65 | { 66 | __list_add(_new, head->prev, head); 67 | } 68 | 69 | static HPT_INLINE void __list_del(struct list_head * prev, struct list_head * next) 70 | { 71 | next->prev = prev; 72 | prev->next = next; 73 | } 74 | 75 | static HPT_INLINE void list_del(struct list_head *entry) 76 | { 77 | __list_del(entry->prev, entry->next); 78 | } 79 | 80 | static HPT_INLINE void list_del_init(struct list_head *entry) 81 | { 82 | __list_del(entry->prev, entry->next); 83 | INIT_LIST_HEAD(entry); 84 | } 85 | 86 | static inline void list_move(struct list_head *list, struct list_head *head) 87 | { 88 | __list_del(list->prev, list->next); 89 | list_add(list, head); 90 | } 91 | 92 | static inline void list_move_tail(struct list_head *list, 93 | struct list_head *head) 94 | { 95 | __list_del(list->prev, list->next); 96 | list_add_tail(list, head); 97 | } 98 | 99 | static HPT_INLINE int list_empty(struct list_head *head) 100 | { 101 | return head->next == head; 102 | } 103 | 104 | static HPT_INLINE void __list_splice(struct list_head *list, 105 | struct list_head *head) 106 | { 107 | struct list_head *first = list->next; 108 | struct list_head *last = list->prev; 109 | struct list_head *at = head->next; 110 | 111 | first->prev = head; 112 | head->next = first; 113 | 114 | last->next = at; 115 | at->prev = last; 116 | } 117 | 118 | static HPT_INLINE void list_splice(struct list_head *list, struct list_head *head) 119 | { 120 | if (!list_empty(list)) 121 | __list_splice(list, head); 122 | } 123 | 124 | static HPT_INLINE void list_splice_init(struct list_head *list, struct list_head *head) 125 | { 126 | if (!list_empty(list)) { 127 | __list_splice(list, head); 128 | INIT_LIST_HEAD(list); 129 | } 130 | } 131 | 132 | /*#define list_entry(ptr, type, member) \ 133 | ((type *)((char *)(ptr)-(HPT_UPTR)(&((type *)0)->member))) */ 134 | #define list_entry(ptr, type, member) \ 135 | ((type *)((unsigned long)(ptr)-((unsigned long)(&((type *)1)->member) - 1))) 136 | 137 | #define list_for_each(pos, head) \ 138 | for (pos = (head)->next; pos != (head); pos = pos->next) 139 | 140 | #define list_for_each_safe(pos, n, head) \ 141 | for (pos = (head)->next, n = pos->next; pos != (head); \ 142 | pos = n, n = pos->next) 143 | 144 | #define get_first_item(attached, type, member) \ 145 | ((type *)((char *)((attached)->next)-(HPT_UPTR)(&((type *)0)->member))) 146 | 147 | #endif 148 | 149 | #endif 150 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_adec.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : ai.c 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/6/15 10 | Description : 11 | History : 12 | 1.Date : 2009/6/19 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | #ifndef __MPI_ADEC_H__ 17 | #define __MPI_ADEC_H__ 18 | 19 | #include "hi_common.h" 20 | #include "hi_comm_aio.h" 21 | #include "hi_comm_adec.h" 22 | 23 | #ifdef __cplusplus 24 | #if __cplusplus 25 | extern "C" 26 | { 27 | #endif 28 | #endif /* __cplusplus */ 29 | 30 | HI_S32 HI_MPI_ADEC_CreateChn(ADEC_CHN AdChn, ADEC_CHN_ATTR_S *pstAttr); 31 | HI_S32 HI_MPI_ADEC_DestroyChn(ADEC_CHN AdChn); 32 | 33 | HI_S32 HI_MPI_ADEC_SendStream(ADEC_CHN AdChn, const AUDIO_STREAM_S *pstStream, HI_BOOL bBlock); 34 | 35 | HI_S32 HI_MPI_ADEC_ClearChnBuf(ADEC_CHN AdChn); 36 | 37 | HI_S32 HI_MPI_ADEC_RegeisterDecoder(HI_S32 *ps32Handle, ADEC_DECODER_S *pstDecoder); 38 | HI_S32 HI_MPI_ADEC_UnRegisterDecoder(HI_S32 s32Handle); 39 | 40 | HI_S32 HI_MPI_ADEC_GetFrame(ADEC_CHN AdChn, AUDIO_FRAME_INFO_S *pstFrmInfo, HI_BOOL bBlock); 41 | HI_S32 HI_MPI_ADEC_ReleaseFrame(ADEC_CHN AdChn, AUDIO_FRAME_INFO_S *pstFrmInfo); 42 | HI_S32 HI_MPI_ADEC_SendEndOfStream(ADEC_CHN AdChn, HI_BOOL bInstant); 43 | 44 | 45 | 46 | #ifdef __cplusplus 47 | #if __cplusplus 48 | } 49 | #endif 50 | #endif /* __cplusplus */ 51 | 52 | #endif /* __MPI_ADEC_H__ */ 53 | 54 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_ae.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_ae.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2014/04/01 10 | Description : 11 | History : 12 | 1.Date : 2014/04/01 13 | Author : h00191408 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | #ifndef __MPI_AE_H__ 18 | #define __MPI_AE_H__ 19 | 20 | #include "hi_comm_isp.h" 21 | #include "hi_comm_3a.h" 22 | #include "hi_ae_comm.h" 23 | 24 | #ifdef __cplusplus 25 | #if __cplusplus 26 | extern "C"{ 27 | #endif 28 | #endif /* End of #ifdef __cplusplus */ 29 | 30 | 31 | /* The interface of ae lib register to isp. */ 32 | HI_S32 HI_MPI_AE_Register(ISP_DEV IspDev, ALG_LIB_S *pstAeLib); 33 | HI_S32 HI_MPI_AE_UnRegister(ISP_DEV IspDev, ALG_LIB_S *pstAeLib); 34 | 35 | /* The callback function of sensor register to ae lib. */ 36 | HI_S32 HI_MPI_AE_SensorRegCallBack(ISP_DEV IspDev, ALG_LIB_S *pstAeLib, SENSOR_ID SensorId, 37 | AE_SENSOR_REGISTER_S *pstRegister); 38 | HI_S32 HI_MPI_AE_SensorUnRegCallBack(ISP_DEV IspDev, ALG_LIB_S *pstAeLib, SENSOR_ID SensorId); 39 | 40 | HI_S32 HI_MPI_ISP_SetExposureAttr(ISP_DEV IspDev, const ISP_EXPOSURE_ATTR_S *pstExpAttr); 41 | HI_S32 HI_MPI_ISP_GetExposureAttr(ISP_DEV IspDev, ISP_EXPOSURE_ATTR_S *pstExpAttr); 42 | 43 | HI_S32 HI_MPI_ISP_SetWDRExposureAttr(ISP_DEV IspDev, const ISP_WDR_EXPOSURE_ATTR_S *pstWDRExpAttr); 44 | HI_S32 HI_MPI_ISP_GetWDRExposureAttr(ISP_DEV IspDev, ISP_WDR_EXPOSURE_ATTR_S *pstWDRExpAttr); 45 | 46 | HI_S32 HI_MPI_ISP_SetAERouteAttr(ISP_DEV IspDev, const ISP_AE_ROUTE_S *pstAERouteAttr); 47 | HI_S32 HI_MPI_ISP_GetAERouteAttr(ISP_DEV IspDev, ISP_AE_ROUTE_S *pstAERouteAttr); 48 | 49 | HI_S32 HI_MPI_ISP_QueryExposureInfo(ISP_DEV IspDev, ISP_EXP_INFO_S *pstExpInfo); 50 | 51 | HI_S32 HI_MPI_ISP_SetIrisAttr(ISP_DEV IspDev, const ISP_IRIS_ATTR_S *pstIrisAttr); 52 | HI_S32 HI_MPI_ISP_GetIrisAttr(ISP_DEV IspDev, ISP_IRIS_ATTR_S *pstIrisAttr); 53 | 54 | HI_S32 HI_MPI_ISP_SetDcirisAttr(ISP_DEV IspDev, const ISP_DCIRIS_ATTR_S *pstDcirisAttr); 55 | HI_S32 HI_MPI_ISP_GetDcirisAttr(ISP_DEV IspDev, ISP_DCIRIS_ATTR_S *pstDcirisAttr); 56 | 57 | HI_S32 HI_MPI_ISP_SetPirisAttr(ISP_DEV IspDev, const ISP_PIRIS_ATTR_S *pstPirisAttr); 58 | HI_S32 HI_MPI_ISP_GetPirisAttr(ISP_DEV IspDev, ISP_PIRIS_ATTR_S *pstPirisAttr); 59 | 60 | HI_S32 HI_MPI_ISP_SetAERouteAttrEx(ISP_DEV IspDev, const ISP_AE_ROUTE_EX_S *pstAERouteAttrEx); 61 | HI_S32 HI_MPI_ISP_GetAERouteAttrEx(ISP_DEV IspDev, ISP_AE_ROUTE_EX_S *pstAERouteAttrEx); 62 | 63 | 64 | 65 | 66 | #ifdef __cplusplus 67 | #if __cplusplus 68 | } 69 | #endif 70 | #endif /* End of #ifdef __cplusplus */ 71 | 72 | #endif 73 | 74 | 75 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_aenc.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : ai.c 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/6/15 10 | Description : 11 | History : 12 | 1.Date : 2009/6/15 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | #ifndef __MPI_AENC_H__ 17 | #define __MPI_AENC_H__ 18 | 19 | #include "hi_common.h" 20 | #include "hi_comm_aio.h" 21 | #include "hi_comm_aenc.h" 22 | 23 | #ifdef __cplusplus 24 | #if __cplusplus 25 | extern "C" 26 | { 27 | #endif 28 | #endif /* __cplusplus */ 29 | 30 | #define AENC_ADAPT_MAGIC 0Xfcfcfcfc 31 | 32 | HI_S32 HI_MPI_AENC_CreateChn(AENC_CHN AeChn, const AENC_CHN_ATTR_S *pstAttr); 33 | HI_S32 HI_MPI_AENC_DestroyChn(AENC_CHN AeChn); 34 | 35 | HI_S32 HI_MPI_AENC_SendFrame(AENC_CHN AeChn, const AUDIO_FRAME_S *pstFrm, const AEC_FRAME_S *pstAecFrm); 36 | 37 | HI_S32 HI_MPI_AENC_GetStream(AENC_CHN AeChn, AUDIO_STREAM_S *pstStream, HI_S32 s32MilliSec); 38 | HI_S32 HI_MPI_AENC_ReleaseStream(AENC_CHN AeChn, const AUDIO_STREAM_S *pstStream); 39 | 40 | HI_S32 HI_MPI_AENC_GetFd(AENC_CHN AeChn); 41 | 42 | HI_S32 HI_MPI_AENC_RegeisterEncoder(HI_S32 *ps32Handle, AENC_ENCODER_S *pstEncoder); 43 | HI_S32 HI_MPI_AENC_UnRegisterEncoder(HI_S32 s32Handle); 44 | 45 | HI_S32 HI_MPI_AENC_SaveFile(AENC_CHN AeChn, AUDIO_SAVE_FILE_INFO_S *pstSaveFileInfo); 46 | 47 | 48 | #ifdef __cplusplus 49 | #if __cplusplus 50 | } 51 | #endif 52 | #endif /* __cplusplus */ 53 | 54 | #endif /* __MPI_AENC_H__ */ 55 | 56 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_af.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_af.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2012/12/19 10 | Description : 11 | History : 12 | 1.Date : 2012/12/19 13 | Author : n00168968 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | #ifndef __MPI_AF_H__ 18 | #define __MPI_AF_H__ 19 | 20 | #include "hi_comm_isp.h" 21 | #include "hi_comm_3a.h" 22 | #include "hi_af_comm.h" 23 | 24 | #ifdef __cplusplus 25 | #if __cplusplus 26 | extern "C"{ 27 | #endif 28 | #endif /* End of #ifdef __cplusplus */ 29 | 30 | /* The interface of af lib register to isp. */ 31 | HI_S32 HI_MPI_AF_Register(ISP_DEV IspDev, ALG_LIB_S *pstAfLib); 32 | HI_S32 HI_MPI_AF_UnRegister(ISP_DEV IspDev, ALG_LIB_S *pstAfLib); 33 | 34 | #if 0 35 | /* The callback function of sensor register to af lib. */ 36 | HI_S32 hi_af_sensor_register_cb(ALG_LIB_S *pstAfLib, SENSOR_ID SensorId, 37 | CMOS_ISP_AF_DEFAULT_S *pstSnsDft, SENSOR_AF_EXP_FUNC_S *pstSnsExp); 38 | #endif 39 | 40 | /* The new awb lib is compatible with the old mpi interface. */ 41 | HI_S32 HI_MPI_ISP_SetFocusType(ISP_DEV IspDev, ISP_OP_TYPE_E enFocusType); //not support yet 42 | HI_S32 HI_MPI_ISP_GetFocusType(ISP_DEV IspDev, ISP_OP_TYPE_E *penFocusType); //not support yet 43 | 44 | HI_S32 HI_MPI_ISP_SetAFAttr(ISP_DEV IspDev, const ISP_AF_ATTR_S *pstAFAttr); //not support yet 45 | HI_S32 HI_MPI_ISP_GetAFAttr(ISP_DEV IspDev, ISP_AF_ATTR_S *pstAFAttr); //not support yet 46 | 47 | HI_S32 HI_MPI_ISP_SetMFAttr(ISP_DEV IspDev, const ISP_MF_ATTR_S *pstMFAttr); //not support yet 48 | HI_S32 HI_MPI_ISP_GetMFAttr(ISP_DEV IspDev, ISP_MF_ATTR_S *pstMFAttr); //not support yet 49 | 50 | HI_S32 HI_MPI_ISP_ManualFocusMove(ISP_DEV IspDev, HI_S32 s32MoveSteps); //not support yet 51 | 52 | 53 | #ifdef __cplusplus 54 | #if __cplusplus 55 | } 56 | #endif 57 | #endif /* End of #ifdef __cplusplus */ 58 | 59 | #endif 60 | 61 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_ai.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_ai.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/5/5 10 | Description : 11 | History : 12 | 1.Date : 2009/5/5 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | #ifndef __MPI_AI_H__ 17 | #define __MPI_AI_H__ 18 | 19 | #include "hi_type.h" 20 | #include "hi_common.h" 21 | #include "hi_comm_aio.h" 22 | 23 | #ifdef __cplusplus 24 | #if __cplusplus 25 | extern "C" 26 | { 27 | #endif 28 | #endif /* __cplusplus */ 29 | 30 | HI_S32 HI_MPI_AI_SetPubAttr(AUDIO_DEV AudioDevId, const AIO_ATTR_S *pstAttr); 31 | HI_S32 HI_MPI_AI_GetPubAttr(AUDIO_DEV AudioDevId, AIO_ATTR_S *pstAttr); 32 | 33 | HI_S32 HI_MPI_AI_Enable(AUDIO_DEV AudioDevId); 34 | HI_S32 HI_MPI_AI_Disable(AUDIO_DEV AudioDevId); 35 | 36 | HI_S32 HI_MPI_AI_EnableChn(AUDIO_DEV AudioDevId, AI_CHN AiChn); 37 | HI_S32 HI_MPI_AI_DisableChn(AUDIO_DEV AudioDevId, AI_CHN AiChn); 38 | 39 | HI_S32 HI_MPI_AI_GetFrame(AUDIO_DEV AudioDevId, AI_CHN AiChn, AUDIO_FRAME_S *pstFrm, AEC_FRAME_S *pstAecFrm, HI_S32 s32MilliSec); 40 | HI_S32 HI_MPI_AI_ReleaseFrame(AUDIO_DEV AudioDevId, AI_CHN AiChn, AUDIO_FRAME_S *pstFrm, AEC_FRAME_S *pstAecFrm); 41 | 42 | HI_S32 HI_MPI_AI_SetChnParam(AUDIO_DEV AudioDevId, AI_CHN AiChn, AI_CHN_PARAM_S *pstChnParam); 43 | HI_S32 HI_MPI_AI_GetChnParam(AUDIO_DEV AudioDevId, AI_CHN AiChn, AI_CHN_PARAM_S *pstChnParam); 44 | 45 | HI_S32 HI_MPI_AI_SetVqeAttr(AUDIO_DEV AiDevId, AI_CHN AiChn, AUDIO_DEV AoDevId, AO_CHN AoChn, AI_VQE_CONFIG_S *pstVqeConfig); 46 | HI_S32 HI_MPI_AI_GetVqeAttr(AUDIO_DEV AiDevId, AI_CHN AiChn, AI_VQE_CONFIG_S *pstVqeConfig); 47 | HI_S32 HI_MPI_AI_EnableVqe(AUDIO_DEV AiDevId, AI_CHN AiChn); 48 | HI_S32 HI_MPI_AI_DisableVqe(AUDIO_DEV AiDevId, AI_CHN AiChn); 49 | 50 | HI_S32 HI_MPI_AI_EnableReSmp(AUDIO_DEV AudioDevId, AI_CHN AiChn, AUDIO_SAMPLE_RATE_E enOutSampleRate); 51 | HI_S32 HI_MPI_AI_DisableReSmp(AUDIO_DEV AudioDevId, AI_CHN AiChn); 52 | 53 | HI_S32 HI_MPI_AI_SetTrackMode(AUDIO_DEV AudioDevId, AUDIO_TRACK_MODE_E enTrackMode); 54 | HI_S32 HI_MPI_AI_GetTrackMode(AUDIO_DEV AudioDevId, AUDIO_TRACK_MODE_E *penTrackMode); 55 | HI_S32 HI_MPI_AI_SaveFile(AUDIO_DEV AudioDevId, AI_CHN AiChn, AUDIO_SAVE_FILE_INFO_S *pstSaveFileInfo); 56 | 57 | HI_S32 HI_MPI_AI_ClrPubAttr(AUDIO_DEV AudioDevId); 58 | 59 | HI_S32 HI_MPI_AI_GetFd(AUDIO_DEV AudioDevId, AI_CHN AiChn); 60 | 61 | HI_S32 HI_MPI_AI_SetVqeVolume(AUDIO_DEV AudioDevId, AI_CHN AiChn, HI_S32 s32VolumeDb); 62 | HI_S32 HI_MPI_AI_GetVqeVolume(AUDIO_DEV AudioDevId, AI_CHN AiChn, HI_S32 *ps32VolumeDb); 63 | 64 | HI_S32 HI_MPI_AI_EnableAecRefFrame(AUDIO_DEV AiDevId, AI_CHN AiChn, AUDIO_DEV AoDevId, AO_CHN AoChn); 65 | HI_S32 HI_MPI_AI_DisableAecRefFrame(AUDIO_DEV AiDevId, AI_CHN AiChn); 66 | 67 | 68 | #ifdef __cplusplus 69 | #if __cplusplus 70 | } 71 | #endif 72 | #endif /* __cplusplus */ 73 | 74 | #endif /* __MPI_AI_H__ */ 75 | 76 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_ao.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_ao.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/5/5 10 | Description : 11 | History : 12 | 1.Date : 2009/5/5 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | #ifndef __MPI_AO_H__ 17 | #define __MPI_AO_H__ 18 | 19 | #include "hi_type.h" 20 | #include "hi_common.h" 21 | #include "hi_comm_aio.h" 22 | 23 | #ifdef __cplusplus 24 | #if __cplusplus 25 | extern "C" 26 | { 27 | #endif 28 | #endif /* __cplusplus */ 29 | 30 | HI_S32 HI_MPI_AO_SetPubAttr(AUDIO_DEV AudioDevId, const AIO_ATTR_S *pstAttr); 31 | HI_S32 HI_MPI_AO_GetPubAttr(AUDIO_DEV AudioDevId, AIO_ATTR_S *pstAttr); 32 | 33 | HI_S32 HI_MPI_AO_Enable(AUDIO_DEV AudioDevId); 34 | HI_S32 HI_MPI_AO_Disable(AUDIO_DEV AudioDevId); 35 | 36 | HI_S32 HI_MPI_AO_EnableChn(AUDIO_DEV AudioDevId, AO_CHN AoChn); 37 | HI_S32 HI_MPI_AO_DisableChn(AUDIO_DEV AudioDevId, AO_CHN AoChn); 38 | 39 | HI_S32 HI_MPI_AO_SendFrame(AUDIO_DEV AudioDevId, AO_CHN AoChn, const AUDIO_FRAME_S *pstData, HI_S32 s32MilliSec); 40 | 41 | HI_S32 HI_MPI_AO_EnableReSmp(AUDIO_DEV AudioDevId, AO_CHN AoChn, AUDIO_SAMPLE_RATE_E enInSampleRate); 42 | HI_S32 HI_MPI_AO_DisableReSmp(AUDIO_DEV AudioDevId, AO_CHN AoChn); 43 | 44 | HI_S32 HI_MPI_AO_ClearChnBuf(AUDIO_DEV AudioDevId ,AO_CHN AoChn); 45 | HI_S32 HI_MPI_AO_QueryChnStat(AUDIO_DEV AudioDevId ,AO_CHN AoChn, AO_CHN_STATE_S *pstStatus); 46 | 47 | HI_S32 HI_MPI_AO_PauseChn(AUDIO_DEV AudioDevId, AO_CHN AoChn); 48 | HI_S32 HI_MPI_AO_ResumeChn(AUDIO_DEV AudioDevId, AO_CHN AoChn); 49 | 50 | HI_S32 HI_MPI_AO_SetVolume(AUDIO_DEV AudioDevId, HI_S32 s32VolumeDb); 51 | HI_S32 HI_MPI_AO_GetVolume(AUDIO_DEV AudioDevId, HI_S32 *ps32VolumeDb); 52 | 53 | HI_S32 HI_MPI_AO_SetMute(AUDIO_DEV AudioDevId, HI_BOOL bEnable, AUDIO_FADE_S *pstFade); 54 | HI_S32 HI_MPI_AO_GetMute(AUDIO_DEV AudioDevId, HI_BOOL *pbEnable, AUDIO_FADE_S *pstFade); 55 | 56 | HI_S32 HI_MPI_AO_SetTrackMode(AUDIO_DEV AudioDevId, AUDIO_TRACK_MODE_E enTrackMode); 57 | HI_S32 HI_MPI_AO_GetTrackMode(AUDIO_DEV AudioDevId, AUDIO_TRACK_MODE_E *penTrackMode); 58 | 59 | HI_S32 HI_MPI_AO_GetFd(AUDIO_DEV AudioDevId, AO_CHN AoChn); 60 | 61 | HI_S32 HI_MPI_AO_ClrPubAttr(AUDIO_DEV AudioDevId); 62 | HI_S32 HI_MPI_AO_SetVqeAttr(AUDIO_DEV AudioDevId, AO_CHN AoChn, AO_VQE_CONFIG_S *pstVqeConfig); 63 | HI_S32 HI_MPI_AO_GetVqeAttr(AUDIO_DEV AudioDevId, AO_CHN AoChn, AO_VQE_CONFIG_S *pstVqeConfig); 64 | HI_S32 HI_MPI_AO_EnableVqe(AUDIO_DEV AudioDevId, AO_CHN AoChn); 65 | HI_S32 HI_MPI_AO_DisableVqe(AUDIO_DEV AudioDevId, AO_CHN AoChn); 66 | #ifdef __cplusplus 67 | #if __cplusplus 68 | } 69 | #endif 70 | #endif /* __cplusplus */ 71 | 72 | #endif /* __MPI_AO_H__ */ 73 | 74 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_awb.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_awb.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2012/12/19 10 | Description : 11 | History : 12 | 1.Date : 2012/12/19 13 | Author : n00168968 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | #ifndef __MPI_AWB_H__ 18 | #define __MPI_AWB_H__ 19 | 20 | #include "hi_comm_isp.h" 21 | #include "hi_comm_3a.h" 22 | #include "hi_awb_comm.h" 23 | 24 | #ifdef __cplusplus 25 | #if __cplusplus 26 | extern "C"{ 27 | #endif 28 | #endif /* End of #ifdef __cplusplus */ 29 | 30 | /* The interface of awb lib register to isp. */ 31 | HI_S32 HI_MPI_AWB_Register(ISP_DEV IspDev, ALG_LIB_S *pstAwbLib); 32 | HI_S32 HI_MPI_AWB_UnRegister(ISP_DEV IspDev, ALG_LIB_S *pstAwbLib); 33 | 34 | /* The callback function of sensor register to awb lib. */ 35 | HI_S32 HI_MPI_AWB_SensorRegCallBack(ISP_DEV IspDev, ALG_LIB_S *pstAwbLib, SENSOR_ID SensorId, 36 | AWB_SENSOR_REGISTER_S *pstRegister); 37 | HI_S32 HI_MPI_AWB_SensorUnRegCallBack(ISP_DEV IspDev, ALG_LIB_S *pstAwbLib, SENSOR_ID SensorId); 38 | 39 | HI_S32 HI_MPI_ISP_AWBLibRegCallBack(ISP_DEV IspDev, ALG_LIB_S *pstAWBLib, 40 | ISP_AWB_REGISTER_S *pstRegister); 41 | 42 | 43 | HI_S32 HI_MPI_ISP_SetWBAttr(ISP_DEV IspDev, const ISP_WB_ATTR_S *pstWBAttr); 44 | HI_S32 HI_MPI_ISP_GetWBAttr(ISP_DEV IspDev, ISP_WB_ATTR_S *pstWBAttr); 45 | 46 | HI_S32 HI_MPI_ISP_SetAWBAttrEx(ISP_DEV IspDev, ISP_AWB_ATTR_EX_S *pstAWBAttrEx); 47 | HI_S32 HI_MPI_ISP_GetAWBAttrEx(ISP_DEV IspDev, ISP_AWB_ATTR_EX_S *pstAWBAttrEx); 48 | 49 | HI_S32 HI_MPI_ISP_SetCCMAttr(ISP_DEV IspDev, const ISP_COLORMATRIX_ATTR_S *pstCCMAttr); 50 | HI_S32 HI_MPI_ISP_GetCCMAttr(ISP_DEV IspDev, ISP_COLORMATRIX_ATTR_S *pstCCMAttr); 51 | 52 | HI_S32 HI_MPI_ISP_SetSaturationAttr(ISP_DEV IspDev, const ISP_SATURATION_ATTR_S *pstSatAttr); 53 | HI_S32 HI_MPI_ISP_GetSaturationAttr(ISP_DEV IspDev, ISP_SATURATION_ATTR_S *pstSatAttr); 54 | 55 | HI_S32 HI_MPI_ISP_QueryWBInfo(ISP_DEV IspDev, ISP_WB_INFO_S *pstWBInfo); 56 | 57 | #ifdef __cplusplus 58 | #if __cplusplus 59 | } 60 | #endif 61 | #endif /* End of #ifdef __cplusplus */ 62 | 63 | #endif 64 | 65 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_fisheye.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2013-2033, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_fisheye.h 7 | Version : Initial Draft 8 | Author : Hisilicon Hi35xx MPP Team 9 | Created : 20115/06/29 10 | Last Modified : 11 | Description : mpi functions declaration 12 | Function List : 13 | History : 14 | ******************************************************************************/ 15 | #ifndef __MPI_FISHEYE_H__ 16 | #define __MPI_FISHEYE_H__ 17 | 18 | #include "hi_common.h" 19 | #include "hi_comm_video.h" 20 | #include "hi_comm_fisheye.h" 21 | 22 | #ifdef __cplusplus 23 | #if __cplusplus 24 | extern "C"{ 25 | #endif 26 | #endif /* __cplusplus */ 27 | 28 | /***************************************************************************** 29 | Prototype : HI_MPI_FISHEYE_BeginJob 30 | Description : Begin a fisheye job,then add task into the job,fisheye will finish all the task in the job. 31 | Input : FISHEYE_HANDLE *phHandle 32 | Output : None 33 | Return Value : 34 | Calls : 35 | Called By : 36 | 37 | History : 38 | 1.Date : 20115/06/29 39 | Author : c00191088 40 | Modification : Created function 41 | <$/> 42 | *****************************************************************************/ 43 | HI_S32 HI_MPI_FISHEYE_BeginJob(FISHEYE_HANDLE *phHandle); 44 | 45 | /***************************************************************************** 46 | Prototype : HI_MPI_FISHEYE_EndJob 47 | Description : End a job,all tasks in the job will be submmitted to fisheye 48 | Input : FISHEYE_HANDLE hHandle 49 | Output : None 50 | Return Value : 51 | Calls : 52 | Called By : 53 | 54 | History : 55 | 1.Date : 20115/06/29 56 | Author : c00191088 57 | Modification : Created function 58 | <$/> 59 | *****************************************************************************/ 60 | HI_S32 HI_MPI_FISHEYE_EndJob(FISHEYE_HANDLE hHandle); 61 | 62 | /***************************************************************************** 63 | Prototype : HI_MPI_FISHEYE_CancelJob 64 | Description : Cancel a job ,then all tasks in the job will not be submmitted to fisheye 65 | Input : FISHEYE_HANDLE hHandle 66 | Output : None 67 | Return Value : 68 | Calls : 69 | Called By : 70 | 71 | History : 72 | 1.Date : 20115/06/29 73 | Author : c00191088 74 | Modification : Created function 75 | <$/> 76 | *****************************************************************************/ 77 | HI_S32 HI_MPI_FISHEYE_CancelJob(FISHEYE_HANDLE hHandle); 78 | 79 | /***************************************************************************** 80 | Prototype : HI_MPI_FISHEYE_AddScaleTask 81 | Description : Add a task to a fisheye job 82 | Input : FISHEYE_HANDLE hHandle 83 | Output : None 84 | Return Value : 85 | Calls : 86 | Called By : 87 | 88 | History : 89 | 1.Date : 20115/06/29 90 | Author : c00191088 91 | Modification : Created function 92 | <$/> 93 | *****************************************************************************/ 94 | HI_S32 HI_MPI_FISHEYE_AddCorrectionTask(FISHEYE_HANDLE hHandle, FISHEYE_TASK_ATTR_S *pstTask, const FISHEYE_ATTR_S *pstFisheyeAttr); 95 | 96 | 97 | 98 | /***************************************************************************** 99 | Prototype : HI_MPI_FISHEYE_AddDrawLineTask 100 | Description : add a draw line task into a job 101 | Input : FISHEYE_HANDLE hHandle 102 | Output : None 103 | Return Value : 104 | Calls : 105 | Called By : 106 | 107 | History : 108 | 1.Date : 2014/01/27 109 | Author : 110 | Modification : Created function 111 | <$/> 112 | *****************************************************************************/ 113 | HI_S32 HI_MPI_FISHEYE_AddLdcTask(FISHEYE_HANDLE hHandle, FISHEYE_TASK_ATTR_S * pstTask, LDC_ATTR_S * pstFisheyeAddLdc); 114 | 115 | /***************************************************************************** 116 | Prototype : HI_MPI_FISHEYE_AddCoverTask 117 | Description : add a draw point task into a job 118 | Input : FISHEYE_HANDLE hHandle 119 | Output : None 120 | Return Value : 121 | Calls : 122 | Called By : 123 | 124 | History : 125 | 1.Date : 2014/01/27 126 | Author : 127 | Modification : Created function 128 | <$/> 129 | *****************************************************************************/ 130 | HI_S32 HI_MPI_FISHEYE_AddPmfTask(FISHEYE_HANDLE hHandle, FISHEYE_TASK_ATTR_S *pstTask, FISHEYE_ADD_PMF_S *pstFisheyeAddPmf); 131 | 132 | 133 | #ifdef __cplusplus 134 | #if __cplusplus 135 | } 136 | #endif 137 | #endif /* __cplusplus */ 138 | 139 | #endif /* __MPI_FISHEYE_H__ */ 140 | 141 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_ive.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_ive.h -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_region.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_region.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2013/05/07 10 | Description : 11 | History : 12 | 1.Date : 2013/05/07 13 | Author : c00191088 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | #ifndef __MPI_REGION_H__ 18 | #define __MPI_REGION_H__ 19 | 20 | #include "hi_comm_region.h" 21 | 22 | #ifdef __cplusplus 23 | #if __cplusplus 24 | extern "C"{ 25 | #endif 26 | #endif /* End of #ifdef __cplusplus */ 27 | 28 | HI_S32 HI_MPI_RGN_Create(RGN_HANDLE Handle, const RGN_ATTR_S *pstRegion); 29 | HI_S32 HI_MPI_RGN_Destroy(RGN_HANDLE Handle); 30 | 31 | HI_S32 HI_MPI_RGN_GetAttr(RGN_HANDLE Handle, RGN_ATTR_S *pstRegion); 32 | HI_S32 HI_MPI_RGN_SetAttr(RGN_HANDLE Handle, const RGN_ATTR_S *pstRegion); 33 | 34 | HI_S32 HI_MPI_RGN_SetBitMap(RGN_HANDLE Handle, const BITMAP_S *pstBitmap); 35 | 36 | HI_S32 HI_MPI_RGN_AttachToChn(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, const RGN_CHN_ATTR_S *pstChnAttr); 37 | HI_S32 HI_MPI_RGN_DetachFromChn(RGN_HANDLE Handle, const MPP_CHN_S *pstChn); 38 | 39 | HI_S32 HI_MPI_RGN_SetDisplayAttr(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, const RGN_CHN_ATTR_S *pstChnAttr); 40 | HI_S32 HI_MPI_RGN_GetDisplayAttr(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, RGN_CHN_ATTR_S *pstChnAttr); 41 | 42 | HI_S32 HI_MPI_RGN_SetAttachField(RGN_HANDLE Handle, VIDEO_FIELD_E enAttachField); 43 | HI_S32 HI_MPI_RGN_GetAttachField(RGN_HANDLE Handle, VIDEO_FIELD_E *penAttachField); 44 | 45 | HI_S32 HI_MPI_RGN_GetCanvasInfo(RGN_HANDLE Handle, RGN_CANVAS_INFO_S *pstCanvasInfo); 46 | HI_S32 HI_MPI_RGN_UpdateCanvas(RGN_HANDLE Handle); 47 | 48 | 49 | #ifdef __cplusplus 50 | #if __cplusplus 51 | } 52 | #endif 53 | #endif /* End of #ifdef __cplusplus */ 54 | 55 | #endif /* End of #ifndef __MPI_REGION_H__ */ 56 | 57 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_sys.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_sys.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2007/1/31 10 | Description : 11 | History : 12 | 1.Date : 2006/1/31 13 | Author : c42025 14 | Modification: Created file 15 | 16 | 2.Date : 2008/03/03 17 | Author : c42025 18 | Modification: add a new funtion "HI_MPI_SYS_GetVersion" 19 | 20 | ******************************************************************************/ 21 | #ifndef __MPI_SYS_H__ 22 | #define __MPI_SYS_H__ 23 | 24 | #include "hi_type.h" 25 | #include "hi_common.h" 26 | #include "hi_comm_sys.h" 27 | 28 | #ifdef __cplusplus 29 | #if __cplusplus 30 | extern "C" { 31 | #endif 32 | #endif /* End of #ifdef __cplusplus */ 33 | 34 | HI_S32 HI_MPI_SYS_Init(); 35 | HI_S32 HI_MPI_SYS_Exit(); 36 | 37 | HI_S32 HI_MPI_SYS_SetConf(const MPP_SYS_CONF_S* pstSysConf); 38 | HI_S32 HI_MPI_SYS_GetConf(MPP_SYS_CONF_S* pstSysConf); 39 | 40 | HI_S32 HI_MPI_SYS_Bind(MPP_CHN_S* pstSrcChn, MPP_CHN_S* pstDestChn); 41 | HI_S32 HI_MPI_SYS_UnBind(MPP_CHN_S* pstSrcChn, MPP_CHN_S* pstDestChn); 42 | HI_S32 HI_MPI_SYS_GetBindbyDest(MPP_CHN_S* pstDestChn, MPP_CHN_S* pstSrcChn); 43 | 44 | HI_S32 HI_MPI_SYS_GetVersion(MPP_VERSION_S* pstVersion); 45 | 46 | /* 47 | ** u64Base is the global PTS of the system. 48 | ** ADVICE: 49 | ** 1. Better to call HI_MPI_SYS_GetCurPts on the host board to get u64Base. 50 | ** 2. When os start up, call HI_MPI_SYS_InitPtsBase to set the init PTS. 51 | ** 3. When media bussines is running, synchronize the PTS one time per minute 52 | ** by calling HI_MPI_SYS_SyncPts. 53 | */ 54 | HI_S32 HI_MPI_SYS_GetCurPts(HI_U64* pu64CurPts); 55 | HI_S32 HI_MPI_SYS_InitPtsBase(HI_U64 u64PtsBase); 56 | HI_S32 HI_MPI_SYS_SyncPts(HI_U64 u64PtsBase); 57 | 58 | /* alloc mmz memory in user context */ 59 | HI_S32 HI_MPI_SYS_MmzAlloc(HI_U32* pu32PhyAddr, HI_VOID** ppVirtAddr, 60 | const HI_CHAR* strMmb, const HI_CHAR* strZone, HI_U32 u32Len); 61 | 62 | /* alloc mmz memory with cache */ 63 | HI_S32 HI_MPI_SYS_MmzAlloc_Cached(HI_U32* pu32PhyAddr, HI_VOID** ppVitAddr, 64 | const HI_CHAR* pstrMmb, const HI_CHAR* pstrZone, HI_U32 u32Len); 65 | 66 | /* free mmz memory in user context */ 67 | HI_S32 HI_MPI_SYS_MmzFree(HI_U32 u32PhyAddr, HI_VOID* pVirtAddr); 68 | 69 | /* fulsh cache */ 70 | HI_S32 HI_MPI_SYS_MmzFlushCache(HI_U32 u32PhyAddr, HI_VOID* pVitAddr, HI_U32 u32Size); 71 | 72 | /* 73 | ** Call the mmap function to map physical address to virtual address 74 | ** The system function mmap is too complicated, so we packge it. 75 | */ 76 | HI_VOID* HI_MPI_SYS_Mmap(HI_U32 u32PhyAddr, HI_U32 u32Size); 77 | HI_S32 HI_MPI_SYS_Munmap(HI_VOID* pVirAddr, HI_U32 u32Size); 78 | 79 | /* 80 | ** Access the physical address. 81 | ** You can use this function to access memory address or register address. 82 | */ 83 | HI_S32 HI_MPI_SYS_SetReg(HI_U32 u32Addr, HI_U32 u32Value); 84 | HI_S32 HI_MPI_SYS_GetReg(HI_U32 u32Addr, HI_U32* pu32Value); 85 | 86 | HI_S32 HI_MPI_SYS_SetMemConf(MPP_CHN_S* pstMppChn, const HI_CHAR* pcMmzName); 87 | HI_S32 HI_MPI_SYS_GetMemConf(MPP_CHN_S* pstMppChn, HI_CHAR* pcMmzName); 88 | 89 | /* Close all the FD which is used by sys module */ 90 | HI_S32 HI_MPI_SYS_CloseFd(HI_VOID); 91 | 92 | /* Get VI VPSS work mode, 0: offline, >0: online */ 93 | HI_S32 HI_MPI_SYS_GetViVpssMode(HI_U32* pu32Mode); 94 | 95 | /* media profile setting, for low power */ 96 | HI_S32 HI_MPI_SYS_SetProfile(PROFILE_TYPE_E enProfile); 97 | 98 | /* Get virtual meminfo according to virtual addr, should be in one process */ 99 | HI_S32 HI_MPI_SYS_GetVirMemInfo(const void* pVitAddr, SYS_VIRMEM_INFO_S* pstMemInfo); 100 | 101 | #ifdef __cplusplus 102 | #if __cplusplus 103 | } 104 | #endif 105 | #endif /* End of #ifdef __cplusplus */ 106 | 107 | #endif /*__MPI_SYS_H__ */ 108 | 109 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_vb.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_vb.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2007/10/15 10 | Description : 11 | History : 12 | 1.Date : 2007/10/15 13 | Author : c42025 14 | Modification: Created file 15 | ******************************************************************************/ 16 | #ifndef __MPI_VB_H__ 17 | #define __MPI_VB_H__ 18 | 19 | #include "hi_comm_vb.h" 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | extern "C"{ 24 | #endif 25 | #endif /* End of #ifdef __cplusplus */ 26 | 27 | VB_POOL HI_MPI_VB_CreatePool(HI_U32 u32BlkSize,HI_U32 u32BlkCnt,const HI_CHAR *pcMmzName); 28 | HI_S32 HI_MPI_VB_DestroyPool(VB_POOL Pool); 29 | 30 | VB_BLK HI_MPI_VB_GetBlock(VB_POOL Pool, HI_U32 u32BlkSize,const HI_CHAR *pcMmzName); 31 | HI_S32 HI_MPI_VB_ReleaseBlock(VB_BLK Block); 32 | 33 | HI_U32 HI_MPI_VB_Handle2PhysAddr(VB_BLK Block); 34 | VB_POOL HI_MPI_VB_Handle2PoolId(VB_BLK Block); 35 | 36 | HI_S32 HI_MPI_VB_GetSupplementAddr(VB_BLK Block, VIDEO_SUPPLEMENT_S *pstSupplement); 37 | 38 | 39 | HI_S32 HI_MPI_VB_Init(HI_VOID); 40 | HI_S32 HI_MPI_VB_Exit(HI_VOID); 41 | HI_S32 HI_MPI_VB_SetConf(const VB_CONF_S *pstVbConf); 42 | HI_S32 HI_MPI_VB_GetConf(VB_CONF_S *pstVbConf); 43 | 44 | HI_S32 HI_MPI_VB_MmapPool(VB_POOL Pool); 45 | HI_S32 HI_MPI_VB_MunmapPool(VB_POOL Pool); 46 | 47 | HI_S32 HI_MPI_VB_GetBlkVirAddr(VB_POOL Pool, HI_U32 u32PhyAddr, HI_VOID **ppVirAddr); 48 | 49 | HI_S32 HI_MPI_VB_InitModCommPool(VB_UID_E enVbUid); 50 | HI_S32 HI_MPI_VB_ExitModCommPool(VB_UID_E enVbUid); 51 | 52 | HI_S32 HI_MPI_VB_SetModPoolConf(VB_UID_E enVbUid, const VB_CONF_S *pstVbConf); 53 | HI_S32 HI_MPI_VB_GetModPoolConf(VB_UID_E enVbUid, VB_CONF_S *pstVbConf); 54 | 55 | 56 | #ifdef __cplusplus 57 | #if __cplusplus 58 | } 59 | #endif 60 | #endif /* End of #ifdef __cplusplus */ 61 | 62 | #endif /*__MPI_VI_H__ */ 63 | 64 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_vda.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_vda.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2013/05/09 10 | Description : 11 | History : 12 | 1.Date : 2013/05/09 13 | Author : x00100808 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | #ifndef __MPI_VDA_H__ 18 | #define __MPI_VDA_H__ 19 | 20 | #include "hi_comm_vda.h" 21 | 22 | #ifdef __cplusplus 23 | #if __cplusplus 24 | extern "C"{ 25 | #endif 26 | #endif /* End of #ifdef __cplusplus */ 27 | 28 | HI_S32 HI_MPI_VDA_CreateChn(VDA_CHN VdaChn, const VDA_CHN_ATTR_S *pstAttr); 29 | HI_S32 HI_MPI_VDA_DestroyChn(VDA_CHN VdaChn); 30 | 31 | HI_S32 HI_MPI_VDA_GetChnAttr(VDA_CHN VdaChn, VDA_CHN_ATTR_S *pstAttr); 32 | HI_S32 HI_MPI_VDA_SetChnAttr(VDA_CHN VdaChn, const VDA_CHN_ATTR_S *pstAttr); 33 | 34 | HI_S32 HI_MPI_VDA_StartRecvPic(VDA_CHN VdaChn); 35 | HI_S32 HI_MPI_VDA_StopRecvPic(VDA_CHN VdaChn); 36 | 37 | HI_S32 HI_MPI_VDA_GetData(VDA_CHN VdaChn, VDA_DATA_S *pstVdaData, HI_S32 s32MilliSec); 38 | HI_S32 HI_MPI_VDA_ReleaseData(VDA_CHN VdaChn, const VDA_DATA_S* pstVdaData); 39 | 40 | HI_S32 HI_MPI_VDA_ResetOdRegion(VDA_CHN VdaChn, HI_S32 s32RgnIndex); 41 | 42 | HI_S32 HI_MPI_VDA_Query(VDA_CHN VdaChn, VDA_CHN_STAT_S *pstChnStat); 43 | 44 | HI_S32 HI_MPI_VDA_GetFd(VDA_CHN VdaChn); 45 | 46 | HI_S32 HI_MPI_VDA_UpdateRef(VDA_CHN VdaChn, const VIDEO_FRAME_INFO_S *pstRefFrame); 47 | 48 | HI_S32 HI_MPI_VDA_SendPic(VDA_CHN VdaChn, const VIDEO_FRAME_INFO_S *pstUserFrame, HI_S32 s32MilliSec); 49 | 50 | 51 | #ifdef __cplusplus 52 | #if __cplusplus 53 | } 54 | #endif 55 | #endif /* End of #ifdef __cplusplus */ 56 | 57 | #endif /* End of #ifndef __MPI_VDA_H__ */ 58 | 59 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_vdec.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_vdec.h -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/mpi_vi.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2013-2030, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_vi.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2013/05/08 10 | Description : 11 | History : 12 | 1.Date : 2013/05/08 13 | Author : 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | #ifndef __MPI_VI_H__ 18 | #define __MPI_VI_H__ 19 | 20 | #include "hi_comm_vi.h" 21 | 22 | #ifdef __cplusplus 23 | #if __cplusplus 24 | extern "C" 25 | { 26 | #endif 27 | #endif /* __cplusplus */ 28 | 29 | HI_S32 HI_MPI_VI_SetDevAttr(VI_DEV ViDev, const VI_DEV_ATTR_S *pstDevAttr); 30 | HI_S32 HI_MPI_VI_GetDevAttr(VI_DEV ViDev, VI_DEV_ATTR_S *pstDevAttr); 31 | 32 | HI_S32 HI_MPI_VI_EnableDev(VI_DEV ViDev); 33 | HI_S32 HI_MPI_VI_DisableDev(VI_DEV ViDev); 34 | 35 | HI_S32 HI_MPI_VI_SetChnAttr(VI_CHN ViChn, const VI_CHN_ATTR_S *pstAttr); 36 | HI_S32 HI_MPI_VI_GetChnAttr(VI_CHN ViChn, VI_CHN_ATTR_S *pstAttr); 37 | 38 | HI_S32 HI_MPI_VI_EnableChn(VI_CHN ViChn); 39 | HI_S32 HI_MPI_VI_DisableChn(VI_CHN ViChn); 40 | 41 | HI_S32 HI_MPI_VI_GetFrame(VI_CHN ViChn, VIDEO_FRAME_INFO_S *pstFrameInfo, HI_S32 s32MilliSec); 42 | HI_S32 HI_MPI_VI_ReleaseFrame(VI_CHN ViChn, VIDEO_FRAME_INFO_S *pstFrameInfo); 43 | HI_S32 HI_MPI_VI_SetFrameDepth(VI_CHN ViChn, HI_U32 u32Depth); 44 | HI_S32 HI_MPI_VI_GetFrameDepth(VI_CHN ViChn, HI_U32 *pu32Depth); 45 | 46 | HI_S32 HI_MPI_VI_SetUserPic(VI_CHN ViChn, VI_USERPIC_ATTR_S *pstUsrPic); 47 | HI_S32 HI_MPI_VI_EnableUserPic(VI_CHN ViChn); 48 | HI_S32 HI_MPI_VI_DisableUserPic(VI_CHN ViChn); 49 | 50 | /* Normally, these functions are not necessary in typical business */ 51 | HI_S32 HI_MPI_VI_BindChn(VI_CHN ViChn, const VI_CHN_BIND_ATTR_S *pstChnBindAttr); 52 | HI_S32 HI_MPI_VI_UnBindChn(VI_CHN ViChn); 53 | HI_S32 HI_MPI_VI_GetChnBind(VI_CHN ViChn, VI_CHN_BIND_ATTR_S *pstChnBindAttr); 54 | 55 | HI_S32 HI_MPI_VI_SetDevAttrEx(VI_DEV ViDev, const VI_DEV_ATTR_EX_S *pstDevAttrEx); 56 | HI_S32 HI_MPI_VI_GetDevAttrEx(VI_DEV ViDev, VI_DEV_ATTR_EX_S *pstDevAttrEx); 57 | 58 | HI_S32 HI_MPI_VI_GetFd(VI_CHN ViChn); 59 | 60 | HI_S32 HI_MPI_VI_Query(VI_CHN ViChn, VI_CHN_STAT_S *pstStat); 61 | 62 | HI_S32 HI_MPI_VI_EnableChnInterrupt(VI_CHN ViChn); 63 | HI_S32 HI_MPI_VI_DisableChnInterrupt(VI_CHN ViChn); 64 | 65 | HI_S32 HI_MPI_VI_SetFlashConfig(VI_DEV ViDev, const VI_FLASH_CONFIG_S *pstFlashConfig); 66 | HI_S32 HI_MPI_VI_GetFlashConfig(VI_DEV ViDev, VI_FLASH_CONFIG_S *pstFlashConfig); 67 | HI_S32 HI_MPI_VI_TriggerFlash(VI_DEV ViDev, HI_BOOL bEnable); 68 | 69 | HI_S32 HI_MPI_VI_SetExtChnAttr(VI_CHN ViChn, const VI_EXT_CHN_ATTR_S *pstExtChnAttr); 70 | HI_S32 HI_MPI_VI_GetExtChnAttr(VI_CHN ViChn, VI_EXT_CHN_ATTR_S *pstExtChnAttr); 71 | 72 | HI_S32 HI_MPI_VI_SetExtChnCrop(VI_CHN ViChn, const CROP_INFO_S *pstExtChnCrop); 73 | HI_S32 HI_MPI_VI_GetExtChnCrop(VI_CHN ViChn, CROP_INFO_S *pstExtChnCrop); 74 | 75 | HI_S32 HI_MPI_VI_SetLDCAttr(VI_CHN ViChn, const VI_LDC_ATTR_S *pstLDCAttr); 76 | HI_S32 HI_MPI_VI_GetLDCAttr(VI_CHN ViChn, VI_LDC_ATTR_S *pstLDCAttr); 77 | 78 | HI_S32 HI_MPI_VI_SetCSCAttr(VI_DEV ViDev, const VI_CSC_ATTR_S *pstCSCAttr); 79 | HI_S32 HI_MPI_VI_GetCSCAttr(VI_DEV ViDev, VI_CSC_ATTR_S *pstCSCAttr); 80 | 81 | HI_S32 HI_MPI_VI_SetRotate(VI_CHN ViChn, const ROTATE_E enRotate); 82 | HI_S32 HI_MPI_VI_GetRotate(VI_CHN ViChn, ROTATE_E *penRotate); 83 | 84 | HI_S32 HI_MPI_VI_GetChnLuma(VI_CHN ViChn, VI_CHN_LUM_S *pstLuma); 85 | 86 | HI_S32 HI_MPI_VI_SetWDRAttr(VI_DEV ViDev, const VI_WDR_ATTR_S *pstWDRAttr); 87 | HI_S32 HI_MPI_VI_GetWDRAttr(VI_DEV ViDev, VI_WDR_ATTR_S *pstWDRAttr); 88 | 89 | HI_S32 HI_MPI_VI_SetFisheyeDevConfig(VI_DEV ViDev, const FISHEYE_CONFIG_S *pstFisheyeConfig); 90 | HI_S32 HI_MPI_VI_GetFisheyeDevConfig(VI_DEV ViDev, FISHEYE_CONFIG_S *pstFisheyeConfig); 91 | 92 | HI_S32 HI_MPI_VI_SetFisheyeAttr(VI_CHN ViChn, const FISHEYE_ATTR_S *pstFisheyeAttr); 93 | HI_S32 HI_MPI_VI_GetFisheyeAttr(VI_CHN ViChn, FISHEYE_ATTR_S *pstFisheyeAttr); 94 | 95 | HI_S32 HI_MPI_VI_SetDevDumpAttr(VI_DEV ViDev, const VI_DUMP_ATTR_S *pstDumpAttr); 96 | HI_S32 HI_MPI_VI_GetDevDumpAttr(VI_DEV ViDev, VI_DUMP_ATTR_S *pstDumpAttr); 97 | 98 | HI_S32 HI_MPI_VI_EnableBayerDump(VI_DEV ViDev); 99 | HI_S32 HI_MPI_VI_DisableBayerDump(VI_DEV ViDev); 100 | 101 | HI_S32 HI_MPI_VI_EnableBayerRead(VI_DEV ViDev); 102 | HI_S32 HI_MPI_VI_DisableBayerRead(VI_DEV ViDev); 103 | HI_S32 HI_MPI_VI_SendBayerData(VI_DEV ViDev, const VI_RAW_DATA_INFO_S *pstRawData, HI_S32 s32MilliSec); 104 | 105 | HI_S32 HI_MPI_VI_SetDCIParam(VI_DEV ViDev, const VI_DCI_PARAM_S *pstDciParam); 106 | HI_S32 HI_MPI_VI_GetDCIParam(VI_DEV ViDev, VI_DCI_PARAM_S *pstDciParam); 107 | 108 | HI_S32 HI_MPI_VI_CloseFd(HI_VOID); 109 | 110 | 111 | 112 | 113 | 114 | #ifdef __cplusplus 115 | #if __cplusplus 116 | } 117 | #endif 118 | #endif /* __cplusplus */ 119 | 120 | #endif /*__MPI_VI_H__ */ 121 | 122 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/include/strlib.h: -------------------------------------------------------------------------------- 1 | 2 | /*-------------------------------------------------------------------------*/ 3 | /** 4 | @file strlib.h 5 | @author N. Devillard 6 | @date Jan 2001 7 | @version 8 | @brief Various string handling routines to complement the C lib. 9 | 10 | This modules adds a few complementary string routines usually missing 11 | in the standard C library. 12 | */ 13 | /*--------------------------------------------------------------------------*/ 14 | 15 | /* 16 | 17 | 18 | 19 | 20 | */ 21 | 22 | #ifndef _STRLIB_H_ 23 | #define _STRLIB_H_ 24 | 25 | /*--------------------------------------------------------------------------- 26 | Includes 27 | ---------------------------------------------------------------------------*/ 28 | 29 | #include 30 | #include 31 | 32 | #ifdef __cplusplus 33 | #if __cplusplus 34 | extern "C"{ 35 | #endif 36 | #endif /* __cplusplus */ 37 | 38 | /*--------------------------------------------------------------------------- 39 | Function codes 40 | ---------------------------------------------------------------------------*/ 41 | 42 | /*-------------------------------------------------------------------------*/ 43 | /** 44 | @brief Convert a string to lowercase. 45 | @param s String to convert. 46 | @return ptr to statically allocated string. 47 | 48 | This function returns a pointer to a statically allocated string 49 | containing a lowercased version of the input string. Do not free 50 | or modify the returned string! Since the returned string is statically 51 | allocated, it will be modified at each function call (not re-entrant). 52 | */ 53 | /*--------------------------------------------------------------------------*/ 54 | char * strlwc(const char * s); 55 | 56 | /*-------------------------------------------------------------------------*/ 57 | /** 58 | @brief Convert a string to uppercase. 59 | @param s String to convert. 60 | @return ptr to statically allocated string. 61 | 62 | This function returns a pointer to a statically allocated string 63 | containing an uppercased version of the input string. Do not free 64 | or modify the returned string! Since the returned string is statically 65 | allocated, it will be modified at each function call (not re-entrant). 66 | */ 67 | /*--------------------------------------------------------------------------*/ 68 | char * strupc(char * s); 69 | 70 | /*-------------------------------------------------------------------------*/ 71 | /** 72 | @brief Skip blanks until the first non-blank character. 73 | @param s String to parse. 74 | @return Pointer to char inside given string. 75 | 76 | This function returns a pointer to the first non-blank character in the 77 | given string. 78 | */ 79 | /*--------------------------------------------------------------------------*/ 80 | char * strskp(char * s); 81 | 82 | /*-------------------------------------------------------------------------*/ 83 | /** 84 | @brief Remove blanks at the end of a string. 85 | @param s String to parse. 86 | @return ptr to statically allocated string. 87 | 88 | This function returns a pointer to a statically allocated string, 89 | which is identical to the input string, except that all blank 90 | characters at the end of the string have been removed. 91 | Do not free or modify the returned string! Since the returned string 92 | is statically allocated, it will be modified at each function call 93 | (not re-entrant). 94 | */ 95 | /*--------------------------------------------------------------------------*/ 96 | char * strcrop(char * s); 97 | 98 | /*-------------------------------------------------------------------------*/ 99 | /** 100 | @brief Remove blanks at the beginning and the end of a string. 101 | @param s String to parse. 102 | @return ptr to statically allocated string. 103 | 104 | This function returns a pointer to a statically allocated string, 105 | which is identical to the input string, except that all blank 106 | characters at the end and the beg. of the string have been removed. 107 | Do not free or modify the returned string! Since the returned string 108 | is statically allocated, it will be modified at each function call 109 | (not re-entrant). 110 | */ 111 | /*--------------------------------------------------------------------------*/ 112 | char * strstrip(char * s) ; 113 | 114 | 115 | 116 | #ifdef __cplusplus 117 | #if __cplusplus 118 | } 119 | #endif 120 | #endif /* __cplusplus */ 121 | 122 | 123 | #endif 124 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/lib/libVoiceEngine.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/hi_sdk_50/lib/libVoiceEngine.a -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/lib/libdnvqe.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/hi_sdk_50/lib/libdnvqe.a -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/lib/libive.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/hi_sdk_50/lib/libive.a -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/lib/libmpi.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/hi_sdk_50/lib/libmpi.a -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/lib/libtde.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/hi_sdk_50/lib/libtde.a -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/hi_sdk_50/lib/libupvqe.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/hi_sdk_50/lib/libupvqe.a -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/src/CAudioAac.h: -------------------------------------------------------------------------------- 1 | #ifndef _MP4_MUTEX_H_ 2 | #define _MP4_MUTEX_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #define USE_FAAC 0 9 | #define USE_LABFAAC 0 10 | #define USE_FDKAAC 1 11 | 12 | #if USE_FAAC 13 | #include "faac.h" 14 | #elif USE_LABFAAC 15 | #include "fa_aacapi.h" 16 | #elif USE_FDKAAC 17 | #include "fdk-aac/aacdecoder_lib.h" 18 | #include "fdk-aac/aacenc_lib.h" 19 | #include "fdk-aac/FDK_audio.h" 20 | #include "fdk-aac/genericStds.h" 21 | #include "fdk-aac/machine_type.h" 22 | #endif 23 | 24 | //#define G711_BUFFER_SIZE (1200) 25 | #define PCM_BUFFER_SIZE (2400) 26 | 27 | #define TEMP_BUFFER_SIZE (1024 * 4) 28 | #define ADTS_HEADER_LENGTH (7) 29 | 30 | 31 | 32 | typedef unsigned long ULONG; 33 | typedef unsigned int UINT; 34 | typedef unsigned char BYTE; 35 | typedef char _TCHAR; 36 | 37 | /* 38 | * u-law, A-law and linear PCM conversions. 39 | */ 40 | #define SIGN_BIT (0x80) /* Sign bit for a A-law byte. */ 41 | #define QUANT_MASK (0xf) /* Quantization field mask. */ 42 | #define NSEGS (8) /* Number of A-law segments. */ 43 | #define SEG_SHIFT (4) /* Left shift for segment number. */ 44 | #define SEG_MASK (0x70) /* Segment field mask. */ 45 | #define BIAS (0x84) /* Bias for linear code. */ 46 | 47 | 48 | int g711a_decode(short amp[], const unsigned char g711a_data[], int g711a_bytes); 49 | 50 | int g711u_decode(short amp[], const unsigned char g711u_data[], int g711u_bytes); 51 | 52 | int g711a_encode(unsigned char g711_data[], const short amp[], int len); 53 | 54 | int g711u_encode(unsigned char g711_data[], const short amp[], int len); 55 | 56 | //-------------------------------------------------------- 57 | //-- Name : CAudioAac 58 | //-- Describle: MP4音频文件接口 59 | //-------------------------------------------------------- 60 | 61 | #if 1 62 | class CAudioAac 63 | { 64 | public: 65 | CAudioAac(void); 66 | virtual ~CAudioAac(void); 67 | 68 | public: 69 | 70 | //-------------------------------------------------------- 71 | //-- Name : init 72 | //-- Describle: 初始化 73 | //-- param[in]: nSampleRate 音频采样率 8000 74 | //-- param[in]: nChannal 通道数 1 75 | //-- param[in]: bitsPerSample 位深 16 76 | //-- param[in]: pMp4File 要创建的mp4文件绝对路径 77 | //-------------------------------------------------------- 78 | bool init( int nSampleRate, int nChannal,int bitsPerSample, int bps); 79 | 80 | 81 | //-------------------------------------------------------- 82 | //-- Name : 83 | //-- Describle: G711 to AAC 84 | //-- param[in]: pBufferG711 输入G711缓冲区 85 | //-- param[in]: nG711Len 缓冲区长度 86 | //-------------------------------------------------------- 87 | int G7112Aac(unsigned char * pBufferG711,int nG711Len); 88 | 89 | //-------------------------------------------------------- 90 | //-- Name : 91 | //-- Describle: AAC to G711 92 | //-- param[in]: pBufferG711 输入G711缓冲区 93 | //-- param[in]: nG711Len 缓冲区长度 94 | //-------------------------------------------------------- 95 | int Aac2G711(unsigned char * pBufferAac, int aacLen, unsigned char * pBufferG711,int * nG711Len); 96 | //-------------------------------------------------------- 97 | //-- Name : Finish 98 | //-- Describle: 操作结束 资源释放 99 | //-------------------------------------------------------- 100 | void Finish(); 101 | 102 | 103 | public: 104 | int b_init_flag; 105 | 106 | #if USE_FAAC 107 | faacEncHandle m_hEncoder; 108 | #elif USE_LABFAAC 109 | uintptr_t h_aacenc; 110 | #elif USE_FDKAAC 111 | HANDLE_AACENCODER handle; 112 | #endif 113 | 114 | int m_nAudioChannal; // 声道数 115 | int m_nSampleRate; // 采样率 116 | int m_nBitsPerSample; // 单样本位数(eg:16) 单个采样音频信息位数 117 | 118 | ULONG m_nInputSamples ; // 输入样本数 119 | ULONG m_nMaxOutputBytes; // 输出所需最大空间 120 | ULONG m_nMaxInputBytes; // 输入所需最大空间 121 | 122 | //MP4FileHandle m_Mp4File; 123 | //MP4TrackId m_AudioTrackId; //MP4TrackId 124 | int aacSize; 125 | unsigned short aac_config; 126 | BYTE* m_pbPCMBuffer ; 127 | BYTE* m_pOutAACBuffer; 128 | private: 129 | BYTE* m_pTempBuffer; 130 | int m_nTempPos; 131 | }; 132 | #endif 133 | 134 | #endif 135 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/src/CInterfaceUrls.cpp: -------------------------------------------------------------------------------- 1 | #include "CInterfaceUrls.h" 2 | #include "HttpRequestTool.h" 3 | #include "cJSON.h" 4 | #include 5 | CInterfaceUrls::CInterfaceUrls() 6 | { 7 | } 8 | 9 | 10 | CInterfaceUrls::~CInterfaceUrls() 11 | { 12 | } 13 | 14 | unsigned char CInterfaceUrls::ToHex(unsigned char x) 15 | { 16 | return x > 9 ? x + 55 : x + 48; 17 | } 18 | 19 | unsigned char CInterfaceUrls::FromHex(unsigned char x) 20 | { 21 | unsigned char y; 22 | if (x >= 'A' && x <= 'Z') y = x - 'A' + 10; 23 | else if (x >= 'a' && x <= 'z') y = x - 'a' + 10; 24 | else if (x >= '0' && x <= '9') y = x - '0'; 25 | else 26 | { 27 | } 28 | return y; 29 | } 30 | 31 | std::string CInterfaceUrls::UrlEncode(const std::string& str) 32 | { 33 | std::string strTemp = ""; 34 | size_t length = str.length(); 35 | for (size_t i = 0; i < length; i++) 36 | { 37 | if (isalnum((unsigned char)str[i]) || 38 | (str[i] == '-') || 39 | (str[i] == '_') || 40 | (str[i] == '.') || 41 | (str[i] == '~')) 42 | strTemp += str[i]; 43 | else if (str[i] == ' ') 44 | strTemp += "+"; 45 | else 46 | { 47 | strTemp += '%'; 48 | strTemp += ToHex((unsigned char)str[i] >> 4); 49 | strTemp += ToHex((unsigned char)str[i] % 16); 50 | } 51 | } 52 | return strTemp; 53 | } 54 | 55 | std::string CInterfaceUrls::UrlDecode(const std::string& str) 56 | { 57 | std::string strTemp = ""; 58 | size_t length = str.length(); 59 | for (size_t i = 0; i < length; i++) 60 | { 61 | if (str[i] == '+') strTemp += ' '; 62 | else if (str[i] == '%') 63 | { 64 | unsigned char high = FromHex((unsigned char)str[++i]); 65 | unsigned char low = FromHex((unsigned char)str[++i]); 66 | strTemp += high * 16 + low; 67 | } 68 | else strTemp += str[i]; 69 | } 70 | return strTemp; 71 | } 72 | 73 | void CInterfaceUrls::demoSaveToList(string userId, int listType, string id, string data) 74 | { 75 | string url = "http://www.starrtc.com/aec/list/save.php"; 76 | url = url + "?userId=" + userId + "&listType="; 77 | char buf[256] = { 0 }; 78 | sprintf(buf, "%d", listType); 79 | url = url + buf; 80 | url = url + "&roomId=" + id; 81 | 82 | data = CInterfaceUrls::UrlEncode(data); 83 | 84 | url = url + "&data=" + data; 85 | 86 | string strData = ""; 87 | std::string strVal = ""; 88 | std::string strErrInfo = ""; 89 | 90 | int ret = libcurl_post(url.c_str(), strData.c_str(), strVal, strErrInfo); 91 | } 92 | 93 | void CInterfaceUrls::demoDeleteFromList(string userId, int listType, string id) 94 | { 95 | string url = "http://www.starrtc.com/aec/list/del.php"; 96 | url = url + "?userId=" + userId + "&listType="; 97 | char buf[256] = { 0 }; 98 | sprintf(buf, "%d", listType); 99 | url = url + buf; 100 | url = url + "&roomId=" + id; 101 | 102 | string strData = ""; 103 | std::string strVal = ""; 104 | std::string strErrInfo = ""; 105 | 106 | int ret = libcurl_post(url.c_str(), strData.c_str(), strVal, strErrInfo); 107 | } 108 | 109 | void CInterfaceUrls::demoQueryList(string listType, list& listData) 110 | { 111 | string url = "http://www.starrtc.com/aec/list/query.php"; 112 | 113 | string strData = "listTypes="; 114 | strData = strData + listType; 115 | 116 | std::string strVal = ""; 117 | std::string strErrInfo = ""; 118 | 119 | int ret = libcurl_post(url.c_str(), strData.c_str(), strVal, strErrInfo); 120 | 121 | cJSON* root = cJSON_Parse(strVal.c_str()); 122 | if (!root) 123 | { 124 | printf("Error before: [%s]\n",cJSON_GetErrorPtr()); 125 | return ; 126 | } 127 | cJSON *itemStatus = cJSON_GetObjectItem(root, "status"); 128 | 129 | if(itemStatus == NULL) 130 | { 131 | printf("get status err: [%s]\n",cJSON_GetErrorPtr()); 132 | return ; 133 | } 134 | if(itemStatus->valueint != 1) 135 | { 136 | printf("status is 0 failed\n"); 137 | return ; 138 | } 139 | 140 | cJSON *itemData = cJSON_GetObjectItem(root, "data"); 141 | 142 | int arraysize = cJSON_GetArraySize(itemData); 143 | 144 | cJSON *objread = NULL; 145 | for(int i = 0; ivaluestring; 154 | strData = CInterfaceUrls::UrlDecode(strData); 155 | cJSON* root1 = cJSON_Parse(strData.c_str()); 156 | if(root1 != NULL) 157 | { 158 | ChatroomInfo chatroomInfo; 159 | cJSON *itemId = cJSON_GetObjectItem(root1, "id"); 160 | if(itemId != NULL) 161 | { 162 | chatroomInfo.m_strRoomId = itemId->valuestring; 163 | } 164 | 165 | cJSON *itemName = cJSON_GetObjectItem(root1, "name"); 166 | if(itemName != NULL) 167 | { 168 | chatroomInfo.m_strName = itemName->valuestring; 169 | } 170 | 171 | cJSON *itemCreator = cJSON_GetObjectItem(root1, "creator"); 172 | if(itemCreator != NULL) 173 | { 174 | chatroomInfo.m_strCreaterId = itemCreator->valuestring; 175 | } 176 | listData.push_back(chatroomInfo); 177 | } 178 | 179 | } 180 | } 181 | } 182 | } 183 | 184 | 185 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/src/CInterfaceUrls.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | using namespace std; 5 | #include "ChatroomInfo.h" 6 | 7 | using namespace std; 8 | class CInterfaceUrls 9 | { 10 | public: 11 | CInterfaceUrls(); 12 | virtual ~CInterfaceUrls(); 13 | static unsigned char ToHex(unsigned char x); 14 | static unsigned char FromHex(unsigned char x); 15 | static std::string UrlEncode(const std::string& str); 16 | static std::string UrlDecode(const std::string& str); 17 | 18 | static void demoSaveToList(string userId, int listType, string id, string data); 19 | 20 | static void demoDeleteFromList(string userId, int listType, string id); 21 | 22 | static void demoQueryList(string listType, list& listData); 23 | }; 24 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/src/HttpRequestTool.h: -------------------------------------------------------------------------------- 1 | #ifndef __LIBCURL_H__ 2 | #define __LIBCURL_H__ 3 | 4 | #include 5 | #include 6 | #include 7 | #include "curl/curl.h" 8 | 9 | 10 | static char error_buffer[CURL_ERROR_SIZE]; 11 | static int writer(char*, size_t, size_t, std::string*); 12 | static bool init(CURL*&, const char*, std::string*); 13 | 14 | 15 | static bool init(CURL*& conn, const char* url, std::string* p_buffer) 16 | { 17 | CURLcode code; 18 | 19 | conn = curl_easy_init(); 20 | if (NULL == conn) 21 | { 22 | std::cout << stderr << " Failed to create CURL connection" << std::endl; 23 | exit(EXIT_FAILURE); 24 | } 25 | 26 | code = curl_easy_setopt(conn, CURLOPT_ERRORBUFFER, error_buffer); 27 | if (code != CURLE_OK) 28 | { 29 | std::cout << stderr << " Failed to set error buffer " << code << std::endl; 30 | return false; 31 | } 32 | 33 | code = curl_easy_setopt(conn, CURLOPT_URL, url); 34 | if (code != CURLE_OK) 35 | { 36 | std::cout << stderr << " Failed to set URL " << error_buffer << std::endl; 37 | return false; 38 | } 39 | 40 | code = curl_easy_setopt(conn, CURLOPT_SSL_VERIFYPEER ,false); 41 | if (code != CURLE_OK) 42 | { 43 | std::cout << stderr << " Failed to set CURLOPT_SSL_VERIFYPEER " << error_buffer << std::endl; 44 | return false; 45 | } 46 | 47 | code = curl_easy_setopt(conn, CURLOPT_FOLLOWLOCATION, 1); 48 | if (code != CURLE_OK) 49 | { 50 | std::cout << stderr << " Failed to set redirect option " << error_buffer << std::endl; 51 | return false; 52 | } 53 | 54 | code = curl_easy_setopt(conn, CURLOPT_WRITEFUNCTION, writer); 55 | if (code != CURLE_OK) 56 | { 57 | std::cout << stderr << " Failed to set writer " << error_buffer << std::endl; 58 | return false; 59 | } 60 | 61 | code = curl_easy_setopt(conn, CURLOPT_WRITEDATA, p_buffer); 62 | if (code != CURLE_OK) 63 | { 64 | std::cout << stderr << " Failed to set write data " << error_buffer << std::endl; 65 | return false; 66 | } 67 | 68 | return true; 69 | } 70 | 71 | static int writer(char* data, size_t size, size_t nmemb, std::string* writer_data) 72 | { 73 | unsigned long sizes = size * nmemb; 74 | 75 | if (NULL == writer_data) 76 | { 77 | return 0; 78 | } 79 | 80 | writer_data->append(data, sizes); 81 | 82 | return sizes; 83 | } 84 | 85 | 86 | 87 | int libcurl_get(const char* url, std::string& buffer, std::string& errinfo) 88 | { 89 | 90 | CURL *conn = NULL; 91 | CURLcode code; 92 | 93 | curl_global_init(CURL_GLOBAL_DEFAULT); 94 | 95 | if (!init(conn, url, &buffer)) 96 | { 97 | std::cout << stderr << " Connection initializion failed" << std::endl; 98 | errinfo = "Connection initializion failed\n"; 99 | 100 | return -1; 101 | } 102 | 103 | code = curl_easy_perform(conn); 104 | 105 | if (code != CURLE_OK) 106 | { 107 | std::cout << stderr << " Failed to get" << url << error_buffer << std::endl; 108 | 109 | errinfo.append("Failed to get "); 110 | errinfo.append(url); 111 | 112 | return -2; 113 | } 114 | 115 | curl_easy_cleanup(conn); 116 | 117 | return 1; 118 | } 119 | 120 | 121 | 122 | int libcurl_post(const char* url, const char* data, std::string& buffer, std::string& errinfo) 123 | { 124 | CURL *conn = NULL; 125 | CURLcode code; 126 | 127 | curl_global_init(CURL_GLOBAL_DEFAULT); 128 | 129 | if (!init(conn, url, &buffer)) 130 | { 131 | std::cout << stderr << " Connection initializion failed" << std::endl; 132 | 133 | errinfo = "Connection initializion failed\n"; 134 | 135 | return -1; 136 | } 137 | 138 | code = curl_easy_setopt(conn, CURLOPT_POST, true); 139 | 140 | if (code != CURLE_OK) 141 | { 142 | std::cout << stderr << " Failed to set CURLOPT_POST " << error_buffer << std::endl; 143 | return -1; 144 | } 145 | 146 | code = curl_easy_setopt(conn, CURLOPT_POSTFIELDS, data); 147 | if (code != CURLE_OK) 148 | { 149 | std::cout << stderr << " Failed to set CURLOPT_POSTFIELDS " << error_buffer << std::endl; 150 | return -1; 151 | } 152 | 153 | code = curl_easy_perform(conn); 154 | 155 | if (code != CURLE_OK) 156 | { 157 | std::cout << stderr << " Failed to post " << url << error_buffer << std::endl; 158 | 159 | errinfo.append("Failed to post "); 160 | errinfo.append(url); 161 | 162 | return -2; 163 | } 164 | 165 | curl_easy_cleanup(conn); 166 | 167 | return 1; 168 | } 169 | 170 | #endif 171 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/src/V3516A.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "sample_comm.h" 4 | #include "v_ini.h" 5 | 6 | #include "XHLiveManager.h" 7 | extern XHLiveManager* g_pXHLiveManager; 8 | extern bool g_bInit; 9 | //#include "StartLiveSrc.h" 10 | //extern StartLiveSrc gStartLiveSrc; 11 | bool gloableSettingStarrtc(); 12 | HI_S32 StartVideoEnc(); 13 | HI_S32 StopVideoEnc(); 14 | 15 | HI_S32 SAMPLE_AUDIO_AiAenc(HI_VOID); 16 | void UDP_THREAD(void); 17 | void init_VideoParam(void); 18 | HI_S32 Load_Param(HI_VOID); 19 | HI_U32 HTX_CreatTrdCheckViMode(void); 20 | HI_U32 SetFrameRateAndBitRate(HI_U32 nFrameRate, HI_U32 nBitRate); 21 | extern ini_reader reader; 22 | 23 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/src/g711.cpp: -------------------------------------------------------------------------------- 1 | #include "g711.h" 2 | 3 | #define SIGN_BIT (0x80) /* Sign bit for a A-law byte. */ 4 | #define QUANT_MASK (0xf) /* Quantization field mask. */ 5 | #define NSEGS (8) /* Number of A-law segments. */ 6 | #define SEG_SHIFT (4) /* Left shift for segment number. */ 7 | #define SEG_MASK (0x70) /* Segment field mask. */ 8 | #define BIAS (0x84) /* Bias for linear code. */ 9 | 10 | int alaw2linear(unsigned char a_val) 11 | { 12 | int t; 13 | int seg; 14 | 15 | a_val ^= 0x55; 16 | 17 | t = a_val & QUANT_MASK; 18 | seg = ((unsigned)a_val & SEG_MASK) >> SEG_SHIFT; 19 | if(seg) t= (t + t + 1 + 32) << (seg + 2); 20 | else t= (t + t + 1 ) << 3; 21 | 22 | return (a_val & SIGN_BIT) ? t : -t; 23 | } 24 | 25 | void build_xlaw_table(byte *linear_to_xlaw, 26 | int (*xlaw2linear)(unsigned char), 27 | int mask) 28 | { 29 | int i, j, v, v1, v2; 30 | 31 | j = 0; 32 | for(i=0;i<128;i++) { 33 | if (i != 127) { 34 | v1 = xlaw2linear(i ^ mask); 35 | v2 = xlaw2linear((i + 1) ^ mask); 36 | v = (v1 + v2 + 4) >> 3; 37 | } else { 38 | v = 8192; 39 | } 40 | for(;j 0) 43 | linear_to_xlaw[8192 - j] = (i ^ (mask ^ 0x80)); 44 | } 45 | } 46 | linear_to_xlaw[0] = linear_to_xlaw[1]; 47 | } 48 | 49 | static byte linear_to_alaw[16384]; 50 | 51 | static short decode_alaw_table[256]; 52 | 53 | void g711_init(){ 54 | build_xlaw_table(linear_to_alaw, alaw2linear, 0xd5); 55 | 56 | for(int i=0;i<256;i++){ 57 | decode_alaw_table[i] = alaw2linear(i); 58 | } 59 | } 60 | 61 | void g711_encode(byte * pcm, size_t pcm_size, byte * g711){ 62 | short *samples = (short *)pcm; 63 | 64 | for(int n = pcm_size / 2; n > 0; n--) { 65 | int v = *samples++; 66 | *g711++ = linear_to_alaw[(v + 32768) >> 2]; 67 | } 68 | } 69 | 70 | void g711_decode(byte * g711, size_t g711_size, byte * pcm){ 71 | short *samples = (short *)pcm; 72 | 73 | for(int n = g711_size; n > 0; n--) { 74 | *samples++ = decode_alaw_table[*g711++]; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/src/g711.h: -------------------------------------------------------------------------------- 1 | #ifndef _G711_H_ 2 | #define _G711_H_ 3 | #include 4 | 5 | typedef unsigned char byte; 6 | 7 | void g711_init(); 8 | void g711_encode(byte * pcm, size_t pcm_size, byte * g711); 9 | void g711_decode(byte * g711, size_t g711_size, byte * pcm); 10 | #endif -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "V3516A.h" 5 | #include "send_searchIp.h" 6 | #include 7 | 8 | #include "RtspCaster.h" 9 | #include "XHLiveManager.h" 10 | #include "CLogin.h" 11 | #include "XHChatroomType.h" 12 | #include "CInterfaceUrls.h" 13 | 14 | extern int Vi_Mode,Vi_Input,SDI_Input; 15 | 16 | 17 | 18 | int main( int argc, char **argv ) 19 | { 20 | 21 | //初始化 RTSP端口 22 | caster_init(554); 23 | 24 | Load_Param(); 25 | 26 | if(Vi_Mode == 0) //CVBS MODE 27 | { 28 | Vi_Input = 3; 29 | } 30 | else if(Vi_Mode ==1 ) //HDMI MODE 31 | { 32 | //启动检测VI模式的线程 修改Vi_Input 33 | HTX_CreatTrdCheckViMode(); 34 | } 35 | else if(Vi_Mode == 2) //SDI MODE 36 | { 37 | Vi_Input = SDI_Input; 38 | } 39 | 40 | CUserManager* pUserManager = new CUserManager(); 41 | CLogin login(pUserManager); 42 | 43 | bool bRet = login.logIn(); 44 | 45 | while(bRet == false) 46 | { 47 | usleep( 1000 ); 48 | bRet = login.logIn(); 49 | } 50 | string strName = "armLive" + pUserManager->m_ServiceParam.m_strUserId; 51 | XH_CHATROOM_TYPE chatRoomType = XH_CHATROOM_TYPE_GLOBAL_PUBLIC; 52 | XH_LIVE_TYPE channelType = XH_LIVE_TYPE_GLOBAL_PUBLIC; 53 | g_pXHLiveManager = new XHLiveManager(pUserManager); 54 | 55 | list listData; 56 | string strLiveId = ""; 57 | 58 | char strListType[10] = { 0 }; 59 | sprintf(strListType, "%d,%d", CHATROOM_LIST_TYPE_LIVE, CHATROOM_LIST_TYPE_LIVE_PUSH); 60 | 61 | if(pUserManager->m_bAEventCenterEnable) 62 | { 63 | CInterfaceUrls::demoQueryList(strListType, listData); 64 | } 65 | else 66 | { 67 | XHLiveManager::getLiveList(pUserManager, "", strListType, listData); 68 | } 69 | list::iterator iter = listData.begin(); 70 | 71 | for (; iter != listData.end(); iter++) 72 | { 73 | if(iter->m_strCreaterId == pUserManager->m_ServiceParam.m_strUserId && strName == iter->m_strName) 74 | { 75 | strLiveId = iter->m_strRoomId; 76 | break; 77 | } 78 | } 79 | if(strLiveId == "") 80 | { 81 | strLiveId = g_pXHLiveManager->createLive(strName, chatRoomType, channelType); 82 | if(strLiveId != "") 83 | { 84 | string strInfo = "{\"id\":\""; 85 | strInfo += strLiveId; 86 | strInfo += "\",\"creator\":\""; 87 | strInfo += pUserManager->m_ServiceParam.m_strUserId; 88 | strInfo += "\",\"name\":\""; 89 | strInfo += strName; 90 | strInfo += "\"}"; 91 | bool bAec = true; 92 | if(bAec) 93 | { 94 | printf("%s\n", (char*)strInfo.c_str()); 95 | CInterfaceUrls::demoSaveToList(pUserManager->m_ServiceParam.m_strUserId, CHATROOM_LIST_TYPE_LIVE, strLiveId, strInfo); 96 | } 97 | else 98 | { 99 | g_pXHLiveManager->saveToList(pUserManager->m_ServiceParam.m_strUserId, CHATROOM_LIST_TYPE_LIVE, strLiveId, strInfo); 100 | } 101 | } 102 | } 103 | 104 | if(strLiveId != "") 105 | { 106 | if(!gloableSettingStarrtc()) 107 | { 108 | printf("gloableSettingStarrtc failed \n"); 109 | } 110 | else 111 | { 112 | StartVideoEnc(); 113 | 114 | while(g_pXHLiveManager->m_Param.videoParam.ppsData == NULL || g_pXHLiveManager->m_Param.videoParam.spsData == NULL) 115 | { 116 | usleep( 1000 ); 117 | } 118 | 119 | StopVideoEnc(); 120 | 121 | bRet = g_pXHLiveManager->startLive(strLiveId); 122 | if(bRet) 123 | { 124 | g_bInit = true; 125 | StartVideoEnc(); 126 | while (true) 127 | { 128 | usleep( 800 ); 129 | } 130 | 131 | StopVideoEnc(); 132 | 133 | } 134 | else 135 | { 136 | printf("startLive failed \n"); 137 | } 138 | } 139 | 140 | } 141 | else 142 | { 143 | printf("createLive failed \n"); 144 | } 145 | caster_quit(); 146 | } 147 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/src/param.ini: -------------------------------------------------------------------------------- 1 | #后台是否开启了aecURL,1为开启,0为未开启 2 | AEventCenterEnable=1 3 | 4 | IMServerIP=demo.starrtc.com 5 | IMServerPort=19903 6 | 7 | ChatRoomServerIP=demo.starrtc.com 8 | ChatRoomServerPort=19906 9 | 10 | UploadServerIP=demo.starrtc.com 11 | UploadServerPort=19931 12 | 13 | #0:G.711 1:AAC 14 | AudioEncType=1 15 | 16 | #0:Cbr 1:Vbr 17 | RcMode=0 18 | 19 | #0:720P 1:1080P 20 | SDI_Input=1 21 | 22 | #0:No 1:Save 23 | SaveMode=1 24 | 25 | #0:CVBS 1:HDMI 2:SDI 26 | ViMode=1 27 | VideoBitRate=1024 28 | 29 | #0:H264 1:H265 30 | VideoEncType=0 31 | VideoFrameRate=20 32 | #0:CIF 1:VGA 2:D1 3:720P 4:1080P 33 | VideoType=4 34 | appId=APPID-FREE 35 | userId=1220057 -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/src/shared_buffer.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _SHARED_BUFFER_HPP 2 | #define _SHARED_BUFFER_HPP 3 | 4 | typedef unsigned char byte; 5 | 6 | namespace axis{ 7 | 8 | class buffer{ 9 | private: 10 | byte * data_; 11 | size_t capacity_; 12 | size_t used_size_; 13 | 14 | private: 15 | buffer(const buffer&); 16 | buffer& operator=(const buffer&); 17 | void reserve(size_t new_size){ 18 | byte * tmp = (byte *)malloc(new_size); 19 | if(data_){ 20 | memcpy(tmp, data_, used_size_ > new_size ? new_size : used_size_); 21 | free(data_); 22 | } 23 | capacity_ = new_size; 24 | data_ = tmp; 25 | } 26 | 27 | public: 28 | buffer() 29 | : used_size_(0) 30 | , capacity_(0) 31 | , data_(0) 32 | { 33 | } 34 | 35 | ~buffer() 36 | { 37 | if(data_)free(data_); 38 | } 39 | 40 | byte* raw_data(){ 41 | if(data_ == 0){ 42 | return 0; 43 | } 44 | return data_; 45 | } 46 | 47 | size_t size() const{ 48 | return used_size_; 49 | } 50 | 51 | void resize(size_t new_size){ 52 | if(new_size > capacity_){ 53 | reserve(new_size); 54 | } 55 | used_size_ = new_size; 56 | } 57 | }; 58 | 59 | class shared_buffer 60 | { 61 | private: 62 | typedef boost::shared_ptr shared_data_ptr; 63 | shared_data_ptr shared_data_; 64 | 65 | public: 66 | shared_buffer() 67 | : shared_data_(new buffer()) 68 | { 69 | } 70 | 71 | byte* raw_data() const{ 72 | return shared_data_->raw_data(); 73 | } 74 | 75 | unsigned size() const{ 76 | return shared_data_->size(); 77 | } 78 | 79 | void resize(size_t new_size){ 80 | shared_data_->resize(new_size); 81 | } 82 | 83 | void reset(){ 84 | shared_data_.reset(new buffer()); 85 | } 86 | }; 87 | 88 | }; 89 | 90 | #endif // _SHARED_BUFFER_HPP 91 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/src/swap.h: -------------------------------------------------------------------------------- 1 | #ifndef _SWAP_H_ 2 | #define _SWAP_H_ 3 | 4 | #include 5 | 6 | typedef unsigned char byte; 7 | 8 | #ifndef WIN32 9 | #define _ASSERT assert 10 | #endif 11 | 12 | #ifndef axis_max 13 | #define axis_max(a,b) (((a) > (b)) ? (a) : (b)) 14 | #endif 15 | 16 | #ifndef axis_min 17 | #define axis_min(a,b) (((a) < (b)) ? (a) : (b)) 18 | #endif 19 | 20 | inline void swap(byte * a, byte * b){ 21 | byte t = *a; 22 | *a = *b; 23 | *b = t; 24 | } 25 | 26 | template 27 | inline T swap(T i){ 28 | byte * b = (byte *)&i; 29 | int len = sizeof(T); 30 | for(int j = 0; j < len / 2; ++j){ 31 | swap(&b[j], &b[sizeof(T) - j - 1]); 32 | } 33 | return i; 34 | } 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/src/testJni.c: -------------------------------------------------------------------------------- 1 | #include "interface_starLiveVideo.h" 2 | 3 | 4 | int test_jni(){ 5 | callbackInit_liveVideoSrc_test(); 6 | 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/src/udptcp.h: -------------------------------------------------------------------------------- 1 | #ifdef WIN32 2 | 3 | #define socklen_t int 4 | 5 | #else 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #define SD_BOTH 2 20 | #define closesocket close 21 | 22 | #endif 23 | #include 24 | //#include 25 | #define INVALID_SOCKET -1 26 | #include 27 | using namespace std ; 28 | class simple_tcp{ 29 | private: 30 | int s; 31 | public: 32 | simple_tcp():s(INVALID_SOCKET){ 33 | 34 | } 35 | ~simple_tcp(){ 36 | clear(); 37 | } 38 | bool listen(const char * addr, int port){ 39 | struct hostent *he = gethostbyname(addr); 40 | if(he == 0)return false; 41 | signal(SIGPIPE,SIG_IGN); 42 | 43 | struct sockaddr_in host; 44 | host.sin_port = htons(port); 45 | host.sin_family = AF_INET; 46 | host.sin_addr = *((struct in_addr *)he->h_addr); 47 | 48 | if(s && s != INVALID_SOCKET)closesocket(s); 49 | 50 | s = socket(AF_INET, SOCK_STREAM, 0); 51 | 52 | if(s == INVALID_SOCKET)return false; 53 | 54 | if(INVALID_SOCKET == bind(s, (struct sockaddr *)&host, sizeof(host))){ 55 | closesocket(s); 56 | return false; 57 | } 58 | 59 | if(::listen(s, 1) == INVALID_SOCKET){ 60 | closesocket(s); 61 | return false; 62 | } 63 | return true; 64 | } 65 | void accept(simple_tcp& st){ 66 | st.s = ::accept(s, 0, 0); 67 | } 68 | bool connect(const char * addr, int port){ 69 | struct hostent *he = gethostbyname(addr); 70 | if(he == 0)return false; 71 | 72 | struct sockaddr_in host; 73 | host.sin_port = htons(port); 74 | host.sin_family = AF_INET; 75 | host.sin_addr = *((struct in_addr *)he->h_addr); 76 | 77 | if(s && s != INVALID_SOCKET)closesocket(s); 78 | s = socket(AF_INET, SOCK_STREAM, 0); 79 | if(s == INVALID_SOCKET)return false; 80 | 81 | int ret = ::connect(s, (struct sockaddr *) &host, sizeof(host)); 82 | if(ret == -1){ 83 | closesocket(s); 84 | s = INVALID_SOCKET; 85 | return false; 86 | } 87 | return true; 88 | } 89 | void clear(){ 90 | if (s && s != INVALID_SOCKET) { 91 | shutdown(s, SD_BOTH); 92 | closesocket(s); 93 | s = INVALID_SOCKET; 94 | } 95 | } 96 | bool readable(){ 97 | fd_set set; 98 | FD_ZERO(&set); 99 | FD_SET(s, &set); 100 | 101 | timeval tv = {0, 0}; 102 | 103 | return 1 == select(0, &set, 0, 0, &tv); 104 | } 105 | bool recv_some(void *buffer, int *length){ 106 | int ret = ::recv(s, (char*)buffer, *length, 0); 107 | if(ret == -1 || ret == 0) return false; 108 | *length = ret; 109 | return true; 110 | } 111 | bool recv(void *buffer, int length){ 112 | int real_recv = 0; 113 | while(length != 0){ 114 | int ret = ::recv(s, (char*)buffer + real_recv, length, 0); 115 | if(ret == -1 || ret == 0) return false; 116 | length -= ret; 117 | real_recv += ret; 118 | } 119 | return true; 120 | } 121 | bool send(const void *buffer, int length){ 122 | int real_send = 0; 123 | while(length != 0){ 124 | int ret = ::send(s, (char*)buffer + real_send, length, 0); 125 | if(ret == -1 || ret == 0){ 126 | 127 | 128 | return false; 129 | } 130 | length -= ret; 131 | real_send += ret; 132 | } 133 | return true; 134 | } 135 | }; 136 | //vector users ; 137 | class simple_udp{ 138 | public: 139 | int s; 140 | struct sockaddr_in clientAddr; 141 | public: 142 | simple_udp():s(INVALID_SOCKET){ 143 | 144 | } 145 | ~simple_udp(){ 146 | } 147 | bool create_socket(int port) 148 | { 149 | struct sockaddr_in host; 150 | host.sin_family = AF_INET; 151 | host.sin_port = htons(port); 152 | host.sin_addr.s_addr = htonl(INADDR_ANY); 153 | 154 | 155 | if ( (s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) 156 | { 157 | perror("socket"); 158 | exit(1); 159 | } 160 | if (bind(s, (struct sockaddr *)&host, sizeof(host)) < 0) 161 | { 162 | perror("bind"); 163 | exit(1); 164 | } 165 | 166 | } 167 | 168 | int recvclient(char * buf) 169 | { 170 | int len = sizeof(clientAddr); 171 | char mesg[2048]; 172 | memset(mesg,0,2048); 173 | int n = recvfrom(s, mesg, sizeof(mesg), 0, (struct sockaddr*)&clientAddr, (socklen_t*)&len); 174 | 175 | if(n<0) 176 | return -1; 177 | memcpy(buf,mesg,n); 178 | //printf("recv n=%d\n",n); 179 | return n; 180 | //printf("mesg=%s\n",mesg); 181 | //cout<<"mesg"<0) 189 | { 190 | printf("%s %u says: %s\n", inet_ntoa(clientAddr.sin_addr), ntohs(clientAddr.sin_port), mesg); 191 | return n ; 192 | } 193 | #endif 194 | } 195 | 196 | int sentclient(void * buf,int length) 197 | { 198 | 199 | int m = sendto(s, buf,length, 0, (struct sockaddr *)&clientAddr, sizeof(clientAddr)); 200 | 201 | if (m < 0) 202 | { 203 | perror("sendto"); 204 | printf("length=%d\n",length); 205 | 206 | } 207 | else 208 | { 209 | 210 | } 211 | 212 | } 213 | }; 214 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/src/v_ini.h: -------------------------------------------------------------------------------- 1 | #ifndef _ini__ 2 | #define _ini__ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | using std::string; 12 | using std::fstream; 13 | using std::map; 14 | 15 | class ini_reader 16 | { 17 | public: 18 | ini_reader( void ) 19 | { 20 | } 21 | ~ini_reader( ) 22 | { 23 | } 24 | public: 25 | int load_ini( const char* name ) 26 | { 27 | int pos; 28 | string line; 29 | fstream fs( name ); 30 | m_key_val.clear( ); 31 | 32 | if( !fs ) 33 | { 34 | return -1; 35 | } 36 | 37 | while( getline( fs, line ) ) 38 | { 39 | pos = line.find( "=" ); 40 | if( 0 < pos ) 41 | { 42 | string key; 43 | string val; 44 | int i = 0; 45 | 46 | if( string::npos != line.find( "\r" ) ) 47 | { 48 | i = 1; 49 | } 50 | else 51 | { 52 | i = 0; 53 | } 54 | 55 | key = line.substr( 0, pos ); 56 | val = line.substr( pos + 1, line.length() - pos - 1 - i ); 57 | 58 | m_key_val.insert( std::make_pair( key, val ) ); 59 | } 60 | } 61 | return m_key_val.size() ? 1 :-1; 62 | } 63 | int save_ini( const char* name ) 64 | { 65 | FILE* f = fopen( name, "w+" ); 66 | if( !f ) 67 | { 68 | char info[256] = { 0 }; 69 | sprintf( info, "\nfopen:%s failed", name ); 70 | return -1; 71 | } 72 | map::iterator iter = m_key_val.begin( ); 73 | while( iter != m_key_val.end( ) ) 74 | { 75 | char buf[128] = { 0 }; 76 | sprintf( buf, "%s=%s\r\n", iter->first.c_str(), iter->second.c_str() ); 77 | fwrite( buf, strlen((const char*)(buf)), 1, f ); 78 | ++iter; 79 | } 80 | fclose( f ); 81 | } 82 | int set_value( const char* key, string& val ) 83 | { 84 | map::iterator iter = m_key_val.find( string( key ) ); 85 | if( iter == m_key_val.end() ) 86 | { 87 | m_key_val.insert( std::make_pair( (string)(key), val ) ); 88 | } 89 | else 90 | { 91 | iter->second = val; 92 | } 93 | return 0; 94 | } 95 | int get_value( const char* key, string& val ) 96 | { 97 | map::iterator iter = m_key_val.find( string( key ) ); 98 | if( iter == m_key_val.end() ) 99 | { 100 | return -1; 101 | } 102 | else 103 | { 104 | val = iter->second; 105 | return 0; 106 | } 107 | } 108 | private: 109 | map m_key_val; 110 | }; 111 | #endif 112 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/CChatroomManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __CHATROOM_MANAGER__ 2 | #define __CHATROOM_MANAGER__ 3 | #include "CUserManager.h" 4 | #include "IStarIMChatroomListener.h" 5 | #include 6 | using namespace std; 7 | 8 | #ifdef __cplusplus 9 | extern "C" 10 | { 11 | #endif 12 | 13 | class CChatroomManager : public IStarIMChatroomListener 14 | { 15 | public: 16 | /* 17 | * 构造方法 18 | */ 19 | CChatroomManager(CUserManager* pUserManager); 20 | /* 21 | * 析构方法 22 | */ 23 | ~CChatroomManager(); 24 | public: 25 | /* 26 | * 创建ChatRoom 27 | */ 28 | bool createChatRoom(string strName, int chatroomType); 29 | 30 | /* 31 | * 加入ChatRoom 32 | */ 33 | bool joinChatRoom(string strChatroomId); 34 | 35 | /** 36 | * 退出聊天室 37 | */ 38 | bool exitChatroom(); 39 | 40 | /* 41 | * 删除聊天室 42 | */ 43 | bool deleteChatRoom(string strRoomId, int listType); 44 | 45 | /* 46 | * 创建后上报创建的聊天室信息 47 | */ 48 | bool reportChatroom(string strRoomId, int listType, string data); 49 | 50 | string getChatroomId(); 51 | public: 52 | //聊天室创建成功 53 | void chatroomCreateOK(string roomId, int maxContentLen); 54 | //聊天室加入成功 55 | void chatroomJoinOK(string roomId, int maxContentLen); 56 | //聊天室创建失败 57 | void chatroomCreateFailed(string errString); 58 | //聊天室加入失败 59 | void chatroomJoinFailed(string roomId, string errString); 60 | //聊天室报错 61 | void chatRoomErr(string errString); 62 | //聊天室关闭成功 63 | void chatroomStopOK(); 64 | //聊天室删除成功 65 | void chatroomDeleteOK(string roomId); 66 | //聊天室删除失败 67 | void chatroomDeleteFailed(string roomId, string errString); 68 | private: 69 | void resetReturnVal(); 70 | /** 71 | * 成功 72 | * @param data 73 | */ 74 | void success(); 75 | /** 76 | * 失败 77 | * @param errMsg 78 | */ 79 | void failed(string errMsg); 80 | private: 81 | //用户信息 82 | CUserManager* m_pUserManager; 83 | bool m_bJoinChatRoom; 84 | bool m_bReturn; 85 | bool m_bSuccess; 86 | string m_strErrInfo; 87 | string m_ChatRoomId; 88 | }; 89 | 90 | #ifdef __cplusplus 91 | } 92 | #endif 93 | #endif 94 | 95 | 96 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/CLiveParam.h: -------------------------------------------------------------------------------- 1 | #ifndef __LIVE_PARAM__ 2 | #define __LIVE_PARAM__ 3 | #include 4 | using namespace std; 5 | 6 | #ifdef __cplusplus 7 | extern "C" 8 | { 9 | #endif 10 | 11 | class CAudioParamInfo 12 | { 13 | public: 14 | CAudioParamInfo(); 15 | ~CAudioParamInfo(); 16 | public: 17 | int audioSampleRateInHz; 18 | int audioChannels; 19 | int audioBitRate; 20 | }; 21 | class CVideoParam 22 | { 23 | public: 24 | CVideoParam(); 25 | ~CVideoParam(); 26 | 27 | void setPPSData(unsigned char* data, int dataLen); 28 | 29 | void setSPSData(unsigned char* data, int dataLen); 30 | public: 31 | int w; 32 | int h; 33 | int fps; 34 | int bitrate; 35 | unsigned char* ppsData; 36 | int ppsDataLen; 37 | unsigned char* spsData; 38 | int spsDataLen; 39 | }; 40 | 41 | 42 | class CLiveParam 43 | { 44 | public: 45 | CLiveParam(); 46 | ~CLiveParam(); 47 | public: 48 | CAudioParamInfo audioParam; 49 | CVideoParam videoParam; 50 | }; 51 | 52 | 53 | #ifdef __cplusplus 54 | } 55 | #endif 56 | #endif 57 | 58 | 59 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/CLogin.h: -------------------------------------------------------------------------------- 1 | #ifndef __LOGIN__ 2 | #define __LOGIN__ 3 | #include "CUserManager.h" 4 | #include 5 | using namespace std; 6 | 7 | #ifdef __cplusplus 8 | extern "C" 9 | { 10 | #endif 11 | 12 | class CLogin 13 | { 14 | public: 15 | /* 16 | * 构造方法 17 | */ 18 | CLogin(CUserManager* pUserManager); 19 | /* 20 | * 析构方法 21 | */ 22 | ~CLogin(); 23 | 24 | /* 25 | * 登录 26 | */ 27 | bool logIn(); 28 | 29 | /* 30 | * 开启IM服务 31 | */ 32 | bool startIMServer(string strIP, int nPort, string userId, string agentId, string strToken); 33 | 34 | /* 35 | * 开启IM服务 36 | */ 37 | bool stopIMServer(); 38 | }; 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | #endif 44 | 45 | 46 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/CSrcManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __SRC_MANAGER__ 2 | #define __SRC_MANAGER__ 3 | #include "CUserManager.h" 4 | #include "ISrcListener.h" 5 | #include 6 | using namespace std; 7 | 8 | #ifdef __cplusplus 9 | extern "C" 10 | { 11 | #endif 12 | #define STREAM_CONFIG_MAX_SIZE 7 13 | class CSrcManager : public ISrcListener 14 | { 15 | public: 16 | /* 17 | * 构造方法 18 | */ 19 | CSrcManager(CUserManager* pUserManager); 20 | /* 21 | * 析构方法 22 | */ 23 | ~CSrcManager(); 24 | public: 25 | /* 26 | * 创建Channel 27 | */ 28 | bool createChannel(string strName, string strChatroomId); 29 | 30 | /* 31 | * 全局参数设置 32 | */ 33 | void globalSetting(int w, int h, int fps, int bitrate); 34 | 35 | /* 36 | * 开启直播编码器 37 | */ 38 | bool startEncoder(int audioSampleRateInHz, int audioChannels, int audioBitRate, unsigned char* ppsData,int ppsDataLen, unsigned char* spsData,int spsDataLen); 39 | /* 40 | * Channel 申请上传 41 | */ 42 | bool applyUpload(string channelId); 43 | 44 | //videoData的释放由此函数负责 45 | void insertVideoRaw(unsigned char* videoData, int dataLen, int isBig); 46 | 47 | /* 48 | * Channel 停止上传 49 | */ 50 | bool stopUpload(); 51 | 52 | /* 53 | * 停止直播编码器 54 | */ 55 | bool stopEncoder(); 56 | public: 57 | virtual int createChannelOK(char* channelId); 58 | virtual int createChannelFailed(char* errString); 59 | 60 | virtual int applyUploadChannelOK(char* channelId); 61 | virtual int applyUploadChannelFailed(char* errString, char* channelId); 62 | 63 | virtual int deleteChannelOK(char* channelId); 64 | virtual int deleteChannelFailed(char* errString, char* channelId); 65 | 66 | virtual int setPeerStreamDownloadConfigOK(char* channelId); 67 | virtual int setPeerStreamDownloadConfigFailed(char* channelId); 68 | 69 | virtual int stopOK(); 70 | 71 | virtual int srcError(char* errString); 72 | private: 73 | void resetReturnVal(); 74 | 75 | /** 76 | * 成功 77 | * @param data 78 | */ 79 | virtual void success(); 80 | 81 | /** 82 | * 失败 83 | * @param errMsg 84 | */ 85 | virtual void failed(string errMsg); 86 | public: 87 | string m_ChannelId; 88 | private: 89 | CUserManager* m_pUserManager; 90 | 91 | bool m_bReturn; 92 | bool m_bSuccess; 93 | string m_strErrInfo; 94 | int m_configArr[STREAM_CONFIG_MAX_SIZE]; 95 | }; 96 | 97 | #ifdef __cplusplus 98 | } 99 | #endif 100 | #endif 101 | 102 | 103 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/CUserManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __USER_MANAGER__ 2 | #define __USER_MANAGER__ 3 | #include 4 | using namespace std; 5 | 6 | #ifdef __cplusplus 7 | extern "C" 8 | { 9 | #endif 10 | 11 | #define AUDIO_SAMPLE_RATE 16000 12 | #define AUDIO_CHANNELS 1 13 | #define AUDIO_BIT_RATE 32 14 | class CAudioParam 15 | { 16 | public: 17 | int m_nSampleRateInHz; 18 | int m_nChannels; 19 | int m_nBitRate; 20 | }; 21 | 22 | class CServiceParam 23 | { 24 | 25 | public: 26 | string m_strUserId; 27 | string m_strAgentId; 28 | 29 | string m_strLoginServiceIP; 30 | int m_nLoginServicePort; 31 | string m_strMessageServiceIP; 32 | int m_nMessageServicePort; 33 | string m_strChatServiceIP; 34 | int m_nChatServicePort; 35 | string m_strUploadServiceIP; 36 | int m_nUploadServicePort; 37 | string m_strDownloadServiceIP; 38 | int m_nDownloadServicePort; 39 | string m_strVOIPServiceIP; 40 | int m_nVOIPServicePort; 41 | 42 | string m_strRequestListAddr; 43 | 44 | public: 45 | int m_CropType; 46 | int m_FrameRate; 47 | }; 48 | 49 | class CUserManager 50 | { 51 | public: 52 | /* 53 | * 构造方法 54 | */ 55 | CUserManager(); 56 | /* 57 | * 析构方法 58 | */ 59 | ~CUserManager(); 60 | 61 | bool readConfig(); 62 | bool writeConfig(); 63 | public: 64 | string m_strAuthKey; 65 | string m_strTokenId; 66 | 67 | string m_strIMServerIp; 68 | int m_nIMServerPort; 69 | int m_nDeployType; 70 | bool m_bVoipP2P; 71 | bool m_bAEventCenterEnable; 72 | CServiceParam m_ServiceParam; 73 | CAudioParam m_AudioParam; 74 | }; 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | #endif 80 | 81 | 82 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/ChatroomInfo.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | using namespace std; 4 | 5 | #ifdef __cplusplus 6 | extern "C" 7 | { 8 | #endif 9 | 10 | class ChatroomInfo 11 | { 12 | public: 13 | string m_strName; 14 | string m_strCreaterId; 15 | string m_strRoomId; 16 | bool m_bLive; 17 | }; 18 | #ifdef __cplusplus 19 | } 20 | #endif -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/IChatroomGetListListener.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "ChatroomInfo.h" 4 | 5 | #ifdef __cplusplus 6 | extern "C" 7 | { 8 | #endif 9 | 10 | class IChatroomGetListListener 11 | { 12 | public: 13 | /** 14 | * 查询聊天室列表回调 15 | */ 16 | virtual int chatroomQueryAllListOK(list& listData) = 0; 17 | }; 18 | 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/ISrcListener.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifdef __cplusplus 3 | extern "C" 4 | { 5 | #endif 6 | class ISrcListener 7 | { 8 | public: 9 | virtual int createChannelOK(char* channelId) = 0; 10 | virtual int createChannelFailed(char* errString) = 0; 11 | 12 | virtual int applyUploadChannelOK(char* channelId) = 0; 13 | virtual int applyUploadChannelFailed(char* errString, char* channelId) = 0; 14 | 15 | virtual int deleteChannelOK(char* channelId) = 0; 16 | virtual int deleteChannelFailed(char* errString, char* channelId) = 0; 17 | 18 | virtual int setPeerStreamDownloadConfigOK(char* channelId) = 0; 19 | virtual int setPeerStreamDownloadConfigFailed(char* channelId) = 0; 20 | 21 | virtual int stopOK() = 0; 22 | 23 | virtual int srcError(char* errString) = 0; 24 | }; 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/IStarIMChatroomListener.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | using namespace std; 5 | #ifdef __cplusplus 6 | extern "C" 7 | { 8 | #endif 9 | 10 | class IStarIMChatroomListener 11 | { 12 | public: 13 | //聊天室创建成功 14 | virtual void chatroomCreateOK(string roomId, int maxContentLen) = 0; 15 | //聊天室加入成功 16 | virtual void chatroomJoinOK(string roomId, int maxContentLen) = 0; 17 | //聊天室创建失败 18 | virtual void chatroomCreateFailed(string errString) = 0; 19 | //聊天室加入失败 20 | virtual void chatroomJoinFailed(string roomId, string errString) = 0; 21 | //聊天室报错 22 | virtual void chatRoomErr(string errString) = 0; 23 | //聊天室关闭成功 24 | virtual void chatroomStopOK() = 0; 25 | //聊天室删除成功 26 | virtual void chatroomDeleteOK(string roomId) = 0; 27 | //聊天室删除失败 28 | virtual void chatroomDeleteFailed(string roomId, string errString) = 0; 29 | }; 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/XHChatroomType.h: -------------------------------------------------------------------------------- 1 | #ifndef CHATROOM_TYPE_H 2 | #define CHATROOM_TYPE_H 3 | 4 | enum XH_CHATROOM_TYPE 5 | { 6 | XH_CHATROOM_TYPE_UNABLE, // 占位 7 | XH_CHATROOM_TYPE_GLOBAL_PUBLIC, // 无需登录和验证 8 | XH_CHATROOM_TYPE_LOGIN_PUBLIC // 需要登录,无需验证 9 | }; 10 | 11 | /** 12 | * 直播类型 13 | */ 14 | enum XH_LIVE_TYPE 15 | { 16 | XH_LIVE_TYPE_GLOBAL_PUBLIC, //无需登录和验证 17 | XH_LIVE_TYPE_LOGIN_PUBLIC, //需要登录,无需验证 18 | XH_LIVE_TYPE_LOGIN_SPECIFY //需要登录和验证 19 | }; 20 | 21 | /** 22 | * 会议类型 23 | */ 24 | enum XH_MEETING_TYPE 25 | { 26 | XH_MEETING_TYPE_GLOBAL_PUBLIC, //无需登录和验证 27 | XH_MEETING_TYPE_LOGIN_PUBLIC, //需要登录,无需验证 28 | XH_MEETING_TYPE_LOGIN_SPECIFY //需要登录和验证 29 | }; 30 | 31 | enum XH_SUPER_ROOM_TYPE 32 | { 33 | XH_SUPER_ROOM_TYPE_GLOBAL_PUBLIC, //无需登录和验证 34 | XH_SUPER_ROOM_TYPE_LOGIN_PUBLIC, //需要登录,无需验证 35 | XH_SUPER_ROOM_TYPE_LOGIN_SPECIFY //需要登录和验证 36 | }; 37 | 38 | enum CHATROOM_LIST_TYPE 39 | { 40 | CHATROOM_LIST_TYPE_CHATROOM, 41 | CHATROOM_LIST_TYPE_LIVE, 42 | CHATROOM_LIST_TYPE_LIVE_PUSH, 43 | CHATROOM_LIST_TYPE_MEETING, 44 | CHATROOM_LIST_TYPE_MEETING_PUSH, 45 | CHATROOM_LIST_TYPE_CLASS, 46 | CHATROOM_LIST_TYPE_CLASS_PUSH, 47 | CHATROOM_LIST_TYPE_AUDIO_LIVE, 48 | CHATROOM_LIST_TYPE_AUDIO_LIVE_PUSH, 49 | CHATROOM_LIST_TYPE_SUPER_ROOM, 50 | CHATROOM_LIST_TYPE_SUPER_ROOM_PUSH 51 | }; 52 | 53 | #endif -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/XHLiveManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __XH_LIVE_MANAGER__ 2 | #define __XH_LIVE_MANAGER__ 3 | #include "CChatroomManager.h" 4 | #include "CSrcManager.h" 5 | #include "CUserManager.h" 6 | #include "CLiveParam.h" 7 | #include "IChatroomGetListListener.h" 8 | #include "ChatroomInfo.h" 9 | #include 10 | #include 11 | using namespace std; 12 | 13 | #ifdef __cplusplus 14 | extern "C" 15 | { 16 | #endif 17 | 18 | class XHLiveManager : public IChatroomGetListListener 19 | { 20 | public: 21 | /* 22 | * 构造方法 23 | */ 24 | XHLiveManager(CUserManager* pUserManager); 25 | /* 26 | * 析构方法 27 | */ 28 | ~XHLiveManager(); 29 | 30 | static void getLiveList(CUserManager* pUserManager, string strUserId, string listType, list& listData); 31 | /** 32 | * 创建直播 33 | */ 34 | string createLive(string strName, int chatroomType, int channelType); 35 | 36 | /** 37 | * 开始直播 38 | * @param strLiveID ID 39 | */ 40 | bool startLive(string strLiveID); 41 | 42 | /* 43 | * 全局参数设置 44 | */ 45 | void globalSetting(int w, int h, int fps, int bitrate); 46 | 47 | /* 48 | * 开启直播编码器 49 | */ 50 | bool startEncoder(int audioSampleRateInHz, int audioChannels, int audioBitRate, unsigned char* ppsData,int ppsDataLen, unsigned char* spsData,int spsDataLen); 51 | 52 | /** 53 | * 保存到列表 54 | * @param userId 55 | * @param type 56 | * @param liveId 57 | * @param data 58 | */ 59 | bool saveToList(string userId, int type, string liveId, string data); 60 | 61 | /** 62 | * 从列表删除 63 | * @param userId 用户ID 64 | * @param type 类型 65 | * @param liveId liveID 66 | */ 67 | void deleteFromList(string userId, int type, string liveId); 68 | 69 | void insertVideoRaw(unsigned char* videoData, int dataLen, int isBig); 70 | 71 | /** 72 | * 查询聊天室列表回调 73 | */ 74 | virtual int chatroomQueryAllListOK(list& chatRoomInfoList); 75 | public: 76 | CLiveParam m_Param; 77 | private: 78 | CUserManager* m_pUserManager; 79 | CChatroomManager* m_pChatroomManager; 80 | CSrcManager* m_pSrcManager; 81 | static bool m_bGetListReturn; 82 | }; 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | #endif 88 | 89 | 90 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/aac_encode.h: -------------------------------------------------------------------------------- 1 | #ifndef _AAC_ENCODE_H_ 2 | #define _AAC_ENCODE_H_ 3 | 4 | #include "codec.h" 5 | 6 | typedef struct _AAC_ENC_OP_INFO_ 7 | { 8 | void *p_aacEncInfo; //store mp3 software decoder internal Info 9 | CHP_MEM_FUNC_T p_mem_func; //store Jubit-8 heap/stack managed function 10 | }AACEncOpInfo_T; 11 | 12 | CHP_RTN_T aac_encoder_init(CHP_MEM_FUNC_T *p_mem_func,CHP_AUD_ENC_INFO_T *p_enc_info,CHP_U32 *bl_handle); 13 | CHP_RTN_T aac_encode(CHP_U32 bl_handle,CHP_AUD_ENC_DATA_T *p_enc_data); 14 | CHP_RTN_T aac_encoder_close(CHP_U32 bl_handle); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/chp_memory.h: -------------------------------------------------------------------------------- 1 | /**====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* 2 | 3 | FILE: chp_memory.h 4 | 5 | The memory manage unit. deal with the malloc and free for memory. 6 | 7 | Copyright (c) 2005 by CHIPNUTS Incorporated. All Rights Reserved. 8 | *====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ 9 | 10 | /**=========================================================================== 11 | 12 | REVISIONS: 13 | Version Name Date Description 14 | 1.0 Tanent 04/14/2006 Initial Version 15 | 1.1 Baggio 05/30/2007 To avoid data abort exception,add address aligned by 4 bytes 16 | to chp_create_mempool(), add data length aligned by 4 bytes to 17 | chp_mempool_malloc(). 18 | *====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ 19 | 20 | #ifndef _CHP_MEMORY_HEAD 21 | #define _CHP_MEMORY_HEAD 22 | 23 | #include "chp_comdef.h" 24 | 25 | // The Block max number 26 | #define CHP_MBLOCK_NUM 256 27 | // The Structure define the all information of the memory pool 28 | typedef struct _CHP_MEMPOOL_INFO_T 29 | { 30 | CHP_U8 *p_addr; // The start addr of the memory 31 | CHP_U32 size; // The size of the memory 32 | CHP_U8 *p_free; // The start addr of the first free block 33 | CHP_U32 malloced[CHP_MBLOCK_NUM]; // The malloced block's start addr record 34 | } CHP_MEMPOOL_INFO_T; 35 | 36 | typedef enum 37 | { 38 | CHP_MP_SUCCESS, 39 | CHP_MP_CANNOT_MALLOC, 40 | CHP_MP_CANNOT_RELEASE, 41 | CHP_MP_SIZE_TOO_LARGE, 42 | CHP_MP_LINK_ERROR, 43 | CHP_MP_SIZE_NOT_SUPPORTED 44 | }CHP_MEMPOOL_RTN_E; 45 | 46 | 47 | // The length of the block's head is 4 bytes 48 | // the lower three bytes describle the length of the block 49 | #define CHP_MBLOCK_SIZE_SIG 0x00ffffff 50 | // the higher one byte describle some information of the block, 51 | // the higher first bit: 1, describle the block is free; 0, describle the block is malloc-ed 52 | // the rest bits is reserved 53 | #define CHP_MBLOCK_HEAD_LEN 4 54 | #define CHP_MBLOCK_FREE_SIG 0x80000000 55 | #define CHP_MBLOCK_RESERVE1 0x40000000 56 | #define CHP_MBLOCK_RESERVE2 0x20000000 57 | #define CHP_MBLOCK_RESERVE3 0x10000000 58 | #define CHP_MBLOCK_RESERVE4 0x08000000 59 | #define CHP_MBLOCK_RESERVE5 0x04000000 60 | #define CHP_MBLOCK_RESERVE6 0x02000000 61 | #define CHP_MBLOCK_RESERVE7 0x01000000 62 | 63 | // The length of the block's tail is 4 bytes 64 | // if the block is free that the 4 bytes is the next free block's start addr 65 | // else if the block is malloc-ed that it is the next malloced or free block's start addr 66 | #define CHP_MBLOCK_TAIL_LEN 4 67 | 68 | // The external define 69 | extern CHP_MEMPOOL_RTN_E chp_create_mempool(CHP_U8 *p_buf, CHP_U32 size_t); 70 | extern void *chp_mempool_malloc(CHP_U32 size_t); 71 | extern void chp_mempool_release(void *p_buffer); 72 | 73 | 74 | #endif /*_CHP_MEMORY_HEAD*/ 75 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/codec.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/third_lib/include/codec.h -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/fdk-aac/FDK_audio.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/third_lib/include/fdk-aac/FDK_audio.h -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/fdk-aac/aacdecoder_lib.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/third_lib/include/fdk-aac/aacdecoder_lib.h -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/fdk-aac/aacenc_lib.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/third_lib/include/fdk-aac/aacenc_lib.h -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/fdk-aac/genericStds.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/third_lib/include/fdk-aac/genericStds.h -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/include/fdk-aac/machine_type.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/third_lib/include/fdk-aac/machine_type.h -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/lib/libRtspCaster.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/third_lib/lib/libRtspCaster.so -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/lib/libaac_enc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/third_lib/lib/libaac_enc.a -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/lib/libfdk-aac.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/third_lib/lib/libfdk-aac.a -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/lib/libfdk-aac.la: -------------------------------------------------------------------------------- 1 | # libfdk-aac.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.1 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libfdk-aac.so.1' 9 | 10 | # Names of this library. 11 | library_names='libfdk-aac.so.1.0.0 libfdk-aac.so.1 libfdk-aac.so' 12 | 13 | # The name of the static archive. 14 | old_library='libfdk-aac.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lm' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libfdk-aac. 26 | current=1 27 | age=0 28 | revision=0 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/home/baijb/work/projetc/hdmi_encode/aac_dir/fdk-aac-0.1.4/target_lib/lib' 42 | -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/lib/libfdk-aac.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/third_lib/lib/libfdk-aac.so -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/lib/libfdk-aac.so.1: -------------------------------------------------------------------------------- 1 | libfdk-aac.so -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/lib/libstarRTC.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/third_lib/lib/libstarRTC.so -------------------------------------------------------------------------------- /Hi3516a_hdmi_rtsp/third_lib/lib/libstarRTCCore.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/Hi3516a_hdmi_rtsp/third_lib/lib/libstarRTCCore.so -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # starrtc-iot-demo 2 | 集成文档:https://docs.starrtc.com/en/docs/hi3516a-1.html 3 | 4 | 海思arm板采集mac电脑的hdmi信号进行实时录屏直播: 5 | 6 | 编译: 7 | cd Debug && make all 8 | 9 | 10 | 将编译出来的Hi3516a_hdmi_rtsp拷贝到海思板子上 11 | 12 | 将src/param.ini配置文件放在与Hi3516a_hdmi_rtsp可执行文件同一目录下。 13 | 14 | 拷贝程序依赖的库文件: 15 | 16 | 17 | 配置文件param.ini参数含义: 18 | 19 | AEventCenterEnable=1 #是否开启aec功能, 20 | 21 | appId=APPID-FREE 22 | 23 | userId= #第一次启动时请留空,否则可能会出现重复id 24 | 25 | 26 | 27 | 下载其它[客户端示例程序](https://docs.starrtc.com/en/download/),进入互动直播,即可观看直播。 28 | 29 | ![arm_hdmi](https://raw.githubusercontent.com/starrtc/starrtc-android-demo/master/assets/arm_hdmi.jpg) 30 | 31 | ![arm_hdmi_screen](https://raw.githubusercontent.com/starrtc/starrtc-android-demo/master/assets/arm_hdmi_screen.jpg) 32 | 33 | hdmi接摄像头: 34 | 35 | ![camera](https://raw.githubusercontent.com/starrtc/starrtc-android-demo/master/assets/camera.jpg) 36 | 37 | Contact 38 | ===== 39 | QQ : 2162498688 40 | 41 | 邮箱:support@starRTC.com 42 | 43 | 手机: 186-1294-6552 44 | 45 | 微信:starRTC 46 | 47 | QQ群:807242783 -------------------------------------------------------------------------------- /starrtc/include/CChatroomManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __CHATROOM_MANAGER__ 2 | #define __CHATROOM_MANAGER__ 3 | #include "CUserManager.h" 4 | #include "IStarIMChatroomListener.h" 5 | #include 6 | using namespace std; 7 | 8 | #ifdef __cplusplus 9 | extern "C" 10 | { 11 | #endif 12 | 13 | class CChatroomManager : public IStarIMChatroomListener 14 | { 15 | public: 16 | /* 17 | * 构造方法 18 | */ 19 | CChatroomManager(CUserManager* pUserManager); 20 | /* 21 | * 析构方法 22 | */ 23 | ~CChatroomManager(); 24 | public: 25 | /* 26 | * 创建ChatRoom 27 | */ 28 | bool createChatRoom(string strName, int chatroomType); 29 | 30 | /* 31 | * 加入ChatRoom 32 | */ 33 | bool joinChatRoom(string strChatroomId); 34 | 35 | /** 36 | * 退出聊天室 37 | */ 38 | bool exitChatroom(); 39 | 40 | /* 41 | * 删除聊天室 42 | */ 43 | bool deleteChatRoom(string strRoomId, int listType); 44 | 45 | /* 46 | * 创建后上报创建的聊天室信息 47 | */ 48 | bool reportChatroom(string strRoomId, int listType, string data); 49 | 50 | string getChatroomId(); 51 | public: 52 | //聊天室创建成功 53 | void chatroomCreateOK(string roomId, int maxContentLen); 54 | //聊天室加入成功 55 | void chatroomJoinOK(string roomId, int maxContentLen); 56 | //聊天室创建失败 57 | void chatroomCreateFailed(string errString); 58 | //聊天室加入失败 59 | void chatroomJoinFailed(string roomId, string errString); 60 | //聊天室报错 61 | void chatRoomErr(string errString); 62 | //聊天室关闭成功 63 | void chatroomStopOK(); 64 | //聊天室删除成功 65 | void chatroomDeleteOK(string roomId); 66 | //聊天室删除失败 67 | void chatroomDeleteFailed(string roomId, string errString); 68 | private: 69 | void resetReturnVal(); 70 | /** 71 | * 成功 72 | * @param data 73 | */ 74 | void success(); 75 | /** 76 | * 失败 77 | * @param errMsg 78 | */ 79 | void failed(string errMsg); 80 | private: 81 | //用户信息 82 | CUserManager* m_pUserManager; 83 | bool m_bJoinChatRoom; 84 | bool m_bReturn; 85 | bool m_bSuccess; 86 | string m_strErrInfo; 87 | string m_ChatRoomId; 88 | }; 89 | 90 | #ifdef __cplusplus 91 | } 92 | #endif 93 | #endif 94 | 95 | 96 | -------------------------------------------------------------------------------- /starrtc/include/CLiveParam.h: -------------------------------------------------------------------------------- 1 | #ifndef __LIVE_PARAM__ 2 | #define __LIVE_PARAM__ 3 | #include 4 | using namespace std; 5 | 6 | #ifdef __cplusplus 7 | extern "C" 8 | { 9 | #endif 10 | 11 | class CAudioParamInfo 12 | { 13 | public: 14 | CAudioParamInfo(); 15 | ~CAudioParamInfo(); 16 | public: 17 | int audioSampleRateInHz; 18 | int audioChannels; 19 | int audioBitRate; 20 | }; 21 | class CVideoParam 22 | { 23 | public: 24 | CVideoParam(); 25 | ~CVideoParam(); 26 | 27 | void setPPSData(unsigned char* data, int dataLen); 28 | 29 | void setSPSData(unsigned char* data, int dataLen); 30 | public: 31 | int w; 32 | int h; 33 | int fps; 34 | int bitrate; 35 | unsigned char* ppsData; 36 | int ppsDataLen; 37 | unsigned char* spsData; 38 | int spsDataLen; 39 | }; 40 | 41 | 42 | class CLiveParam 43 | { 44 | public: 45 | CLiveParam(); 46 | ~CLiveParam(); 47 | public: 48 | CAudioParamInfo audioParam; 49 | CVideoParam videoParam; 50 | }; 51 | 52 | 53 | #ifdef __cplusplus 54 | } 55 | #endif 56 | #endif 57 | 58 | 59 | -------------------------------------------------------------------------------- /starrtc/include/CLogin.h: -------------------------------------------------------------------------------- 1 | #ifndef __LOGIN__ 2 | #define __LOGIN__ 3 | #include "CUserManager.h" 4 | #include 5 | using namespace std; 6 | 7 | #ifdef __cplusplus 8 | extern "C" 9 | { 10 | #endif 11 | 12 | class CLogin 13 | { 14 | public: 15 | /* 16 | * 构造方法 17 | */ 18 | CLogin(CUserManager* pUserManager); 19 | /* 20 | * 析构方法 21 | */ 22 | ~CLogin(); 23 | 24 | /* 25 | * 登录 26 | */ 27 | bool logIn(); 28 | 29 | /* 30 | * 开启IM服务 31 | */ 32 | bool startIMServer(string strIP, int nPort, string userId, string agentId, string strToken); 33 | 34 | /* 35 | * 开启IM服务 36 | */ 37 | bool stopIMServer(); 38 | }; 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | #endif 44 | 45 | 46 | -------------------------------------------------------------------------------- /starrtc/include/CSrcManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __SRC_MANAGER__ 2 | #define __SRC_MANAGER__ 3 | #include "CUserManager.h" 4 | #include "ISrcListener.h" 5 | #include 6 | using namespace std; 7 | 8 | #ifdef __cplusplus 9 | extern "C" 10 | { 11 | #endif 12 | #define STREAM_CONFIG_MAX_SIZE 7 13 | class CSrcManager : public ISrcListener 14 | { 15 | public: 16 | /* 17 | * 构造方法 18 | */ 19 | CSrcManager(CUserManager* pUserManager); 20 | /* 21 | * 析构方法 22 | */ 23 | ~CSrcManager(); 24 | public: 25 | /* 26 | * 创建Channel 27 | */ 28 | bool createChannel(string strName, string strChatroomId); 29 | 30 | /* 31 | * 全局参数设置 32 | */ 33 | void globalSetting(int w, int h, int fps, int bitrate); 34 | 35 | /* 36 | * 开启直播编码器 37 | */ 38 | bool startEncoder(int audioSampleRateInHz, int audioChannels, int audioBitRate, unsigned char* ppsData,int ppsDataLen, unsigned char* spsData,int spsDataLen); 39 | /* 40 | * Channel 申请上传 41 | */ 42 | bool applyUpload(string channelId); 43 | 44 | //videoData的释放由此函数负责 45 | void insertVideoRaw(unsigned char* videoData, int dataLen, int isBig); 46 | 47 | /* 48 | * Channel 停止上传 49 | */ 50 | bool stopUpload(); 51 | 52 | /* 53 | * 停止直播编码器 54 | */ 55 | bool stopEncoder(); 56 | public: 57 | virtual int createChannelOK(char* channelId); 58 | virtual int createChannelFailed(char* errString); 59 | 60 | virtual int applyUploadChannelOK(char* channelId); 61 | virtual int applyUploadChannelFailed(char* errString, char* channelId); 62 | 63 | virtual int deleteChannelOK(char* channelId); 64 | virtual int deleteChannelFailed(char* errString, char* channelId); 65 | 66 | virtual int setPeerStreamDownloadConfigOK(char* channelId); 67 | virtual int setPeerStreamDownloadConfigFailed(char* channelId); 68 | 69 | virtual int stopOK(); 70 | 71 | virtual int srcError(char* errString); 72 | private: 73 | void resetReturnVal(); 74 | 75 | /** 76 | * 成功 77 | * @param data 78 | */ 79 | virtual void success(); 80 | 81 | /** 82 | * 失败 83 | * @param errMsg 84 | */ 85 | virtual void failed(string errMsg); 86 | public: 87 | string m_ChannelId; 88 | private: 89 | CUserManager* m_pUserManager; 90 | 91 | bool m_bReturn; 92 | bool m_bSuccess; 93 | string m_strErrInfo; 94 | int m_configArr[STREAM_CONFIG_MAX_SIZE]; 95 | }; 96 | 97 | #ifdef __cplusplus 98 | } 99 | #endif 100 | #endif 101 | 102 | 103 | -------------------------------------------------------------------------------- /starrtc/include/CUserManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __USER_MANAGER__ 2 | #define __USER_MANAGER__ 3 | #include 4 | using namespace std; 5 | 6 | #ifdef __cplusplus 7 | extern "C" 8 | { 9 | #endif 10 | 11 | #define AUDIO_SAMPLE_RATE 16000 12 | #define AUDIO_CHANNELS 1 13 | #define AUDIO_BIT_RATE 32 14 | class CAudioParam 15 | { 16 | public: 17 | int m_nSampleRateInHz; 18 | int m_nChannels; 19 | int m_nBitRate; 20 | }; 21 | 22 | class CServiceParam 23 | { 24 | 25 | public: 26 | string m_strUserId; 27 | string m_strAgentId; 28 | 29 | string m_strLoginServiceIP; 30 | int m_nLoginServicePort; 31 | string m_strMessageServiceIP; 32 | int m_nMessageServicePort; 33 | string m_strChatServiceIP; 34 | int m_nChatServicePort; 35 | string m_strUploadServiceIP; 36 | int m_nUploadServicePort; 37 | string m_strDownloadServiceIP; 38 | int m_nDownloadServicePort; 39 | string m_strVOIPServiceIP; 40 | int m_nVOIPServicePort; 41 | 42 | string m_strRequestListAddr; 43 | 44 | public: 45 | int m_CropType; 46 | int m_FrameRate; 47 | }; 48 | 49 | class CUserManager 50 | { 51 | public: 52 | /* 53 | * 构造方法 54 | */ 55 | CUserManager(); 56 | /* 57 | * 析构方法 58 | */ 59 | ~CUserManager(); 60 | 61 | bool readConfig(); 62 | bool writeConfig(); 63 | public: 64 | string m_strAuthKey; 65 | string m_strTokenId; 66 | 67 | string m_strIMServerIp; 68 | int m_nIMServerPort; 69 | int m_nDeployType; 70 | bool m_bVoipP2P; 71 | bool m_bAEventCenterEnable; 72 | CServiceParam m_ServiceParam; 73 | CAudioParam m_AudioParam; 74 | }; 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | #endif 80 | 81 | 82 | -------------------------------------------------------------------------------- /starrtc/include/ChatroomInfo.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | using namespace std; 4 | 5 | #ifdef __cplusplus 6 | extern "C" 7 | { 8 | #endif 9 | 10 | class ChatroomInfo 11 | { 12 | public: 13 | string m_strName; 14 | string m_strCreaterId; 15 | string m_strRoomId; 16 | bool m_bLive; 17 | }; 18 | #ifdef __cplusplus 19 | } 20 | #endif -------------------------------------------------------------------------------- /starrtc/include/IChatroomGetListListener.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "ChatroomInfo.h" 4 | 5 | #ifdef __cplusplus 6 | extern "C" 7 | { 8 | #endif 9 | 10 | class IChatroomGetListListener 11 | { 12 | public: 13 | /** 14 | * 查询聊天室列表回调 15 | */ 16 | virtual int chatroomQueryAllListOK(list& listData) = 0; 17 | }; 18 | 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif -------------------------------------------------------------------------------- /starrtc/include/ISrcListener.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifdef __cplusplus 3 | extern "C" 4 | { 5 | #endif 6 | class ISrcListener 7 | { 8 | public: 9 | virtual int createChannelOK(char* channelId) = 0; 10 | virtual int createChannelFailed(char* errString) = 0; 11 | 12 | virtual int applyUploadChannelOK(char* channelId) = 0; 13 | virtual int applyUploadChannelFailed(char* errString, char* channelId) = 0; 14 | 15 | virtual int deleteChannelOK(char* channelId) = 0; 16 | virtual int deleteChannelFailed(char* errString, char* channelId) = 0; 17 | 18 | virtual int setPeerStreamDownloadConfigOK(char* channelId) = 0; 19 | virtual int setPeerStreamDownloadConfigFailed(char* channelId) = 0; 20 | 21 | virtual int stopOK() = 0; 22 | 23 | virtual int srcError(char* errString) = 0; 24 | }; 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif -------------------------------------------------------------------------------- /starrtc/include/IStarIMChatroomListener.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | using namespace std; 5 | #ifdef __cplusplus 6 | extern "C" 7 | { 8 | #endif 9 | 10 | class IStarIMChatroomListener 11 | { 12 | public: 13 | //聊天室创建成功 14 | virtual void chatroomCreateOK(string roomId, int maxContentLen) = 0; 15 | //聊天室加入成功 16 | virtual void chatroomJoinOK(string roomId, int maxContentLen) = 0; 17 | //聊天室创建失败 18 | virtual void chatroomCreateFailed(string errString) = 0; 19 | //聊天室加入失败 20 | virtual void chatroomJoinFailed(string roomId, string errString) = 0; 21 | //聊天室报错 22 | virtual void chatRoomErr(string errString) = 0; 23 | //聊天室关闭成功 24 | virtual void chatroomStopOK() = 0; 25 | //聊天室删除成功 26 | virtual void chatroomDeleteOK(string roomId) = 0; 27 | //聊天室删除失败 28 | virtual void chatroomDeleteFailed(string roomId, string errString) = 0; 29 | }; 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | -------------------------------------------------------------------------------- /starrtc/include/XHChatroomType.h: -------------------------------------------------------------------------------- 1 | #ifndef CHATROOM_TYPE_H 2 | #define CHATROOM_TYPE_H 3 | 4 | enum XH_CHATROOM_TYPE 5 | { 6 | XH_CHATROOM_TYPE_UNABLE, // 占位 7 | XH_CHATROOM_TYPE_GLOBAL_PUBLIC, // 无需登录和验证 8 | XH_CHATROOM_TYPE_LOGIN_PUBLIC // 需要登录,无需验证 9 | }; 10 | 11 | /** 12 | * 直播类型 13 | */ 14 | enum XH_LIVE_TYPE 15 | { 16 | XH_LIVE_TYPE_GLOBAL_PUBLIC, //无需登录和验证 17 | XH_LIVE_TYPE_LOGIN_PUBLIC, //需要登录,无需验证 18 | XH_LIVE_TYPE_LOGIN_SPECIFY //需要登录和验证 19 | }; 20 | 21 | /** 22 | * 会议类型 23 | */ 24 | enum XH_MEETING_TYPE 25 | { 26 | XH_MEETING_TYPE_GLOBAL_PUBLIC, //无需登录和验证 27 | XH_MEETING_TYPE_LOGIN_PUBLIC, //需要登录,无需验证 28 | XH_MEETING_TYPE_LOGIN_SPECIFY //需要登录和验证 29 | }; 30 | 31 | enum XH_SUPER_ROOM_TYPE 32 | { 33 | XH_SUPER_ROOM_TYPE_GLOBAL_PUBLIC, //无需登录和验证 34 | XH_SUPER_ROOM_TYPE_LOGIN_PUBLIC, //需要登录,无需验证 35 | XH_SUPER_ROOM_TYPE_LOGIN_SPECIFY //需要登录和验证 36 | }; 37 | 38 | enum CHATROOM_LIST_TYPE 39 | { 40 | CHATROOM_LIST_TYPE_CHATROOM, 41 | CHATROOM_LIST_TYPE_LIVE, 42 | CHATROOM_LIST_TYPE_LIVE_PUSH, 43 | CHATROOM_LIST_TYPE_MEETING, 44 | CHATROOM_LIST_TYPE_MEETING_PUSH, 45 | CHATROOM_LIST_TYPE_CLASS, 46 | CHATROOM_LIST_TYPE_CLASS_PUSH, 47 | CHATROOM_LIST_TYPE_AUDIO_LIVE, 48 | CHATROOM_LIST_TYPE_AUDIO_LIVE_PUSH, 49 | CHATROOM_LIST_TYPE_SUPER_ROOM, 50 | CHATROOM_LIST_TYPE_SUPER_ROOM_PUSH 51 | }; 52 | 53 | #endif -------------------------------------------------------------------------------- /starrtc/include/XHLiveManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __XH_LIVE_MANAGER__ 2 | #define __XH_LIVE_MANAGER__ 3 | #include "CChatroomManager.h" 4 | #include "CSrcManager.h" 5 | #include "CUserManager.h" 6 | #include "CLiveParam.h" 7 | #include "IChatroomGetListListener.h" 8 | #include "ChatroomInfo.h" 9 | #include 10 | #include 11 | using namespace std; 12 | 13 | #ifdef __cplusplus 14 | extern "C" 15 | { 16 | #endif 17 | 18 | class XHLiveManager : public IChatroomGetListListener 19 | { 20 | public: 21 | /* 22 | * 构造方法 23 | */ 24 | XHLiveManager(CUserManager* pUserManager); 25 | /* 26 | * 析构方法 27 | */ 28 | ~XHLiveManager(); 29 | 30 | static void getLiveList(CUserManager* pUserManager, string strUserId, string listType, list& listData); 31 | /** 32 | * 创建直播 33 | */ 34 | string createLive(string strName, int chatroomType, int channelType); 35 | 36 | /** 37 | * 开始直播 38 | * @param strLiveID ID 39 | */ 40 | bool startLive(string strLiveID); 41 | 42 | /* 43 | * 全局参数设置 44 | */ 45 | void globalSetting(int w, int h, int fps, int bitrate); 46 | 47 | /* 48 | * 开启直播编码器 49 | */ 50 | bool startEncoder(int audioSampleRateInHz, int audioChannels, int audioBitRate, unsigned char* ppsData,int ppsDataLen, unsigned char* spsData,int spsDataLen); 51 | 52 | /** 53 | * 保存到列表 54 | * @param userId 55 | * @param type 56 | * @param liveId 57 | * @param data 58 | */ 59 | bool saveToList(string userId, int type, string liveId, string data); 60 | 61 | /** 62 | * 从列表删除 63 | * @param userId 用户ID 64 | * @param type 类型 65 | * @param liveId liveID 66 | */ 67 | void deleteFromList(string userId, int type, string liveId); 68 | 69 | void insertVideoRaw(unsigned char* videoData, int dataLen, int isBig); 70 | 71 | /** 72 | * 查询聊天室列表回调 73 | */ 74 | virtual int chatroomQueryAllListOK(list& chatRoomInfoList); 75 | public: 76 | CLiveParam m_Param; 77 | private: 78 | CUserManager* m_pUserManager; 79 | CChatroomManager* m_pChatroomManager; 80 | CSrcManager* m_pSrcManager; 81 | static bool m_bGetListReturn; 82 | }; 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | #endif 88 | 89 | 90 | -------------------------------------------------------------------------------- /starrtc/lib/libstarRTC.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/starrtc/lib/libstarRTC.so -------------------------------------------------------------------------------- /starrtc/lib/libstarRTCCore.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starrtc/starrtc-iot-demo/a09a2fd2d4850f68d2e7c1951f223a6296b7d1f9/starrtc/lib/libstarRTCCore.so --------------------------------------------------------------------------------