|
|
@ -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; |
|
|
|