Browse Source

update

master
zhaohe 1 year ago
parent
commit
94c4352c15
  1. 9
      include/ixsync.hpp
  2. 17
      src/xsync_v2.cpp

9
include/ixsync.hpp

@ -22,7 +22,7 @@ typedef function<void(bool state, string targetIp)> xsync_
typedef function<void(xysnc_camera_sync_data_t *timecode_msg)> xsync_on_camera_sync_msg_t;
typedef struct {
bool placeholder;
bool listenCameraSyncPacket;
} xsync_config_t;
typedef struct {
@ -348,9 +348,10 @@ class IXsync {
*
*/
virtual xs_error_code_t TTLOutputModule_setSrcSigType(int index, SignalType_t source) = 0;
virtual xs_error_code_t TTLOutputModule_getSrcSigType(int index, SignalType_t &source) = 0;
virtual xs_error_code_t TTLOutputModule_setFreqDivision(int index, uint32_t div) = 0;
virtual xs_error_code_t TTLOutputModule1_setSrcSigType(SignalType_t source) = 0;
virtual xs_error_code_t TTLOutputModule1_getSrcSigType(SignalType_t &source) = 0;
virtual xs_error_code_t TTLOutputModule1_setFreqDivision(uint32_t div) = 0;
virtual xs_error_code_t TTLOutputModule_getFreqDivision(int index, uint32_t &div) = 0;
virtual xs_error_code_t TTLOutputModule_setFreqMultiplication(int index, uint32_t multi) = 0;
virtual xs_error_code_t TTLOutputModule_getFreqMultiplication(int index, uint32_t &multi) = 0;

17
src/xsync_v2.cpp

@ -158,13 +158,16 @@ class Xsync : public IXsync {
#if 1
// 相机同步包
xsync_camera_sync_udp_listener = g_xsync_udp_factory->createXSUDP();
ecode = xsync_camera_sync_udp_listener->initialize("0.0.0.0", IFLYTOP_XSYNC_CAMERA_SYNC_PACKET_PC_PORT);
if (ecode != kxs_ec_success) goto err;
ecode = xsync_camera_sync_udp_listener->startReceive([this](XsyncNetAdd &from, uint8_t *data, size_t length) { //
parseCameraSyncMsgAndReport(from, data, length);
});
if (ecode != kxs_ec_success) goto err;
if (config->listenCameraSyncPacket) {
xsync_camera_sync_udp_listener = g_xsync_udp_factory->createXSUDP();
ecode = xsync_camera_sync_udp_listener->initialize("0.0.0.0", IFLYTOP_XSYNC_CAMERA_SYNC_PACKET_PC_PORT);
if (ecode != kxs_ec_success) goto err;
ecode = xsync_camera_sync_udp_listener->startReceive([this](XsyncNetAdd &from, uint8_t *data, size_t length) { //
parseCameraSyncMsgAndReport(from, data, length);
});
if (ecode != kxs_ec_success) goto err;
}
#endif
m_xsync_timecode_udp_listener = xsync_timecode_udp_listener;

Loading…
Cancel
Save