Unified · Split
| @@ -7,6 +7,7 @@ use std::{ · 6 unmodified lines | |||
| 7 | use crate::DisplayId; | 7 | use crate::DisplayId; |
| 8 | use collections::HashMap; | 8 | use collections::HashMap; |
| 9 | use parking_lot::Mutex; | 9 | use parking_lot::Mutex; |
| 10 | pub use sys::CVSMPTETime as SmtpeTime; | ||
| 10 | pub use sys::CVTimeStamp as VideoTimestamp; | 11 | pub use sys::CVTimeStamp as VideoTimestamp; |
| 11 | 12 | ||
| 12 | pub(crate) struct MacDisplayLinker { | 13 | pub(crate) struct MacDisplayLinker { |
| @@ -153,7 +154,7 @@ mod sys { · 140 unmodified lines | |||
| 153 | kCVTimeStampTopField | kCVTimeStampBottomField; | 154 | kCVTimeStampTopField | kCVTimeStampBottomField; |
| 154 | 155 | ||
| 155 | #[repr(C)] | 156 | #[repr(C)] |
| 156 | #[derive(Clone, Copy)] | 157 | #[derive(Clone, Copy, Default)] |
| 157 | pub struct CVSMPTETime { | 158 | pub struct CVSMPTETime { |
| 158 | pub subframes: i16, | 159 | pub subframes: i16, |
| 159 | pub subframe_divisor: i16, | 160 | pub subframe_divisor: i16, |
| @@ -147,18 +147,25 @@ impl Platform for TestPlatform { · 146 unmodified lines | |||
| 147 | fn set_display_link_output_callback( | 147 | fn set_display_link_output_callback( |
| 148 | &self, | 148 | &self, |
| 149 | _display_id: DisplayId, | 149 | _display_id: DisplayId, |
| 150 | _callback: Box<dyn FnMut(&crate::VideoTimestamp, &crate::VideoTimestamp) + Send>, | 150 | mut callback: Box<dyn FnMut(&crate::VideoTimestamp, &crate::VideoTimestamp) + Send>, |
| 151 | ) { | 151 | ) { |
| 152 | unimplemented!() | 152 | let timestamp = crate::VideoTimestamp { |
| 153 | } | 153 | version: 0, |
| 154 | 154 | video_time_scale: 0, | |
| 155 | fn start_display_link(&self, _display_id: DisplayId) { | 155 | video_time: 0, |
| 156 | unimplemented!() | 156 | host_time: 0, |
| 157 | } | 157 | rate_scalar: 0.0, |
| 158 | 158 | video_refresh_period: 0, | |
| 159 | fn stop_display_link(&self, _display_id: DisplayId) { | 159 | smpte_time: crate::SmtpeTime::default(), |
| 160 | unimplemented!() | 160 | flags: 0, |
| 161 | } | 161 | reserved: 0, |
| 162 | }; | ||
| 163 | callback(×tamp, ×tamp) | ||
| 164 | } | ||
| 165 | |||
| 166 | fn start_display_link(&self, _display_id: DisplayId) {} | ||
| 167 | |||
| 168 | fn stop_display_link(&self, _display_id: DisplayId) {} | ||
| 162 | 169 | ||
| 163 | fn open_url(&self, _url: &str) { | 170 | fn open_url(&self, _url: &str) { |
| 164 | unimplemented!() | 171 | unimplemented!() |