File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ mod apple_sys;
2929mod pixel_buffer;
3030mod pixelformat;
3131
32+ pub use pixel_buffer:: PixelBuffer ;
33+
3234struct ErrorHandler ;
3335impl StreamErrorHandler for ErrorHandler {
3436 fn on_error ( & self ) {
Original file line number Diff line number Diff line change @@ -99,6 +99,12 @@ impl PixelBuffer {
9999 }
100100}
101101
102+ impl Into < CMSampleBuffer > for PixelBuffer {
103+ fn into ( self ) -> CMSampleBuffer {
104+ self . buffer
105+ }
106+ }
107+
102108#[ derive( Debug ) ]
103109pub struct Plane {
104110 buffer : CVPixelBufferRef ,
@@ -170,7 +176,6 @@ impl RawCapturer<'_> {
170176
171177pub unsafe fn sample_buffer_to_pixel_buffer ( sample_buffer : & CMSampleBuffer ) -> CVPixelBufferRef {
172178 let buffer_ref = & ( * sample_buffer. sys_ref ) ;
173-
174179
175180 CMSampleBufferGetImageBuffer ( buffer_ref) as CVPixelBufferRef
176181}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use super::Options;
44use crate :: frame:: Frame ;
55
66#[ cfg( target_os = "macos" ) ]
7- mod mac;
7+ pub mod mac;
88
99#[ cfg( target_os = "windows" ) ]
1010mod win;
Original file line number Diff line number Diff line change 1- mod engine;
1+ pub mod engine;
22
33use std:: { error:: Error , sync:: mpsc} ;
44
Original file line number Diff line number Diff line change @@ -11,3 +11,8 @@ pub use targets::Target;
1111pub use utils:: has_permission;
1212pub use utils:: is_supported;
1313pub use utils:: request_permission;
14+
15+ #[ cfg( target_os = "macos" ) ]
16+ pub mod engine {
17+ pub use crate :: capturer:: engine:: mac;
18+ }
You can’t perform that action at this time.
0 commit comments