|
|
@ -138,9 +138,11 @@ class Xsync : public IXsync { |
|
|
|
|
|
|
|
if (packet->eventid == ktimecode_report_event) { |
|
|
|
Timecode64_t tc64; |
|
|
|
tc64.tc0 = packet->data[0]; |
|
|
|
tc64.tc1 = packet->data[1]; |
|
|
|
tc64.tc0 = packet->data[0]; |
|
|
|
tc64.tc1 = packet->data[1]; |
|
|
|
tc64.subframe = packet->data[2]; |
|
|
|
XsyncTimecode_t timecode = timecode64ToXsyncTimeCode(tc64); |
|
|
|
|
|
|
|
if (m_on_timecode_msg_cb) m_on_timecode_msg_cb(&timecode); |
|
|
|
} else if (packet->eventid == kxsync_work_state_report_event) { |
|
|
|
// 信号发生器状态改变
|
|
|
@ -159,7 +161,9 @@ class Xsync : public IXsync { |
|
|
|
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); }); |
|
|
|
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
|
|
|
|
|
|
|
|