海康带音频摄像机的音频输出sdk,在DS-2CD2T46FWDA3-IS型号的摄像机上验证成功
| | |
| | | # Compiled Object files, Static and Dynamic libs (Shared Objects) |
| | | *.o |
| | | *.a |
| | | *.so |
| | | |
| | | # Folders |
| | | _obj |
| | | _test |
| | | .idea |
| | | |
| | | # Architecture specific extensions/prefixes |
| | | *.[568vq] |
| | |
| | | |
| | | hikvision voice sdk |
| | | |
| | | 目前就一个接口 |
| | | 输入:摄像机ip, 摄像机用户名,摄像机密码,音频文件绝对路径 |
| | | 返回值:-1 错误, 0 正确 |
| | | func SendVoice(ip,usrname,passwd,voiceFilePath string) int |
New file |
| | |
| | | package hikvoice |
| | | |
| | | /* |
| | | #cgo CFLAGS: -I${SRCDIR}/include -w -g |
| | | #cgo LDFLAGS: -L${SRCDIR}/libs |
| | | #cgo LDFLAGS: -lHikVoice -lAudioRender -lHCCore -lhcnetsdk -lhpr |
| | | #cgo LDFLAGS: -ldl -lm |
| | | |
| | | #include <stdlib.h> |
| | | #include "Voice.h" |
| | | |
| | | */ |
| | | import "C" |
| | | |
| | | // SendVoice Send Voice |
| | | func SendVoice(ip,usrname,passwd,voiceFilePath string) int { |
| | | return int(C.SendVoice(C.CString(ip), C.CString(usrname), C.CString(passwd), C.CString(voiceFilePath))) |
| | | } |
New file |
| | |
| | | package hikvoice |
| | | |
| | | import( |
| | | "testing" |
| | | "fmt" |
| | | ) |
| | | |
| | | func TestMain(m *testing.M) { |
| | | fmt.Println("begin") |
| | | r := SendVoice("192.168.5.35", "admin", "a1234567", "/media/basic/cdbfb548-3100-4738-b9c1-0a7e1e002170/workspace/goproject/src/hicvoice/8k_1_16.g711a") |
| | | fmt.Println("end ", r) |
| | | } |
New file |
| | |
| | | /* |
| | | * Copyright(C) 2010,Custom Co., Ltd |
| | | * FileName: Voice.h |
| | | * Description: |
| | | * Version: 1.0 |
| | | * Author: panyadong |
| | | * Create Date: 2010-6-7 |
| | | * Modification History: |
| | | */ |
| | | |
| | | #ifndef _VOICE_H |
| | | #define _VOICE_H_ |
| | | |
| | | #ifdef __cplusplus |
| | | extern "C" { // 即使这是一个C++程序,下列这个函数的实现也要以C约定的风格来搞! |
| | | #endif |
| | | |
| | | int SendVoice(char *ip, char *userName, char *password, char *filename); |
| | | |
| | | //语音转发 |
| | | //int Demo_VoiceTrans(char * ip, char * userName, char * password, char * filename); |
| | | |
| | | #ifdef __cplusplus |
| | | } |
| | | #endif |
| | | |
| | | #endif |
| | | |
| | | |
New file |
| | |
| | | /* |
| | | * Copyright(C) 2010,Hikvision Digital Technology Co., Ltd |
| | | * |
| | | * 文件名称:public.h |
| | | * 描 述: |
| | | * 当前版本:1.0 |
| | | * 作 者:潘亚东 |
| | | * 创建日期:2010年3月25日 |
| | | * 修改记录: |
| | | */ |
| | | |
| | | |
| | | #ifndef _PUBLIC_H_ |
| | | #define _PUBLIC_H_ |
| | | |
| | | #define HPR_OK 0 |
| | | #define HPR_ERROR -1 |
| | | |
| | | #if (defined(_WIN32)) //windows |
| | | #include <windows.h> |
| | | #endif |
| | | |
| | | #include "./HCNetSDK.h" |
| | | |
| | | |
| | | #endif |