64 changed files with 1672 additions and 397 deletions
-
2Projects/la_mojo/build
-
1Projects/la_mojo/la_mojo.vpj
-
11Projects/la_mojo/makefile
-
837Projects/la_serva/makefile
-
2lib/App/3dSERVER/LRF_DefenderHandler.h
-
2lib/App/3dSERVER/LRF_KafkaHandler.h
-
2lib/App/3dSERVER/LRF_SafeShoreHandler.h
-
144lib/App/common/SQLite_dataBinder.cpp
-
4lib/App/common/SQLite_dataBinder.h
-
6lib/App/common/dataBinder.h
-
59lib/App/common/dataBinder_structures.h
-
31lib/App/common/deviceNode2D.cpp
-
65lib/App/common/deviceNode3D.cpp
-
376lib/App/common/deviceNodeCamera.cpp
-
55lib/App/common/deviceNodeCamera.h
-
36lib/App/common/deviceNodeFactory.cpp
-
9lib/App/common/deviceNodePTZCamControl.cpp
-
2lib/App/common/deviceNodePTZCamControl.h
-
125lib/App/common/deviceNodePresetCamControl.cpp
-
41lib/App/common/deviceNodePresetCamControl.h
-
9lib/App/common/deviceNodeStaticCamControl.cpp
-
2lib/App/common/deviceNodeStaticCamControl.h
-
2lib/App/common/kernelModule.h
-
16lib/App/common/kernelModuleEmbedVideo.cpp
-
2lib/App/common/kernelModuleEmbedVideo.h
-
10lib/App/common/kernelModuleFlyHunter.cpp
-
2lib/App/common/kernelModuleFlyHunter.h
-
7lib/App/common/kernelModuleKafka.cpp
-
2lib/App/common/kernelModuleKafka.h
-
44lib/App/common/kernelModuleModemManager.cpp
-
2lib/App/common/kernelModuleModemManager.h
-
7lib/App/common/kernelModuleOnvifObserver.cpp
-
2lib/App/common/kernelModuleOnvifObserver.h
-
2lib/App/common/kernelModuleRemoteServer.h
-
4lib/App/common/kernelModuleSSDP.cpp
-
2lib/App/common/kernelModuleSSDP.h
-
4lib/App/common/kernelModuleUSBRelay.cpp
-
2lib/App/common/kernelModuleUSBRelay.h
-
3lib/App/common/kernelPrototype.h
-
55lib/App/mojo/mojoKernel.cpp
-
5lib/App/mojo/mojoKernel.h
-
7lib/App/mojo/mojoRemoteClient.cpp
-
2lib/App/mojo/rgooseModule.h
-
2lib/components/base/basicCamera.h
-
2lib/components/base/basicEventHandler.h
-
4lib/components/base/basicEventHeap.cpp
-
2lib/components/object/objectEventReport.h
-
2lib/data/media/lapsedVideoRecorder.h
-
2lib/data/net/netClientHandler.h
-
5lib/data/net/netServer.cpp
-
2lib/data/net/netServer.h
-
2lib/data/ponvif/ponvif.cpp
-
21lib/data/protocol/protocolARGUS_DATA.h
-
2lib/data/protocol/protocolPTZ_ONVIF.cpp
-
2lib/defender-dc-trig/rgooseIPCamera.h
-
2lib/defender-dc-trig/rgooseServerModule.h
-
2lib/gui/controls/EventViewWidget.h
-
2lib/gui/controls/LrfSensorWidget.h
-
2lib/gui/controls/TimeShowWidget.h
-
2lib/gui/controls/targetDisplay.h
-
2lib/rgoose/rgooseKernel.h
-
2lib/rgoose/rgooseModule.h
-
2lib/rgoose/rgooseNodePTZCamControl.h
-
2lib/rgoose/rgooseNodeStaticCamControl.h
837
Projects/la_serva/makefile
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,125 @@ |
|||
#include "deviceNodePresetCamControl.h"
|
|||
#include "../mojo/mojoKernel.h"
|
|||
#define LOG( X ) deviceNode::m_pLog->Log( "PRST_CAM", this, X )
|
|||
#define LOG_ERROR( X ) deviceNode::m_pLog->Log( "PRST_CAM", this, _LOG_ERROR, X )
|
|||
|
|||
deviceNodePresetCamControl::deviceNodePresetCamControl( DBC_NODE_DATA *Data ): deviceNodeCamera( Data ), basicEventHandler(){ |
|||
}; |
|||
|
|||
deviceNodePresetCamControl::deviceNodePresetCamControl( uint32_t id ): deviceNodeCamera( id ), basicEventHandler(){ |
|||
m_sMediaSource.mediaSourceId = m_sNodeData.aux_id; |
|||
strncpy( m_sMediaSource.mediaName, m_sNodeData.name, 128 ); |
|||
m_sMediaSource.mediaName[127] = (char)0; |
|||
memset( &m_sCtrlData, 0, sizeof( CAMERA_CTRL_DATA )); |
|||
}; |
|||
|
|||
deviceNodePresetCamControl::~deviceNodePresetCamControl(){ |
|||
stopService(); |
|||
}; |
|||
|
|||
bool deviceNodePresetCamControl::startService(){ |
|||
return create(); |
|||
}; |
|||
|
|||
bool deviceNodePresetCamControl::stopService(){ |
|||
return true; |
|||
}; |
|||
|
|||
bool deviceNodePresetCamControl::dispatchEvent( EVENT_CONTAINER *E ){ |
|||
if( E == NULL ) return false; |
|||
//if( !m_sCamData.online ) return;
|
|||
//if( m_bBusy ) return;
|
|||
if ( m_sCamData.prefered_events_only ) { |
|||
//Check if we eligable dest of event
|
|||
if( E->m_nDestinationNodeID != m_sNodeData.node_id ) return true; |
|||
}; |
|||
switch (E->m_eClass) { |
|||
case EVT_CLASS_SENSOR_CLD: |
|||
case EVT_CLASS_SENSOR_LGS: |
|||
case EVT_CLASS_SENSOR_LFS: |
|||
case EVT_CLASS_SENSOR_MND: |
|||
case EVT_CLASS_SENSOR_PLS_210: |
|||
case EVT_CLASS_SENSOR_PLS_360: |
|||
case EVT_CLASS_SENSOR_ALS: |
|||
case EVT_CLASS_SENSOR_3D: |
|||
case EVT_CLASS_SENSOR_ACC:{ |
|||
switch( E->m_eType ) { |
|||
case EVT_ROI_ACTIVE:{ |
|||
TARGET_DATA *tDATA; |
|||
tDATA = (TARGET_DATA *)E->m_pEvtData; |
|||
if( tDATA ) { |
|||
lookAt( E->m_db_id, tDATA->system_target ); |
|||
}; |
|||
break; |
|||
}; |
|||
case EVT_TARGET_1D: |
|||
case EVT_TARGET_2D_BLACK: |
|||
case EVT_TARGET_2D_WHITE: |
|||
case EVT_TARGET_3D_BLACK: |
|||
case EVT_TARGET_3D_WHITE:{ |
|||
TARGET_DATA *tDATA; |
|||
tDATA = (TARGET_DATA *)E->m_pEvtData; |
|||
if( tDATA ) { |
|||
#ifdef DEBUG_EXTRA
|
|||
LOG( "CHECK CAMERA FOV" ); |
|||
#endif
|
|||
if( testFOV(tDATA->system_target) ){ |
|||
#ifdef DEBUG_EXTRA
|
|||
LOG("TARGET IN CAMERA FOV"); |
|||
#endif
|
|||
lookAt( E->m_db_id, tDATA->system_target ); |
|||
}; |
|||
}; |
|||
break; |
|||
}; |
|||
}; |
|||
break; |
|||
}; |
|||
}; |
|||
return true;//Propogate Event
|
|||
}; |
|||
|
|||
bool deviceNodePresetCamControl::validate(){ |
|||
#ifdef DEBUG_EXTRA
|
|||
LOG("VALIDATE"); |
|||
#endif
|
|||
if( CAM_WS_END == getWM() ) return false; |
|||
// Validate Camera Settings
|
|||
/*{
|
|||
DBC_CAM_DATA *tDATA = argusNetNode::m_pDBC->getCamData( m_sNodeData.aux_id ); |
|||
if( tDATA ) { |
|||
if( memcmp( &m_sCamData, tDATA, sizeof(DBC_CAM_DATA)) != 0 ){ |
|||
free( tDATA ); |
|||
LOG("Cam Settings Changed!"); |
|||
return false; |
|||
}; |
|||
free( tDATA ); |
|||
} else{ |
|||
LOG("Cam Deleted!"); |
|||
return false; |
|||
}; |
|||
}*/ |
|||
// Validate Stream - > moved to Video Encoder!
|
|||
/*
|
|||
{ |
|||
if( m_sNodeData.aux_parameter ) { |
|||
#ifdef DEBUG_EXTRA
|
|||
LOG("VALIDATE Stream"); |
|||
#endif
|
|||
if( !m_bSourceConnected ) { |
|||
if( connectToStream( m_sNodeData.aux_parameter ) ) { |
|||
argusNetNode::m_pDBC->setStreamValid( m_sNodeData.aux_parameter ); |
|||
} else { |
|||
argusNetNode::m_pDBC->setStreamValid( m_sNodeData.aux_parameter, false ); |
|||
}; |
|||
} else { |
|||
validateStream(); |
|||
}; |
|||
}; |
|||
} |
|||
*/ |
|||
return deviceNodeCamera::validate(); |
|||
}; |
|||
|
|||
#undef LOG
|
|||
#undef LOG_ERROR
|
|||
@ -0,0 +1,41 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Dr.Frucht Systems Ltd. |
|||
// Copyright © 2000-2017. All Rights Reserved. |
|||
// Version 2.0 6/11/2019 |
|||
// Last modification: 6/11/2019 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: rgooseIPCamera.h |
|||
// AUTHOR: gagua |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of rgooseIPCamera.h |
|||
//---------------------------------------------------------------------------- |
|||
// |
|||
#ifndef __DEVICE_PRESET_CAMERA_CTRL_HEADER__ |
|||
#define __DEVICE_PRESET_CAMERA_CTRL_HEADER__ |
|||
|
|||
#include "deviceNodeCamera.h" |
|||
#include "../../components/base/basicEventHandler.h" |
|||
#include "../../components/base/basicEventHeap.h" |
|||
|
|||
//https://www.ebay.com/itm/Professional-Rolling-Makeup-Case-Bulb-Mirror-Cosmetic-Artist-Dressing-Train-Case/233264525474 |
|||
|
|||
//ffmpeg -i input.mp4 -af loudnorm=I=-23:LRA=7:tp=-2:print_format=json -f null - |
|||
//ffmpeg -i input.mp4 -af loudnorm=I=-23:LRA=7:tp=-2:measured_I=-30:measured_LRA=1.1:measured_tp=-11 04:measured_thresh=-40.21:offset=-0.47 -ar 48k -y output.mp4 |
|||
|
|||
class deviceNodePresetCamControl: public deviceNodeCamera, public basicEventHandler { |
|||
protected: |
|||
CAMERA_CTRL_DATA m_sCtrlData; |
|||
|
|||
public: |
|||
explicit deviceNodePresetCamControl( uint32_t id ); |
|||
explicit deviceNodePresetCamControl( DBC_NODE_DATA *Data = NULL ); |
|||
~deviceNodePresetCamControl(); |
|||
virtual bool dispatchEvent( EVENT_CONTAINER *Evt ); |
|||
virtual bool startService(); |
|||
virtual bool stopService(); |
|||
virtual bool validate(); |
|||
}; |
|||
|
|||
#endif |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue