Skip to content

Commit

Permalink
tune av api
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Nov 29, 2024
1 parent 419b443 commit 6ce1792
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cidre/src/av/audio/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Format>;

#[cfg(feature = "at")]
#[objc::msg_send(audioBufferList)]
Expand Down
6 changes: 3 additions & 3 deletions cidre/src/av/audio/mixing.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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<av::audio::ConnectionPoint>;
}
impl av::audio::StereoMixing for MixingDestination {}
impl av::audio::Mixing for MixingDestination {}
Expand All @@ -25,7 +25,7 @@ pub trait Mixing: StereoMixing {
&self,
mixer: av::AudioNode,
bus: av::AudioNodeBus,
) -> Option<&av::audio::MixingDestination>;
) -> Option<arc::R<av::audio::MixingDestination>>;

#[objc::msg_send(volume)]
fn volume(&self) -> f32;
Expand Down
4 changes: 2 additions & 2 deletions cidre/src/av/sample_buffer/display_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<av::LayerVideoGravity>;

#[objc::msg_send(setVideoGravity:)]
pub fn set_video_gravity(&mut self, value: &av::LayerVideoGravity);
Expand All @@ -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<av::SampleBufVideoRenderer>;
}

#[link(name = "ca", kind = "static")]
Expand Down

0 comments on commit 6ce1792

Please sign in to comment.