mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-03-27 11:12:40 +00:00
Add comment about Newtek NDI times resolution
See: https://github.com/FFmpeg/FFmpeg/blob/master/libavdevice/libndi_newtek_common.h#L27 From NDI SDK Documentation: This is the timecode of this frame in 100ns intervals. This is generally not used internally by the SDK, but is passed through to applications who may interpret it as they wish. When sending data, a value of NDIlib_send_timecode_synthesize can be specified (and should be the default), the operation of this value is documented in the sending section of this documentation. NDIlib_send_timecode_synthesize will yield UTC time in 100ns intervals since the Unix Time Epoch 1/1/1970 00:00. When interpreting this timecode a receiving application may choose to localise the time of day based on time zone offset which can optionally be communicated by the sender in connection metadata. Since timecode is stored in UTC within NDI, communicating timecode time of day for non UTC time zones requires a translation
This commit is contained in:
parent
cb1ea2195f
commit
227080e32d
2 changed files with 2 additions and 0 deletions
|
@ -388,6 +388,7 @@ impl BaseSrcImpl<BaseSrc> for NdiAudioSrc {
|
|||
|
||||
let buffer = buffer.get_mut().unwrap();
|
||||
|
||||
// Newtek NDI yields times in 100ns intervals since the Unix Time
|
||||
let pts: gst::ClockTime = (pts * 100).into();
|
||||
buffer.set_pts(pts + ndi_struct.start_pts);
|
||||
|
||||
|
|
|
@ -386,6 +386,7 @@ impl BaseSrcImpl<BaseSrc> for NdiVideoSrc {
|
|||
let mut buffer = gst::Buffer::with_size(buff_size).unwrap();
|
||||
{
|
||||
let vec = Vec::from_raw_parts(video_frame.p_data as *mut u8, buff_size, buff_size);
|
||||
// Newtek NDI yields times in 100ns intervals since the Unix Time
|
||||
let pts: gst::ClockTime = (pts * 100).into();
|
||||
|
||||
let duration: gst::ClockTime = (((f64::from(video_frame.frame_rate_D)
|
||||
|
|
Loading…
Reference in a new issue