mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 01:21:05 +00:00
Remove unnecessary trait sealing
For all these traits only the implementation that already exists is possible. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1563>
This commit is contained in:
parent
887bffbb2c
commit
abbc85c3d0
59 changed files with 78 additions and 368 deletions
|
@ -10,12 +10,7 @@ use gst::prelude::*;
|
|||
|
||||
use crate::{ffi, AudioAggregator, AudioAggregatorPad};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::AudioAggregator>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait AudioAggregatorExtManual: sealed::Sealed + IsA<AudioAggregator> + 'static {
|
||||
pub trait AudioAggregatorExtManual: IsA<AudioAggregator> + 'static {
|
||||
#[doc(alias = "gst_audio_aggregator_set_sink_caps")]
|
||||
fn set_sink_caps(&self, pad: &impl IsA<AudioAggregatorPad>, caps: &gst::CapsRef) {
|
||||
unsafe {
|
||||
|
|
|
@ -8,14 +8,7 @@ use glib::{
|
|||
|
||||
use crate::{ffi, AudioAggregatorConvertPad};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::AudioAggregatorConvertPad>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait AudioAggregatorConvertPadExtManual:
|
||||
sealed::Sealed + IsA<AudioAggregatorConvertPad> + 'static
|
||||
{
|
||||
pub trait AudioAggregatorConvertPadExtManual: IsA<AudioAggregatorConvertPad> + 'static {
|
||||
#[doc(alias = "converter-config")]
|
||||
fn converter_config(&self) -> Option<crate::AudioConverterConfig> {
|
||||
ObjectExt::property::<Option<gst::Structure>>(self.as_ref(), "converter-config")
|
||||
|
|
|
@ -3,12 +3,7 @@ use gst::prelude::*;
|
|||
|
||||
use crate::{ffi, AudioAggregatorPad};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::AudioAggregatorPad>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait AudioAggregatorPadExtManual: sealed::Sealed + IsA<AudioAggregatorPad> + 'static {
|
||||
pub trait AudioAggregatorPadExtManual: IsA<AudioAggregatorPad> + 'static {
|
||||
fn audio_info(&self) -> Option<crate::AudioInfo> {
|
||||
unsafe {
|
||||
let ptr = self.as_ptr() as *mut ffi::GstAudioAggregatorPad;
|
||||
|
|
|
@ -20,12 +20,7 @@ extern "C" {
|
|||
) -> gst::ffi::GstFlowReturn;
|
||||
}
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::AudioDecoder>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait AudioDecoderExtManual: sealed::Sealed + IsA<AudioDecoder> + 'static {
|
||||
pub trait AudioDecoderExtManual: IsA<AudioDecoder> + 'static {
|
||||
#[doc(alias = "gst_audio_decoder_negotiate")]
|
||||
fn negotiate(&self) -> Result<(), gst::FlowError> {
|
||||
unsafe {
|
||||
|
|
|
@ -6,12 +6,7 @@ use glib::{prelude::*, translate::*};
|
|||
|
||||
use crate::{ffi, AudioEncoder};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::AudioEncoder>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait AudioEncoderExtManual: sealed::Sealed + IsA<AudioEncoder> + 'static {
|
||||
pub trait AudioEncoderExtManual: IsA<AudioEncoder> + 'static {
|
||||
#[doc(alias = "gst_audio_encoder_negotiate")]
|
||||
fn negotiate(&self) -> Result<(), gst::FlowError> {
|
||||
unsafe {
|
||||
|
|
|
@ -5,12 +5,7 @@ use gst_base::prelude::*;
|
|||
|
||||
use crate::{ffi, AudioFilter, AudioInfo};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::AudioFilter>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait AudioFilterExtManual: sealed::Sealed + IsA<AudioFilter> + 'static {
|
||||
pub trait AudioFilterExtManual: IsA<AudioFilter> + 'static {
|
||||
fn audio_info(&self) -> Option<AudioInfo> {
|
||||
unsafe {
|
||||
let ptr: &ffi::GstAudioFilter = &*(self.as_ptr() as *const _);
|
||||
|
|
|
@ -16,12 +16,7 @@ use gst::{format::FormattedValue, prelude::*};
|
|||
|
||||
use crate::{ffi, Aggregator, AggregatorPad};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::Aggregator>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait AggregatorExtManual: sealed::Sealed + IsA<Aggregator> + 'static {
|
||||
pub trait AggregatorExtManual: IsA<Aggregator> + 'static {
|
||||
#[doc(alias = "get_allocator")]
|
||||
#[doc(alias = "gst_aggregator_get_allocator")]
|
||||
fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams) {
|
||||
|
|
|
@ -5,12 +5,7 @@ use gst::prelude::*;
|
|||
|
||||
use crate::{ffi, AggregatorPad};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::AggregatorPad>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait AggregatorPadExtManual: sealed::Sealed + IsA<AggregatorPad> + 'static {
|
||||
pub trait AggregatorPadExtManual: IsA<AggregatorPad> + 'static {
|
||||
#[doc(alias = "get_segment")]
|
||||
fn segment(&self) -> gst::Segment {
|
||||
unsafe {
|
||||
|
|
|
@ -10,12 +10,7 @@ use gst::{
|
|||
|
||||
use crate::{ffi, BaseParse, BaseParseFrame};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::BaseParse>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait BaseParseExtManual: sealed::Sealed + IsA<BaseParse> + 'static {
|
||||
pub trait BaseParseExtManual: IsA<BaseParse> + 'static {
|
||||
#[doc(alias = "get_sink_pad")]
|
||||
fn sink_pad(&self) -> &gst::Pad {
|
||||
unsafe {
|
||||
|
|
|
@ -7,12 +7,7 @@ use gst::prelude::*;
|
|||
|
||||
use crate::{ffi, BaseSink};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::BaseSink>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait BaseSinkExtManual: sealed::Sealed + IsA<BaseSink> + 'static {
|
||||
pub trait BaseSinkExtManual: IsA<BaseSink> + 'static {
|
||||
#[doc(alias = "get_segment")]
|
||||
fn segment(&self) -> gst::Segment {
|
||||
unsafe {
|
||||
|
|
|
@ -7,12 +7,7 @@ use gst::prelude::*;
|
|||
|
||||
use crate::{ffi, BaseSrc};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::BaseSrc>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait BaseSrcExtManual: sealed::Sealed + IsA<BaseSrc> + 'static {
|
||||
pub trait BaseSrcExtManual: IsA<BaseSrc> + 'static {
|
||||
#[doc(alias = "get_allocator")]
|
||||
#[doc(alias = "gst_base_src_get_allocator")]
|
||||
fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams) {
|
||||
|
|
|
@ -7,12 +7,7 @@ use gst::prelude::*;
|
|||
|
||||
use crate::{ffi, BaseTransform};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::BaseTransform>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait BaseTransformExtManual: sealed::Sealed + IsA<BaseTransform> + 'static {
|
||||
pub trait BaseTransformExtManual: IsA<BaseTransform> + 'static {
|
||||
#[doc(alias = "get_allocator")]
|
||||
#[doc(alias = "gst_base_transform_get_allocator")]
|
||||
fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams) {
|
||||
|
|
|
@ -2,12 +2,7 @@
|
|||
use crate::{ffi, prelude::*, Formatter};
|
||||
use gst::glib::translate::*;
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::Formatter>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait FormatterExtManual: sealed::Sealed + IsA<Formatter> + 'static {
|
||||
pub trait FormatterExtManual: IsA<Formatter> + 'static {
|
||||
fn can_load_uri(&self, uri: &str) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let klass = self.class_of::<crate::Formatter>().unwrap();
|
||||
|
|
|
@ -45,12 +45,7 @@ impl GLContext {
|
|||
}
|
||||
}
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::GLContext>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait GLContextExtManual: sealed::Sealed + IsA<GLContext> + 'static {
|
||||
pub trait GLContextExtManual: IsA<GLContext> + 'static {
|
||||
#[doc(alias = "get_gl_context")]
|
||||
#[doc(alias = "gst_gl_context_get_gl_context")]
|
||||
fn gl_context(&self) -> uintptr_t {
|
||||
|
|
|
@ -3,12 +3,7 @@ use crate::{ffi, GLContext, GLDisplay};
|
|||
use glib::prelude::*;
|
||||
use glib::translate::*;
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::GLDisplay>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait GLDisplayExtManual: sealed::Sealed + IsA<GLDisplay> + 'static {
|
||||
pub trait GLDisplayExtManual: IsA<GLDisplay> + 'static {
|
||||
#[doc(alias = "gst_gl_display_get_handle")]
|
||||
#[doc(alias = "get_handle")]
|
||||
fn handle(&self) -> usize {
|
||||
|
|
|
@ -2,12 +2,7 @@ use glib::{prelude::*, translate::*};
|
|||
|
||||
use crate::{ffi, GLFramebuffer, GLMemoryRef};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::GLFramebuffer>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait GLFramebufferExtManual: sealed::Sealed + IsA<GLFramebuffer> + 'static {
|
||||
pub trait GLFramebufferExtManual: IsA<GLFramebuffer> + 'static {
|
||||
#[doc(alias = "gst_gl_framebuffer_draw_to_texture")]
|
||||
fn draw_to_texture<F: FnOnce()>(&self, mem: &mut GLMemoryRef, func: F) {
|
||||
let mut func = std::mem::ManuallyDrop::new(func);
|
||||
|
|
|
@ -12,14 +12,9 @@ pub enum Writable {}
|
|||
// TODO: implement copy for videoframes. This would need to go through all the individual memories
|
||||
// and copy them. Some GL textures can be copied, others cannot.
|
||||
|
||||
pub trait IsGLVideoFrame: IsVideoFrame + Sized {}
|
||||
pub unsafe trait IsGLVideoFrame: IsVideoFrame {}
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsGLVideoFrame> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait GLVideoFrameExt: sealed::Sealed + IsGLVideoFrame {
|
||||
pub trait GLVideoFrameExt: IsGLVideoFrame + VideoFrameExt {
|
||||
#[inline]
|
||||
fn memory(&self, idx: u32) -> Result<&GLMemoryRef, glib::BoolError> {
|
||||
if idx >= self.info().n_planes() {
|
||||
|
@ -80,14 +75,14 @@ pub struct GLVideoFrame<T> {
|
|||
unsafe impl<T> Send for GLVideoFrame<T> {}
|
||||
unsafe impl<T> Sync for GLVideoFrame<T> {}
|
||||
|
||||
impl<T> IsVideoFrame for GLVideoFrame<T> {
|
||||
unsafe impl<T> IsVideoFrame for GLVideoFrame<T> {
|
||||
#[inline]
|
||||
fn as_raw(&self) -> &gst_video::ffi::GstVideoFrame {
|
||||
&self.frame
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> IsGLVideoFrame for GLVideoFrame<T> {}
|
||||
unsafe impl<T> IsGLVideoFrame for GLVideoFrame<T> {}
|
||||
|
||||
impl<T> Debug for GLVideoFrame<T> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
|
@ -272,14 +267,14 @@ pub struct GLVideoFrameRef<T> {
|
|||
unsafe impl<T> Send for GLVideoFrameRef<T> {}
|
||||
unsafe impl<T> Sync for GLVideoFrameRef<T> {}
|
||||
|
||||
impl<T> IsVideoFrame for GLVideoFrameRef<T> {
|
||||
unsafe impl<T> IsVideoFrame for GLVideoFrameRef<T> {
|
||||
#[inline]
|
||||
fn as_raw(&self) -> &gst_video::ffi::GstVideoFrame {
|
||||
&self.frame
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> IsGLVideoFrame for GLVideoFrameRef<T> {}
|
||||
unsafe impl<T> IsGLVideoFrame for GLVideoFrameRef<T> {}
|
||||
|
||||
impl<T> Debug for GLVideoFrameRef<T> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
|
|
|
@ -4,18 +4,11 @@ use gst::prelude::*;
|
|||
|
||||
use crate::{ffi, subclass::AudioVisualizerSetupToken, AudioVisualizer};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::AudioVisualizer>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait AudioVisualizerExtManual:
|
||||
sealed::Sealed + IsA<AudioVisualizer> + IsA<gst::Element> + 'static
|
||||
{
|
||||
pub trait AudioVisualizerExtManual: IsA<AudioVisualizer> + 'static {
|
||||
// rustdoc-stripper-ignore-next
|
||||
/// Returns the number of samples per frame required before calling the render method
|
||||
fn req_spf(&self) -> u32 {
|
||||
let sinkpad = self.static_pad("sink").expect("sink pad presence");
|
||||
let sinkpad = self.as_ref().static_pad("sink").expect("sink pad presence");
|
||||
let _stream_lock = sinkpad.stream_lock();
|
||||
|
||||
let ptr = self.as_ptr() as *mut ffi::GstAudioVisualizer;
|
||||
|
@ -31,7 +24,7 @@ pub trait AudioVisualizerExtManual:
|
|||
token.0.as_ptr()
|
||||
);
|
||||
|
||||
let sinkpad = self.static_pad("sink").expect("sink pad presence");
|
||||
let sinkpad = self.as_ref().static_pad("sink").expect("sink pad presence");
|
||||
let _stream_lock = sinkpad.stream_lock();
|
||||
|
||||
let ptr = self.as_ptr() as *mut ffi::GstAudioVisualizer;
|
||||
|
@ -41,7 +34,7 @@ pub trait AudioVisualizerExtManual:
|
|||
}
|
||||
|
||||
fn audio_info(&self) -> gst_audio::AudioInfo {
|
||||
let sinkpad = self.static_pad("sink").expect("sink pad presence");
|
||||
let sinkpad = self.as_ref().static_pad("sink").expect("sink pad presence");
|
||||
let _stream_lock = sinkpad.stream_lock();
|
||||
|
||||
let ptr = self.as_ptr() as *mut ffi::GstAudioVisualizer;
|
||||
|
@ -54,7 +47,7 @@ pub trait AudioVisualizerExtManual:
|
|||
}
|
||||
|
||||
fn video_info(&self) -> gst_video::VideoInfo {
|
||||
let srcpad = self.static_pad("src").expect("src pad presence");
|
||||
let srcpad = self.as_ref().static_pad("src").expect("src pad presence");
|
||||
let _stream_lock = srcpad.stream_lock();
|
||||
|
||||
let ptr = self.as_ptr() as *mut ffi::GstAudioVisualizer;
|
||||
|
@ -67,4 +60,4 @@ pub trait AudioVisualizerExtManual:
|
|||
}
|
||||
}
|
||||
|
||||
impl<O: IsA<AudioVisualizer> + IsA<gst::Element>> AudioVisualizerExtManual for O {}
|
||||
impl<O: IsA<AudioVisualizer>> AudioVisualizerExtManual for O {}
|
||||
|
|
|
@ -31,14 +31,7 @@ impl Iterator for Iter {
|
|||
|
||||
impl std::iter::FusedIterator for Iter {}
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::DiscovererStreamInfo>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait DiscovererStreamInfoExtManual:
|
||||
sealed::Sealed + IsA<DiscovererStreamInfo> + 'static
|
||||
{
|
||||
pub trait DiscovererStreamInfoExtManual: IsA<DiscovererStreamInfo> + 'static {
|
||||
fn next_iter(&self) -> Iter {
|
||||
Iter {
|
||||
stream_info: self.next(),
|
||||
|
|
|
@ -8,12 +8,7 @@ use crate::{
|
|||
ffi, EncodingAudioProfile, EncodingContainerProfile, EncodingProfile, EncodingVideoProfile,
|
||||
};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::EncodingProfile>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait EncodingProfileExtManual: sealed::Sealed + IsA<EncodingProfile> + 'static {
|
||||
pub trait EncodingProfileExtManual: IsA<EncodingProfile> + 'static {
|
||||
#[cfg(feature = "v1_20")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
||||
#[doc(alias = "gst_encoding_profile_get_element_properties")]
|
||||
|
|
|
@ -5,12 +5,7 @@ use glib::translate::*;
|
|||
|
||||
use crate::{ffi, RTPBaseDepayload};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::RTPBaseDepayload>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait RTPBaseDepayloadExtManual: sealed::Sealed + IsA<RTPBaseDepayload> + 'static {
|
||||
pub trait RTPBaseDepayloadExtManual: IsA<RTPBaseDepayload> + 'static {
|
||||
#[cfg(feature = "v1_24")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||
fn extensions(&self) -> Vec<crate::RTPHeaderExtension> {
|
||||
|
|
|
@ -4,12 +4,7 @@ use glib::{prelude::*, translate::*};
|
|||
|
||||
use crate::{ffi, RTPBasePayload};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::RTPBasePayload>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait RTPBasePayloadExtManual: sealed::Sealed + IsA<RTPBasePayload> + 'static {
|
||||
pub trait RTPBasePayloadExtManual: IsA<RTPBasePayload> + 'static {
|
||||
#[cfg(feature = "v1_20")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
||||
#[doc(alias = "gst_rtp_base_payload_set_outcaps_structure")]
|
||||
|
|
|
@ -2,12 +2,7 @@ use glib::{object::IsA, translate::*};
|
|||
|
||||
use crate::{ffi, RTPHeaderExtension, RTPHeaderExtensionFlags};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::RTPHeaderExtension>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait RTPHeaderExtensionExtManual: sealed::Sealed + IsA<RTPHeaderExtension> + 'static {
|
||||
pub trait RTPHeaderExtensionExtManual: IsA<RTPHeaderExtension> + 'static {
|
||||
#[doc(alias = "gst_rtp_header_extension_read")]
|
||||
fn read(
|
||||
&self,
|
||||
|
|
|
@ -6,12 +6,7 @@ use glib::{prelude::*, translate::*};
|
|||
|
||||
use crate::{ffi, RTSPAddress, RTSPAddressPool, RTSPAddressPoolResult};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::RTSPAddressPool>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait RTSPAddressPoolExtManual: sealed::Sealed + IsA<RTSPAddressPool> + 'static {
|
||||
pub trait RTSPAddressPoolExtManual: IsA<RTSPAddressPool> + 'static {
|
||||
#[doc(alias = "gst_rtsp_address_pool_reserve_address")]
|
||||
fn reserve_address(
|
||||
&self,
|
||||
|
|
|
@ -10,12 +10,7 @@ use glib::{
|
|||
|
||||
use crate::{ffi, RTSPAuth, RTSPToken};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::RTSPAuth>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait RTSPAuthExtManual: sealed::Sealed + IsA<RTSPAuth> + 'static {
|
||||
pub trait RTSPAuthExtManual: IsA<RTSPAuth> + 'static {
|
||||
#[doc(alias = "gst_rtsp_auth_set_default_token")]
|
||||
fn set_default_token(&self, mut token: Option<&mut RTSPToken>) {
|
||||
unsafe {
|
||||
|
|
|
@ -4,12 +4,7 @@ use crate::{ffi, RTSPClient, RTSPSession};
|
|||
use glib::{prelude::*, source::SourceId, translate::*};
|
||||
use gst_rtsp::rtsp_message::RTSPMessage;
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::RTSPClient>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait RTSPClientExtManual: sealed::Sealed + IsA<RTSPClient> + 'static {
|
||||
pub trait RTSPClientExtManual: IsA<RTSPClient> + 'static {
|
||||
#[doc(alias = "gst_rtsp_client_attach")]
|
||||
fn attach(&self, context: Option<&glib::MainContext>) -> SourceId {
|
||||
unsafe {
|
||||
|
|
|
@ -4,12 +4,7 @@ use glib::{prelude::*, translate::*};
|
|||
|
||||
use crate::{ffi, RTSPMedia};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::RTSPMedia>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait RTSPMediaExtManual: sealed::Sealed + IsA<RTSPMedia> + 'static {
|
||||
pub trait RTSPMediaExtManual: IsA<RTSPMedia> + 'static {
|
||||
#[doc(alias = "gst_rtsp_media_take_pipeline")]
|
||||
fn take_pipeline(&self, pipeline: &impl IsA<gst::Pipeline>) {
|
||||
unsafe {
|
||||
|
|
|
@ -4,12 +4,7 @@ use glib::{prelude::*, translate::*};
|
|||
|
||||
use crate::{ffi, RTSPMediaFactory};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::RTSPMediaFactory>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait RTSPMediaFactoryExtManual: sealed::Sealed + IsA<RTSPMediaFactory> + 'static {
|
||||
pub trait RTSPMediaFactoryExtManual: IsA<RTSPMediaFactory> + 'static {
|
||||
#[doc(alias = "gst_rtsp_media_factory_add_role_from_structure")]
|
||||
fn add_role_from_structure(&self, structure: &gst::StructureRef) {
|
||||
unsafe {
|
||||
|
|
|
@ -4,14 +4,7 @@ use glib::{prelude::*, translate::*};
|
|||
|
||||
use crate::{ffi, RTSPContext, RTSPOnvifMediaFactory};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::RTSPOnvifMediaFactory>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait RTSPOnvifMediaFactoryExtManual:
|
||||
sealed::Sealed + IsA<RTSPOnvifMediaFactory> + 'static
|
||||
{
|
||||
pub trait RTSPOnvifMediaFactoryExtManual: IsA<RTSPOnvifMediaFactory> + 'static {
|
||||
#[doc(alias = "gst_rtsp_onvif_media_factory_requires_backchannel")]
|
||||
fn requires_backchannel(&self, ctx: &RTSPContext) -> bool {
|
||||
skip_assert_initialized!();
|
||||
|
|
|
@ -4,12 +4,7 @@ use glib::{prelude::*, source::SourceId, translate::*};
|
|||
|
||||
use crate::{ffi, RTSPServer};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::RTSPServer>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait RTSPServerExtManual: sealed::Sealed + IsA<RTSPServer> + 'static {
|
||||
pub trait RTSPServerExtManual: IsA<RTSPServer> + 'static {
|
||||
#[doc(alias = "gst_rtsp_server_attach")]
|
||||
fn attach(
|
||||
&self,
|
||||
|
|
|
@ -6,12 +6,7 @@ use glib::{prelude::*, translate::*};
|
|||
|
||||
use crate::{ffi, RTSPSession, RTSPSessionMedia};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::RTSPSession>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait RTSPSessionExtManual: sealed::Sealed + IsA<super::RTSPSession> + 'static {
|
||||
pub trait RTSPSessionExtManual: IsA<super::RTSPSession> + 'static {
|
||||
#[doc(alias = "gst_rtsp_session_dup_media")]
|
||||
#[doc(alias = "gst_rtsp_session_get_media")]
|
||||
fn media(&self, path: &str) -> (Option<RTSPSessionMedia>, i32) {
|
||||
|
|
|
@ -36,12 +36,7 @@ fn into_raw_watch<F: FnMut(&RTSPSessionPool) -> ControlFlow + Send + 'static>(fu
|
|||
Box::into_raw(func) as gpointer
|
||||
}
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::RTSPSessionPool>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait RTSPSessionPoolExtManual: sealed::Sealed + IsA<RTSPSessionPool> + 'static {
|
||||
pub trait RTSPSessionPoolExtManual: IsA<RTSPSessionPool> + 'static {
|
||||
#[doc(alias = "gst_rtsp_session_pool_create_watch")]
|
||||
fn create_watch<F>(&self, name: Option<&str>, priority: Priority, func: F) -> glib::Source
|
||||
where
|
||||
|
|
|
@ -3,12 +3,7 @@ use gst::prelude::*;
|
|||
|
||||
use crate::{ffi, VideoAggregator};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::VideoAggregator>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait VideoAggregatorExtManual: sealed::Sealed + IsA<VideoAggregator> + 'static {
|
||||
pub trait VideoAggregatorExtManual: IsA<VideoAggregator> + 'static {
|
||||
fn video_info(&self) -> Option<crate::VideoInfo> {
|
||||
unsafe {
|
||||
let ptr = self.as_ptr() as *mut ffi::GstVideoAggregator;
|
||||
|
|
|
@ -8,14 +8,7 @@ use glib::{
|
|||
|
||||
use crate::{ffi, VideoAggregatorConvertPad};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::VideoAggregatorConvertPad>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait VideoAggregatorConvertPadExtManual:
|
||||
sealed::Sealed + IsA<VideoAggregatorConvertPad> + 'static
|
||||
{
|
||||
pub trait VideoAggregatorConvertPadExtManual: IsA<VideoAggregatorConvertPad> + 'static {
|
||||
#[doc(alias = "converter-config")]
|
||||
fn converter_config(&self) -> Option<crate::VideoConverterConfig> {
|
||||
ObjectExt::property::<Option<gst::Structure>>(self.as_ref(), "converter-config")
|
||||
|
|
|
@ -3,12 +3,7 @@ use gst::prelude::*;
|
|||
|
||||
use crate::{ffi, subclass::AggregateFramesToken, VideoAggregatorPad};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::VideoAggregatorPad>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait VideoAggregatorPadExtManual: sealed::Sealed + IsA<VideoAggregatorPad> + 'static {
|
||||
pub trait VideoAggregatorPadExtManual: IsA<VideoAggregatorPad> + 'static {
|
||||
#[doc(alias = "gst_video_aggregator_pad_has_current_buffer")]
|
||||
fn has_current_buffer(&self, _token: &AggregateFramesToken) -> bool {
|
||||
unsafe {
|
||||
|
|
|
@ -28,12 +28,7 @@ extern "C" {
|
|||
) -> gst::ffi::GstFlowReturn;
|
||||
}
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::VideoDecoder>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait VideoDecoderExtManual: sealed::Sealed + IsA<VideoDecoder> + 'static {
|
||||
pub trait VideoDecoderExtManual: IsA<VideoDecoder> + 'static {
|
||||
#[doc(alias = "gst_video_decoder_allocate_output_frame")]
|
||||
fn allocate_output_frame(
|
||||
&self,
|
||||
|
|
|
@ -10,12 +10,8 @@ use crate::{
|
|||
video_codec_state::{InNegotiation, Readable, VideoCodecState, VideoCodecStateContext},
|
||||
VideoCodecFrame, VideoEncoder,
|
||||
};
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::VideoEncoder>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait VideoEncoderExtManual: sealed::Sealed + IsA<VideoEncoder> + 'static {
|
||||
pub trait VideoEncoderExtManual: IsA<VideoEncoder> + 'static {
|
||||
#[doc(alias = "gst_video_encoder_allocate_output_frame")]
|
||||
fn allocate_output_frame(
|
||||
&self,
|
||||
|
|
|
@ -6,12 +6,7 @@ use gst_base::prelude::*;
|
|||
|
||||
use crate::{ffi, VideoFilter};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::VideoFilter>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait VideoFilterExtManual: sealed::Sealed + IsA<VideoFilter> + 'static {
|
||||
pub trait VideoFilterExtManual: IsA<VideoFilter> + 'static {
|
||||
fn input_video_info(&self) -> Option<crate::VideoInfo> {
|
||||
unsafe {
|
||||
let ptr = self.as_ptr() as *mut ffi::GstVideoFilter;
|
||||
|
|
|
@ -8,11 +8,11 @@ use glib::translate::{from_glib, from_glib_none, Borrowed, ToGlibPtr};
|
|||
pub enum Readable {}
|
||||
pub enum Writable {}
|
||||
|
||||
pub trait IsVideoFrame {
|
||||
pub unsafe trait IsVideoFrame {
|
||||
fn as_raw(&self) -> &ffi::GstVideoFrame;
|
||||
}
|
||||
|
||||
impl<T> IsVideoFrame for VideoFrame<T> {
|
||||
unsafe impl<T> IsVideoFrame for VideoFrame<T> {
|
||||
#[inline]
|
||||
fn as_raw(&self) -> &ffi::GstVideoFrame {
|
||||
&self.frame
|
||||
|
@ -39,12 +39,7 @@ impl<T> fmt::Debug for VideoFrame<T> {
|
|||
}
|
||||
}
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsVideoFrame> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait VideoFrameExt: sealed::Sealed + IsVideoFrame {
|
||||
pub trait VideoFrameExt: IsVideoFrame {
|
||||
#[inline]
|
||||
fn as_ptr(&self) -> *const ffi::GstVideoFrame {
|
||||
self.as_raw() as _
|
||||
|
@ -556,7 +551,7 @@ pub struct VideoFrameRef<T> {
|
|||
phantom: PhantomData<T>,
|
||||
}
|
||||
|
||||
impl<T> IsVideoFrame for VideoFrameRef<T> {
|
||||
unsafe impl<T> IsVideoFrame for VideoFrameRef<T> {
|
||||
#[inline]
|
||||
fn as_raw(&self) -> &ffi::GstVideoFrame {
|
||||
&self.frame
|
||||
|
|
|
@ -5,12 +5,7 @@ use libc::uintptr_t;
|
|||
|
||||
use crate::{ffi, VideoOverlay};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::VideoOverlay>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait VideoOverlayExtManual: sealed::Sealed + IsA<VideoOverlay> + 'static {
|
||||
pub trait VideoOverlayExtManual: IsA<VideoOverlay> + 'static {
|
||||
unsafe fn set_window_handle(&self, handle: uintptr_t) {
|
||||
ffi::gst_video_overlay_set_window_handle(self.as_ref().to_glib_none().0, handle)
|
||||
}
|
||||
|
|
|
@ -4,12 +4,7 @@ use glib::{prelude::*, translate::*};
|
|||
|
||||
use crate::{ffi, WebRTCICE, WebRTCICEStream};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::WebRTCICE>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait WebRTCICEExtManual: sealed::Sealed + IsA<WebRTCICE> + 'static {
|
||||
pub trait WebRTCICEExtManual: IsA<WebRTCICE> + 'static {
|
||||
#[doc(alias = "gst_webrtc_ice_add_candidate")]
|
||||
fn add_candidate(&self, stream: &impl IsA<WebRTCICEStream>, candidate: &str) {
|
||||
#[cfg(not(feature = "v1_24"))]
|
||||
|
|
|
@ -42,12 +42,7 @@ impl Bin {
|
|||
}
|
||||
}
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::Bin>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait GstBinExtManual: sealed::Sealed + IsA<Bin> + 'static {
|
||||
pub trait GstBinExtManual: IsA<Bin> + 'static {
|
||||
#[doc(alias = "gst_bin_add_many")]
|
||||
fn add_many(
|
||||
&self,
|
||||
|
|
|
@ -345,12 +345,7 @@ impl FromGlibPtrNone<*mut ffi::GstBufferPoolAcquireParams> for BufferPoolAcquire
|
|||
}
|
||||
}
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::BufferPool>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait BufferPoolExtManual: sealed::Sealed + IsA<BufferPool> + 'static {
|
||||
pub trait BufferPoolExtManual: IsA<BufferPool> + 'static {
|
||||
#[doc(alias = "get_config")]
|
||||
#[doc(alias = "gst_buffer_pool_get_config")]
|
||||
fn config(&self) -> BufferPoolConfig {
|
||||
|
|
|
@ -17,19 +17,20 @@ cfg_if::cfg_if! {
|
|||
}
|
||||
|
||||
use super::Bus;
|
||||
use glib::prelude::*;
|
||||
|
||||
pub trait UnixBusExtManual: 'static {
|
||||
pub trait UnixBusExtManual: IsA<Bus> + 'static {
|
||||
#[doc(alias = "get_pollfd")]
|
||||
#[doc(alias = "gst_bus_get_pollfd")]
|
||||
fn pollfd(&self) -> unix::io::RawFd;
|
||||
}
|
||||
|
||||
impl UnixBusExtManual for Bus {
|
||||
impl<T: IsA<Bus>> UnixBusExtManual for T {
|
||||
fn pollfd(&self) -> unix::io::RawFd {
|
||||
#[cfg(unix)]
|
||||
unsafe {
|
||||
let mut pollfd = mem::MaybeUninit::uninit();
|
||||
crate::ffi::gst_bus_get_pollfd(self.to_glib_none().0, pollfd.as_mut_ptr());
|
||||
crate::ffi::gst_bus_get_pollfd(self.as_ref().to_glib_none().0, pollfd.as_mut_ptr());
|
||||
let pollfd = pollfd.assume_init();
|
||||
pollfd.fd
|
||||
}
|
||||
|
|
|
@ -16,20 +16,21 @@ cfg_if::cfg_if! {
|
|||
}
|
||||
}
|
||||
|
||||
use glib::prelude::*;
|
||||
use super::Bus;
|
||||
|
||||
pub trait WindowsBusExtManual: 'static {
|
||||
pub trait WindowsBusExtManual: IsA<Bus> + 'static {
|
||||
#[doc(alias = "get_pollfd")]
|
||||
#[doc(alias = "gst_bus_get_pollfd")]
|
||||
fn pollfd(&self) -> windows::io::RawHandle;
|
||||
}
|
||||
|
||||
impl WindowsBusExtManual for Bus {
|
||||
impl<T: IsA<Bus>> WindowsBusExtManual for T {
|
||||
fn pollfd(&self) -> windows::io::RawHandle {
|
||||
#[cfg(windows)]
|
||||
unsafe {
|
||||
let mut pollfd = mem::MaybeUninit::uninit();
|
||||
crate::ffi::gst_bus_get_pollfd(self.to_glib_none().0, pollfd.as_mut_ptr());
|
||||
crate::ffi::gst_bus_get_pollfd(self.as_ref().to_glib_none().0, pollfd.as_mut_ptr());
|
||||
let pollfd = pollfd.assume_init();
|
||||
pollfd.fd as *mut _
|
||||
}
|
||||
|
|
|
@ -6,12 +6,7 @@ use glib::{prelude::*, translate::*};
|
|||
|
||||
use crate::ChildProxy;
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::ChildProxy>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait ChildProxyExtManual: sealed::Sealed + IsA<ChildProxy> + 'static {
|
||||
pub trait ChildProxyExtManual: IsA<ChildProxy> + 'static {
|
||||
#[doc(alias = "gst_child_proxy_lookup")]
|
||||
fn lookup(&self, name: &str) -> Result<(glib::Object, glib::ParamSpec), glib::BoolError> {
|
||||
unsafe {
|
||||
|
|
|
@ -420,12 +420,7 @@ impl Clock {
|
|||
}
|
||||
}
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::Clock>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait ClockExtManual: sealed::Sealed + IsA<Clock> + 'static {
|
||||
pub trait ClockExtManual: IsA<Clock> + 'static {
|
||||
#[doc(alias = "gst_clock_new_periodic_id")]
|
||||
fn new_periodic_id(&self, start_time: ClockTime, interval: ClockTime) -> PeriodicClockId {
|
||||
assert_ne!(interval, ClockTime::ZERO);
|
||||
|
|
|
@ -4,12 +4,7 @@ use glib::{prelude::*, translate::*};
|
|||
|
||||
use crate::{ClockTime, ControlBinding};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::ControlBinding>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait ControlBindingExtManual: sealed::Sealed + IsA<ControlBinding> + 'static {
|
||||
pub trait ControlBindingExtManual: IsA<ControlBinding> + 'static {
|
||||
#[doc(alias = "get_g_value_array")]
|
||||
#[doc(alias = "gst_control_binding_get_g_value_array")]
|
||||
fn g_value_array(
|
||||
|
|
|
@ -4,12 +4,7 @@ use glib::{prelude::*, translate::*};
|
|||
|
||||
use crate::{ClockTime, ControlSource};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::ControlSource>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait ControlSourceExtManual: sealed::Sealed + IsA<ControlSource> + 'static {
|
||||
pub trait ControlSourceExtManual: IsA<ControlSource> + 'static {
|
||||
#[doc(alias = "get_value_array")]
|
||||
#[doc(alias = "gst_control_source_get_value_array")]
|
||||
fn value_array(
|
||||
|
|
|
@ -26,12 +26,8 @@ impl FromGlib<libc::c_uint> for DeviceMonitorFilterId {
|
|||
DeviceMonitorFilterId(NonZeroU32::new_unchecked(val))
|
||||
}
|
||||
}
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::DeviceMonitor>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait DeviceMonitorExtManual: sealed::Sealed + IsA<DeviceMonitor> + 'static {
|
||||
pub trait DeviceMonitorExtManual: IsA<DeviceMonitor> + 'static {
|
||||
#[doc(alias = "gst_device_monitor_add_filter")]
|
||||
fn add_filter(
|
||||
&self,
|
||||
|
|
|
@ -29,12 +29,7 @@ impl DeviceProvider {
|
|||
}
|
||||
}
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::DeviceProvider>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait DeviceProviderExtManual: sealed::Sealed + IsA<DeviceProvider> + 'static {
|
||||
pub trait DeviceProviderExtManual: IsA<DeviceProvider> + 'static {
|
||||
#[doc(alias = "get_metadata")]
|
||||
#[doc(alias = "gst_device_provider_class_get_metadata")]
|
||||
fn metadata<'a>(&self, key: &str) -> Option<&'a str> {
|
||||
|
|
|
@ -102,12 +102,7 @@ impl FromGlib<libc::c_ulong> for NotifyWatchId {
|
|||
}
|
||||
}
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::Element>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait ElementExtManual: sealed::Sealed + IsA<Element> + 'static {
|
||||
pub trait ElementExtManual: IsA<Element> + 'static {
|
||||
#[doc(alias = "get_element_class")]
|
||||
#[inline]
|
||||
fn element_class(&self) -> &glib::Class<Element> {
|
||||
|
|
|
@ -4,12 +4,7 @@ use glib::prelude::*;
|
|||
|
||||
use crate::value::GstValueExt;
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<glib::Object>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait GObjectExtManualGst: sealed::Sealed + IsA<glib::Object> + 'static {
|
||||
pub trait GObjectExtManualGst: IsA<glib::Object> + 'static {
|
||||
#[doc(alias = "gst_util_set_object_arg")]
|
||||
#[track_caller]
|
||||
fn set_property_from_str(&self, name: &str, value: &str) {
|
||||
|
|
|
@ -4,12 +4,7 @@ use glib::{prelude::*, signal::SignalHandlerId, translate::*};
|
|||
|
||||
use crate::{ffi, ClockTime, Object, ObjectFlags};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::Object>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait GstObjectExtManual: sealed::Sealed + IsA<Object> + 'static {
|
||||
pub trait GstObjectExtManual: IsA<Object> + 'static {
|
||||
#[doc(alias = "deep-notify")]
|
||||
fn connect_deep_notify<
|
||||
F: Fn(&Self, &crate::Object, &glib::ParamSpec) + Send + Sync + 'static,
|
||||
|
|
|
@ -195,12 +195,7 @@ pub enum EventForeachAction {
|
|||
Replace(Event),
|
||||
}
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::Pad>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait PadExtManual: sealed::Sealed + IsA<Pad> + 'static {
|
||||
pub trait PadExtManual: IsA<Pad> + 'static {
|
||||
#[doc(alias = "gst_pad_add_probe")]
|
||||
fn add_probe<F>(&self, mask: PadProbeType, func: F) -> Option<PadProbeId>
|
||||
where
|
||||
|
|
|
@ -40,12 +40,7 @@ impl Pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::Pipeline>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait GstPipelineExtManual: sealed::Sealed + IsA<Pipeline> + 'static {
|
||||
pub trait GstPipelineExtManual: IsA<Pipeline> + 'static {
|
||||
fn set_pipeline_flags(&self, flags: PipelineFlags) {
|
||||
unsafe {
|
||||
let ptr: *mut ffi::GstObject = self.as_ptr() as *mut _;
|
||||
|
|
|
@ -7,12 +7,7 @@ use glib::{
|
|||
|
||||
use crate::{ffi, PluginFeature, Rank};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::PluginFeature>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait PluginFeatureExtManual: sealed::Sealed + IsA<PluginFeature> + Sized + 'static {
|
||||
pub trait PluginFeatureExtManual: IsA<PluginFeature> + 'static {
|
||||
#[doc(alias = "get_rank")]
|
||||
#[doc(alias = "gst_plugin_feature_get_rank")]
|
||||
fn rank(&self) -> Rank {
|
||||
|
|
|
@ -4,12 +4,7 @@ use glib::{prelude::*, translate::*};
|
|||
|
||||
use crate::{ffi, tags::*, TagMergeMode, TagSetter};
|
||||
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::TagSetter>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait TagSetterExtManual: sealed::Sealed + IsA<TagSetter> + 'static {
|
||||
pub trait TagSetterExtManual: IsA<TagSetter> + 'static {
|
||||
#[doc(alias = "gst_tag_setter_add_tag_value")]
|
||||
fn add_tag<'a, T: Tag<'a>>(&self, value: &T::TagType, mode: TagMergeMode) {
|
||||
unsafe {
|
||||
|
|
|
@ -10,12 +10,8 @@ unsafe extern "C" fn task_pool_trampoline<P: FnOnce() + Send + 'static>(data: gp
|
|||
let func = Box::from_raw(data as *mut P);
|
||||
func()
|
||||
}
|
||||
mod sealed {
|
||||
pub trait Sealed {}
|
||||
impl<T: super::IsA<super::TaskPool>> Sealed for T {}
|
||||
}
|
||||
|
||||
pub trait TaskPoolExtManual: sealed::Sealed + IsA<TaskPool> + 'static {
|
||||
pub trait TaskPoolExtManual: IsA<TaskPool> + 'static {
|
||||
#[doc(alias = "gst_task_pool_push")]
|
||||
fn push<P: FnOnce() + Send + 'static>(
|
||||
&self,
|
||||
|
|
Loading…
Reference in a new issue