From 6ce1792a8a609a4d48f7487604bf895e615008fc Mon Sep 17 00:00:00 2001 From: Yury Date: Fri, 29 Nov 2024 19:06:16 +0300 Subject: [PATCH] tune av api --- cidre/src/av/audio/buffer.rs | 2 +- cidre/src/av/audio/mixing.rs | 6 +++--- cidre/src/av/sample_buffer/display_layer.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cidre/src/av/audio/buffer.rs b/cidre/src/av/audio/buffer.rs index 8662ca89..357d2790 100644 --- a/cidre/src/av/audio/buffer.rs +++ b/cidre/src/av/audio/buffer.rs @@ -15,7 +15,7 @@ define_obj_type!( /// A buffer of audio data, with a format. impl Buf { #[objc::msg_send(format)] - pub fn format(&self) -> &Format; + pub fn format(&self) -> arc::R; #[cfg(feature = "at")] #[objc::msg_send(audioBufferList)] diff --git a/cidre/src/av/audio/mixing.rs b/cidre/src/av/audio/mixing.rs index cd988695..ef9f6c6c 100644 --- a/cidre/src/av/audio/mixing.rs +++ b/cidre/src/av/audio/mixing.rs @@ -1,4 +1,4 @@ -use crate::{av, define_obj_type, ns, objc}; +use crate::{arc, av, define_obj_type, ns, objc}; #[objc::protocol(AVStereoMixing)] pub trait StereoMixing { @@ -13,7 +13,7 @@ define_obj_type!(pub MixingDestination(ns::Id)); impl MixingDestination { #[objc::msg_send(connectionPoint)] - pub fn connection_point(&self) -> &av::audio::ConnectionPoint; + pub fn connection_point(&self) -> arc::R; } impl av::audio::StereoMixing for MixingDestination {} impl av::audio::Mixing for MixingDestination {} @@ -25,7 +25,7 @@ pub trait Mixing: StereoMixing { &self, mixer: av::AudioNode, bus: av::AudioNodeBus, - ) -> Option<&av::audio::MixingDestination>; + ) -> Option>; #[objc::msg_send(volume)] fn volume(&self) -> f32; diff --git a/cidre/src/av/sample_buffer/display_layer.rs b/cidre/src/av/sample_buffer/display_layer.rs index 65e22bf7..9f7d0e9c 100644 --- a/cidre/src/av/sample_buffer/display_layer.rs +++ b/cidre/src/av/sample_buffer/display_layer.rs @@ -9,7 +9,7 @@ impl DisplayLayer { pub fn set_control_timebase(&self, value: Option<&cm::Timebase>); #[objc::msg_send(videoGravity)] - pub fn video_gravity(&self) -> &av::LayerVideoGravity; + pub fn video_gravity(&self) -> arc::R; #[objc::msg_send(setVideoGravity:)] pub fn set_video_gravity(&mut self, value: &av::LayerVideoGravity); @@ -31,7 +31,7 @@ impl DisplayLayer { pub fn output_obscured_due_to_insufficient_external_protection(&self) -> bool; #[objc::msg_send(sampleBufferRenderer)] - pub fn sample_buf_renderer(&self) -> &av::SampleBufVideoRenderer; + pub fn sample_buf_renderer(&self) -> arc::R; } #[link(name = "ca", kind = "static")]