// // Copyright (C) 2023 Sebastian Dröge // // This Source Code Form is subject to the terms of the Mozilla Public License, v2.0. // If a copy of the MPL was not distributed with this file, You can obtain one at // . // // SPDX-License-Identifier: MPL-2.0 use gst::{glib, prelude::*, subclass::prelude::*}; use crate::basepay::RtpBasePay2Impl; pub mod imp; glib::wrapper! { pub struct RtpBaseAudioPay2(ObjectSubclass) @extends crate::basepay::RtpBasePay2, gst::Element, gst::Object; } /// Trait containing extension methods for `RtpBaseAudioPay2`. pub trait RtpBaseAudioPay2Ext: IsA { /// Sets the number of bytes per frame. /// /// Should always be called together with `RtpBasePay2Ext::set_src_caps()`. fn set_bpf(&self, bpf: usize) { self.upcast_ref::().imp().set_bpf(bpf) } } impl> RtpBaseAudioPay2Ext for O {} /// Trait to implement in `RtpBaseAudioPay2` subclasses. pub trait RtpBaseAudioPay2Impl: RtpBasePay2Impl {} unsafe impl IsSubclassable for RtpBaseAudioPay2 { fn class_init(class: &mut glib::Class) { Self::parent_class_init::(class); } }