Evgeny Gagua 2 years ago
parent
commit
d03a90900c
  1. 8
      Projects/la_mojo/build
  2. 88
      lib/App/common/deviceNodeCamera.cpp
  3. 31
      lib/App/common/kernelModuleEmbedVideo.cpp
  4. 20
      lib/data/media/video/videoAVLIBSource.cpp
  5. 4
      lib/data/ponvif/ponvif.h

8
Projects/la_mojo/build

@ -1,11 +1,11 @@
#! /bin/sh
#make clean -e "CFG=Debug"
#make -e "CFG=Debug" -j6
make clean -e "CFG=Debug"
make -e "CFG=Debug" -j6
make clean -e "CFG=Debug86"
make -e "CFG=Debug86" -j4
#make clean -e "CFG=Debug86"
#make -e "CFG=Debug86" -j4
#make clean -e "CFG=Release86"
#make -e "CFG=Release86" -j4

88
lib/App/common/deviceNodeCamera.cpp

@ -714,10 +714,10 @@ bool deviceNodeCamera::fusion_validateROI( uint64_t cts, CAM_ROI *ptr ){
CAM_ROI *deviceNodeCamera::fusion_fetchROI( void ){
CAM_ROI *tVAL = NULL;
uint64_t cts = 0;
m_mROIsProtector.lock();
vCAM_ROIS::iterator sRec;
m_mROIsProtector.lock();
if( m_vROIS.size() ){
vCAM_ROIS::iterator sRec;
uint64_t cts = 0;
for( vCAM_ROIS::iterator idx = m_vROIS.begin(); idx < m_vROIS.end(); idx++ ){
if ( tVAL == NULL ) {
sRec = idx;
@ -746,21 +746,16 @@ DBC_SNAPSHOT_DATA *deviceNodeCamera::fusion_translate_ROI( CAM_ROI *(&ptr) ){
DBC_SNAPSHOT_DATA *rVal = NULL;
if( ptr == NULL ) return NULL;
if( ptr->targets.size() ){
//if( m_bSourceConnected ){
rVal = (DBC_SNAPSHOT_DATA *)malloc(sizeof(DBC_SNAPSHOT_DATA));
if( rVal ){
memset( rVal, 0, sizeof(DBC_SNAPSHOT_DATA) );
//rVal->stream_id = m_nActiveStreamID;
rVal->stream_id = m_sNodeData.aux_parameter;
for( vCAM_TRACK_RECORDS::iterator idx = ptr->targets.begin(); idx < ptr->targets.end(); idx++ ) {
LOG("Added Event ID");
rVal->assoc_event_ids.push_back( (*idx)->evt_db_ID );
};
};
//};
rVal = (DBC_SNAPSHOT_DATA *)malloc(sizeof(DBC_SNAPSHOT_DATA));
if( rVal ){
memset( rVal, 0, sizeof(DBC_SNAPSHOT_DATA) );
rVal->stream_id = m_sNodeData.aux_parameter;
for( vCAM_TRACK_RECORDS::iterator idx = ptr->targets.begin(); idx < ptr->targets.end(); idx++ )
rVal->assoc_event_ids.push_back( (*idx)->evt_db_ID );
};
ptr->targets.clear();
} else {
LOG("No Events ID to ROI");
LOG_ERROR("No Events ID to ROI");
};
utilizeROI( ptr );
// Not Setting MD5 and TS -> will set at capture time
@ -768,6 +763,7 @@ DBC_SNAPSHOT_DATA *deviceNodeCamera::fusion_translate_ROI( CAM_ROI *(&ptr) ){
};
void deviceNodeCamera::fusion_validate( void ){
if ( m_bNoAbsPositionning ) return;
m_mROIsProtector.lock();
if( m_vROIS.size() ){
#ifdef DEBUG_EXTRA
@ -1007,6 +1003,7 @@ void deviceNodeCamera::m_fThreadProc( void ){
m_bCameraOnHomePosition = false;
setWM( CAM_WS_BUSY );
if( m_pCurrentROI != NULL ){
//LOG("ROI Ok");
m_nHomingCounter = 0;
if( m_pBEH ){
EVENT_CONTAINER *tEVT = createBasicEvent(
@ -1020,23 +1017,26 @@ void deviceNodeCamera::m_fThreadProc( void ){
};
};
if( m_bNoAbsPositionning ){
//LOG("ABS to PRESET");
uint8_t COL, ROW;
translateROI2PRESET(
m_pCurrentROI->cam_orientation.pan,
m_pCurrentROI->cam_orientation.tilt,
m_pCurrentROI->cam_orientation.zoom, COL, ROW );
char tB[64];
sprintf( tB, "Get ABS Preset Col %d Row %d!", COL, ROW );
LOG( tB );
sprintf( tB, "Old Preset Col %d Row %d!", m_bCurrentPresetCol, m_bCurrentPresetRow );
LOG( tB );
//char tB[64];
//sprintf( tB, "Get ABS Preset Col %d Row %d!", COL, ROW );
//LOG( tB );
//sprintf( tB, "Old Preset Col %d Row %d!", m_bCurrentPresetCol, m_bCurrentPresetRow );
//LOG( tB );
if ( ( m_bCurrentPresetCol == COL ) && ( m_bCurrentPresetRow == ROW ) ) {
m_fCP_Pan = m_pCurrentROI->cam_orientation.pan;
m_fCP_Tilt = m_pCurrentROI->cam_orientation.tilt;
m_fCP_Zoom = m_pCurrentROI->cam_orientation.zoom;
#ifdef DEBUG_EXTRA
LOG("INSTANT BCAST CAM ONPOS");
#endif
// Send Capture event
DBC_SNAPSHOT_DATA *tData = fusion_translate_ROI( m_pCurrentROI );
setWM( CAM_WS_READY );
if( tData != NULL ) {
if( m_pBEH ){
EVENT_CONTAINER *tEVT = createBasicEvent(
@ -1045,10 +1045,6 @@ void deviceNodeCamera::m_fThreadProc( void ){
EVT_CAMERA_ON_POSITION,
NULL, NULL, tData );
if( tEVT ){
#ifdef DEBUG
LOG("INSTANT BCAST CAM ONPOS");
#endif
//tEVT->m_db_id = tTASK->source_evt_id; // EVT ids embed in DATA
m_pBEH->broadcast( tEVT );
} else {
free( tData );
@ -1057,12 +1053,10 @@ void deviceNodeCamera::m_fThreadProc( void ){
free( tData );
};
};
setWM( CAM_WS_READY );
} else {
CSTR token = getPresetToken( COL, ROW );
if ( token ) {
LOG("Have One!");
//update position Info
m_bCurrentPresetCol = COL;
m_bCurrentPresetRow = ROW;
@ -1075,9 +1069,11 @@ void deviceNodeCamera::m_fThreadProc( void ){
} else {
// Waiting Movement finish
if( m_bSkeepPositioningWait ){
#ifdef DEBUG_EXTRA
LOG("INSTANT BCAST CAM ONPOS");
#endif
// Send Capture event
DBC_SNAPSHOT_DATA *tData = fusion_translate_ROI( m_pCurrentROI );
setWM( CAM_WS_READY );
if( tData != NULL ) {
if( m_pBEH ){
EVENT_CONTAINER *tEVT = createBasicEvent(
@ -1086,10 +1082,6 @@ void deviceNodeCamera::m_fThreadProc( void ){
EVT_CAMERA_ON_POSITION,
NULL, NULL, tData );
if( tEVT ){
#ifdef DEBUG
LOG("INSTANT BCAST CAM ONPOS");
#endif
//tEVT->m_db_id = tTASK->source_evt_id; // EVT ids embed in DATA
m_pBEH->broadcast( tEVT );
} else {
free( tData );
@ -1098,6 +1090,7 @@ void deviceNodeCamera::m_fThreadProc( void ){
free( tData );
};
};
setWM( CAM_WS_READY );
} else {
setWM(CAM_WS_WAIT_ONPOS);
};
@ -1124,9 +1117,11 @@ void deviceNodeCamera::m_fThreadProc( void ){
} else {
// Waiting Movement finish
if( m_bSkeepPositioningWait ){
#ifdef DEBUG_EXTRA
LOG("INSTANT BCAST CAM ONPOS");
#endif
// Send Capture event
DBC_SNAPSHOT_DATA *tData = fusion_translate_ROI( m_pCurrentROI );
setWM( CAM_WS_READY );
if( tData != NULL ) {
if( m_pBEH ){
EVENT_CONTAINER *tEVT = createBasicEvent(
@ -1135,10 +1130,6 @@ void deviceNodeCamera::m_fThreadProc( void ){
EVT_CAMERA_ON_POSITION,
NULL, NULL, tData );
if( tEVT ){
#ifdef DEBUG
LOG("INSTANT BCAST CAM ONPOS");
#endif
//tEVT->m_db_id = tTASK->source_evt_id; // EVT ids embed in DATA
m_pBEH->broadcast( tEVT );
} else {
free( tData );
@ -1147,6 +1138,7 @@ void deviceNodeCamera::m_fThreadProc( void ){
free( tData );
};
};
setWM( CAM_WS_READY );
} else {
setWM(CAM_WS_WAIT_ONPOS);
};
@ -1180,7 +1172,7 @@ void deviceNodeCamera::m_fThreadProc( void ){
EVT_CAMERA_ON_POSITION,
NULL, NULL, tData );
if( tEVT ){
#ifdef DEBUG
#ifdef DEBUG_EXTRA
LOG("BCAST CAM ONPOS");
#endif
//tEVT->m_db_id = tTASK->source_evt_id; // EVT ids embed in DATA
@ -1199,12 +1191,16 @@ void deviceNodeCamera::m_fThreadProc( void ){
CSTR TK = getPresetToken( ARGUS_PRESET_TYPE_HOME );
if( TK ) {
if ( !m_bCameraOnHomePosition ) {
#ifdef DEBUG_EXTRA
LOG("Go Home!");
LOG( TK );
#endif
if( !m_pProtocol->goPreset( TK )){
LOG_ERROR("Cannot Issue goPreset Command!");
};
m_bCameraOnHomePosition = true;
m_bCurrentPresetCol = 0;
m_bCurrentPresetRow = 0;
};
};
setWM( CAM_WS_READY );
@ -1239,10 +1235,10 @@ void deviceNodeCamera::m_fThreadProc( void ){
setWM( CAM_WS_READY );
break;
};
case CAM_WS_READY:{
case CAM_WS_READY:{
m_pCurrentROI = fusion_fetchROI();
if( m_pCurrentROI != NULL ) {
#ifdef DEBUG_EXTRA__
#ifdef DEBUG_EXTRA
LOG("HAVE ROI to see!");
#endif
setWM( CAM_WS_GO_ABS_POSITION );
@ -1638,10 +1634,9 @@ bool deviceNodeCamera::lookAt( uint32_t TargetRefID, C3D_SPH_DEGREES L ){
EVT_CAMERA_ON_POSITION,
NULL, NULL, tData );
if( tEVT ){
#ifdef DEBUG
#ifdef DEBUG_EXTRA
LOG("INSTANT BCAST CAM ONPOS");
#endif
//tEVT->m_db_id = tTASK->source_evt_id; // EVT ids embed in DATA
#endif
m_pBEH->broadcast( tEVT );
} else {
free( tData );
@ -1697,9 +1692,10 @@ bool deviceNodeCamera::lookAt( uint32_t TargetRefID, C3D_SPH_DEGREES L ){
m_vROIS.push_back( tROI );
m_mROIsProtector.unlock();
} else {
LOG_ERROR("No MEM 4 TARGTEG DATA");
utilizeROI( tROI );
};
};
} else LOG_ERROR("No MEM 4 ROI");
return true;
};
return fusion_consumeData(TargetRefID, L);

31
lib/App/common/kernelModuleEmbedVideo.cpp

@ -238,7 +238,7 @@ static const char * ht_no_signal = "HTTP/1.1 200 OK\r\n"
void signal_pipe_handler( int SIG ){
//basicLogCollection::getInstance()->Log("SIG_PIPE", NULL, _LOG_ERROR, "Sig Pipe Received");
basicLogCollection::getInstance()->Log("SIG_PIPE", NULL, _LOG_ERROR, "Sig Pipe Received Web Client Disconnected!");
// Web Client Disconnected!
};
@ -510,18 +510,19 @@ void *kernelModuleEmbedVideo::webClientProc( void *ptr ){
w = false;
continue;
};
SLEEP( 66 );
usleep( 66666 );
};
};
};
close( CTX->m_iEncoderPipe[0] );
shutdown( CTX->m_iSocketFID, SHUT_RDWR);
close( CTX->m_iSocketFID );
//pthread_exit( NULL );
SLEEP( 3 );
close( CTX->m_iSocketFID );
CTX->bValid = false;
#ifdef DEBUG
TLOG("WEB Client Handler Ended!");
#endif
pthread_exit( NULL );
return NULL;
};
@ -1416,15 +1417,17 @@ bool kernelModuleEmbedVideo::dispatchEvent( EVENT_CONTAINER *Evt ){
LOG("Mutex Locked!");
#endif
mapSTREAMHANDLERS::iterator hnd = m_mapHANDLERS.find( sid );
if( hnd != m_mapHANDLERS.end() ){
if( hnd != m_mapHANDLERS.end() )
#ifdef DEBUG_EXTRA
{
LOG("Handler found!");
#endif
(*hnd).second->triggerCamMove();
#ifdef DEBUG_EXTRA
LOG("Triggered!");
#endif
} else LOG("No Stream Found!");
#endif
m_mStreamHandlersProtector.unlock();
#ifdef DEBUG_EXTRA
LOG("Mutex Unlocked!");
@ -1433,7 +1436,7 @@ bool kernelModuleEmbedVideo::dispatchEvent( EVENT_CONTAINER *Evt ){
break;
};
case EVT_CAMERA_ON_POSITION:{
#ifdef DEBUG
#ifdef DEBUG_EXTRA
LOG("Cam On Position After Event -> Capture Picture");
#endif
DBC_SNAPSHOT_DATA *tData = (DBC_SNAPSHOT_DATA *) Evt->m_pEvtData;
@ -1483,7 +1486,7 @@ bool kernelModuleEmbedVideo::saveStreamPicture( DBC_SNAPSHOT_DATA *ptr ){
m_mPictureProtector.unlock();
LOG_ERROR("No memory to allocate!");
};
#ifdef DEBUG
#ifdef DEBUG_EXTRA
} else {
LOG("No apropriate Stream Found!");
#endif
@ -1492,7 +1495,7 @@ bool kernelModuleEmbedVideo::saveStreamPicture( DBC_SNAPSHOT_DATA *ptr ){
//*/
};
if( ( m_sEmbedVideoData.output_mode & EVE_OUTPUT_VIDEO ) == EVE_OUTPUT_VIDEO ){
#ifdef DEBUG
#ifdef DEBUG_EXTRA
LOG("Saving Video!");
#endif
if( ptr->assoc_event_ids.size() ){
@ -1503,13 +1506,13 @@ bool kernelModuleEmbedVideo::saveStreamPicture( DBC_SNAPSHOT_DATA *ptr ){
uint32_t cfrm;
for( DBC_INT_LIST::iterator idx = ptr->assoc_event_ids.begin(); idx < ptr->assoc_event_ids.end(); idx++ )
(*hnd).second->triggerEvent( (*idx), db_id, cfrm );
#ifdef DEBUG
#ifdef DEBUG_EXTRA
} else {
LOG("No Stream Found!");
#endif
};
m_mStreamHandlersProtector.unlock();
#ifdef DEBUG
#ifdef DEBUG_EXTRA
} else {
LOG("No Assoc EVTIDS!");
#endif
@ -1831,7 +1834,7 @@ bool streamHandler::create( dataBinder *ptr, uint32_t stremID ){
};
if( m_pSource != NULL ) {
char tMRL[1024];
#ifdef DEBUG
#ifdef DEBUG_EXTRA
LOG("Source OK");
#endif
int tW = m_pMaster->getWidh();
@ -1866,7 +1869,7 @@ bool streamHandler::create( dataBinder *ptr, uint32_t stremID ){
};
m_pSource = NULL;
} else {
#ifdef DEBUG
#ifdef DEBUG_EXTRA
LOG("Source is Connected to Output.");
#endif
};
@ -4064,7 +4067,7 @@ void streamHandler::swapActiveStreams( void ){
bool streamHandler::triggerEvent( uint32_t eid, uint32_t &dbid, uint32_t &frame ){
#ifdef DEBUG
#ifdef DEBUG_EXTRA
LOG("Trig Evt");
#endif

20
lib/data/media/video/videoAVLIBSource.cpp

@ -40,16 +40,7 @@ videoAVLIBSource::videoAVLIBSource( void *opaque ): basicMediaSource(), basicThr
return;
};
m_eMediaStatus = m_pVideoState->m_bStatus = MS_UNDEFINED;
m_pVideoState->m_pFormatCtx = avformat_alloc_context();
if (m_pVideoState->m_pFormatCtx == NULL){
LOG_ERROR("Video Format Context Memory Allocation Error");
return;
};
//m_pVideoState->m_pFormatCtx->interrupt_callback = int_cb;
m_pVideoState->m_iVideoStreamID = -1;
#ifndef _NOAUDIO_
m_pVideoState->m_iAudioStreamID = -1;
@ -96,7 +87,7 @@ videoAVLIBSource::~videoAVLIBSource(){
LOG("Destructor");
if ( m_pVideoState != NULL ){
_close();
av_free( m_pVideoState );
av_free(m_pVideoState);
m_pVideoState = NULL;
};
};
@ -214,6 +205,10 @@ bool videoAVLIBSource::_stop(void){
bool videoAVLIBSource::_restart( void ){
if (m_pVideoState == NULL) return false;
if (m_pVideoState->m_bStatus < MS_OPENED) return false;
if (m_pVideoState->m_pFormatCtx == NULL){
LOG_ERROR("Video Format Context Memory Allocation Error");
return false;
};
// Stop Thread
basicThread::uninit();
int RetVal;
@ -379,6 +374,11 @@ bool videoAVLIBSource::_open( char *URI, bool ShowDeviceMenu, float framerate, i
if (URI == NULL) return false;
if (m_pVideoState == NULL) return false;
if (m_bThreadStatus > TH_PRE_INIT ) return false;
m_pVideoState->m_pFormatCtx = avformat_alloc_context();
if (m_pVideoState->m_pFormatCtx == NULL){
LOG_ERROR("Video Format Context Memory Allocation Error");
return false;
};
if (m_pVideoState->m_bStatus == MS_INIT) {
char Buffer[1024] = {0};
char tChar[128] = {0};

4
lib/data/ponvif/ponvif.h

@ -24,7 +24,7 @@
#define CURL_MANAGER
//#define DEBUG_ONVIF_PRINTOUT_MESSAGES
#define DEBUG_ONVIF_TRAFFIC
//#define DEBUG_ONVIF_TRAFFIC
#define PONVIF_DEFAULT_DISCOVERYBINDIP (CSTR)"0.0.0.0"
#define PONVIF_DEFAULT_DISCOVERYMCASTIP (CSTR)"239.255.255.250"
@ -43,7 +43,7 @@
#define PONVIF_PACK_GET_PRESETS (CSTR)"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\"><s:Header><Security s:mustUnderstand=\"1\" xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\"><UsernameToken><Username>%s</Username><Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest\">%s</Password><Nonce EncodingType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary\">%s</Nonce><Created xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">%s</Created></UsernameToken></Security></s:Header><s:Body xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><GetPresets xmlns=\"http://www.onvif.org/ver20/ptz/wsdl\"><ProfileToken>%s</ProfileToken></GetPresets></s:Body></s:Envelope>"
#define PONVIF_PACK_GET_PTZ_NODE (CSTR)"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\"><s:Header><Security s:mustUnderstand=\"1\" xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\"><UsernameToken><Username>%s</Username><Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest\">%s</Password><Nonce EncodingType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary\">%s</Nonce><Created xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">%s</Created></UsernameToken></Security></s:Header><s:Body xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><GetNode xmlns=\"http://www.onvif.org/ver20/ptz/wsdl\"><NodeToken>%s</NodeToken></GetNode></s:Body></s:Envelope>"
#define PONVIF_PACK_GET_PTZ_STATUS (CSTR)"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\"><s:Header><Security s:mustUnderstand=\"1\" xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\"><UsernameToken><Username>%s</Username><Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest\">%s</Password><Nonce EncodingType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary\">%s</Nonce><Created xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">%s</Created></UsernameToken></Security></s:Header><s:Body xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><GetStatus xmlns=\"http://www.onvif.org/ver20/ptz/wsdl\"><ProfileToken>%s</ProfileToken></GetStatus></s:Body></s:Envelope>"
#define PONVIF_PACK_GOTO_PRESET (CSTR)"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\"><s:Header><Security s:mustUnderstand=\"1\" xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\"><UsernameToken><Username>%s</Username><Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest\">%s</Password><Nonce EncodingType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary\">%s</Nonce><Created xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">%s</Created></UsernameToken></Security></s:Header><s:Body xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><GotoPreset xmlns=\"http://www.onvif.org/ver20/ptz/wsdl\"><ProfileToken>%s</ProfileToken><PresetToken>%s</PresetToken><Speed><PanTilt x=\"%%SPEEDPANTILTX%%\" y=\"%%SPEEDPANTILTY%%\" xmlns=\"http://www.onvif.org/ver10/schema\"/><Zoom x=\"%%SPEEDZOOMX%%\" xmlns=\"http://www.onvif.org/ver10/schema\"/></Speed></GotoPreset></s:Body></s:Envelope>"
#define PONVIF_PACK_GOTO_PRESET (CSTR)"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\"><s:Header><Security s:mustUnderstand=\"1\" xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\"><UsernameToken><Username>%s</Username><Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest\">%s</Password><Nonce EncodingType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary\">%s</Nonce><Created xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">%s</Created></UsernameToken></Security></s:Header><s:Body xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><GotoPreset xmlns=\"http://www.onvif.org/ver20/ptz/wsdl\"><ProfileToken>%s</ProfileToken><PresetToken>%s</PresetToken><Speed><PanTilt x=\"%0.3f\" y=\"%0.3f\" xmlns=\"http://www.onvif.org/ver10/schema\"/><Zoom x=\"%0.3f\" xmlns=\"http://www.onvif.org/ver10/schema\"/></Speed></GotoPreset></s:Body></s:Envelope>"
#define PONVIF_PACK_REMOVE_PRESET (CSTR)"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\"><s:Header><Security s:mustUnderstand=\"1\" xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\"><UsernameToken><Username>%s</Username><Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest\">%s</Password><Nonce EncodingType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary\">%s</Nonce><Created xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">%s</Created></UsernameToken></Security></s:Header><s:Body xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><RemovePreset xmlns=\"http://www.onvif.org/ver20/ptz/wsdl\"><ProfileToken>%s</ProfileToken><PresetToken>%s</PresetToken></RemovePreset></s:Body></s:Envelope>"
#define PONVIF_PACK_SET_PRESET (CSTR)"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\"><s:Header><Security s:mustUnderstand=\"1\" xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\"><UsernameToken><Username>%s</Username><Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest\">%s</Password><Nonce EncodingType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary\">%s</Nonce><Created xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">%s</Created></UsernameToken></Security></s:Header><s:Body xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><SetPreset xmlns=\"http://www.onvif.org/ver20/ptz/wsdl\"><ProfileToken>%s</ProfileToken><PresetName>%s</PresetName></SetPreset></s:Body></s:Envelope>"
#define PONVIF_PACK_RELATIVE_MOVE (CSTR)"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\"><s:Header><Security s:mustUnderstand=\"1\" xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\"><UsernameToken><Username>%s</Username><Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest\">%s</Password><Nonce EncodingType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary\">%s</Nonce><Created xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">%s</Created></UsernameToken></Security></s:Header><s:Body xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><RelativeMove xmlns=\"http://www.onvif.org/ver20/ptz/wsdl\"><ProfileToken>%s</ProfileToken><Translation><PanTilt x=\"%%TRANSLATIONPANTILTX%%\" y=\"%%TRANSLATIONPANTILTY%%\" space=\"http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace\" xmlns=\"http://www.onvif.org/ver10/schema\"/></Translation><Speed><PanTilt x=\"%0.2f\" y=\"%0.2f\" space=\"http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace\" xmlns=\"http://www.onvif.org/ver10/schema\"/></Speed></RelativeMove></s:Body></s:Envelope>"

Loading…
Cancel
Save