mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-09 10:45:27 +00:00
Print frame timestamp/timecode in debug output
This commit is contained in:
parent
75eb959c80
commit
4ebcd78acc
2 changed files with 25 additions and 4 deletions
|
@ -15,6 +15,7 @@ use std::{i32, u32};
|
||||||
use connect_ndi;
|
use connect_ndi;
|
||||||
use stop_ndi;
|
use stop_ndi;
|
||||||
use ndi::*;
|
use ndi::*;
|
||||||
|
use ndisys;
|
||||||
|
|
||||||
use HASHMAP_RECEIVERS;
|
use HASHMAP_RECEIVERS;
|
||||||
|
|
||||||
|
@ -358,8 +359,18 @@ impl BaseSrcImpl for NdiAudioSrc {
|
||||||
gst_log!(
|
gst_log!(
|
||||||
self.cat,
|
self.cat,
|
||||||
obj: element,
|
obj: element,
|
||||||
"NDI audio frame received: {:?}",
|
"NDI audio frame received: {:?} with timecode {} and timestamp {}",
|
||||||
audio_frame
|
audio_frame,
|
||||||
|
if audio_frame.timecode() == ndisys::NDIlib_send_timecode_synthesize {
|
||||||
|
gst::CLOCK_TIME_NONE
|
||||||
|
} else {
|
||||||
|
gst::ClockTime::from(audio_frame.timecode() as u64 * 100)
|
||||||
|
},
|
||||||
|
if audio_frame.timestamp() == ndisys::NDIlib_recv_timestamp_undefined {
|
||||||
|
gst::CLOCK_TIME_NONE
|
||||||
|
} else {
|
||||||
|
gst::ClockTime::from(audio_frame.timestamp() as u64 * 100)
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let info = gst_audio::AudioInfo::new(
|
let info = gst_audio::AudioInfo::new(
|
||||||
|
|
|
@ -375,8 +375,18 @@ impl BaseSrcImpl for NdiVideoSrc {
|
||||||
gst_log!(
|
gst_log!(
|
||||||
self.cat,
|
self.cat,
|
||||||
obj: element,
|
obj: element,
|
||||||
"NDI video frame received: {:?}",
|
"NDI video frame received: {:?} with timecode {} and timestamp {}",
|
||||||
video_frame
|
video_frame,
|
||||||
|
if video_frame.timecode() == ndisys::NDIlib_send_timecode_synthesize {
|
||||||
|
gst::CLOCK_TIME_NONE
|
||||||
|
} else {
|
||||||
|
gst::ClockTime::from(video_frame.timecode() as u64 * 100)
|
||||||
|
},
|
||||||
|
if video_frame.timestamp() == ndisys::NDIlib_recv_timestamp_undefined {
|
||||||
|
gst::CLOCK_TIME_NONE
|
||||||
|
} else {
|
||||||
|
gst::ClockTime::from(video_frame.timestamp() as u64 * 100)
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// YV12 and I420 are swapped in the NDI SDK compared to GStreamer
|
// YV12 and I420 are swapped in the NDI SDK compared to GStreamer
|
||||||
|
|
Loading…
Reference in a new issue