diff --git a/Cargo.toml b/Cargo.toml index 023d2d900..b56652052 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -123,15 +123,32 @@ gobject-sys = { git = "https://github.com/gtk-rs/gtk-rs-core", branch = "master" cairo-rs = { git = "https://github.com/gtk-rs/gtk-rs-core", branch = "master" } pango = { git = "https://github.com/gtk-rs/gtk-rs-core", branch = "master" } pangocairo = { git = "https://github.com/gtk-rs/gtk-rs-core", branch = "master" } +gstreamer-allocators-sys = { path = "gstreamer-allocators/sys" } +gstreamer-analytics-sys = { path = "gstreamer-analytics/sys" } +gstreamer-app-sys = { path = "gstreamer-app/sys" } gstreamer-audio-sys = { path = "./gstreamer-audio/sys"} gstreamer-base-sys = { path = "./gstreamer-base/sys"} +gstreamer-check-sys = { path = "./gstreamer-check/sys" } +gstreamer-controller-sys = { path = "./gstreamer-controller/sys" } +gstreamer-editing-services-sys = { path = "./gstreamer-editing-services/sys"} +gstreamer-gl-egl-sys = { path = "./gstreamer-gl/egl/sys"} +gstreamer-gl-wayland-sys = { path = "./gstreamer-gl/wayland/sys"} +gstreamer-gl-x11-sys = { path = "./gstreamer-gl/x11/sys"} gstreamer-gl-sys = { path = "./gstreamer-gl/sys"} +gstreamer-mpegts-sys = { path = "./gstreamer-mpegts/sys"} gstreamer-net-sys = { path = "./gstreamer-net/sys"} gstreamer-pbutils-sys = { path = "./gstreamer-pbutils/sys"} +gstreamer-play-sys = { path = "./gstreamer-play/sys" } +gstreamer-player-sys = { path = "./gstreamer-player/sys" } +gstreamer-rtp-sys = { path = "./gstreamer-rtp/sys" } gstreamer-rtsp-sys = { path = "./gstreamer-rtsp/sys"} +gstreamer-rtsp-server-sys = { path = "./gstreamer-rtsp-server/sys" } gstreamer-sdp-sys = { path = "./gstreamer-sdp/sys"} +gstreamer-tag-sys = { path = "./gstreamer-tag/sys" } gstreamer-sys = { path = "./gstreamer/sys"} +gstreamer-validate-sys = { path = "./gstreamer-validate/sys" } gstreamer-video-sys = { path = "./gstreamer-video/sys"} +gstreamer-webrtc-sys = { path = "./gstreamer-webrtc/sys" } ges = { package = "gstreamer-editing-services", path = "./gstreamer-editing-services" } gst = { package = "gstreamer", path = "./gstreamer" } gst-allocators = { package = "gstreamer-allocators", path = "./gstreamer-allocators" } diff --git a/gstreamer-allocators/Cargo.toml b/gstreamer-allocators/Cargo.toml index 28b7e72ff..fe6d747c9 100644 --- a/gstreamer-allocators/Cargo.toml +++ b/gstreamer-allocators/Cargo.toml @@ -15,7 +15,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-allocators-sys", path = "sys" } +gstreamer-allocators-sys.workspace = true glib.workspace = true gst.workspace = true once_cell = "1" @@ -25,12 +25,12 @@ gir-format-check = "0.1" [features] default = [] -v1_16 = ["gst/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gstreamer-allocators-sys/v1_16"] +v1_18 = ["gst/v1_18", "gstreamer-allocators-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gstreamer-allocators-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gstreamer-allocators-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gstreamer-allocators-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gstreamer-allocators-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-allocators/src/dma_buf_allocator.rs b/gstreamer-allocators/src/dma_buf_allocator.rs index 2b6ecb213..f0b680f45 100644 --- a/gstreamer-allocators/src/dma_buf_allocator.rs +++ b/gstreamer-allocators/src/dma_buf_allocator.rs @@ -9,7 +9,7 @@ use gst::{Memory, MemoryRef}; #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] use crate::FdMemoryFlags; -use crate::{DmaBufAllocator, FdMemory, FdMemoryRef}; +use crate::{ffi, DmaBufAllocator, FdMemory, FdMemoryRef}; gst::memory_object_wrapper!( DmaBufMemory, diff --git a/gstreamer-allocators/src/drm_dumb_allocator.rs b/gstreamer-allocators/src/drm_dumb_allocator.rs index b98a1e12d..48c5ae582 100644 --- a/gstreamer-allocators/src/drm_dumb_allocator.rs +++ b/gstreamer-allocators/src/drm_dumb_allocator.rs @@ -3,7 +3,7 @@ use std::{fmt, mem, os::unix::prelude::IntoRawFd}; use glib::{prelude::*, translate::*}; use gst::{Memory, MemoryRef}; -use crate::{DRMDumbAllocator, DmaBufMemory}; +use crate::{ffi, DRMDumbAllocator, DmaBufMemory}; gst::memory_object_wrapper!( DRMDumbMemory, diff --git a/gstreamer-allocators/src/fd_allocator.rs b/gstreamer-allocators/src/fd_allocator.rs index a29462687..af9b645ec 100644 --- a/gstreamer-allocators/src/fd_allocator.rs +++ b/gstreamer-allocators/src/fd_allocator.rs @@ -3,7 +3,7 @@ use std::{fmt, os::unix::prelude::RawFd}; use glib::{prelude::*, translate::*}; use gst::{Memory, MemoryRef}; -use crate::{FdAllocator, FdMemoryFlags}; +use crate::{ffi, FdAllocator, FdMemoryFlags}; gst::memory_object_wrapper!( FdMemory, diff --git a/gstreamer-allocators/src/lib.rs b/gstreamer-allocators/src/lib.rs index db0ad174e..3235e7c2e 100644 --- a/gstreamer-allocators/src/lib.rs +++ b/gstreamer-allocators/src/lib.rs @@ -4,9 +4,9 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use glib; pub use gst; +pub use gstreamer_allocators_sys as ffi; macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer-allocators/src/phys_memory.rs b/gstreamer-allocators/src/phys_memory.rs index 1a82dc4be..cb2034595 100644 --- a/gstreamer-allocators/src/phys_memory.rs +++ b/gstreamer-allocators/src/phys_memory.rs @@ -1,5 +1,6 @@ use std::fmt; +use crate::ffi; use glib::translate::*; use gst::{Memory, MemoryRef}; diff --git a/gstreamer-allocators/src/shm_allocator.rs b/gstreamer-allocators/src/shm_allocator.rs index 2ac05c9e2..f110978b8 100644 --- a/gstreamer-allocators/src/shm_allocator.rs +++ b/gstreamer-allocators/src/shm_allocator.rs @@ -1,6 +1,6 @@ use glib::translate::*; -use crate::ShmAllocator; +use crate::{ffi, ShmAllocator}; impl ShmAllocator { #[doc(alias = "gst_shm_allocator_get")] diff --git a/gstreamer-analytics/Cargo.toml b/gstreamer-analytics/Cargo.toml index f9f2d836a..f28429174 100644 --- a/gstreamer-analytics/Cargo.toml +++ b/gstreamer-analytics/Cargo.toml @@ -15,7 +15,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-analytics-sys", path = "sys" } +gstreamer-analytics-sys.workspace = true glib.workspace = true gst.workspace = true @@ -24,7 +24,7 @@ gir-format-check = "0.1" [features] default = [] -v1_26 = ["gst/v1_26", "ffi/v1_26"] +v1_26 = ["gst/v1_26", "gstreamer-analytics-sys/v1_26"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-analytics/src/classification.rs b/gstreamer-analytics/src/classification.rs index d7166ad6a..43c8f81c7 100644 --- a/gstreamer-analytics/src/classification.rs +++ b/gstreamer-analytics/src/classification.rs @@ -2,7 +2,7 @@ use glib::translate::*; -use crate::relation_meta::*; +use crate::{ffi, relation_meta::*}; #[derive(Debug)] pub enum AnalyticsClassificationMtd {} diff --git a/gstreamer-analytics/src/lib.rs b/gstreamer-analytics/src/lib.rs index f22f66ce1..775b6e73c 100644 --- a/gstreamer-analytics/src/lib.rs +++ b/gstreamer-analytics/src/lib.rs @@ -4,9 +4,9 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use glib; pub use gst; +pub use gstreamer_analytics_sys as ffi; macro_rules! skip_assert_initialized { () => {}; diff --git a/gstreamer-analytics/src/object_detection.rs b/gstreamer-analytics/src/object_detection.rs index 443d355b5..2fbcd5a7d 100644 --- a/gstreamer-analytics/src/object_detection.rs +++ b/gstreamer-analytics/src/object_detection.rs @@ -2,7 +2,7 @@ use glib::translate::*; -use crate::relation_meta::*; +use crate::{ffi, relation_meta::*}; #[derive(Debug)] pub enum AnalyticsODMtd {} diff --git a/gstreamer-analytics/src/relation_meta.rs b/gstreamer-analytics/src/relation_meta.rs index 3fb566ddc..03bff5ee5 100644 --- a/gstreamer-analytics/src/relation_meta.rs +++ b/gstreamer-analytics/src/relation_meta.rs @@ -4,7 +4,7 @@ use glib::translate::*; use gst::prelude::*; use std::marker::PhantomData; -use crate::RelTypes; +use crate::{ffi, RelTypes}; #[repr(transparent)] #[doc(alias = "GstAnalyticsRelationMeta")] diff --git a/gstreamer-analytics/src/tracking.rs b/gstreamer-analytics/src/tracking.rs index c8820726c..a5388c1d9 100644 --- a/gstreamer-analytics/src/tracking.rs +++ b/gstreamer-analytics/src/tracking.rs @@ -2,7 +2,7 @@ use glib::translate::*; -use crate::relation_meta::*; +use crate::{ffi, relation_meta::*}; #[derive(Debug)] pub enum AnalyticsTrackingMtd {} diff --git a/gstreamer-app/Cargo.toml b/gstreamer-app/Cargo.toml index 142a57e5f..51058f60b 100644 --- a/gstreamer-app/Cargo.toml +++ b/gstreamer-app/Cargo.toml @@ -17,7 +17,7 @@ rust-version.workspace = true futures-core = "0.3" futures-sink = "0.3" libc = "0.2" -ffi = { package = "gstreamer-app-sys", path = "sys" } +gstreamer-app-sys.workspace = true glib.workspace = true gst.workspace = true gst-base.workspace = true @@ -29,12 +29,12 @@ gir-format-check = "0.1" [features] default = [] -v1_16 = ["gst/v1_16", "gst-base/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "gst-base/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "gst-base/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "gst-base/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "gst-base/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "gst-base/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gst-base/v1_16", "gstreamer-app-sys/v1_16"] +v1_18 = ["gst/v1_18", "gst-base/v1_18", "gstreamer-app-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gst-base/v1_20", "gstreamer-app-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gst-base/v1_22", "gstreamer-app-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gst-base/v1_24", "gstreamer-app-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gst-base/v1_26", "gstreamer-app-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-app/src/app_sink.rs b/gstreamer-app/src/app_sink.rs index 4d478f6ef..018d0c584 100644 --- a/gstreamer-app/src/app_sink.rs +++ b/gstreamer-app/src/app_sink.rs @@ -14,7 +14,7 @@ use std::sync::atomic::{AtomicBool, Ordering}; use futures_core::Stream; use glib::{ffi::gpointer, prelude::*, translate::*}; -use crate::AppSink; +use crate::{ffi, AppSink}; #[allow(clippy::type_complexity)] pub struct AppSinkCallbacks { diff --git a/gstreamer-app/src/app_src.rs b/gstreamer-app/src/app_src.rs index 0e63f9100..604e681ec 100644 --- a/gstreamer-app/src/app_src.rs +++ b/gstreamer-app/src/app_src.rs @@ -18,7 +18,7 @@ use glib::{ translate::*, }; -use crate::AppSrc; +use crate::{ffi, AppSrc}; #[allow(clippy::type_complexity)] pub struct AppSrcCallbacks { diff --git a/gstreamer-app/src/lib.rs b/gstreamer-app/src/lib.rs index a1c20bd8c..ae1e0765a 100644 --- a/gstreamer-app/src/lib.rs +++ b/gstreamer-app/src/lib.rs @@ -4,10 +4,10 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use glib; pub use gst; pub use gst_base; +pub use gstreamer_app_sys as ffi; macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer-audio/Cargo.toml b/gstreamer-audio/Cargo.toml index 1f4f8e97a..67711150a 100644 --- a/gstreamer-audio/Cargo.toml +++ b/gstreamer-audio/Cargo.toml @@ -16,7 +16,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" cfg-if = "1.0" -ffi = { package = "gstreamer-audio-sys", path = "sys" } +gstreamer-audio-sys.workspace = true glib.workspace = true gst.workspace = true gst-base.workspace = true @@ -31,12 +31,12 @@ gir-format-check = "0.1" [features] default = [] -v1_16 = ["gst/v1_16", "gst-base/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "gst-base/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "gst-base/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "gst-base/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "gst-base/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "gst-base/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gst-base/v1_16", "gstreamer-audio-sys/v1_16"] +v1_18 = ["gst/v1_18", "gst-base/v1_18", "gstreamer-audio-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gst-base/v1_20", "gstreamer-audio-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gst-base/v1_22", "gstreamer-audio-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gst-base/v1_24", "gstreamer-audio-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gst-base/v1_26", "gstreamer-audio-sys/v1_26", "v1_24"] serde = ["dep:serde", "gst/serde"] [package.metadata.docs.rs] diff --git a/gstreamer-audio/src/audio_aggregator.rs b/gstreamer-audio/src/audio_aggregator.rs index 473bd0fdc..fb89e3058 100644 --- a/gstreamer-audio/src/audio_aggregator.rs +++ b/gstreamer-audio/src/audio_aggregator.rs @@ -8,7 +8,7 @@ use glib::signal::{connect_raw, SignalHandlerId}; use glib::translate::*; use gst::prelude::*; -use crate::auto::{AudioAggregator, AudioAggregatorPad}; +use crate::{ffi, AudioAggregator, AudioAggregatorPad}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-audio/src/audio_aggregator_convert_pad.rs b/gstreamer-audio/src/audio_aggregator_convert_pad.rs index 26c588d4e..8a852b2de 100644 --- a/gstreamer-audio/src/audio_aggregator_convert_pad.rs +++ b/gstreamer-audio/src/audio_aggregator_convert_pad.rs @@ -6,7 +6,7 @@ use glib::{ translate::*, }; -use crate::auto::AudioAggregatorConvertPad; +use crate::{ffi, AudioAggregatorConvertPad}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-audio/src/audio_aggregator_pad.rs b/gstreamer-audio/src/audio_aggregator_pad.rs index cf3910e62..8bd99da9c 100644 --- a/gstreamer-audio/src/audio_aggregator_pad.rs +++ b/gstreamer-audio/src/audio_aggregator_pad.rs @@ -1,7 +1,7 @@ -use glib::{object::IsA, translate::*}; +use glib::translate::*; use gst::prelude::*; -use crate::auto::AudioAggregatorPad; +use crate::{ffi, AudioAggregatorPad}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-audio/src/audio_buffer.rs b/gstreamer-audio/src/audio_buffer.rs index 20159489e..682593ff6 100644 --- a/gstreamer-audio/src/audio_buffer.rs +++ b/gstreamer-audio/src/audio_buffer.rs @@ -2,6 +2,7 @@ use std::{fmt, marker::PhantomData, mem, ops, ptr, slice}; +use crate::ffi; use glib::translate::*; use smallvec::SmallVec; diff --git a/gstreamer-audio/src/audio_channel_position.rs b/gstreamer-audio/src/audio_channel_position.rs index fe0eddccb..6a983a0fe 100644 --- a/gstreamer-audio/src/audio_channel_position.rs +++ b/gstreamer-audio/src/audio_channel_position.rs @@ -2,6 +2,7 @@ use std::{mem, slice}; +use crate::ffi; use glib::{prelude::*, translate::*, value::FromValue, Type}; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] diff --git a/gstreamer-audio/src/audio_decoder.rs b/gstreamer-audio/src/audio_decoder.rs index 95cd74e56..a000df4ff 100644 --- a/gstreamer-audio/src/audio_decoder.rs +++ b/gstreamer-audio/src/audio_decoder.rs @@ -4,7 +4,7 @@ use std::{mem, ptr}; use glib::{prelude::*, translate::*}; -use crate::{AudioDecoder, AudioInfo}; +use crate::{ffi, AudioDecoder, AudioInfo}; extern "C" { fn _gst_audio_decoder_error( diff --git a/gstreamer-audio/src/audio_encoder.rs b/gstreamer-audio/src/audio_encoder.rs index 261994dd8..23e101b84 100644 --- a/gstreamer-audio/src/audio_encoder.rs +++ b/gstreamer-audio/src/audio_encoder.rs @@ -4,7 +4,7 @@ use std::{mem, ptr}; use glib::{prelude::*, translate::*}; -use crate::AudioEncoder; +use crate::{ffi, AudioEncoder}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-audio/src/audio_filter.rs b/gstreamer-audio/src/audio_filter.rs index 18545c571..e6eb41a6a 100644 --- a/gstreamer-audio/src/audio_filter.rs +++ b/gstreamer-audio/src/audio_filter.rs @@ -3,7 +3,7 @@ use glib::{prelude::*, translate::*}; use gst_base::prelude::*; -use crate::{AudioFilter, AudioInfo}; +use crate::{ffi, AudioFilter, AudioInfo}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-audio/src/audio_format.rs b/gstreamer-audio/src/audio_format.rs index 1c5578e09..80091b92f 100644 --- a/gstreamer-audio/src/audio_format.rs +++ b/gstreamer-audio/src/audio_format.rs @@ -2,6 +2,7 @@ use std::str; +use crate::ffi; use glib::translate::{from_glib, IntoGlib}; use once_cell::sync::Lazy; diff --git a/gstreamer-audio/src/audio_format_info.rs b/gstreamer-audio/src/audio_format_info.rs index f22beabf7..6952abd8f 100644 --- a/gstreamer-audio/src/audio_format_info.rs +++ b/gstreamer-audio/src/audio_format_info.rs @@ -2,6 +2,7 @@ use std::{cmp::Ordering, fmt, marker::PhantomData, str}; +use crate::ffi; use glib::{ prelude::*, translate::{from_glib, from_glib_none, FromGlib, IntoGlib, ToGlibPtr, ToGlibPtrMut}, diff --git a/gstreamer-audio/src/audio_info.rs b/gstreamer-audio/src/audio_info.rs index 595ba4154..c85977dd5 100644 --- a/gstreamer-audio/src/audio_info.rs +++ b/gstreamer-audio/src/audio_info.rs @@ -2,6 +2,7 @@ use std::{fmt, marker::PhantomData, mem, ptr, slice}; +use crate::ffi; use glib::translate::{ from_glib, from_glib_full, from_glib_none, IntoGlib, ToGlibPtr, ToGlibPtrMut, }; diff --git a/gstreamer-audio/src/audio_meta.rs b/gstreamer-audio/src/audio_meta.rs index 17080a5d7..7a831610e 100644 --- a/gstreamer-audio/src/audio_meta.rs +++ b/gstreamer-audio/src/audio_meta.rs @@ -14,6 +14,8 @@ use glib::translate::{from_glib, IntoGlib}; use glib::translate::{from_glib_none, ToGlibPtr}; use gst::prelude::*; +use crate::ffi; + #[repr(transparent)] #[doc(alias = "GstAudioClippingMeta")] pub struct AudioClippingMeta(ffi::GstAudioClippingMeta); @@ -295,11 +297,14 @@ impl fmt::Debug for AudioLevelMeta { } pub mod tags { - gst::impl_meta_tag!(Audio, GST_META_TAG_AUDIO_STR); - gst::impl_meta_tag!(Channels, GST_META_TAG_AUDIO_CHANNELS_STR); - gst::impl_meta_tag!(Rate, GST_META_TAG_AUDIO_RATE_STR); + gst::impl_meta_tag!(Audio, crate::ffi::GST_META_TAG_AUDIO_STR); + gst::impl_meta_tag!(Channels, crate::ffi::GST_META_TAG_AUDIO_CHANNELS_STR); + gst::impl_meta_tag!(Rate, crate::ffi::GST_META_TAG_AUDIO_RATE_STR); #[cfg(feature = "v1_24")] - gst::impl_meta_tag!(DSDPlaneOffsets, GST_META_TAG_DSD_PLANE_OFFSETS_STR); + gst::impl_meta_tag!( + DSDPlaneOffsets, + crate::ffi::GST_META_TAG_DSD_PLANE_OFFSETS_STR + ); } #[cfg(test)] diff --git a/gstreamer-audio/src/audio_ring_buffer_spec.rs b/gstreamer-audio/src/audio_ring_buffer_spec.rs index e3a5d5fdc..5e054d008 100644 --- a/gstreamer-audio/src/audio_ring_buffer_spec.rs +++ b/gstreamer-audio/src/audio_ring_buffer_spec.rs @@ -5,10 +5,10 @@ use std::fmt; use glib::translate::*; use gst::Caps; -use crate::{ffi::GstAudioRingBufferSpec, AudioInfo, AudioRingBufferFormatType}; +use crate::{ffi, AudioInfo, AudioRingBufferFormatType}; #[repr(transparent)] -pub struct AudioRingBufferSpec(pub(crate) GstAudioRingBufferSpec); +pub struct AudioRingBufferSpec(pub(crate) ffi::GstAudioRingBufferSpec); impl AudioRingBufferSpec { #[doc(alias = "get_type")] diff --git a/gstreamer-audio/src/audio_stream_align.rs b/gstreamer-audio/src/audio_stream_align.rs index af82ac6ca..855052467 100644 --- a/gstreamer-audio/src/audio_stream_align.rs +++ b/gstreamer-audio/src/audio_stream_align.rs @@ -18,7 +18,7 @@ impl AudioStreamAlign { let mut out_timestamp = mem::MaybeUninit::uninit(); let mut out_duration = mem::MaybeUninit::uninit(); let mut out_sample_position = mem::MaybeUninit::uninit(); - let ret = from_glib(ffi::gst_audio_stream_align_process( + let ret = from_glib(crate::ffi::gst_audio_stream_align_process( self.to_glib_none_mut().0, discont.into_glib(), timestamp.into_glib(), diff --git a/gstreamer-audio/src/functions.rs b/gstreamer-audio/src/functions.rs index 67c322628..d7f368ce4 100644 --- a/gstreamer-audio/src/functions.rs +++ b/gstreamer-audio/src/functions.rs @@ -2,6 +2,7 @@ use std::i32; +use crate::ffi; use glib::translate::{from_glib_full, IntoGlibPtr, ToGlibPtr}; #[doc(alias = "gst_audio_buffer_clip")] diff --git a/gstreamer-audio/src/lib.rs b/gstreamer-audio/src/lib.rs index 8968a95f5..ca995847f 100644 --- a/gstreamer-audio/src/lib.rs +++ b/gstreamer-audio/src/lib.rs @@ -4,10 +4,10 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use glib; pub use gst; pub use gst_base; +pub use gstreamer_audio_sys as ffi; macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer-audio/src/subclass/audio_aggregator.rs b/gstreamer-audio/src/subclass/audio_aggregator.rs index 6c6f67a1e..1fa751d5a 100644 --- a/gstreamer-audio/src/subclass/audio_aggregator.rs +++ b/gstreamer-audio/src/subclass/audio_aggregator.rs @@ -5,7 +5,7 @@ use std::ptr; use glib::translate::*; use gst_base::{prelude::*, subclass::prelude::*}; -use crate::{AudioAggregator, AudioAggregatorPad}; +use crate::{ffi, AudioAggregator, AudioAggregatorPad}; pub trait AudioAggregatorImpl: AudioAggregatorImplExt + AggregatorImpl { fn create_output_buffer(&self, num_frames: u32) -> Option { diff --git a/gstreamer-audio/src/subclass/audio_aggregator_pad.rs b/gstreamer-audio/src/subclass/audio_aggregator_pad.rs index 0d021dad3..ddeee83a9 100644 --- a/gstreamer-audio/src/subclass/audio_aggregator_pad.rs +++ b/gstreamer-audio/src/subclass/audio_aggregator_pad.rs @@ -5,7 +5,7 @@ use std::ptr; use glib::translate::*; use gst_base::{prelude::*, subclass::prelude::*}; -use crate::AudioAggregatorPad; +use crate::{ffi, AudioAggregatorPad}; pub trait AudioAggregatorPadImpl: AudioAggregatorPadImplExt + AggregatorPadImpl { const HANDLE_CONVERSION: bool = false; diff --git a/gstreamer-audio/src/subclass/audio_decoder.rs b/gstreamer-audio/src/subclass/audio_decoder.rs index 568c9f2d8..381e79087 100644 --- a/gstreamer-audio/src/subclass/audio_decoder.rs +++ b/gstreamer-audio/src/subclass/audio_decoder.rs @@ -5,7 +5,7 @@ use std::{mem, ptr}; use glib::translate::*; use gst::subclass::prelude::*; -use crate::{prelude::*, AudioDecoder}; +use crate::{ffi, prelude::*, AudioDecoder}; pub trait AudioDecoderImpl: AudioDecoderImplExt + ElementImpl { fn open(&self) -> Result<(), gst::ErrorMessage> { diff --git a/gstreamer-audio/src/subclass/audio_encoder.rs b/gstreamer-audio/src/subclass/audio_encoder.rs index 8888ab33b..59991527c 100644 --- a/gstreamer-audio/src/subclass/audio_encoder.rs +++ b/gstreamer-audio/src/subclass/audio_encoder.rs @@ -5,7 +5,7 @@ use std::ptr; use glib::translate::*; use gst::subclass::prelude::*; -use crate::{prelude::*, AudioEncoder, AudioInfo}; +use crate::{ffi, prelude::*, AudioEncoder, AudioInfo}; pub trait AudioEncoderImpl: AudioEncoderImplExt + ElementImpl { fn open(&self) -> Result<(), gst::ErrorMessage> { diff --git a/gstreamer-audio/src/subclass/audio_filter.rs b/gstreamer-audio/src/subclass/audio_filter.rs index 582d2fac8..ed306f87d 100644 --- a/gstreamer-audio/src/subclass/audio_filter.rs +++ b/gstreamer-audio/src/subclass/audio_filter.rs @@ -3,7 +3,7 @@ use glib::translate::*; use gst_base::{prelude::*, subclass::prelude::*}; -use crate::{AudioFilter, AudioInfo}; +use crate::{ffi, AudioFilter, AudioInfo}; pub trait AudioFilterImpl: AudioFilterImplExt + BaseTransformImpl { fn allowed_caps() -> &'static gst::Caps { diff --git a/gstreamer-audio/src/subclass/audio_sink.rs b/gstreamer-audio/src/subclass/audio_sink.rs index eb25c2575..043a757d5 100644 --- a/gstreamer-audio/src/subclass/audio_sink.rs +++ b/gstreamer-audio/src/subclass/audio_sink.rs @@ -5,7 +5,7 @@ use gst::LoggableError; use gst_base::subclass::prelude::*; use super::prelude::*; -use crate::{AudioRingBufferSpec, AudioSink}; +use crate::{ffi, AudioRingBufferSpec, AudioSink}; pub trait AudioSinkImpl: AudioSinkImplExt + AudioBaseSinkImpl { fn close(&self) -> Result<(), LoggableError> { diff --git a/gstreamer-audio/src/subclass/audio_src.rs b/gstreamer-audio/src/subclass/audio_src.rs index eb3c46acf..891f3e49f 100644 --- a/gstreamer-audio/src/subclass/audio_src.rs +++ b/gstreamer-audio/src/subclass/audio_src.rs @@ -7,7 +7,7 @@ use gst::LoggableError; use gst_base::subclass::prelude::*; use super::prelude::*; -use crate::{AudioRingBufferSpec, AudioSrc}; +use crate::{ffi, AudioRingBufferSpec, AudioSrc}; pub trait AudioSrcImpl: AudioSrcImplExt + AudioBaseSrcImpl { fn close(&self) -> Result<(), LoggableError> { diff --git a/gstreamer-base/Cargo.toml b/gstreamer-base/Cargo.toml index 161363972..a86342eab 100644 --- a/gstreamer-base/Cargo.toml +++ b/gstreamer-base/Cargo.toml @@ -16,7 +16,7 @@ rust-version.workspace = true [dependencies] cfg-if = "1.0" libc = "0.2" -ffi = { package = "gstreamer-base-sys", path = "sys" } +gstreamer-base-sys.workspace = true glib.workspace = true gst.workspace = true atomic_refcell = "0.1" @@ -26,13 +26,13 @@ gir-format-check = "0.1" [features] default = [] -v1_14_1 = ["ffi/v1_14_1"] -v1_16 = ["gst/v1_16", "ffi/v1_16", "v1_14_1"] -v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "ffi/v1_26", "v1_24"] +v1_14_1 = ["gstreamer-base-sys/v1_14_1"] +v1_16 = ["gst/v1_16", "gstreamer-base-sys/v1_16", "v1_14_1"] +v1_18 = ["gst/v1_18", "gstreamer-base-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gstreamer-base-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gstreamer-base-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gstreamer-base-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gstreamer-base-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-base/src/adapter.rs b/gstreamer-base/src/adapter.rs index 6fec3efde..1fbc7d584 100644 --- a/gstreamer-base/src/adapter.rs +++ b/gstreamer-base/src/adapter.rs @@ -4,7 +4,7 @@ use std::{io, mem, ops}; use glib::translate::*; -use crate::Adapter; +use crate::{ffi, Adapter}; impl Adapter { #[doc(alias = "gst_adapter_copy")] diff --git a/gstreamer-base/src/aggregator.rs b/gstreamer-base/src/aggregator.rs index 33d849bae..04e74c777 100644 --- a/gstreamer-base/src/aggregator.rs +++ b/gstreamer-base/src/aggregator.rs @@ -14,8 +14,7 @@ use glib::signal::{connect_raw, SignalHandlerId}; use glib::{prelude::*, translate::*}; use gst::{format::FormattedValue, prelude::*}; -use crate::Aggregator; -use crate::AggregatorPad; +use crate::{ffi, Aggregator, AggregatorPad}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-base/src/aggregator_pad.rs b/gstreamer-base/src/aggregator_pad.rs index 3456eab8a..fedd04fc9 100644 --- a/gstreamer-base/src/aggregator_pad.rs +++ b/gstreamer-base/src/aggregator_pad.rs @@ -3,7 +3,7 @@ use glib::{prelude::*, translate::*}; use gst::prelude::*; -use crate::AggregatorPad; +use crate::{ffi, AggregatorPad}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-base/src/base_parse.rs b/gstreamer-base/src/base_parse.rs index 415e69e21..fca514ee2 100644 --- a/gstreamer-base/src/base_parse.rs +++ b/gstreamer-base/src/base_parse.rs @@ -8,7 +8,7 @@ use gst::{ prelude::*, }; -use crate::{BaseParse, BaseParseFrame}; +use crate::{ffi, BaseParse, BaseParseFrame}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-base/src/base_parse_frame.rs b/gstreamer-base/src/base_parse_frame.rs index a8c1aefbe..f9c5032ad 100644 --- a/gstreamer-base/src/base_parse_frame.rs +++ b/gstreamer-base/src/base_parse_frame.rs @@ -4,7 +4,7 @@ use std::{fmt, marker::PhantomData, ptr}; use glib::translate::*; -use crate::{BaseParse, BaseParseFrameFlags}; +use crate::{ffi, BaseParse, BaseParseFrameFlags}; pub struct BaseParseFrame<'a>( ptr::NonNull, diff --git a/gstreamer-base/src/base_sink.rs b/gstreamer-base/src/base_sink.rs index b65c8add2..23fd7c270 100644 --- a/gstreamer-base/src/base_sink.rs +++ b/gstreamer-base/src/base_sink.rs @@ -5,7 +5,7 @@ use std::mem; use glib::{prelude::*, translate::*}; use gst::prelude::*; -use crate::BaseSink; +use crate::{ffi, BaseSink}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-base/src/base_src.rs b/gstreamer-base/src/base_src.rs index a2b2ff625..09ca0e13d 100644 --- a/gstreamer-base/src/base_src.rs +++ b/gstreamer-base/src/base_src.rs @@ -5,7 +5,7 @@ use std::{mem, ptr}; use glib::{prelude::*, translate::*}; use gst::prelude::*; -use crate::BaseSrc; +use crate::{ffi, BaseSrc}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-base/src/base_transform.rs b/gstreamer-base/src/base_transform.rs index 57441a048..3bcfbf557 100644 --- a/gstreamer-base/src/base_transform.rs +++ b/gstreamer-base/src/base_transform.rs @@ -5,7 +5,7 @@ use std::{mem, ptr}; use glib::{prelude::*, translate::*}; use gst::prelude::*; -use crate::BaseTransform; +use crate::{ffi, BaseTransform}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-base/src/flow_combiner.rs b/gstreamer-base/src/flow_combiner.rs index fdccc2be1..eb018f1ca 100644 --- a/gstreamer-base/src/flow_combiner.rs +++ b/gstreamer-base/src/flow_combiner.rs @@ -1,5 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. +use crate::ffi; use glib::{prelude::*, translate::*}; glib::wrapper! { diff --git a/gstreamer-base/src/functions.rs b/gstreamer-base/src/functions.rs index ef0493dac..69f4da91e 100644 --- a/gstreamer-base/src/functions.rs +++ b/gstreamer-base/src/functions.rs @@ -3,6 +3,7 @@ use std::mem; pub use crate::auto::functions::*; +use crate::ffi; use glib::{prelude::*, translate::*}; #[doc(alias = "gst_type_find_helper_for_data")] diff --git a/gstreamer-base/src/lib.rs b/gstreamer-base/src/lib.rs index 465b3f476..9c3572d50 100644 --- a/gstreamer-base/src/lib.rs +++ b/gstreamer-base/src/lib.rs @@ -4,9 +4,9 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use glib; pub use gst; +pub use gstreamer_base_sys as ffi; macro_rules! assert_initialized_main_thread { () => { @@ -20,6 +20,7 @@ macro_rules! skip_assert_initialized { () => {}; } +#[allow(unused_imports)] mod auto; pub use crate::auto::*; diff --git a/gstreamer-base/src/subclass/aggregator.rs b/gstreamer-base/src/subclass/aggregator.rs index d891fe95e..9e5177b76 100644 --- a/gstreamer-base/src/subclass/aggregator.rs +++ b/gstreamer-base/src/subclass/aggregator.rs @@ -5,7 +5,7 @@ use std::ptr; use glib::{prelude::*, translate::*}; use gst::subclass::prelude::*; -use crate::{Aggregator, AggregatorPad}; +use crate::{ffi, Aggregator, AggregatorPad}; pub trait AggregatorImpl: AggregatorImplExt + ElementImpl { fn flush(&self) -> Result { diff --git a/gstreamer-base/src/subclass/aggregator_pad.rs b/gstreamer-base/src/subclass/aggregator_pad.rs index b4b14bf51..264244f59 100644 --- a/gstreamer-base/src/subclass/aggregator_pad.rs +++ b/gstreamer-base/src/subclass/aggregator_pad.rs @@ -3,7 +3,7 @@ use glib::{prelude::*, translate::*}; use gst::subclass::prelude::*; -use crate::{Aggregator, AggregatorPad}; +use crate::{ffi, Aggregator, AggregatorPad}; pub trait AggregatorPadImpl: AggregatorPadImplExt + PadImpl { fn flush(&self, aggregator: &Aggregator) -> Result { diff --git a/gstreamer-base/src/subclass/base_parse.rs b/gstreamer-base/src/subclass/base_parse.rs index 9f145dd44..0560fcb66 100644 --- a/gstreamer-base/src/subclass/base_parse.rs +++ b/gstreamer-base/src/subclass/base_parse.rs @@ -5,7 +5,7 @@ use std::mem; use glib::translate::*; use gst::subclass::prelude::*; -use crate::{prelude::*, BaseParse, BaseParseFrame}; +use crate::{ffi, prelude::*, BaseParse, BaseParseFrame}; pub trait BaseParseImpl: BaseParseImplExt + ElementImpl { fn start(&self) -> Result<(), gst::ErrorMessage> { diff --git a/gstreamer-base/src/subclass/base_sink.rs b/gstreamer-base/src/subclass/base_sink.rs index 0f3cc01ae..773ba1e92 100644 --- a/gstreamer-base/src/subclass/base_sink.rs +++ b/gstreamer-base/src/subclass/base_sink.rs @@ -5,7 +5,7 @@ use std::ptr; use glib::{prelude::*, translate::*}; use gst::subclass::prelude::*; -use crate::BaseSink; +use crate::{ffi, BaseSink}; pub trait BaseSinkImpl: BaseSinkImplExt + ElementImpl { fn start(&self) -> Result<(), gst::ErrorMessage> { diff --git a/gstreamer-base/src/subclass/base_src.rs b/gstreamer-base/src/subclass/base_src.rs index 327eb0fbb..efcc39450 100644 --- a/gstreamer-base/src/subclass/base_src.rs +++ b/gstreamer-base/src/subclass/base_src.rs @@ -6,7 +6,7 @@ use atomic_refcell::AtomicRefCell; use glib::{prelude::*, translate::*}; use gst::{prelude::*, subclass::prelude::*}; -use crate::{prelude::BaseSrcExtManual, BaseSrc}; +use crate::{ffi, prelude::*, BaseSrc}; #[derive(Default)] pub(super) struct InstanceData { diff --git a/gstreamer-base/src/subclass/base_transform.rs b/gstreamer-base/src/subclass/base_transform.rs index 330e31d1e..23f07b957 100644 --- a/gstreamer-base/src/subclass/base_transform.rs +++ b/gstreamer-base/src/subclass/base_transform.rs @@ -5,7 +5,7 @@ use std::{mem, ptr}; use glib::translate::*; use gst::subclass::prelude::*; -use crate::{prelude::*, BaseTransform}; +use crate::{ffi, prelude::*, BaseTransform}; #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum BaseTransformMode { diff --git a/gstreamer-base/src/subclass/push_src.rs b/gstreamer-base/src/subclass/push_src.rs index 6782b0e05..6a7c15d5c 100644 --- a/gstreamer-base/src/subclass/push_src.rs +++ b/gstreamer-base/src/subclass/push_src.rs @@ -6,7 +6,7 @@ use glib::{prelude::*, subclass::prelude::*, translate::*}; use gst::prelude::*; use super::base_src::{BaseSrcImpl, CreateSuccess}; -use crate::{prelude::BaseSrcExtManual, PushSrc}; +use crate::{ffi, prelude::*, PushSrc}; pub trait PushSrcImpl: PushSrcImplExt + BaseSrcImpl { fn fill(&self, buffer: &mut gst::BufferRef) -> Result { diff --git a/gstreamer-check/Cargo.toml b/gstreamer-check/Cargo.toml index f48eea5bf..e9de5690a 100644 --- a/gstreamer-check/Cargo.toml +++ b/gstreamer-check/Cargo.toml @@ -14,7 +14,7 @@ edition.workspace = true rust-version.workspace = true [dependencies] -ffi = { package = "gstreamer-check-sys", path = "sys" } +gstreamer-check-sys.workspace = true glib.workspace = true gst.workspace = true @@ -23,12 +23,12 @@ gir-format-check = "0.1" [features] default = [] -v1_16 = ["gst/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gstreamer-check-sys/v1_16"] +v1_18 = ["gst/v1_18", "gstreamer-check-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gstreamer-check-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gstreamer-check-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gstreamer-check-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gstreamer-check-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-check/src/harness.rs b/gstreamer-check/src/harness.rs index 71e817435..ec8331cb9 100644 --- a/gstreamer-check/src/harness.rs +++ b/gstreamer-check/src/harness.rs @@ -5,7 +5,7 @@ use std::{mem, ops, path, ptr}; use glib::translate::*; use gst::prelude::*; -use crate::TestClock; +use crate::{ffi, TestClock}; #[derive(Debug)] #[doc(alias = "GstHarness")] diff --git a/gstreamer-check/src/lib.rs b/gstreamer-check/src/lib.rs index 1ce82c5a1..cfe268fc2 100644 --- a/gstreamer-check/src/lib.rs +++ b/gstreamer-check/src/lib.rs @@ -4,9 +4,9 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use glib; pub use gst; +pub use gstreamer_check_sys as ffi; macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer-check/src/test_clock.rs b/gstreamer-check/src/test_clock.rs index abe7c184f..9780ba280 100644 --- a/gstreamer-check/src/test_clock.rs +++ b/gstreamer-check/src/test_clock.rs @@ -4,7 +4,7 @@ use std::ptr; use glib::translate::*; -use crate::TestClock; +use crate::{ffi, TestClock}; impl TestClock { #[doc(alias = "gst_test_clock_has_id")] diff --git a/gstreamer-controller/Cargo.toml b/gstreamer-controller/Cargo.toml index cc0d35b43..0f161df1c 100644 --- a/gstreamer-controller/Cargo.toml +++ b/gstreamer-controller/Cargo.toml @@ -14,7 +14,7 @@ edition.workspace = true rust-version.workspace = true [dependencies] -ffi = { package = "gstreamer-controller-sys", path = "sys" } +gstreamer-controller-sys.workspace = true glib.workspace = true gst.workspace = true @@ -23,12 +23,12 @@ gir-format-check = "0.1" [features] default = [] -v1_16 = ["gst/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gstreamer-controller-sys/v1_16"] +v1_18 = ["gst/v1_18", "gstreamer-controller-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gstreamer-controller-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gstreamer-controller-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gstreamer-controller-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gstreamer-controller-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-controller/src/control_point.rs b/gstreamer-controller/src/control_point.rs index d0a056612..57a03c8b3 100644 --- a/gstreamer-controller/src/control_point.rs +++ b/gstreamer-controller/src/control_point.rs @@ -2,6 +2,8 @@ use glib::translate::*; +use crate::ffi; + glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] #[doc(alias = "GstControlPoint")] diff --git a/gstreamer-controller/src/lib.rs b/gstreamer-controller/src/lib.rs index 6abe7647a..7caf866f5 100644 --- a/gstreamer-controller/src/lib.rs +++ b/gstreamer-controller/src/lib.rs @@ -4,9 +4,9 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use glib; pub use gst; +pub use gstreamer_controller_sys as ffi; macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer-editing-services/Cargo.toml b/gstreamer-editing-services/Cargo.toml index e4383021b..92efb3564 100644 --- a/gstreamer-editing-services/Cargo.toml +++ b/gstreamer-editing-services/Cargo.toml @@ -15,7 +15,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-editing-services-sys", path = "sys"} +gstreamer-editing-services-sys.workspace = true glib.workspace = true gio.workspace = true gst.workspace = true @@ -28,12 +28,12 @@ gir-format-check = "0.1" serde_json = "1.0" [features] -v1_16 = ["gst/v1_16", "gst-base/v1_16", "gst-pbutils/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "gst-base/v1_18", "gst-pbutils/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "gst-base/v1_20", "gst-pbutils/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "gst-base/v1_22", "gst-pbutils/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "gst-base/v1_24", "gst-pbutils/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "gst-base/v1_26", "gst-pbutils/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gst-base/v1_16", "gst-pbutils/v1_16", "gstreamer-editing-services-sys/v1_16"] +v1_18 = ["gst/v1_18", "gst-base/v1_18", "gst-pbutils/v1_18", "gstreamer-editing-services-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gst-base/v1_20", "gst-pbutils/v1_20", "gstreamer-editing-services-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gst-base/v1_22", "gst-pbutils/v1_22", "gstreamer-editing-services-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gst-base/v1_24", "gst-pbutils/v1_24", "gstreamer-editing-services-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gst-base/v1_26", "gst-pbutils/v1_26", "gstreamer-editing-services-sys/v1_26", "v1_24"] serde = ["dep:serde", "gst/serde", "gst-pbutils/serde"] [package.metadata.docs.rs] diff --git a/gstreamer-editing-services/src/composition_meta.rs b/gstreamer-editing-services/src/composition_meta.rs index 511764117..c5d0364df 100644 --- a/gstreamer-editing-services/src/composition_meta.rs +++ b/gstreamer-editing-services/src/composition_meta.rs @@ -2,6 +2,7 @@ use std::fmt; +use crate::ffi; use glib::translate::from_glib; use gst::prelude::*; diff --git a/gstreamer-editing-services/src/formatter.rs b/gstreamer-editing-services/src/formatter.rs index fc5444ae3..455002b26 100644 --- a/gstreamer-editing-services/src/formatter.rs +++ b/gstreamer-editing-services/src/formatter.rs @@ -1,5 +1,5 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use crate::{prelude::*, Formatter}; +use crate::{ffi, prelude::*, Formatter}; use gst::glib::translate::*; mod sealed { diff --git a/gstreamer-editing-services/src/lib.rs b/gstreamer-editing-services/src/lib.rs index 9aaecadd8..fdc61c276 100644 --- a/gstreamer-editing-services/src/lib.rs +++ b/gstreamer-editing-services/src/lib.rs @@ -6,13 +6,13 @@ use std::sync::Once; -pub use ffi; pub use gio; pub use glib; use glib::translate::from_glib; pub use gst; pub use gst_base; pub use gst_pbutils; +pub use gstreamer_editing_services_sys as ffi; static GES_INIT: Once = Once::new(); diff --git a/gstreamer-editing-services/src/subclass/formatter.rs b/gstreamer-editing-services/src/subclass/formatter.rs index 03cd9180b..f4baac2e8 100644 --- a/gstreamer-editing-services/src/subclass/formatter.rs +++ b/gstreamer-editing-services/src/subclass/formatter.rs @@ -1,7 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use crate::prelude::*; -use crate::Formatter; +use crate::{ffi, prelude::*, Formatter}; use glib::{subclass::prelude::*, translate::*}; pub trait FormatterImpl: FormatterImplExt + ObjectImpl + Send + Sync { diff --git a/gstreamer-gl/Cargo.toml b/gstreamer-gl/Cargo.toml index 053ea19bf..fc3a5f225 100644 --- a/gstreamer-gl/Cargo.toml +++ b/gstreamer-gl/Cargo.toml @@ -18,7 +18,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-gl-sys", path = "sys" } +gstreamer-gl-sys.workspace = true glib.workspace = true gst.workspace = true gst-base.workspace = true @@ -32,12 +32,12 @@ serde_json = "1.0" [features] default = [] -v1_16 = ["gst/v1_16", "gst-base/v1_16", "gst-video/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "gst-base/v1_18", "gst-video/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "gst-base/v1_20", "gst-video/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "gst-base/v1_22", "gst-video/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "gst-base/v1_24", "gst-video/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "gst-base/v1_26", "gst-video/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gst-base/v1_16", "gst-video/v1_16", "gstreamer-gl-sys/v1_16"] +v1_18 = ["gst/v1_18", "gst-base/v1_18", "gst-video/v1_18", "gstreamer-gl-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gst-base/v1_20", "gst-video/v1_20", "gstreamer-gl-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gst-base/v1_22", "gst-video/v1_22", "gstreamer-gl-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gst-base/v1_24", "gst-video/v1_24", "gstreamer-gl-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gst-base/v1_26", "gst-video/v1_26", "gstreamer-gl-sys/v1_26", "v1_24"] serde = ["dep:serde", "gst/serde", "gst-video/serde"] [package.metadata.docs.rs] diff --git a/gstreamer-gl/egl/Cargo.toml b/gstreamer-gl/egl/Cargo.toml index 01de22b7c..8cbcbe27c 100644 --- a/gstreamer-gl/egl/Cargo.toml +++ b/gstreamer-gl/egl/Cargo.toml @@ -17,7 +17,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-gl-egl-sys", path = "sys" } +gstreamer-gl-egl-sys.workspace = true glib.workspace = true gst.workspace = true gst-gl.workspace = true @@ -27,12 +27,12 @@ gir-format-check = "0.1" [features] default = [] -v1_16 = ["gst/v1_16", "gst-gl/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "gst-gl/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "gst-gl/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "gst-gl/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "gst-gl/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "gst-gl/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gst-gl/v1_16", "gstreamer-gl-egl-sys/v1_16"] +v1_18 = ["gst/v1_18", "gst-gl/v1_18", "gstreamer-gl-egl-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gst-gl/v1_20", "gstreamer-gl-egl-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gst-gl/v1_22", "gstreamer-gl-egl-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gst-gl/v1_24", "gstreamer-gl-egl-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gst-gl/v1_26", "gstreamer-gl-egl-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-gl/egl/src/gl_display_egl.rs b/gstreamer-gl/egl/src/gl_display_egl.rs index 2438cf8fb..b4dce1677 100644 --- a/gstreamer-gl/egl/src/gl_display_egl.rs +++ b/gstreamer-gl/egl/src/gl_display_egl.rs @@ -10,7 +10,7 @@ use glib::{ffi::gpointer, translate::*}; use gst_gl::GLDisplayType; use libc::uintptr_t; -use crate::GLDisplayEGL; +use crate::{ffi, GLDisplayEGL}; impl GLDisplayEGL { #[doc(alias = "gst_gl_display_egl_new_with_egl_display")] diff --git a/gstreamer-gl/egl/src/lib.rs b/gstreamer-gl/egl/src/lib.rs index b7d41b3f0..d39dabdea 100644 --- a/gstreamer-gl/egl/src/lib.rs +++ b/gstreamer-gl/egl/src/lib.rs @@ -9,8 +9,8 @@ #![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] -pub use ffi; pub use gst_gl; +pub use gstreamer_gl_egl_sys as ffi; macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer-gl/src/context.rs b/gstreamer-gl/src/context.rs index e686d92db..44b0135a7 100644 --- a/gstreamer-gl/src/context.rs +++ b/gstreamer-gl/src/context.rs @@ -5,7 +5,7 @@ use std::ptr; use glib::{prelude::*, translate::*}; use gst::ContextRef; -use crate::GLDisplay; +use crate::{ffi, GLDisplay}; pub trait ContextGLExt { #[doc(alias = "get_gl_display")] diff --git a/gstreamer-gl/src/functions.rs b/gstreamer-gl/src/functions.rs index 800559244..73294f736 100644 --- a/gstreamer-gl/src/functions.rs +++ b/gstreamer-gl/src/functions.rs @@ -3,7 +3,7 @@ use std::ptr; use glib::{object::IsA, translate::*}; pub use crate::auto::functions::*; -use crate::{GLContext, GLDisplay}; +use crate::{ffi, GLContext, GLDisplay}; #[doc(alias = "gst_gl_handle_context_query")] pub fn gl_handle_context_query( diff --git a/gstreamer-gl/src/gl_base_memory.rs b/gstreamer-gl/src/gl_base_memory.rs index 610114813..8825182cb 100644 --- a/gstreamer-gl/src/gl_base_memory.rs +++ b/gstreamer-gl/src/gl_base_memory.rs @@ -2,7 +2,7 @@ use ffi::GstGLBaseMemory; use glib::{prelude::*, translate::*}; use gst::{Memory, MemoryRef}; -use crate::{GLAllocationParams, GLBaseMemoryAllocator}; +use crate::{ffi, GLAllocationParams, GLBaseMemoryAllocator}; gst::memory_object_wrapper!( GLBaseMemory, diff --git a/gstreamer-gl/src/gl_context.rs b/gstreamer-gl/src/gl_context.rs index da0508acf..ee7106ea5 100644 --- a/gstreamer-gl/src/gl_context.rs +++ b/gstreamer-gl/src/gl_context.rs @@ -3,7 +3,7 @@ use glib::{prelude::*, translate::*}; use libc::uintptr_t; -use crate::{GLContext, GLDisplay, GLPlatform, GLAPI}; +use crate::{ffi, GLContext, GLDisplay, GLPlatform, GLAPI}; impl GLContext { pub unsafe fn new_wrapped>( diff --git a/gstreamer-gl/src/gl_display.rs b/gstreamer-gl/src/gl_display.rs index 714be5f47..3430e26cc 100644 --- a/gstreamer-gl/src/gl_display.rs +++ b/gstreamer-gl/src/gl_display.rs @@ -1,4 +1,4 @@ -use crate::{GLContext, GLDisplay}; +use crate::{ffi, GLContext, GLDisplay}; use glib::prelude::*; use glib::translate::*; diff --git a/gstreamer-gl/src/gl_framebuffer.rs b/gstreamer-gl/src/gl_framebuffer.rs index 10dce1d7f..fae4df122 100644 --- a/gstreamer-gl/src/gl_framebuffer.rs +++ b/gstreamer-gl/src/gl_framebuffer.rs @@ -1,6 +1,6 @@ use glib::{prelude::*, translate::*}; -use crate::{GLFramebuffer, GLMemoryRef}; +use crate::{ffi, GLFramebuffer, GLMemoryRef}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-gl/src/gl_memory.rs b/gstreamer-gl/src/gl_memory.rs index 75b5a3df0..f5972753a 100644 --- a/gstreamer-gl/src/gl_memory.rs +++ b/gstreamer-gl/src/gl_memory.rs @@ -2,7 +2,7 @@ use ffi::GstGLMemory; use glib::translate::*; use gst::{result_from_gboolean, LoggableError, Memory, MemoryRef, CAT_RUST}; -use crate::{GLBaseMemory, GLBaseMemoryRef, GLFormat, GLTextureTarget}; +use crate::{ffi, GLBaseMemory, GLBaseMemoryRef, GLFormat, GLTextureTarget}; gst::memory_object_wrapper!( GLMemory, diff --git a/gstreamer-gl/src/gl_memory_pbo.rs b/gstreamer-gl/src/gl_memory_pbo.rs index aaa0dde2b..ff9c3d987 100644 --- a/gstreamer-gl/src/gl_memory_pbo.rs +++ b/gstreamer-gl/src/gl_memory_pbo.rs @@ -2,7 +2,7 @@ use ffi::GstGLMemoryPBO; use glib::translate::*; use gst::{Memory, MemoryRef}; -use crate::{GLBaseMemory, GLBaseMemoryRef, GLMemory, GLMemoryRef}; +use crate::{ffi, GLBaseMemory, GLBaseMemoryRef, GLMemory, GLMemoryRef}; gst::memory_object_wrapper!( GLMemoryPBO, diff --git a/gstreamer-gl/src/gl_sync_meta.rs b/gstreamer-gl/src/gl_sync_meta.rs index 9d46079d6..6370e47ea 100644 --- a/gstreamer-gl/src/gl_sync_meta.rs +++ b/gstreamer-gl/src/gl_sync_meta.rs @@ -5,7 +5,7 @@ use std::fmt; use glib::translate::*; use gst::prelude::*; -use crate::GLContext; +use crate::{ffi, GLContext}; #[repr(transparent)] #[doc(alias = "GstGLSyncMeta")] diff --git a/gstreamer-gl/src/gl_video_frame.rs b/gstreamer-gl/src/gl_video_frame.rs index 9cb578169..4f9436695 100644 --- a/gstreamer-gl/src/gl_video_frame.rs +++ b/gstreamer-gl/src/gl_video_frame.rs @@ -2,7 +2,7 @@ use std::{fmt::Debug, marker::PhantomData, mem, ptr}; -use crate::GLMemoryRef; +use crate::{ffi, GLMemoryRef}; use glib::translate::{from_glib, Borrowed, ToGlibPtr}; use gst_video::{video_frame::IsVideoFrame, VideoFrameExt}; diff --git a/gstreamer-gl/src/lib.rs b/gstreamer-gl/src/lib.rs index 6801d5d85..62ae45bd3 100644 --- a/gstreamer-gl/src/lib.rs +++ b/gstreamer-gl/src/lib.rs @@ -4,11 +4,11 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use glib; pub use gst; pub use gst_base; pub use gst_video; +pub use gstreamer_gl_sys as ffi; macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer-gl/src/subclass/gl_base_filter.rs b/gstreamer-gl/src/subclass/gl_base_filter.rs index 070019863..849aef14b 100644 --- a/gstreamer-gl/src/subclass/gl_base_filter.rs +++ b/gstreamer-gl/src/subclass/gl_base_filter.rs @@ -3,7 +3,7 @@ use glib::translate::*; use gst::{ffi::GstCaps, result_from_gboolean, Caps, LoggableError, CAT_RUST}; use gst_base::subclass::prelude::*; -use crate::{prelude::*, GLBaseFilter}; +use crate::{ffi, prelude::*, GLBaseFilter}; pub trait GLBaseFilterImpl: GLBaseFilterImplExt + BaseTransformImpl { fn gl_set_caps(&self, incaps: &Caps, outcaps: &Caps) -> Result<(), LoggableError> { diff --git a/gstreamer-gl/src/subclass/gl_base_src.rs b/gstreamer-gl/src/subclass/gl_base_src.rs index 38a4c625b..7e0b5b06f 100644 --- a/gstreamer-gl/src/subclass/gl_base_src.rs +++ b/gstreamer-gl/src/subclass/gl_base_src.rs @@ -3,7 +3,7 @@ use glib::translate::*; use gst::{result_from_gboolean, LoggableError, CAT_RUST}; use gst_base::subclass::prelude::*; -use crate::{prelude::*, GLBaseSrc, GLMemory, GLAPI}; +use crate::{ffi, prelude::*, GLBaseSrc, GLMemory, GLAPI}; pub trait GLBaseSrcImpl: GLBaseSrcImplExt + PushSrcImpl { const SUPPORTED_GL_API: GLAPI; diff --git a/gstreamer-gl/src/subclass/gl_filter.rs b/gstreamer-gl/src/subclass/gl_filter.rs index 504436fb0..f475e76ec 100644 --- a/gstreamer-gl/src/subclass/gl_filter.rs +++ b/gstreamer-gl/src/subclass/gl_filter.rs @@ -5,7 +5,7 @@ use gst::{ }; use super::prelude::*; -use crate::{prelude::*, GLFilter, GLMemory}; +use crate::{ffi, prelude::*, GLFilter, GLMemory}; #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum GLFilterMode { diff --git a/gstreamer-gl/wayland/Cargo.toml b/gstreamer-gl/wayland/Cargo.toml index 880c443c0..fd249a9f9 100644 --- a/gstreamer-gl/wayland/Cargo.toml +++ b/gstreamer-gl/wayland/Cargo.toml @@ -18,7 +18,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-gl-wayland-sys", path = "sys" } +gstreamer-gl-wayland-sys.workspace = true glib.workspace = true gst.workspace = true gst-gl.workspace = true @@ -28,12 +28,12 @@ gir-format-check = "0.1" [features] default = [] -v1_16 = ["gst/v1_16", "gst-gl/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "gst-gl/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "gst-gl/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "gst-gl/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "gst-gl/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "gst-gl/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gst-gl/v1_16", "gstreamer-gl-wayland-sys/v1_16"] +v1_18 = ["gst/v1_18", "gst-gl/v1_18", "gstreamer-gl-wayland-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gst-gl/v1_20", "gstreamer-gl-wayland-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gst-gl/v1_22", "gstreamer-gl-wayland-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gst-gl/v1_24", "gstreamer-gl-wayland-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gst-gl/v1_26", "gstreamer-gl-wayland-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-gl/wayland/src/gl_display_wayland.rs b/gstreamer-gl/wayland/src/gl_display_wayland.rs index 2fbf67b77..1731b5662 100644 --- a/gstreamer-gl/wayland/src/gl_display_wayland.rs +++ b/gstreamer-gl/wayland/src/gl_display_wayland.rs @@ -15,9 +15,9 @@ impl GLDisplayWayland { pub unsafe fn with_display( display: uintptr_t, ) -> Result { - from_glib_full::<_, Option>(ffi::gst_gl_display_wayland_new_with_display( - display as gpointer, - )) + from_glib_full::<_, Option>( + crate::ffi::gst_gl_display_wayland_new_with_display(display as gpointer), + ) .ok_or_else(|| glib::bool_error!("Failed to create new Wayland GL display")) } } diff --git a/gstreamer-gl/wayland/src/lib.rs b/gstreamer-gl/wayland/src/lib.rs index 2319df34b..05d0156a2 100644 --- a/gstreamer-gl/wayland/src/lib.rs +++ b/gstreamer-gl/wayland/src/lib.rs @@ -9,8 +9,8 @@ #![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] -pub use ffi; pub use gst_gl; +pub use gstreamer_gl_wayland_sys as ffi; macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer-gl/x11/Cargo.toml b/gstreamer-gl/x11/Cargo.toml index c838a2e32..8220c6431 100644 --- a/gstreamer-gl/x11/Cargo.toml +++ b/gstreamer-gl/x11/Cargo.toml @@ -18,7 +18,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-gl-x11-sys", path = "sys" } +gstreamer-gl-x11-sys.workspace = true glib.workspace = true gst.workspace = true gst-gl.workspace = true @@ -28,12 +28,12 @@ gir-format-check = "0.1" [features] default = [] -v1_16 = ["gst/v1_16", "gst-gl/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "gst-gl/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "gst-gl/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "gst-gl/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "gst-gl/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "gst-gl/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gst-gl/v1_16", "gstreamer-gl-x11-sys/v1_16"] +v1_18 = ["gst/v1_18", "gst-gl/v1_18", "gstreamer-gl-x11-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gst-gl/v1_20", "gstreamer-gl-x11-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gst-gl/v1_22", "gstreamer-gl-x11-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gst-gl/v1_24", "gstreamer-gl-x11-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gst-gl/v1_26", "gstreamer-gl-x11-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-gl/x11/src/gl_display_x11.rs b/gstreamer-gl/x11/src/gl_display_x11.rs index d5d8f7e89..73ba12030 100644 --- a/gstreamer-gl/x11/src/gl_display_x11.rs +++ b/gstreamer-gl/x11/src/gl_display_x11.rs @@ -13,7 +13,7 @@ use crate::GLDisplayX11; impl GLDisplayX11 { pub unsafe fn with_display(display: uintptr_t) -> Result { - from_glib_full::<_, Option>(ffi::gst_gl_display_x11_new_with_display( + from_glib_full::<_, Option>(crate::ffi::gst_gl_display_x11_new_with_display( display as gpointer, )) .ok_or_else(|| glib::bool_error!("Failed to create new X11 GL display")) diff --git a/gstreamer-gl/x11/src/lib.rs b/gstreamer-gl/x11/src/lib.rs index 687dc9b4e..0aad0c700 100644 --- a/gstreamer-gl/x11/src/lib.rs +++ b/gstreamer-gl/x11/src/lib.rs @@ -9,8 +9,8 @@ #![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] -pub use ffi; pub use gst_gl; +pub use gstreamer_gl_x11_sys as ffi; macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer-mpegts/Cargo.toml b/gstreamer-mpegts/Cargo.toml index f0dd0b888..76a5638ca 100644 --- a/gstreamer-mpegts/Cargo.toml +++ b/gstreamer-mpegts/Cargo.toml @@ -14,7 +14,7 @@ edition.workspace = true rust-version.workspace = true [dependencies] -ffi = { package = "gstreamer-mpegts-sys", path = "sys" } +gstreamer-mpegts-sys.workspace = true glib.workspace = true gst.workspace = true @@ -23,12 +23,12 @@ gir-format-check = "0.1" [features] default = [] -v1_16 = ["gst/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gstreamer-mpegts-sys/v1_16"] +v1_18 = ["gst/v1_18", "gstreamer-mpegts-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gstreamer-mpegts-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gstreamer-mpegts-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gstreamer-mpegts-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gstreamer-mpegts-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-mpegts/src/lib.rs b/gstreamer-mpegts/src/lib.rs index 099e553b2..bfb8b4159 100644 --- a/gstreamer-mpegts/src/lib.rs +++ b/gstreamer-mpegts/src/lib.rs @@ -3,9 +3,9 @@ use std::sync::Once; -pub use ffi::*; pub use glib; pub use gst; +pub use gstreamer_mpegts_sys as ffi; static MPEGTS_INIT: Once = Once::new(); @@ -14,7 +14,7 @@ macro_rules! assert_initialized_main_thread { if !gst::INITIALIZED.load(std::sync::atomic::Ordering::SeqCst) { gst::assert_initialized(); } - crate::MPEGTS_INIT.call_once(|| unsafe { ffi::gst_mpegts_initialize() }); + crate::MPEGTS_INIT.call_once(|| unsafe { crate::ffi::gst_mpegts_initialize() }); }; } diff --git a/gstreamer-net/Cargo.toml b/gstreamer-net/Cargo.toml index e11664a95..20fefd70b 100644 --- a/gstreamer-net/Cargo.toml +++ b/gstreamer-net/Cargo.toml @@ -14,7 +14,7 @@ edition.workspace = true rust-version.workspace = true [dependencies] -ffi = { package = "gstreamer-net-sys", path = "sys" } +gstreamer-net-sys.workspace = true glib.workspace = true gio.workspace = true gst.workspace = true @@ -24,12 +24,12 @@ gir-format-check = "0.1" [features] default = [] -v1_16 = ["gst/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gstreamer-net-sys/v1_16"] +v1_18 = ["gst/v1_18", "gstreamer-net-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gstreamer-net-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gstreamer-net-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gstreamer-net-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gstreamer-net-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-net/src/lib.rs b/gstreamer-net/src/lib.rs index 618fe1688..43ea33bfa 100644 --- a/gstreamer-net/src/lib.rs +++ b/gstreamer-net/src/lib.rs @@ -4,9 +4,9 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use gio; pub use gst; +pub use gstreamer_net_sys as ffi; macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer-net/src/net_address_meta.rs b/gstreamer-net/src/net_address_meta.rs index cb0b3aa8f..496b9b420 100644 --- a/gstreamer-net/src/net_address_meta.rs +++ b/gstreamer-net/src/net_address_meta.rs @@ -2,6 +2,7 @@ use std::fmt; +use crate::ffi; use glib::translate::*; use gst::prelude::*; diff --git a/gstreamer-net/src/ptp_clock.rs b/gstreamer-net/src/ptp_clock.rs index c43315fc6..6953c3c96 100644 --- a/gstreamer-net/src/ptp_clock.rs +++ b/gstreamer-net/src/ptp_clock.rs @@ -4,7 +4,7 @@ use std::num::NonZeroU64; use glib::translate::*; -use crate::PtpClock; +use crate::{ffi, PtpClock}; impl PtpClock { // rustdoc-stripper-ignore-next diff --git a/gstreamer-pbutils/Cargo.toml b/gstreamer-pbutils/Cargo.toml index 937dc13ed..e4a44b3d7 100644 --- a/gstreamer-pbutils/Cargo.toml +++ b/gstreamer-pbutils/Cargo.toml @@ -15,7 +15,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-pbutils-sys", path = "sys" } +gstreamer-pbutils-sys.workspace = true glib.workspace = true gst.workspace = true gst-video.workspace = true @@ -29,12 +29,12 @@ serde_json = "1.0" [features] default = [] -v1_16 = ["gst/v1_16", "gst-audio/v1_16", "gst-video/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "gst-audio/v1_18", "gst-video/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "gst-audio/v1_20", "gst-video/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "gst-audio/v1_22", "gst-video/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "gst-audio/v1_24", "gst-video/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "gst-audio/v1_26", "gst-video/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gst-audio/v1_16", "gst-video/v1_16", "gstreamer-pbutils-sys/v1_16"] +v1_18 = ["gst/v1_18", "gst-audio/v1_18", "gst-video/v1_18", "gstreamer-pbutils-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gst-audio/v1_20", "gst-video/v1_20", "gstreamer-pbutils-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gst-audio/v1_22", "gst-video/v1_22", "gstreamer-pbutils-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gst-audio/v1_24", "gst-video/v1_24", "gstreamer-pbutils-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gst-audio/v1_26", "gst-video/v1_26", "gstreamer-pbutils-sys/v1_26", "v1_24"] serde = ["dep:serde", "gst/serde"] [package.metadata.docs.rs] diff --git a/gstreamer-pbutils/src/audio_visualizer.rs b/gstreamer-pbutils/src/audio_visualizer.rs index 3e810ef5a..f04602b05 100644 --- a/gstreamer-pbutils/src/audio_visualizer.rs +++ b/gstreamer-pbutils/src/audio_visualizer.rs @@ -2,7 +2,7 @@ use gst::prelude::*; -use crate::{auto::AudioVisualizer, subclass::AudioVisualizerSetupToken}; +use crate::{ffi, subclass::AudioVisualizerSetupToken, AudioVisualizer}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-pbutils/src/discoverer.rs b/gstreamer-pbutils/src/discoverer.rs index 9e7bdc00e..2d452c233 100644 --- a/gstreamer-pbutils/src/discoverer.rs +++ b/gstreamer-pbutils/src/discoverer.rs @@ -8,7 +8,7 @@ use glib::{ translate::*, }; -use crate::{auto::Discoverer, DiscovererInfo}; +use crate::{ffi, Discoverer, DiscovererInfo}; impl Discoverer { pub fn set_timeout(&self, timeout: gst::ClockTime) { diff --git a/gstreamer-pbutils/src/discoverer_video_info.rs b/gstreamer-pbutils/src/discoverer_video_info.rs index 222404b4f..b6323231c 100644 --- a/gstreamer-pbutils/src/discoverer_video_info.rs +++ b/gstreamer-pbutils/src/discoverer_video_info.rs @@ -4,7 +4,7 @@ use std::fmt; use glib::{prelude::*, translate::*}; -use crate::{DiscovererStreamInfo, DiscovererVideoInfo}; +use crate::{ffi, DiscovererStreamInfo, DiscovererVideoInfo}; impl DiscovererVideoInfo { #[doc(alias = "get_framerate")] diff --git a/gstreamer-pbutils/src/encoding_profile.rs b/gstreamer-pbutils/src/encoding_profile.rs index bbed3ad09..74a8912a9 100644 --- a/gstreamer-pbutils/src/encoding_profile.rs +++ b/gstreamer-pbutils/src/encoding_profile.rs @@ -2,11 +2,11 @@ use glib::{prelude::*, translate::*}; -use crate::auto::{ - EncodingAudioProfile, EncodingContainerProfile, EncodingProfile, EncodingVideoProfile, -}; #[cfg(feature = "v1_20")] use crate::ElementProperties; +use crate::{ + ffi, EncodingAudioProfile, EncodingContainerProfile, EncodingProfile, EncodingVideoProfile, +}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-pbutils/src/functions.rs b/gstreamer-pbutils/src/functions.rs index 376b097ba..9ca86a8e2 100644 --- a/gstreamer-pbutils/src/functions.rs +++ b/gstreamer-pbutils/src/functions.rs @@ -3,6 +3,7 @@ use std::{mem, ptr}; pub use crate::auto::functions::*; +use crate::ffi; use glib::translate::*; pub unsafe trait CodecTag<'a>: gst::Tag<'a, TagType = &'a str> {} diff --git a/gstreamer-pbutils/src/lib.rs b/gstreamer-pbutils/src/lib.rs index f6db5a725..692dc1787 100644 --- a/gstreamer-pbutils/src/lib.rs +++ b/gstreamer-pbutils/src/lib.rs @@ -6,9 +6,9 @@ use std::sync::Once; -pub use ffi; pub use glib; pub use gst; +pub use gstreamer_pbutils_sys as ffi; static PBUTILS_INIT: Once = Once::new(); @@ -18,7 +18,7 @@ macro_rules! assert_initialized_main_thread { gst::assert_initialized(); } crate::PBUTILS_INIT.call_once(|| { - unsafe { ffi::gst_pb_utils_init() }; + unsafe { crate::ffi::gst_pb_utils_init() }; }); }; } diff --git a/gstreamer-pbutils/src/subclass/audio_visualizer.rs b/gstreamer-pbutils/src/subclass/audio_visualizer.rs index b277937b8..a332e8f97 100644 --- a/gstreamer-pbutils/src/subclass/audio_visualizer.rs +++ b/gstreamer-pbutils/src/subclass/audio_visualizer.rs @@ -3,7 +3,7 @@ use glib::{prelude::*, translate::*}; use gst::{result_from_gboolean, subclass::prelude::*, LoggableError, CAT_RUST}; -use crate::AudioVisualizer; +use crate::{ffi, AudioVisualizer}; pub struct AudioVisualizerSetupToken<'a>(pub(crate) &'a AudioVisualizer); diff --git a/gstreamer-play/Cargo.toml b/gstreamer-play/Cargo.toml index 9a0b7cc3e..05e5eb8ca 100644 --- a/gstreamer-play/Cargo.toml +++ b/gstreamer-play/Cargo.toml @@ -15,7 +15,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-play-sys", path = "sys" } +gstreamer-play-sys.workspace = true glib.workspace = true gst = { workspace = true, features = ["v1_20"] } gst-video = { workspace = true, features = ["v1_20"] } @@ -24,9 +24,9 @@ gst-video = { workspace = true, features = ["v1_20"] } gir-format-check = "0.1" [features] -v1_22 = ["gst/v1_22", "gst-video/v1_22", "ffi/v1_22"] -v1_24 = ["gst/v1_24", "gst-video/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "gst-video/v1_26", "ffi/v1_26", "v1_24"] +v1_22 = ["gst/v1_22", "gst-video/v1_22", "gstreamer-play-sys/v1_22"] +v1_24 = ["gst/v1_24", "gst-video/v1_24", "gstreamer-play-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gst-video/v1_26", "gstreamer-play-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-play/src/config.rs b/gstreamer-play/src/config.rs index 2a37c8c49..f187d98e5 100644 --- a/gstreamer-play/src/config.rs +++ b/gstreamer-play/src/config.rs @@ -2,6 +2,7 @@ use std::{mem, ops}; +use crate::ffi; use glib::translate::*; #[derive(Debug, Clone, PartialEq, Eq)] diff --git a/gstreamer-play/src/lib.rs b/gstreamer-play/src/lib.rs index 4e22bd55c..f1e7c2ae5 100644 --- a/gstreamer-play/src/lib.rs +++ b/gstreamer-play/src/lib.rs @@ -4,9 +4,9 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use gst; pub use gst_video; +pub use gstreamer_play_sys as ffi; macro_rules! skip_assert_initialized { () => {}; diff --git a/gstreamer-play/src/play.rs b/gstreamer-play/src/play.rs index 9735c4da0..deac5d251 100644 --- a/gstreamer-play/src/play.rs +++ b/gstreamer-play/src/play.rs @@ -2,7 +2,7 @@ use glib::translate::*; -use crate::Play; +use crate::{ffi, Play}; impl Play { #[doc(alias = "get_config")] diff --git a/gstreamer-play/src/play_signal_adapter.rs b/gstreamer-play/src/play_signal_adapter.rs index 96160899e..cff30cff4 100644 --- a/gstreamer-play/src/play_signal_adapter.rs +++ b/gstreamer-play/src/play_signal_adapter.rs @@ -8,7 +8,7 @@ use glib::{ translate::*, }; -use crate::PlaySignalAdapter; +use crate::{ffi, PlaySignalAdapter}; impl PlaySignalAdapter { #[doc(alias = "duration-changed")] diff --git a/gstreamer-play/src/play_video_info.rs b/gstreamer-play/src/play_video_info.rs index ac9ec8e36..6abb2f9fc 100644 --- a/gstreamer-play/src/play_video_info.rs +++ b/gstreamer-play/src/play_video_info.rs @@ -4,7 +4,7 @@ use std::mem; use glib::translate::*; -use crate::PlayVideoInfo; +use crate::{ffi, PlayVideoInfo}; impl PlayVideoInfo { #[doc(alias = "get_framerate")] diff --git a/gstreamer-play/src/play_video_overlay_video_renderer.rs b/gstreamer-play/src/play_video_overlay_video_renderer.rs index 07251f133..0181db942 100644 --- a/gstreamer-play/src/play_video_overlay_video_renderer.rs +++ b/gstreamer-play/src/play_video_overlay_video_renderer.rs @@ -5,7 +5,7 @@ use std::ptr; use glib::{prelude::*, translate::*}; use libc::uintptr_t; -use crate::PlayVideoOverlayVideoRenderer; +use crate::{ffi, PlayVideoOverlayVideoRenderer}; impl PlayVideoOverlayVideoRenderer { pub unsafe fn new(window_handle: uintptr_t) -> PlayVideoOverlayVideoRenderer { diff --git a/gstreamer-play/src/subclass/play_video_renderer.rs b/gstreamer-play/src/subclass/play_video_renderer.rs index 6fbdd613b..f6dea7854 100644 --- a/gstreamer-play/src/subclass/play_video_renderer.rs +++ b/gstreamer-play/src/subclass/play_video_renderer.rs @@ -2,7 +2,7 @@ use glib::{prelude::*, subclass::prelude::*, translate::*}; -use crate::{Play, PlayVideoRenderer}; +use crate::{ffi, Play, PlayVideoRenderer}; pub trait PlayVideoRendererImpl: ObjectImpl { fn create_video_sink(&self, play: &Play) -> gst::Element; diff --git a/gstreamer-player/Cargo.toml b/gstreamer-player/Cargo.toml index beda5a0be..8b7788d33 100644 --- a/gstreamer-player/Cargo.toml +++ b/gstreamer-player/Cargo.toml @@ -15,7 +15,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-player-sys", path = "sys" } +gstreamer-player-sys.workspace = true glib.workspace = true gst.workspace = true gst-video.workspace = true @@ -25,12 +25,12 @@ gir-format-check = "0.1" [features] default = [] -v1_16 = ["gst/v1_16", "gst-video/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "gst-video/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "gst-video/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "gst-video/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "gst-video/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "gst-video/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gst-video/v1_16", "gstreamer-player-sys/v1_16"] +v1_18 = ["gst/v1_18", "gst-video/v1_18", "gstreamer-player-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gst-video/v1_20", "gstreamer-player-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gst-video/v1_22", "gstreamer-player-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gst-video/v1_24", "gstreamer-player-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gst-video/v1_26", "gstreamer-player-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-player/src/config.rs b/gstreamer-player/src/config.rs index 4ae85ec11..bbf8e5f9a 100644 --- a/gstreamer-player/src/config.rs +++ b/gstreamer-player/src/config.rs @@ -2,6 +2,7 @@ use std::{mem, ops}; +use crate::ffi; use glib::translate::*; #[derive(Debug, Clone, PartialEq, Eq)] diff --git a/gstreamer-player/src/lib.rs b/gstreamer-player/src/lib.rs index 56d953c1e..483c64844 100644 --- a/gstreamer-player/src/lib.rs +++ b/gstreamer-player/src/lib.rs @@ -4,9 +4,9 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use gst; pub use gst_video; +pub use gstreamer_player_sys as ffi; macro_rules! skip_assert_initialized { () => {}; diff --git a/gstreamer-player/src/player.rs b/gstreamer-player/src/player.rs index 410f61683..fd1ccd03e 100644 --- a/gstreamer-player/src/player.rs +++ b/gstreamer-player/src/player.rs @@ -8,7 +8,7 @@ use glib::{ translate::*, }; -use crate::Player; +use crate::{ffi, Player}; impl Player { #[doc(alias = "get_config")] diff --git a/gstreamer-player/src/player_g_main_context_signal_dispatcher.rs b/gstreamer-player/src/player_g_main_context_signal_dispatcher.rs index 6de1cec67..92a88c857 100644 --- a/gstreamer-player/src/player_g_main_context_signal_dispatcher.rs +++ b/gstreamer-player/src/player_g_main_context_signal_dispatcher.rs @@ -2,7 +2,7 @@ use glib::translate::*; -use crate::PlayerGMainContextSignalDispatcher; +use crate::{ffi, PlayerGMainContextSignalDispatcher}; impl PlayerGMainContextSignalDispatcher { #[doc(alias = "gst_player_g_main_context_signal_dispatcher_new")] diff --git a/gstreamer-player/src/player_video_info.rs b/gstreamer-player/src/player_video_info.rs index 5e723a907..bebf0703f 100644 --- a/gstreamer-player/src/player_video_info.rs +++ b/gstreamer-player/src/player_video_info.rs @@ -4,7 +4,7 @@ use std::mem; use glib::translate::*; -use crate::PlayerVideoInfo; +use crate::{ffi, PlayerVideoInfo}; impl PlayerVideoInfo { #[doc(alias = "get_framerate")] diff --git a/gstreamer-player/src/player_video_overlay_video_renderer.rs b/gstreamer-player/src/player_video_overlay_video_renderer.rs index 11ad957e5..192b1d6da 100644 --- a/gstreamer-player/src/player_video_overlay_video_renderer.rs +++ b/gstreamer-player/src/player_video_overlay_video_renderer.rs @@ -5,7 +5,7 @@ use std::ptr; use glib::{prelude::*, translate::*}; use libc::uintptr_t; -use crate::PlayerVideoOverlayVideoRenderer; +use crate::{ffi, PlayerVideoOverlayVideoRenderer}; impl PlayerVideoOverlayVideoRenderer { pub unsafe fn new(window_handle: uintptr_t) -> PlayerVideoOverlayVideoRenderer { diff --git a/gstreamer-player/src/subclass/player_video_renderer.rs b/gstreamer-player/src/subclass/player_video_renderer.rs index e297593a8..7c524ddca 100644 --- a/gstreamer-player/src/subclass/player_video_renderer.rs +++ b/gstreamer-player/src/subclass/player_video_renderer.rs @@ -2,7 +2,7 @@ use glib::{prelude::*, subclass::prelude::*, translate::*}; -use crate::{Player, PlayerVideoRenderer}; +use crate::{ffi, Player, PlayerVideoRenderer}; pub trait PlayerVideoRendererImpl: ObjectImpl { fn create_video_sink(&self, player: &Player) -> gst::Element; diff --git a/gstreamer-rtp/Cargo.toml b/gstreamer-rtp/Cargo.toml index 5c8bbca3d..4ce4cf4cf 100644 --- a/gstreamer-rtp/Cargo.toml +++ b/gstreamer-rtp/Cargo.toml @@ -15,7 +15,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-rtp-sys", path = "sys" } +gstreamer-rtp-sys.workspace = true glib.workspace = true gst.workspace = true serde = { version = "1.0", optional = true } @@ -26,12 +26,12 @@ serde_json = "1.0" [features] default = [] -v1_16 = ["gst/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gstreamer-rtp-sys/v1_16"] +v1_18 = ["gst/v1_18", "gstreamer-rtp-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gstreamer-rtp-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gstreamer-rtp-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gstreamer-rtp-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gstreamer-rtp-sys/v1_26", "v1_24"] serde = ["dep:serde", "gst/serde"] [package.metadata.docs.rs] diff --git a/gstreamer-rtp/src/lib.rs b/gstreamer-rtp/src/lib.rs index 5fd182e8e..0c715fa9d 100644 --- a/gstreamer-rtp/src/lib.rs +++ b/gstreamer-rtp/src/lib.rs @@ -4,9 +4,9 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use glib; pub use gst; +pub use gstreamer_rtp_sys as ffi; macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer-rtp/src/rtp_base_depayload.rs b/gstreamer-rtp/src/rtp_base_depayload.rs index ee0d7788b..8987a5ccb 100644 --- a/gstreamer-rtp/src/rtp_base_depayload.rs +++ b/gstreamer-rtp/src/rtp_base_depayload.rs @@ -3,7 +3,7 @@ use glib::prelude::*; #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] use glib::translate::*; -use crate::RTPBaseDepayload; +use crate::{ffi, RTPBaseDepayload}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-rtp/src/rtp_base_payload.rs b/gstreamer-rtp/src/rtp_base_payload.rs index 962cedc35..df82e8443 100644 --- a/gstreamer-rtp/src/rtp_base_payload.rs +++ b/gstreamer-rtp/src/rtp_base_payload.rs @@ -2,7 +2,7 @@ use std::ptr; use glib::{prelude::*, translate::*}; -use crate::RTPBasePayload; +use crate::{ffi, RTPBasePayload}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-rtp/src/rtp_buffer.rs b/gstreamer-rtp/src/rtp_buffer.rs index 0e4720851..7b3a88032 100644 --- a/gstreamer-rtp/src/rtp_buffer.rs +++ b/gstreamer-rtp/src/rtp_buffer.rs @@ -2,6 +2,7 @@ use std::{fmt, marker::PhantomData, mem, ptr, slice}; +use crate::ffi; use glib::translate::{from_glib, mut_override, FromGlibPtrFull, IntoGlib}; pub enum Readable {} diff --git a/gstreamer-rtp/src/rtp_header_extension.rs b/gstreamer-rtp/src/rtp_header_extension.rs index e6ce4f3a9..24b69b238 100644 --- a/gstreamer-rtp/src/rtp_header_extension.rs +++ b/gstreamer-rtp/src/rtp_header_extension.rs @@ -1,6 +1,6 @@ use glib::{object::IsA, translate::*}; -use crate::{RTPHeaderExtension, RTPHeaderExtensionFlags}; +use crate::{ffi, RTPHeaderExtension, RTPHeaderExtensionFlags}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-rtp/src/rtp_meta.rs b/gstreamer-rtp/src/rtp_meta.rs index 891ef6779..d2f6028b1 100644 --- a/gstreamer-rtp/src/rtp_meta.rs +++ b/gstreamer-rtp/src/rtp_meta.rs @@ -3,6 +3,7 @@ use std::fmt; use std::ptr; +use crate::ffi; use glib::translate::*; use gst::prelude::*; diff --git a/gstreamer-rtp/src/subclass/rtp_base_depayload.rs b/gstreamer-rtp/src/subclass/rtp_base_depayload.rs index 380638655..64b75554f 100644 --- a/gstreamer-rtp/src/subclass/rtp_base_depayload.rs +++ b/gstreamer-rtp/src/subclass/rtp_base_depayload.rs @@ -5,7 +5,7 @@ use std::ptr; use glib::translate::*; use gst::subclass::prelude::*; -use crate::{prelude::*, RTPBaseDepayload}; +use crate::{ffi, prelude::*, RTPBaseDepayload}; pub trait RTPBaseDepayloadImpl: RTPBaseDepayloadImplExt + ElementImpl { fn set_caps(&self, caps: &gst::Caps) -> Result<(), gst::LoggableError> { diff --git a/gstreamer-rtp/src/subclass/rtp_base_payload.rs b/gstreamer-rtp/src/subclass/rtp_base_payload.rs index 50407058b..8002ebd3b 100644 --- a/gstreamer-rtp/src/subclass/rtp_base_payload.rs +++ b/gstreamer-rtp/src/subclass/rtp_base_payload.rs @@ -3,7 +3,7 @@ use glib::translate::*; use gst::subclass::prelude::*; -use crate::{prelude::*, RTPBasePayload}; +use crate::{ffi, prelude::*, RTPBasePayload}; pub trait RTPBasePayloadImpl: RTPBasePayloadImplExt + ElementImpl { fn caps(&self, pad: &gst::Pad, filter: Option<&gst::Caps>) -> gst::Caps { diff --git a/gstreamer-rtp/src/subclass/rtp_header_extension.rs b/gstreamer-rtp/src/subclass/rtp_header_extension.rs index 2ebbc872e..319a7d5dc 100644 --- a/gstreamer-rtp/src/subclass/rtp_header_extension.rs +++ b/gstreamer-rtp/src/subclass/rtp_header_extension.rs @@ -3,6 +3,7 @@ use glib::{prelude::*, subclass::prelude::*, translate::*}; use super::prelude::*; +use crate::ffi; pub trait RTPHeaderExtensionImpl: RTPHeaderExtensionImplExt + ElementImpl { const URI: &'static str; diff --git a/gstreamer-rtsp-server/Cargo.toml b/gstreamer-rtsp-server/Cargo.toml index b781194e0..0733e4ced 100644 --- a/gstreamer-rtsp-server/Cargo.toml +++ b/gstreamer-rtsp-server/Cargo.toml @@ -15,7 +15,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-rtsp-server-sys", path = "sys" } +gstreamer-rtsp-server-sys.workspace = true glib.workspace = true gio.workspace = true gst.workspace = true @@ -30,12 +30,12 @@ serde_json = "1.0" [features] default = [] -v1_16 = ["gst/v1_16", "gst-sdp/v1_16", "gst-rtsp/v1_16", "gst-net/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "gst-sdp/v1_18", "gst-rtsp/v1_18", "gst-net/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "gst-sdp/v1_20", "gst-rtsp/v1_20", "gst-net/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "gst-sdp/v1_22", "gst-rtsp/v1_22", "gst-net/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "gst-sdp/v1_24", "gst-rtsp/v1_24", "gst-net/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "gst-sdp/v1_26", "gst-rtsp/v1_26", "gst-net/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gst-sdp/v1_16", "gst-rtsp/v1_16", "gst-net/v1_16", "gstreamer-rtsp-server-sys/v1_16"] +v1_18 = ["gst/v1_18", "gst-sdp/v1_18", "gst-rtsp/v1_18", "gst-net/v1_18", "gstreamer-rtsp-server-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gst-sdp/v1_20", "gst-rtsp/v1_20", "gst-net/v1_20", "gstreamer-rtsp-server-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gst-sdp/v1_22", "gst-rtsp/v1_22", "gst-net/v1_22", "gstreamer-rtsp-server-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gst-sdp/v1_24", "gst-rtsp/v1_24", "gst-net/v1_24", "gstreamer-rtsp-server-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gst-sdp/v1_26", "gst-rtsp/v1_26", "gst-net/v1_26", "gstreamer-rtsp-server-sys/v1_26", "v1_24"] serde = ["dep:serde", "gst/serde", "gst-rtsp/serde"] [package.metadata.docs.rs] diff --git a/gstreamer-rtsp-server/src/lib.rs b/gstreamer-rtsp-server/src/lib.rs index d39a9273b..a3b0aa16c 100644 --- a/gstreamer-rtsp-server/src/lib.rs +++ b/gstreamer-rtsp-server/src/lib.rs @@ -4,13 +4,13 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use gio; pub use glib; pub use gst; pub use gst_net; pub use gst_rtsp; pub use gst_sdp; +pub use gstreamer_rtsp_server_sys as ffi; macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer-rtsp-server/src/rtsp_address_pool.rs b/gstreamer-rtsp-server/src/rtsp_address_pool.rs index e690a98eb..0b11a252f 100644 --- a/gstreamer-rtsp-server/src/rtsp_address_pool.rs +++ b/gstreamer-rtsp-server/src/rtsp_address_pool.rs @@ -4,7 +4,7 @@ use std::ptr; use glib::{prelude::*, translate::*}; -use crate::{RTSPAddress, RTSPAddressPool, RTSPAddressPoolResult}; +use crate::{ffi, RTSPAddress, RTSPAddressPool, RTSPAddressPoolResult}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-rtsp-server/src/rtsp_auth.rs b/gstreamer-rtsp-server/src/rtsp_auth.rs index 8a6a38a66..8a5df8a95 100644 --- a/gstreamer-rtsp-server/src/rtsp_auth.rs +++ b/gstreamer-rtsp-server/src/rtsp_auth.rs @@ -8,7 +8,7 @@ use glib::{ translate::*, }; -use crate::{RTSPAuth, RTSPToken}; +use crate::{ffi, RTSPAuth, RTSPToken}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-rtsp-server/src/rtsp_client.rs b/gstreamer-rtsp-server/src/rtsp_client.rs index f5b6f2398..ef108d319 100644 --- a/gstreamer-rtsp-server/src/rtsp_client.rs +++ b/gstreamer-rtsp-server/src/rtsp_client.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use crate::{RTSPClient, RTSPSession}; +use crate::{ffi, RTSPClient, RTSPSession}; use glib::{prelude::*, source::SourceId, translate::*}; use gst_rtsp::rtsp_message::RTSPMessage; diff --git a/gstreamer-rtsp-server/src/rtsp_context.rs b/gstreamer-rtsp-server/src/rtsp_context.rs index f6be16f1c..7444a2a46 100644 --- a/gstreamer-rtsp-server/src/rtsp_context.rs +++ b/gstreamer-rtsp-server/src/rtsp_context.rs @@ -5,7 +5,7 @@ use std::{marker::PhantomData, ptr}; use glib::{prelude::*, translate::*}; use gst_rtsp::{rtsp_message::RTSPMessage, RTSPUrl}; -use crate::{RTSPClient, RTSPSession, RTSPToken}; +use crate::{ffi, RTSPClient, RTSPSession, RTSPToken}; #[derive(Debug, PartialEq, Eq)] #[doc(alias = "GstRTSPContext")] diff --git a/gstreamer-rtsp-server/src/rtsp_media.rs b/gstreamer-rtsp-server/src/rtsp_media.rs index 809c9274e..c80e53209 100644 --- a/gstreamer-rtsp-server/src/rtsp_media.rs +++ b/gstreamer-rtsp-server/src/rtsp_media.rs @@ -2,7 +2,7 @@ use glib::{prelude::*, translate::*}; -use crate::RTSPMedia; +use crate::{ffi, RTSPMedia}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-rtsp-server/src/rtsp_media_factory.rs b/gstreamer-rtsp-server/src/rtsp_media_factory.rs index 03279e920..ac31b87b1 100644 --- a/gstreamer-rtsp-server/src/rtsp_media_factory.rs +++ b/gstreamer-rtsp-server/src/rtsp_media_factory.rs @@ -2,7 +2,7 @@ use glib::{prelude::*, translate::*}; -use crate::RTSPMediaFactory; +use crate::{ffi, RTSPMediaFactory}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-rtsp-server/src/rtsp_onvif_media_factory.rs b/gstreamer-rtsp-server/src/rtsp_onvif_media_factory.rs index 204b17ab8..bf69ebf6d 100644 --- a/gstreamer-rtsp-server/src/rtsp_onvif_media_factory.rs +++ b/gstreamer-rtsp-server/src/rtsp_onvif_media_factory.rs @@ -2,7 +2,7 @@ use glib::{prelude::*, translate::*}; -use crate::{RTSPContext, RTSPOnvifMediaFactory}; +use crate::{ffi, RTSPContext, RTSPOnvifMediaFactory}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-rtsp-server/src/rtsp_server.rs b/gstreamer-rtsp-server/src/rtsp_server.rs index 9305a1d5d..8762b8ea5 100644 --- a/gstreamer-rtsp-server/src/rtsp_server.rs +++ b/gstreamer-rtsp-server/src/rtsp_server.rs @@ -2,7 +2,7 @@ use glib::{prelude::*, source::SourceId, translate::*}; -use crate::RTSPServer; +use crate::{ffi, RTSPServer}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-rtsp-server/src/rtsp_session.rs b/gstreamer-rtsp-server/src/rtsp_session.rs index 387ae09ad..1584682ef 100644 --- a/gstreamer-rtsp-server/src/rtsp_session.rs +++ b/gstreamer-rtsp-server/src/rtsp_session.rs @@ -4,7 +4,7 @@ use std::mem; use glib::{prelude::*, translate::*}; -use crate::{RTSPSession, RTSPSessionMedia}; +use crate::{ffi, RTSPSession, RTSPSessionMedia}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-rtsp-server/src/rtsp_session_pool.rs b/gstreamer-rtsp-server/src/rtsp_session_pool.rs index 12cdcf9a3..26b91f872 100644 --- a/gstreamer-rtsp-server/src/rtsp_session_pool.rs +++ b/gstreamer-rtsp-server/src/rtsp_session_pool.rs @@ -10,7 +10,7 @@ use glib::{ ControlFlow, }; -use crate::RTSPSessionPool; +use crate::{ffi, RTSPSessionPool}; unsafe extern "C" fn trampoline_watch< F: FnMut(&RTSPSessionPool) -> ControlFlow + Send + 'static, diff --git a/gstreamer-rtsp-server/src/rtsp_thread.rs b/gstreamer-rtsp-server/src/rtsp_thread.rs index a76d1de77..e72f2adc7 100644 --- a/gstreamer-rtsp-server/src/rtsp_thread.rs +++ b/gstreamer-rtsp-server/src/rtsp_thread.rs @@ -1,5 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. +use crate::ffi; use glib::translate::*; gst::mini_object_wrapper!(RTSPThread, RTSPThreadRef, ffi::GstRTSPThread, || { diff --git a/gstreamer-rtsp-server/src/rtsp_token.rs b/gstreamer-rtsp-server/src/rtsp_token.rs index efb86fa0a..a181a0d58 100644 --- a/gstreamer-rtsp-server/src/rtsp_token.rs +++ b/gstreamer-rtsp-server/src/rtsp_token.rs @@ -2,6 +2,7 @@ use std::fmt; +use crate::ffi; use glib::{translate::*, SendValue}; gst::mini_object_wrapper!(RTSPToken, RTSPTokenRef, ffi::GstRTSPToken, || { diff --git a/gstreamer-rtsp-server/src/subclass/rtsp_auth.rs b/gstreamer-rtsp-server/src/subclass/rtsp_auth.rs index db42888fb..f626a61ff 100644 --- a/gstreamer-rtsp-server/src/subclass/rtsp_auth.rs +++ b/gstreamer-rtsp-server/src/subclass/rtsp_auth.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use crate::{RTSPAuth, RTSPContext}; +use crate::{ffi, RTSPAuth, RTSPContext}; use glib::{prelude::*, subclass::prelude::*, translate::*}; use libc::c_char; diff --git a/gstreamer-rtsp-server/src/subclass/rtsp_client.rs b/gstreamer-rtsp-server/src/subclass/rtsp_client.rs index 2d279a5b0..63e4de92f 100644 --- a/gstreamer-rtsp-server/src/subclass/rtsp_client.rs +++ b/gstreamer-rtsp-server/src/subclass/rtsp_client.rs @@ -2,7 +2,7 @@ use glib::{prelude::*, subclass::prelude::*, translate::*}; -use crate::RTSPClient; +use crate::{ffi, RTSPClient}; pub trait RTSPClientImpl: RTSPClientImplExt + ObjectImpl + Send + Sync { fn create_sdp(&self, media: &crate::RTSPMedia) -> Option { diff --git a/gstreamer-rtsp-server/src/subclass/rtsp_media.rs b/gstreamer-rtsp-server/src/subclass/rtsp_media.rs index d15c1a18d..ee61f395f 100644 --- a/gstreamer-rtsp-server/src/subclass/rtsp_media.rs +++ b/gstreamer-rtsp-server/src/subclass/rtsp_media.rs @@ -4,7 +4,7 @@ use std::ptr; use glib::{prelude::*, subclass::prelude::*, translate::*}; -use crate::{RTSPMedia, RTSPThread}; +use crate::{ffi, RTSPMedia, RTSPThread}; #[derive(Debug)] pub struct SDPInfo(ptr::NonNull); diff --git a/gstreamer-rtsp-server/src/subclass/rtsp_media_factory.rs b/gstreamer-rtsp-server/src/subclass/rtsp_media_factory.rs index fbfa8f355..d02153866 100644 --- a/gstreamer-rtsp-server/src/subclass/rtsp_media_factory.rs +++ b/gstreamer-rtsp-server/src/subclass/rtsp_media_factory.rs @@ -4,7 +4,7 @@ use std::mem::transmute; use glib::{prelude::*, subclass::prelude::*, translate::*}; -use crate::RTSPMediaFactory; +use crate::{ffi, RTSPMediaFactory}; pub trait RTSPMediaFactoryImpl: RTSPMediaFactoryImplExt + ObjectImpl + Send + Sync { fn gen_key(&self, url: &gst_rtsp::RTSPUrl) -> Option { diff --git a/gstreamer-rtsp-server/src/subclass/rtsp_mount_points.rs b/gstreamer-rtsp-server/src/subclass/rtsp_mount_points.rs index 923d0fcd5..6d4e4e9d7 100644 --- a/gstreamer-rtsp-server/src/subclass/rtsp_mount_points.rs +++ b/gstreamer-rtsp-server/src/subclass/rtsp_mount_points.rs @@ -3,7 +3,7 @@ use glib::{prelude::*, subclass::prelude::*, translate::*}; use gst_rtsp::ffi::GstRTSPUrl; -use crate::RTSPMountPoints; +use crate::{ffi, RTSPMountPoints}; pub trait RTSPMountPointsImpl: RTSPMountPointsImplExt + ObjectImpl + Send + Sync { fn make_path(&self, url: &gst_rtsp::RTSPUrl) -> Option { diff --git a/gstreamer-rtsp-server/src/subclass/rtsp_onvif_media_factory.rs b/gstreamer-rtsp-server/src/subclass/rtsp_onvif_media_factory.rs index f2e751580..c06efaa28 100644 --- a/gstreamer-rtsp-server/src/subclass/rtsp_onvif_media_factory.rs +++ b/gstreamer-rtsp-server/src/subclass/rtsp_onvif_media_factory.rs @@ -3,7 +3,7 @@ use glib::{prelude::*, subclass::prelude::*, translate::*}; use super::prelude::*; -use crate::RTSPOnvifMediaFactory; +use crate::{ffi, RTSPOnvifMediaFactory}; pub trait RTSPOnvifMediaFactoryImpl: RTSPMediaFactoryImplExt + RTSPMediaFactoryImpl + Send + Sync diff --git a/gstreamer-rtsp-server/src/subclass/rtsp_server.rs b/gstreamer-rtsp-server/src/subclass/rtsp_server.rs index 949aece67..5d7f99059 100644 --- a/gstreamer-rtsp-server/src/subclass/rtsp_server.rs +++ b/gstreamer-rtsp-server/src/subclass/rtsp_server.rs @@ -2,7 +2,7 @@ use glib::{prelude::*, subclass::prelude::*, translate::*}; -use crate::RTSPServer; +use crate::{ffi, RTSPServer}; pub trait RTSPServerImpl: RTSPServerImplExt + ObjectImpl + Send + Sync { fn create_client(&self) -> Option { diff --git a/gstreamer-rtsp/Cargo.toml b/gstreamer-rtsp/Cargo.toml index feaab0197..9f270861f 100644 --- a/gstreamer-rtsp/Cargo.toml +++ b/gstreamer-rtsp/Cargo.toml @@ -15,7 +15,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-rtsp-sys", path = "sys" } +gstreamer-rtsp-sys.workspace = true glib.workspace = true gst.workspace = true gst-sdp.workspace = true @@ -27,12 +27,12 @@ serde_json = "1.0" [features] default = [] -v1_16 = ["gst/v1_16", "gst-sdp/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "gst-sdp/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "gst-sdp/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "gst-sdp/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "gst-sdp/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "gst-sdp/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gst-sdp/v1_16", "gstreamer-rtsp-sys/v1_16"] +v1_18 = ["gst/v1_18", "gst-sdp/v1_18", "gstreamer-rtsp-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gst-sdp/v1_20", "gstreamer-rtsp-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gst-sdp/v1_22", "gstreamer-rtsp-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gst-sdp/v1_24", "gstreamer-rtsp-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gst-sdp/v1_26", "gstreamer-rtsp-sys/v1_26", "v1_24"] serde = ["dep:serde", "gst/serde"] [package.metadata.docs.rs] diff --git a/gstreamer-rtsp/src/lib.rs b/gstreamer-rtsp/src/lib.rs index 25047a36c..25fea9ce4 100644 --- a/gstreamer-rtsp/src/lib.rs +++ b/gstreamer-rtsp/src/lib.rs @@ -4,10 +4,10 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use glib; pub use gst; pub use gst_sdp; +pub use gstreamer_rtsp_sys as ffi; macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer-rtsp/src/rtsp_auth_credential.rs b/gstreamer-rtsp/src/rtsp_auth_credential.rs index 97c3e14f2..613b3181e 100644 --- a/gstreamer-rtsp/src/rtsp_auth_credential.rs +++ b/gstreamer-rtsp/src/rtsp_auth_credential.rs @@ -1,15 +1,14 @@ -use crate::{RTSPAuthCredential, RTSPAuthMethod, RTSPAuthParam}; -use ffi::GstRTSPAuthCredential; +use crate::{ffi, RTSPAuthCredential, RTSPAuthMethod, RTSPAuthParam}; use glib::translate::*; impl RTSPAuthCredential { pub fn scheme(&self) -> RTSPAuthMethod { - let ptr: *mut GstRTSPAuthCredential = self.to_glib_none().0; + let ptr: *mut ffi::GstRTSPAuthCredential = self.to_glib_none().0; unsafe { from_glib((*ptr).scheme) } } pub fn authorization(&self) -> Option<&str> { - let ptr: *mut GstRTSPAuthCredential = self.to_glib_none().0; + let ptr: *mut ffi::GstRTSPAuthCredential = self.to_glib_none().0; unsafe { if (*ptr).authorization.is_null() { None @@ -20,7 +19,7 @@ impl RTSPAuthCredential { } pub fn params(&self) -> glib::collections::PtrSlice { - let ptr: *mut GstRTSPAuthCredential = self.to_glib_none().0; + let ptr: *mut ffi::GstRTSPAuthCredential = self.to_glib_none().0; unsafe { FromGlibPtrContainer::from_glib_none((*ptr).params) } } } diff --git a/gstreamer-rtsp/src/rtsp_message.rs b/gstreamer-rtsp/src/rtsp_message.rs index a46df6bd8..460573ac7 100644 --- a/gstreamer-rtsp/src/rtsp_message.rs +++ b/gstreamer-rtsp/src/rtsp_message.rs @@ -1,4 +1,4 @@ -use crate::{RTSPAuthCredential, RTSPHeaderField, RTSPStatusCode}; +use crate::{ffi, RTSPAuthCredential, RTSPHeaderField, RTSPStatusCode}; use glib::translate::*; glib::wrapper! { diff --git a/gstreamer-sdp/Cargo.toml b/gstreamer-sdp/Cargo.toml index a7b29e1c7..7ce4dc89d 100644 --- a/gstreamer-sdp/Cargo.toml +++ b/gstreamer-sdp/Cargo.toml @@ -14,7 +14,7 @@ edition.workspace = true rust-version.workspace = true [dependencies] -ffi = { package = "gstreamer-sdp-sys", path = "sys" } +gstreamer-sdp-sys.workspace = true glib.workspace = true gst.workspace = true @@ -23,12 +23,12 @@ gir-format-check = "0.1" [features] default = [] -v1_16 = ["gst/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gstreamer-sdp-sys/v1_16"] +v1_18 = ["gst/v1_18", "gstreamer-sdp-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gstreamer-sdp-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gstreamer-sdp-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gstreamer-sdp-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gstreamer-sdp-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-sdp/src/lib.rs b/gstreamer-sdp/src/lib.rs index 02c2a1d6e..277718a19 100644 --- a/gstreamer-sdp/src/lib.rs +++ b/gstreamer-sdp/src/lib.rs @@ -4,9 +4,9 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use glib; pub use gst; +pub use gstreamer_sdp_sys as ffi; macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer-sdp/src/sdp_attribute.rs b/gstreamer-sdp/src/sdp_attribute.rs index fa8db01fa..9b28b8f3d 100644 --- a/gstreamer-sdp/src/sdp_attribute.rs +++ b/gstreamer-sdp/src/sdp_attribute.rs @@ -2,6 +2,7 @@ use std::{ffi::CStr, fmt, mem}; +use crate::ffi; use glib::translate::*; #[repr(transparent)] diff --git a/gstreamer-sdp/src/sdp_bandwidth.rs b/gstreamer-sdp/src/sdp_bandwidth.rs index 5098525d8..543f4d49f 100644 --- a/gstreamer-sdp/src/sdp_bandwidth.rs +++ b/gstreamer-sdp/src/sdp_bandwidth.rs @@ -2,6 +2,7 @@ use std::{ffi::CStr, fmt, mem}; +use crate::ffi; use glib::translate::*; #[repr(transparent)] diff --git a/gstreamer-sdp/src/sdp_connection.rs b/gstreamer-sdp/src/sdp_connection.rs index d0d4a750f..0633dc1e3 100644 --- a/gstreamer-sdp/src/sdp_connection.rs +++ b/gstreamer-sdp/src/sdp_connection.rs @@ -2,6 +2,7 @@ use std::{ffi::CStr, fmt, mem}; +use crate::ffi; use glib::translate::*; #[repr(transparent)] diff --git a/gstreamer-sdp/src/sdp_key.rs b/gstreamer-sdp/src/sdp_key.rs index 757e83628..13330a992 100644 --- a/gstreamer-sdp/src/sdp_key.rs +++ b/gstreamer-sdp/src/sdp_key.rs @@ -4,7 +4,7 @@ use std::{ffi::CStr, fmt}; #[repr(transparent)] #[doc(alias = "GstSDPKey")] -pub struct SDPKey(ffi::GstSDPKey); +pub struct SDPKey(crate::ffi::GstSDPKey); unsafe impl Send for SDPKey {} unsafe impl Sync for SDPKey {} diff --git a/gstreamer-sdp/src/sdp_media.rs b/gstreamer-sdp/src/sdp_media.rs index 0e803de37..e56701acd 100644 --- a/gstreamer-sdp/src/sdp_media.rs +++ b/gstreamer-sdp/src/sdp_media.rs @@ -9,7 +9,7 @@ use std::{ use glib::translate::*; use crate::{ - sdp_attribute::SDPAttribute, sdp_bandwidth::SDPBandwidth, sdp_connection::SDPConnection, + ffi, sdp_attribute::SDPAttribute, sdp_bandwidth::SDPBandwidth, sdp_connection::SDPConnection, sdp_key::SDPKey, }; diff --git a/gstreamer-sdp/src/sdp_message.rs b/gstreamer-sdp/src/sdp_message.rs index af2137b8e..67ac3d6ef 100644 --- a/gstreamer-sdp/src/sdp_message.rs +++ b/gstreamer-sdp/src/sdp_message.rs @@ -9,6 +9,7 @@ use std::{ use glib::{prelude::*, translate::*}; use crate::{ + ffi, sdp_attribute::SDPAttribute, sdp_bandwidth::SDPBandwidth, sdp_connection::SDPConnection, diff --git a/gstreamer-sdp/src/sdp_origin.rs b/gstreamer-sdp/src/sdp_origin.rs index e51a87ee5..7ae9e78c6 100644 --- a/gstreamer-sdp/src/sdp_origin.rs +++ b/gstreamer-sdp/src/sdp_origin.rs @@ -4,7 +4,7 @@ use std::{ffi::CStr, fmt}; #[repr(transparent)] #[doc(alias = "GstSDPOrigin")] -pub struct SDPOrigin(pub(crate) ffi::GstSDPOrigin); +pub struct SDPOrigin(pub(crate) crate::ffi::GstSDPOrigin); unsafe impl Send for SDPOrigin {} unsafe impl Sync for SDPOrigin {} diff --git a/gstreamer-sdp/src/sdp_time.rs b/gstreamer-sdp/src/sdp_time.rs index 9e09446dd..aea8c48b9 100644 --- a/gstreamer-sdp/src/sdp_time.rs +++ b/gstreamer-sdp/src/sdp_time.rs @@ -2,6 +2,7 @@ use std::{ffi::CStr, fmt, mem, os::raw::c_char, ptr}; +use crate::ffi; use glib::translate::*; #[repr(transparent)] diff --git a/gstreamer-sdp/src/sdp_zone.rs b/gstreamer-sdp/src/sdp_zone.rs index 6cc7c14d4..892cca19f 100644 --- a/gstreamer-sdp/src/sdp_zone.rs +++ b/gstreamer-sdp/src/sdp_zone.rs @@ -2,6 +2,7 @@ use std::{ffi::CStr, fmt, mem}; +use crate::ffi; use glib::translate::*; #[repr(transparent)] diff --git a/gstreamer-tag/Cargo.toml b/gstreamer-tag/Cargo.toml index 3079f662d..ccef9ba3e 100644 --- a/gstreamer-tag/Cargo.toml +++ b/gstreamer-tag/Cargo.toml @@ -18,18 +18,18 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-tag-sys", path = "sys" } +gstreamer-tag-sys.workspace = true glib.workspace = true gst.workspace = true [features] default = [] -v1_16 = ["gst/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gstreamer-tag-sys/v1_16"] +v1_18 = ["gst/v1_18", "gstreamer-tag-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gstreamer-tag-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gstreamer-tag-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gstreamer-tag-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gstreamer-tag-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-tag/src/lib.rs b/gstreamer-tag/src/lib.rs index 9524e128f..cf2a2466c 100644 --- a/gstreamer-tag/src/lib.rs +++ b/gstreamer-tag/src/lib.rs @@ -4,9 +4,9 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use glib; pub use gst; +pub use gstreamer_tag_sys as ffi; macro_rules! skip_assert_initialized { () => {}; diff --git a/gstreamer-tag/src/tags.rs b/gstreamer-tag/src/tags.rs index a920a0781..0dd8b14b9 100644 --- a/gstreamer-tag/src/tags.rs +++ b/gstreamer-tag/src/tags.rs @@ -17,7 +17,7 @@ pub fn tag_parse_extended_comment( let mut c_key = ptr::null_mut(); let mut c_lang = ptr::null_mut(); let mut c_value = ptr::null_mut(); - let res: bool = from_glib(ffi::gst_tag_parse_extended_comment( + let res: bool = from_glib(crate::ffi::gst_tag_parse_extended_comment( ext_comment.to_glib_none().0, &mut c_key, &mut c_lang, diff --git a/gstreamer-validate/Cargo.toml b/gstreamer-validate/Cargo.toml index 491fac932..5d0f2ee58 100644 --- a/gstreamer-validate/Cargo.toml +++ b/gstreamer-validate/Cargo.toml @@ -15,7 +15,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-validate-sys", path = "sys" } +gstreamer-validate-sys.workspace = true glib.workspace = true gst = { workspace = true, features = ["v1_22"] } @@ -25,8 +25,8 @@ tempfile = "3" [features] default = [] -v1_24 = ["gst/v1_24", "ffi/v1_24"] -v1_26 = ["gst/v1_26", "ffi/v1_26", "v1_24"] +v1_24 = ["gst/v1_24", "gstreamer-validate-sys/v1_24"] +v1_26 = ["gst/v1_26", "gstreamer-validate-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-validate/src/action.rs b/gstreamer-validate/src/action.rs index 802340e95..4600fb90d 100644 --- a/gstreamer-validate/src/action.rs +++ b/gstreamer-validate/src/action.rs @@ -3,8 +3,7 @@ use glib::prelude::*; use glib::translate::*; -use crate::ActionType; -use crate::Scenario; +use crate::{ffi, ActionType, Scenario}; gst::mini_object_wrapper!(Action, ActionRef, ffi::GstValidateAction, || { ffi::gst_validate_action_get_type() diff --git a/gstreamer-validate/src/action_type.rs b/gstreamer-validate/src/action_type.rs index 833a2e3f0..4b6351a55 100644 --- a/gstreamer-validate/src/action_type.rs +++ b/gstreamer-validate/src/action_type.rs @@ -1,5 +1,6 @@ use std::{ffi::c_int, ptr}; +use crate::ffi; use glib::translate::*; #[derive(Debug)] diff --git a/gstreamer-validate/src/enums.rs b/gstreamer-validate/src/enums.rs index 2a71a1975..43170fff5 100644 --- a/gstreamer-validate/src/enums.rs +++ b/gstreamer-validate/src/enums.rs @@ -1,3 +1,4 @@ +use crate::ffi; use glib::translate::*; #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] diff --git a/gstreamer-validate/src/functions.rs b/gstreamer-validate/src/functions.rs index 8c907605e..ba65e00e4 100644 --- a/gstreamer-validate/src/functions.rs +++ b/gstreamer-validate/src/functions.rs @@ -1,5 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. +use crate::ffi; use glib::translate::*; #[doc(alias = "gst_validate_init")] diff --git a/gstreamer-validate/src/lib.rs b/gstreamer-validate/src/lib.rs index 621b5779c..2542f8fbe 100644 --- a/gstreamer-validate/src/lib.rs +++ b/gstreamer-validate/src/lib.rs @@ -4,6 +4,8 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] +pub use gstreamer_validate_sys as ffi; + #[doc(hidden)] pub static INITIALIZED: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false); diff --git a/gstreamer-validate/src/reporter.rs b/gstreamer-validate/src/reporter.rs index 9316be85d..f2c624d45 100644 --- a/gstreamer-validate/src/reporter.rs +++ b/gstreamer-validate/src/reporter.rs @@ -6,7 +6,7 @@ impl crate::Reporter { #[doc(alias = "gst_validate_report_action")] pub fn report_action(&self, action: &Action, issue_id: crate::IssueId, message: &str) { unsafe { - ffi::gst_validate_report_action( + crate::ffi::gst_validate_report_action( self.to_glib_none().0, action.to_glib_none().0, issue_id.into_glib(), diff --git a/gstreamer-video/Cargo.toml b/gstreamer-video/Cargo.toml index 25de78c74..ee31fa838 100644 --- a/gstreamer-video/Cargo.toml +++ b/gstreamer-video/Cargo.toml @@ -17,7 +17,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" cfg-if = "1.0" -ffi = { package = "gstreamer-video-sys", path = "sys" } +gstreamer-video-sys.workspace = true glib.workspace = true gst.workspace = true gst-base.workspace = true @@ -34,12 +34,12 @@ gir-format-check = "0.1" [features] default = [] -v1_16 = ["gst/v1_16", "gst-base/v1_16", "ffi/v1_16"] -v1_18 = ["gst/v1_18", "gst-base/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "gst-base/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "gst-base/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "gst-base/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "gst-base/v1_26", "ffi/v1_26", "v1_24"] +v1_16 = ["gst/v1_16", "gst-base/v1_16", "gstreamer-video-sys/v1_16"] +v1_18 = ["gst/v1_18", "gst-base/v1_18", "gstreamer-video-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gst-base/v1_20", "gstreamer-video-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gst-base/v1_22", "gstreamer-video-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gst-base/v1_24", "gstreamer-video-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gst-base/v1_26", "gstreamer-video-sys/v1_26", "v1_24"] serde = ["dep:serde", "gst/serde"] [package.metadata.docs.rs] diff --git a/gstreamer-video/src/caps_features.rs b/gstreamer-video/src/caps_features.rs index 6f16ebbeb..39b5f176e 100644 --- a/gstreamer-video/src/caps_features.rs +++ b/gstreamer-video/src/caps_features.rs @@ -1,5 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. +use crate::ffi; use gst::CapsFeatures; use once_cell::sync::Lazy; diff --git a/gstreamer-video/src/enums.rs b/gstreamer-video/src/enums.rs index 96cf121a1..a47bf5c14 100644 --- a/gstreamer-video/src/enums.rs +++ b/gstreamer-video/src/enums.rs @@ -17,7 +17,7 @@ impl VideoCaptionType { #[doc(alias = "gst_video_caption_type_from_caps")] pub fn from_caps(caps: &gst::CapsRef) -> VideoCaptionType { skip_assert_initialized!(); - unsafe { from_glib(ffi::gst_video_caption_type_from_caps(caps.as_ptr())) } + unsafe { from_glib(crate::ffi::gst_video_caption_type_from_caps(caps.as_ptr())) } } } @@ -34,7 +34,7 @@ impl VideoOrientationMethod { use std::mem; let mut method = mem::MaybeUninit::uninit(); - let ret = from_glib(ffi::gst_video_orientation_from_tag( + let ret = from_glib(crate::ffi::gst_video_orientation_from_tag( mut_override(taglist.as_ptr()), method.as_mut_ptr(), )); diff --git a/gstreamer-video/src/functions.rs b/gstreamer-video/src/functions.rs index a69f81fbc..7587b55eb 100644 --- a/gstreamer-video/src/functions.rs +++ b/gstreamer-video/src/functions.rs @@ -2,6 +2,7 @@ use std::{i32, mem, ptr}; +use crate::ffi; use glib::translate::{from_glib, from_glib_full, IntoGlib, ToGlibPtr}; #[doc(alias = "gst_video_convert_sample")] diff --git a/gstreamer-video/src/lib.rs b/gstreamer-video/src/lib.rs index 7f40ac386..2afe21f54 100644 --- a/gstreamer-video/src/lib.rs +++ b/gstreamer-video/src/lib.rs @@ -4,10 +4,10 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use glib; pub use gst; pub use gst_base; +pub use gstreamer_video_sys as ffi; macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer-video/src/subclass/navigation.rs b/gstreamer-video/src/subclass/navigation.rs index 333f3e08e..5a7393f20 100644 --- a/gstreamer-video/src/subclass/navigation.rs +++ b/gstreamer-video/src/subclass/navigation.rs @@ -2,7 +2,7 @@ use glib::{prelude::*, subclass::prelude::*, translate::*}; -use crate::Navigation; +use crate::{ffi, Navigation}; pub trait NavigationImpl: ObjectImpl { fn send_event(&self, structure: gst::Structure); diff --git a/gstreamer-video/src/subclass/video_aggregator.rs b/gstreamer-video/src/subclass/video_aggregator.rs index 07bd7aa7d..2d798f35b 100644 --- a/gstreamer-video/src/subclass/video_aggregator.rs +++ b/gstreamer-video/src/subclass/video_aggregator.rs @@ -5,7 +5,7 @@ use std::{mem, ptr}; use glib::translate::*; use gst_base::{prelude::*, subclass::prelude::*}; -use crate::VideoAggregator; +use crate::{ffi, VideoAggregator}; pub struct AggregateFramesToken<'a>(pub(crate) &'a VideoAggregator); diff --git a/gstreamer-video/src/subclass/video_aggregator_pad.rs b/gstreamer-video/src/subclass/video_aggregator_pad.rs index 1e0083554..6d4c51ddd 100644 --- a/gstreamer-video/src/subclass/video_aggregator_pad.rs +++ b/gstreamer-video/src/subclass/video_aggregator_pad.rs @@ -5,7 +5,7 @@ use std::{mem, ptr}; use glib::translate::*; use gst_base::{prelude::*, subclass::prelude::*}; -use crate::{subclass::AggregateFramesToken, VideoAggregator, VideoAggregatorPad}; +use crate::{ffi, subclass::AggregateFramesToken, VideoAggregator, VideoAggregatorPad}; pub trait VideoAggregatorPadImpl: VideoAggregatorPadImplExt + AggregatorPadImpl { fn update_conversion_info(&self) { diff --git a/gstreamer-video/src/subclass/video_decoder.rs b/gstreamer-video/src/subclass/video_decoder.rs index 3758bef79..0f474b676 100644 --- a/gstreamer-video/src/subclass/video_decoder.rs +++ b/gstreamer-video/src/subclass/video_decoder.rs @@ -4,6 +4,7 @@ use glib::translate::*; use gst::subclass::prelude::*; use crate::{ + ffi, prelude::*, video_codec_state::{Readable, VideoCodecState}, VideoCodecFrame, VideoDecoder, diff --git a/gstreamer-video/src/subclass/video_encoder.rs b/gstreamer-video/src/subclass/video_encoder.rs index 8fd9ff335..4745cdfb5 100644 --- a/gstreamer-video/src/subclass/video_encoder.rs +++ b/gstreamer-video/src/subclass/video_encoder.rs @@ -4,6 +4,7 @@ use glib::translate::*; use gst::subclass::prelude::*; use crate::{ + ffi, prelude::*, video_codec_state::{Readable, VideoCodecState}, VideoCodecFrame, VideoEncoder, diff --git a/gstreamer-video/src/subclass/video_filter.rs b/gstreamer-video/src/subclass/video_filter.rs index 0123dce84..e820d8b1a 100644 --- a/gstreamer-video/src/subclass/video_filter.rs +++ b/gstreamer-video/src/subclass/video_filter.rs @@ -3,7 +3,7 @@ use glib::translate::*; use gst_base::{prelude::*, subclass::prelude::*}; -use crate::{VideoFilter, VideoFrameExt, VideoFrameRef, VideoInfo}; +use crate::{ffi, VideoFilter, VideoFrameExt, VideoFrameRef, VideoInfo}; pub trait VideoFilterImpl: VideoFilterImplExt + BaseTransformImpl { fn set_info( diff --git a/gstreamer-video/src/subclass/video_sink.rs b/gstreamer-video/src/subclass/video_sink.rs index 805169c6f..8bf209a8c 100644 --- a/gstreamer-video/src/subclass/video_sink.rs +++ b/gstreamer-video/src/subclass/video_sink.rs @@ -3,7 +3,7 @@ use glib::{prelude::*, translate::*}; use gst_base::subclass::prelude::*; -use crate::VideoSink; +use crate::{ffi, VideoSink}; pub trait VideoSinkImpl: VideoSinkImplExt + BaseSinkImpl + ElementImpl { fn show_frame(&self, buffer: &gst::Buffer) -> Result { diff --git a/gstreamer-video/src/video_aggregator.rs b/gstreamer-video/src/video_aggregator.rs index 2667fb201..e610f18a0 100644 --- a/gstreamer-video/src/video_aggregator.rs +++ b/gstreamer-video/src/video_aggregator.rs @@ -1,7 +1,7 @@ use glib::translate::*; use gst::prelude::*; -use crate::auto::VideoAggregator; +use crate::{ffi, VideoAggregator}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-video/src/video_aggregator_convert_pad.rs b/gstreamer-video/src/video_aggregator_convert_pad.rs index 1a0b396d7..01bb04b3e 100644 --- a/gstreamer-video/src/video_aggregator_convert_pad.rs +++ b/gstreamer-video/src/video_aggregator_convert_pad.rs @@ -6,7 +6,7 @@ use glib::{ translate::*, }; -use crate::auto::VideoAggregatorConvertPad; +use crate::{ffi, VideoAggregatorConvertPad}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-video/src/video_aggregator_pad.rs b/gstreamer-video/src/video_aggregator_pad.rs index db3317f08..426b38484 100644 --- a/gstreamer-video/src/video_aggregator_pad.rs +++ b/gstreamer-video/src/video_aggregator_pad.rs @@ -1,7 +1,7 @@ use glib::{object::IsA, translate::*}; use gst::prelude::*; -use crate::{auto::VideoAggregatorPad, subclass::AggregateFramesToken}; +use crate::{ffi, subclass::AggregateFramesToken, VideoAggregatorPad}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-video/src/video_buffer_pool.rs b/gstreamer-video/src/video_buffer_pool.rs index fdd22dd85..0ca0cc6cd 100644 --- a/gstreamer-video/src/video_buffer_pool.rs +++ b/gstreamer-video/src/video_buffer_pool.rs @@ -2,6 +2,7 @@ use std::{marker::PhantomData, mem}; +use crate::ffi; use glib::translate::*; pub static BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META: &glib::GStr = unsafe { diff --git a/gstreamer-video/src/video_codec_frame.rs b/gstreamer-video/src/video_codec_frame.rs index 26ac0911c..47de4483c 100644 --- a/gstreamer-video/src/video_codec_frame.rs +++ b/gstreamer-video/src/video_codec_frame.rs @@ -4,7 +4,7 @@ use std::{fmt, marker::PhantomData, mem}; use glib::translate::*; -use crate::{utils::HasStreamLock, VideoCodecFrameFlags}; +use crate::{ffi, utils::HasStreamLock, VideoCodecFrameFlags}; pub struct VideoCodecFrame<'a> { frame: *mut ffi::GstVideoCodecFrame, diff --git a/gstreamer-video/src/video_codec_state.rs b/gstreamer-video/src/video_codec_state.rs index ed6c34cc4..078746e59 100644 --- a/gstreamer-video/src/video_codec_state.rs +++ b/gstreamer-video/src/video_codec_state.rs @@ -4,7 +4,7 @@ use std::{fmt, marker::PhantomData, ptr}; use glib::translate::*; -use crate::{utils::HasStreamLock, video_info::VideoInfo}; +use crate::{ffi, utils::HasStreamLock, video_info::VideoInfo}; pub trait VideoCodecStateContext<'a> { #[doc(alias = "get_element")] diff --git a/gstreamer-video/src/video_color_matrix.rs b/gstreamer-video/src/video_color_matrix.rs index c438df9f5..7a0598e78 100644 --- a/gstreamer-video/src/video_color_matrix.rs +++ b/gstreamer-video/src/video_color_matrix.rs @@ -12,7 +12,7 @@ impl crate::VideoColorMatrix { let mut kr = mem::MaybeUninit::uninit(); let mut kb = mem::MaybeUninit::uninit(); glib::result_from_gboolean!( - ffi::gst_video_color_matrix_get_Kr_Kb( + crate::ffi::gst_video_color_matrix_get_Kr_Kb( self.into_glib(), kr.as_mut_ptr(), kb.as_mut_ptr(), diff --git a/gstreamer-video/src/video_converter.rs b/gstreamer-video/src/video_converter.rs index 3e2ff4772..122e22314 100644 --- a/gstreamer-video/src/video_converter.rs +++ b/gstreamer-video/src/video_converter.rs @@ -2,7 +2,7 @@ use std::{ops, ptr}; -use crate::VideoFrameExt; +use crate::{ffi, prelude::*}; use glib::{prelude::*, translate::*}; #[derive(Debug)] diff --git a/gstreamer-video/src/video_decoder.rs b/gstreamer-video/src/video_decoder.rs index 918449018..972a6d3a8 100644 --- a/gstreamer-video/src/video_decoder.rs +++ b/gstreamer-video/src/video_decoder.rs @@ -8,6 +8,7 @@ use glib::{prelude::*, translate::*}; #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] use crate::VideoInterlaceMode; use crate::{ + ffi, utils::HasStreamLock, video_codec_state::{InNegotiation, Readable, VideoCodecState, VideoCodecStateContext}, VideoCodecFrame, VideoDecoder, VideoFormat, diff --git a/gstreamer-video/src/video_encoder.rs b/gstreamer-video/src/video_encoder.rs index ae2c7f36e..b459f5d7d 100644 --- a/gstreamer-video/src/video_encoder.rs +++ b/gstreamer-video/src/video_encoder.rs @@ -5,6 +5,7 @@ use std::{mem, ptr}; use glib::{prelude::*, translate::*}; use crate::{ + ffi, utils::HasStreamLock, video_codec_state::{InNegotiation, Readable, VideoCodecState, VideoCodecStateContext}, VideoCodecFrame, VideoEncoder, diff --git a/gstreamer-video/src/video_event.rs b/gstreamer-video/src/video_event.rs index 025f342cc..dafdf0c78 100644 --- a/gstreamer-video/src/video_event.rs +++ b/gstreamer-video/src/video_event.rs @@ -7,7 +7,7 @@ use gst::EventType; #[cfg(feature = "v1_22")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] use crate::NavigationModifierType; -use crate::{NavigationCommand, NavigationEventType}; +use crate::{ffi, NavigationCommand, NavigationEventType}; // FIXME: Copy from gstreamer/src/event.rs macro_rules! event_builder_generic_impl { diff --git a/gstreamer-video/src/video_filter.rs b/gstreamer-video/src/video_filter.rs index 9bc4b5c7a..c6ef1df73 100644 --- a/gstreamer-video/src/video_filter.rs +++ b/gstreamer-video/src/video_filter.rs @@ -4,7 +4,7 @@ use glib::{prelude::*, translate::*}; use gst::prelude::*; use gst_base::prelude::*; -use crate::VideoFilter; +use crate::{ffi, VideoFilter}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-video/src/video_format.rs b/gstreamer-video/src/video_format.rs index 36828ca16..04591b8b8 100644 --- a/gstreamer-video/src/video_format.rs +++ b/gstreamer-video/src/video_format.rs @@ -2,6 +2,7 @@ use std::str; +use crate::ffi; use glib::translate::{from_glib, FromGlib, IntoGlib}; use once_cell::sync::Lazy; diff --git a/gstreamer-video/src/video_format_info.rs b/gstreamer-video/src/video_format_info.rs index 083b8bf8e..a00e11176 100644 --- a/gstreamer-video/src/video_format_info.rs +++ b/gstreamer-video/src/video_format_info.rs @@ -2,6 +2,7 @@ use std::{cmp::Ordering, fmt, marker::PhantomData, str}; +use crate::ffi; use glib::translate::{from_glib, IntoGlib, ToGlibPtr}; #[doc(alias = "GstVideoFormatInfo")] diff --git a/gstreamer-video/src/video_frame.rs b/gstreamer-video/src/video_frame.rs index 84ccc2366..7d8c4c976 100644 --- a/gstreamer-video/src/video_frame.rs +++ b/gstreamer-video/src/video_frame.rs @@ -2,6 +2,7 @@ use std::{fmt, marker::PhantomData, mem, ops, ptr, slice}; +use crate::ffi; use glib::translate::{from_glib, from_glib_none, Borrowed, ToGlibPtr}; pub enum Readable {} diff --git a/gstreamer-video/src/video_hdr.rs b/gstreamer-video/src/video_hdr.rs index afe96fffd..970780a47 100644 --- a/gstreamer-video/src/video_hdr.rs +++ b/gstreamer-video/src/video_hdr.rs @@ -2,6 +2,7 @@ use std::{fmt, mem, ptr, str}; +use crate::ffi; use glib::translate::*; #[doc(alias = "GstVideoContentLightLevel")] diff --git a/gstreamer-video/src/video_info.rs b/gstreamer-video/src/video_info.rs index b08aabecd..31e0113ea 100644 --- a/gstreamer-video/src/video_info.rs +++ b/gstreamer-video/src/video_info.rs @@ -2,6 +2,7 @@ use std::{fmt, marker::PhantomData, mem, ptr, str}; +use crate::ffi; use glib::translate::*; use gst::prelude::*; diff --git a/gstreamer-video/src/video_info_dma_drm.rs b/gstreamer-video/src/video_info_dma_drm.rs index b2f657021..173a7b3c6 100644 --- a/gstreamer-video/src/video_info_dma_drm.rs +++ b/gstreamer-video/src/video_info_dma_drm.rs @@ -5,7 +5,7 @@ use std::{fmt, marker::PhantomData, mem, ops, ptr, str}; use glib::translate::*; use gst::prelude::*; -use crate::{VideoFormat, VideoInfo}; +use crate::{ffi, VideoFormat, VideoInfo}; #[doc(alias = "gst_video_dma_drm_fourcc_from_format")] pub fn dma_drm_fourcc_from_format(v: VideoFormat) -> Result { diff --git a/gstreamer-video/src/video_message.rs b/gstreamer-video/src/video_message.rs index abc8dd851..93cd0384d 100644 --- a/gstreamer-video/src/video_message.rs +++ b/gstreamer-video/src/video_message.rs @@ -8,7 +8,7 @@ use glib::{ }; use gst::{ffi as gst_ffi, prelude::*, Message, Object, Seqnum}; -use crate::NavigationMessageType; +use crate::{ffi, NavigationMessageType}; macro_rules! message_builder_generic_impl { ($new_fn:expr) => { diff --git a/gstreamer-video/src/video_meta.rs b/gstreamer-video/src/video_meta.rs index 1c7bac9a9..a98dffced 100644 --- a/gstreamer-video/src/video_meta.rs +++ b/gstreamer-video/src/video_meta.rs @@ -2,6 +2,7 @@ use std::{fmt, ptr}; +use crate::ffi; use glib::translate::*; use gst::prelude::*; @@ -1162,10 +1163,10 @@ impl fmt::Debug for AncillaryMeta { } pub mod tags { - gst::impl_meta_tag!(Video, GST_META_TAG_VIDEO_STR); - gst::impl_meta_tag!(Size, GST_META_TAG_VIDEO_SIZE_STR); - gst::impl_meta_tag!(Orientation, GST_META_TAG_VIDEO_ORIENTATION_STR); - gst::impl_meta_tag!(Colorspace, GST_META_TAG_VIDEO_COLORSPACE_STR); + gst::impl_meta_tag!(Video, crate::ffi::GST_META_TAG_VIDEO_STR); + gst::impl_meta_tag!(Size, crate::ffi::GST_META_TAG_VIDEO_SIZE_STR); + gst::impl_meta_tag!(Orientation, crate::ffi::GST_META_TAG_VIDEO_ORIENTATION_STR); + gst::impl_meta_tag!(Colorspace, crate::ffi::GST_META_TAG_VIDEO_COLORSPACE_STR); } #[derive(Debug, Clone, PartialEq, Eq)] diff --git a/gstreamer-video/src/video_overlay.rs b/gstreamer-video/src/video_overlay.rs index 6e27c9a25..fe196691c 100644 --- a/gstreamer-video/src/video_overlay.rs +++ b/gstreamer-video/src/video_overlay.rs @@ -3,7 +3,7 @@ use glib::{prelude::*, translate::*}; use libc::uintptr_t; -use crate::VideoOverlay; +use crate::{ffi, VideoOverlay}; mod sealed { pub trait Sealed {} diff --git a/gstreamer-video/src/video_overlay_composition.rs b/gstreamer-video/src/video_overlay_composition.rs index 8543dc1f9..b6ab51dd6 100644 --- a/gstreamer-video/src/video_overlay_composition.rs +++ b/gstreamer-video/src/video_overlay_composition.rs @@ -2,6 +2,7 @@ use std::{fmt, mem}; +use crate::ffi; use glib::translate::*; gst::mini_object_wrapper!( diff --git a/gstreamer-video/src/video_rectangle.rs b/gstreamer-video/src/video_rectangle.rs index db1e4b48e..84125e704 100644 --- a/gstreamer-video/src/video_rectangle.rs +++ b/gstreamer-video/src/video_rectangle.rs @@ -2,6 +2,7 @@ use std::{marker::PhantomData, mem}; +use crate::ffi; use glib::translate::IntoGlib; #[repr(C)] diff --git a/gstreamer-video/src/video_time_code.rs b/gstreamer-video/src/video_time_code.rs index ca8876f3a..bfd0fafe1 100644 --- a/gstreamer-video/src/video_time_code.rs +++ b/gstreamer-video/src/video_time_code.rs @@ -5,7 +5,7 @@ use std::{cmp, fmt, mem, str}; use glib::translate::*; use gst::prelude::*; -use crate::{VideoTimeCodeFlags, VideoTimeCodeInterval}; +use crate::{ffi, VideoTimeCodeFlags, VideoTimeCodeInterval}; glib::wrapper! { #[doc(alias = "GstVideoTimeCode")] diff --git a/gstreamer-video/src/video_time_code_interval.rs b/gstreamer-video/src/video_time_code_interval.rs index a54983c6d..5e463a32f 100644 --- a/gstreamer-video/src/video_time_code_interval.rs +++ b/gstreamer-video/src/video_time_code_interval.rs @@ -2,6 +2,7 @@ use std::{cmp, fmt, mem, str}; +use crate::ffi; use glib::translate::*; glib::wrapper! { diff --git a/gstreamer-video/src/video_vbi_encoder.rs b/gstreamer-video/src/video_vbi_encoder.rs index 54939bf33..a03b536a4 100644 --- a/gstreamer-video/src/video_vbi_encoder.rs +++ b/gstreamer-video/src/video_vbi_encoder.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use crate::VideoFormat; +use crate::{ffi, VideoFormat}; use glib::translate::*; use crate::video_vbi::line_buffer_len; diff --git a/gstreamer-video/src/video_vbi_parser.rs b/gstreamer-video/src/video_vbi_parser.rs index 618cbb2e7..f47b5ff1c 100644 --- a/gstreamer-video/src/video_vbi_parser.rs +++ b/gstreamer-video/src/video_vbi_parser.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use crate::VideoFormat; +use crate::{ffi, VideoFormat}; use glib::translate::*; use std::fmt; diff --git a/gstreamer-webrtc/Cargo.toml b/gstreamer-webrtc/Cargo.toml index d78190942..8701335b2 100644 --- a/gstreamer-webrtc/Cargo.toml +++ b/gstreamer-webrtc/Cargo.toml @@ -15,7 +15,7 @@ rust-version.workspace = true [dependencies] libc = "0.2" -ffi = { package = "gstreamer-webrtc-sys", path = "sys" } +gstreamer-webrtc-sys.workspace = true glib.workspace = true gst.workspace = true gst-sdp.workspace = true @@ -25,13 +25,13 @@ gir-format-check = "0.1" [features] default = [] -v1_14_1 = ["ffi/v1_14_1"] -v1_16 = ["gst/v1_16", "gst-sdp/v1_16", "ffi/v1_16", "v1_14_1"] -v1_18 = ["gst/v1_18", "gst-sdp/v1_18", "ffi/v1_18", "v1_16"] -v1_20 = ["gst/v1_20", "gst-sdp/v1_20", "ffi/v1_20", "v1_18"] -v1_22 = ["gst/v1_22", "gst-sdp/v1_22", "ffi/v1_22", "v1_20"] -v1_24 = ["gst/v1_24", "gst-sdp/v1_24", "ffi/v1_24", "v1_22"] -v1_26 = ["gst/v1_26", "gst-sdp/v1_26", "ffi/v1_26", "v1_24"] +v1_14_1 = ["gstreamer-webrtc-sys/v1_14_1"] +v1_16 = ["gst/v1_16", "gst-sdp/v1_16", "gstreamer-webrtc-sys/v1_16", "v1_14_1"] +v1_18 = ["gst/v1_18", "gst-sdp/v1_18", "gstreamer-webrtc-sys/v1_18", "v1_16"] +v1_20 = ["gst/v1_20", "gst-sdp/v1_20", "gstreamer-webrtc-sys/v1_20", "v1_18"] +v1_22 = ["gst/v1_22", "gst-sdp/v1_22", "gstreamer-webrtc-sys/v1_22", "v1_20"] +v1_24 = ["gst/v1_24", "gst-sdp/v1_24", "gstreamer-webrtc-sys/v1_24", "v1_22"] +v1_26 = ["gst/v1_26", "gst-sdp/v1_26", "gstreamer-webrtc-sys/v1_26", "v1_24"] [package.metadata.docs.rs] all-features = true diff --git a/gstreamer-webrtc/src/lib.rs b/gstreamer-webrtc/src/lib.rs index 0376fe4bc..9398c0b24 100644 --- a/gstreamer-webrtc/src/lib.rs +++ b/gstreamer-webrtc/src/lib.rs @@ -4,10 +4,10 @@ #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] -pub use ffi; pub use glib; pub use gst; pub use gst_sdp; +pub use gstreamer_webrtc_sys as ffi; macro_rules! skip_assert_initialized { () => {}; diff --git a/gstreamer-webrtc/src/web_rtc_session_description.rs b/gstreamer-webrtc/src/web_rtc_session_description.rs index 44c9431eb..063a8cd81 100644 --- a/gstreamer-webrtc/src/web_rtc_session_description.rs +++ b/gstreamer-webrtc/src/web_rtc_session_description.rs @@ -9,7 +9,7 @@ impl WebRTCSessionDescription { pub fn new(type_: WebRTCSDPType, sdp: gst_sdp::SDPMessage) -> WebRTCSessionDescription { skip_assert_initialized!(); unsafe { - from_glib_full(ffi::gst_webrtc_session_description_new( + from_glib_full(crate::ffi::gst_webrtc_session_description_new( type_.into_glib(), sdp.into_glib_ptr(), )) diff --git a/gstreamer-webrtc/src/web_rtcice.rs b/gstreamer-webrtc/src/web_rtcice.rs index a213c91d9..ccb5bb3e9 100644 --- a/gstreamer-webrtc/src/web_rtcice.rs +++ b/gstreamer-webrtc/src/web_rtcice.rs @@ -2,7 +2,7 @@ use glib::{prelude::*, translate::*}; -use crate::{WebRTCICE, WebRTCICEStream}; +use crate::{ffi, WebRTCICE, WebRTCICEStream}; mod sealed { pub trait Sealed {} diff --git a/gstreamer/Cargo.toml b/gstreamer/Cargo.toml index 01f989278..21706506f 100644 --- a/gstreamer/Cargo.toml +++ b/gstreamer/Cargo.toml @@ -16,7 +16,7 @@ rust-version.workspace = true [dependencies] cfg-if = "1.0" libc = "0.2" -ffi = { package = "gstreamer-sys", path = "sys" } +gstreamer-sys.workspace = true glib.workspace = true num-integer = { version = "0.1", default-features = false, features = [] } num-rational = { version = "0.4", default-features = false, features = [] } @@ -43,12 +43,12 @@ gir-format-check = "0.1" [features] default = [] -v1_16 = ["ffi/v1_16"] -v1_18 = ["ffi/v1_18", "v1_16"] -v1_20 = ["ffi/v1_20", "v1_18"] -v1_22 = ["ffi/v1_22", "v1_20"] -v1_24 = ["ffi/v1_24", "v1_22"] -v1_26 = ["ffi/v1_26", "v1_24"] +v1_16 = ["gstreamer-sys/v1_16"] +v1_18 = ["gstreamer-sys/v1_18", "v1_16"] +v1_20 = ["gstreamer-sys/v1_20", "v1_18"] +v1_22 = ["gstreamer-sys/v1_22", "v1_20"] +v1_24 = ["gstreamer-sys/v1_24", "v1_22"] +v1_26 = ["gstreamer-sys/v1_26", "v1_24"] serde = ["num-rational/serde", "dep:serde", "serde_bytes"] log = ["dep:log"] diff --git a/gstreamer/src/allocation_params.rs b/gstreamer/src/allocation_params.rs index e73161792..6aec8d19d 100644 --- a/gstreamer/src/allocation_params.rs +++ b/gstreamer/src/allocation_params.rs @@ -4,7 +4,7 @@ use std::{marker::PhantomData, mem}; use glib::translate::*; -use crate::MemoryFlags; +use crate::{ffi, MemoryFlags}; #[derive(Debug, Clone)] #[doc(alias = "GstAllocationParams")] diff --git a/gstreamer/src/allocator.rs b/gstreamer/src/allocator.rs index bd68997fe..7504b5ad4 100644 --- a/gstreamer/src/allocator.rs +++ b/gstreamer/src/allocator.rs @@ -2,7 +2,7 @@ use glib::{prelude::*, translate::*}; -use crate::Allocator; +use crate::{ffi, Allocator}; impl Allocator { #[doc(alias = "gst_allocator_register")] diff --git a/gstreamer/src/bin.rs b/gstreamer/src/bin.rs index ad3e1dd37..9c601d352 100644 --- a/gstreamer/src/bin.rs +++ b/gstreamer/src/bin.rs @@ -9,7 +9,7 @@ use glib::{ GString, }; -use crate::{prelude::*, Bin, BinFlags, Element, LoggableError}; +use crate::{ffi, prelude::*, Bin, BinFlags, Element, LoggableError}; impl Bin { // rustdoc-stripper-ignore-next diff --git a/gstreamer/src/buffer.rs b/gstreamer/src/buffer.rs index 11277ce15..e6bca0462 100644 --- a/gstreamer/src/buffer.rs +++ b/gstreamer/src/buffer.rs @@ -10,7 +10,9 @@ use std::{ use glib::translate::*; -use crate::{meta::*, BufferCursor, BufferFlags, BufferRefCursor, ClockTime, Memory, MemoryRef}; +use crate::{ + ffi, meta::*, BufferCursor, BufferFlags, BufferRefCursor, ClockTime, Memory, MemoryRef, +}; pub enum Readable {} pub enum Writable {} diff --git a/gstreamer/src/buffer_cursor.rs b/gstreamer/src/buffer_cursor.rs index f00c1eb5f..28c28991c 100644 --- a/gstreamer/src/buffer_cursor.rs +++ b/gstreamer/src/buffer_cursor.rs @@ -4,7 +4,7 @@ use std::{fmt, io, marker::PhantomData, mem, ptr, u64, usize}; use crate::{ buffer::{Readable, Writable}, - Buffer, BufferRef, + ffi, Buffer, BufferRef, }; pub struct BufferCursor { diff --git a/gstreamer/src/buffer_pool.rs b/gstreamer/src/buffer_pool.rs index 50216a6dc..6e418d479 100644 --- a/gstreamer/src/buffer_pool.rs +++ b/gstreamer/src/buffer_pool.rs @@ -9,7 +9,7 @@ use std::{ use glib::{prelude::*, translate::*}; -use crate::{AllocationParams, Allocator, BufferPool, Structure, StructureRef}; +use crate::{ffi, AllocationParams, Allocator, BufferPool, Structure, StructureRef}; #[derive(Debug, Clone, PartialEq, Eq)] #[repr(transparent)] diff --git a/gstreamer/src/bufferlist.rs b/gstreamer/src/bufferlist.rs index 8f30f5820..51d2d77ae 100644 --- a/gstreamer/src/bufferlist.rs +++ b/gstreamer/src/bufferlist.rs @@ -8,7 +8,7 @@ use std::{ use glib::translate::*; -use crate::{Buffer, BufferRef}; +use crate::{ffi, Buffer, BufferRef}; mini_object_wrapper!(BufferList, BufferListRef, ffi::GstBufferList, || { ffi::gst_buffer_list_get_type() diff --git a/gstreamer/src/bus.rs b/gstreamer/src/bus.rs index 42181d043..74e6cf64e 100644 --- a/gstreamer/src/bus.rs +++ b/gstreamer/src/bus.rs @@ -18,7 +18,7 @@ use glib::{ ControlFlow, }; -use crate::{Bus, BusSyncReply, Message, MessageType}; +use crate::{ffi, Bus, BusSyncReply, Message, MessageType}; unsafe extern "C" fn trampoline_watch ControlFlow + Send + 'static>( bus: *mut ffi::GstBus, diff --git a/gstreamer/src/bus_unix.rs b/gstreamer/src/bus_unix.rs index 9f225bd18..6dba647d8 100644 --- a/gstreamer/src/bus_unix.rs +++ b/gstreamer/src/bus_unix.rs @@ -29,7 +29,7 @@ impl UnixBusExtManual for Bus { #[cfg(unix)] unsafe { let mut pollfd = mem::MaybeUninit::uninit(); - ffi::gst_bus_get_pollfd(self.to_glib_none().0, pollfd.as_mut_ptr()); + crate::ffi::gst_bus_get_pollfd(self.to_glib_none().0, pollfd.as_mut_ptr()); let pollfd = pollfd.assume_init(); pollfd.fd } diff --git a/gstreamer/src/bus_windows.rs b/gstreamer/src/bus_windows.rs index 7cd98050c..7d80c49da 100644 --- a/gstreamer/src/bus_windows.rs +++ b/gstreamer/src/bus_windows.rs @@ -29,7 +29,7 @@ impl WindowsBusExtManual for Bus { #[cfg(windows)] unsafe { let mut pollfd = mem::MaybeUninit::uninit(); - ffi::gst_bus_get_pollfd(self.to_glib_none().0, pollfd.as_mut_ptr()); + crate::ffi::gst_bus_get_pollfd(self.to_glib_none().0, pollfd.as_mut_ptr()); let pollfd = pollfd.assume_init(); pollfd.fd as *mut _ } diff --git a/gstreamer/src/caps.rs b/gstreamer/src/caps.rs index 756c47216..5e4f314b2 100644 --- a/gstreamer/src/caps.rs +++ b/gstreamer/src/caps.rs @@ -4,7 +4,7 @@ use std::{fmt, marker::PhantomData, ptr, str}; use glib::{prelude::*, translate::*, value::ToSendValue}; -use crate::{caps_features::*, structure::*, CapsIntersectMode}; +use crate::{caps_features::*, ffi, structure::*, CapsIntersectMode}; mini_object_wrapper!(Caps, CapsRef, ffi::GstCaps, || { ffi::gst_caps_get_type() }); diff --git a/gstreamer/src/caps_features.rs b/gstreamer/src/caps_features.rs index 41765588b..226c5d70c 100644 --- a/gstreamer/src/caps_features.rs +++ b/gstreamer/src/caps_features.rs @@ -9,6 +9,7 @@ use std::{ ptr, str, }; +use crate::ffi; use glib::{prelude::*, translate::*}; use once_cell::sync::Lazy; diff --git a/gstreamer/src/child_proxy.rs b/gstreamer/src/child_proxy.rs index d6b732566..42cac7d6a 100644 --- a/gstreamer/src/child_proxy.rs +++ b/gstreamer/src/child_proxy.rs @@ -17,7 +17,7 @@ pub trait ChildProxyExtManual: sealed::Sealed + IsA + 'static { unsafe { let mut target = ptr::null_mut(); let mut pspec = ptr::null_mut(); - let ret = from_glib(ffi::gst_child_proxy_lookup( + let ret = from_glib(crate::ffi::gst_child_proxy_lookup( self.as_ref().to_glib_none().0, name.to_glib_none().0, &mut target, diff --git a/gstreamer/src/clock.rs b/gstreamer/src/clock.rs index fd1bd8649..93bc6390f 100644 --- a/gstreamer/src/clock.rs +++ b/gstreamer/src/clock.rs @@ -17,7 +17,7 @@ use glib::{ use libc::c_void; use crate::{ - prelude::*, Clock, ClockEntryType, ClockError, ClockFlags, ClockReturn, ClockSuccess, + ffi, prelude::*, Clock, ClockEntryType, ClockError, ClockFlags, ClockReturn, ClockSuccess, ClockTime, ClockTimeDiff, }; diff --git a/gstreamer/src/context.rs b/gstreamer/src/context.rs index ae6fb612f..732c0715e 100644 --- a/gstreamer/src/context.rs +++ b/gstreamer/src/context.rs @@ -4,7 +4,7 @@ use std::{ffi::CStr, fmt}; use glib::translate::{from_glib, from_glib_full, IntoGlib, ToGlibPtr}; -use crate::StructureRef; +use crate::{ffi, StructureRef}; mini_object_wrapper!(Context, ContextRef, ffi::GstContext, || { ffi::gst_context_get_type() diff --git a/gstreamer/src/control_binding.rs b/gstreamer/src/control_binding.rs index e02adbc3c..b499b1e0f 100644 --- a/gstreamer/src/control_binding.rs +++ b/gstreamer/src/control_binding.rs @@ -21,7 +21,7 @@ pub trait ControlBindingExtManual: sealed::Sealed + IsA + 'stati let n_values = values.len() as u32; unsafe { glib::result_from_gboolean!( - ffi::gst_control_binding_get_g_value_array( + crate::ffi::gst_control_binding_get_g_value_array( self.as_ref().to_glib_none().0, timestamp.into_glib(), interval.into_glib(), diff --git a/gstreamer/src/control_source.rs b/gstreamer/src/control_source.rs index 2b516ed6c..dd588da66 100644 --- a/gstreamer/src/control_source.rs +++ b/gstreamer/src/control_source.rs @@ -21,7 +21,7 @@ pub trait ControlSourceExtManual: sealed::Sealed + IsA + 'static let n_values = values.len() as u32; unsafe { glib::result_from_gboolean!( - ffi::gst_control_source_get_value_array( + crate::ffi::gst_control_source_get_value_array( self.as_ref().to_glib_none().0, timestamp.into_glib(), interval.into_glib(), diff --git a/gstreamer/src/date_time.rs b/gstreamer/src/date_time.rs index 8500178d8..bfc6db3a8 100644 --- a/gstreamer/src/date_time.rs +++ b/gstreamer/src/date_time.rs @@ -4,7 +4,7 @@ use std::{cmp, fmt}; use glib::translate::*; -use crate::DateTime; +use crate::{ffi, DateTime}; // Validate that the given values result in a valid DateTime fn validate( diff --git a/gstreamer/src/device_monitor.rs b/gstreamer/src/device_monitor.rs index d225469d0..a1cfb373e 100644 --- a/gstreamer/src/device_monitor.rs +++ b/gstreamer/src/device_monitor.rs @@ -4,7 +4,7 @@ use std::num::NonZeroU32; use glib::{prelude::*, translate::*}; -use crate::{Caps, DeviceMonitor}; +use crate::{ffi, Caps, DeviceMonitor}; #[derive(Debug, PartialEq, Eq)] pub struct DeviceMonitorFilterId(NonZeroU32); diff --git a/gstreamer/src/device_provider.rs b/gstreamer/src/device_provider.rs index 9c6fc7dbc..b41c6917b 100644 --- a/gstreamer/src/device_provider.rs +++ b/gstreamer/src/device_provider.rs @@ -4,7 +4,7 @@ use std::ffi::CStr; use glib::{prelude::*, translate::*}; -use crate::{DeviceProvider, Plugin, Rank}; +use crate::{ffi, DeviceProvider, Plugin, Rank}; impl DeviceProvider { #[doc(alias = "gst_device_provider_register")] diff --git a/gstreamer/src/device_provider_factory.rs b/gstreamer/src/device_provider_factory.rs index 50dd2f7a9..92c7a3da4 100644 --- a/gstreamer/src/device_provider_factory.rs +++ b/gstreamer/src/device_provider_factory.rs @@ -5,7 +5,7 @@ use std::ffi::CStr; use glib::translate::*; use crate::{ - DeviceProviderFactory, ELEMENT_METADATA_AUTHOR, ELEMENT_METADATA_DESCRIPTION, + ffi, DeviceProviderFactory, ELEMENT_METADATA_AUTHOR, ELEMENT_METADATA_DESCRIPTION, ELEMENT_METADATA_DOC_URI, ELEMENT_METADATA_ICON_NAME, ELEMENT_METADATA_KLASS, ELEMENT_METADATA_LONGNAME, }; diff --git a/gstreamer/src/element.rs b/gstreamer/src/element.rs index 5de09618d..7575baab5 100644 --- a/gstreamer/src/element.rs +++ b/gstreamer/src/element.rs @@ -6,6 +6,7 @@ use glib::translate::*; use itertools::Itertools; use crate::{ + ffi, format::{ CompatibleFormattedValue, FormattedValue, SpecificFormattedValueFullRange, SpecificFormattedValueIntrinsic, diff --git a/gstreamer/src/element_factory.rs b/gstreamer/src/element_factory.rs index 7565c0d90..58795d11e 100644 --- a/gstreamer/src/element_factory.rs +++ b/gstreamer/src/element_factory.rs @@ -5,7 +5,7 @@ use std::ffi::CStr; use glib::{prelude::*, translate::*}; use crate::{ - CapsRef, Element, ElementFactory, Rank, StaticPadTemplate, ELEMENT_METADATA_AUTHOR, + ffi, CapsRef, Element, ElementFactory, Rank, StaticPadTemplate, ELEMENT_METADATA_AUTHOR, ELEMENT_METADATA_DESCRIPTION, ELEMENT_METADATA_DOC_URI, ELEMENT_METADATA_ICON_NAME, ELEMENT_METADATA_KLASS, ELEMENT_METADATA_LONGNAME, }; diff --git a/gstreamer/src/element_factory_type.rs b/gstreamer/src/element_factory_type.rs index 5f45d104a..fb1205d10 100644 --- a/gstreamer/src/element_factory_type.rs +++ b/gstreamer/src/element_factory_type.rs @@ -2,6 +2,8 @@ use glib::{bitflags::bitflags, translate::*}; +use crate::ffi; + bitflags! { #[doc(alias = "GstElementFactoryListType")] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] diff --git a/gstreamer/src/enums.rs b/gstreamer/src/enums.rs index 3fa438cab..13ccee483 100644 --- a/gstreamer/src/enums.rs +++ b/gstreamer/src/enums.rs @@ -10,7 +10,7 @@ use glib::{ }; use thiserror::Error; -use crate::{ClockReturn, State, StateChange, StateChangeReturn}; +use crate::{ffi, ClockReturn, State, StateChange, StateChangeReturn}; macro_rules! impl_return_result_traits { ($ffi_type:ident, $ret_type:ident, $ok_type:ident, $err_type:ident) => { diff --git a/gstreamer/src/event.rs b/gstreamer/src/event.rs index 7aa3c091c..441753a72 100644 --- a/gstreamer/src/event.rs +++ b/gstreamer/src/event.rs @@ -8,6 +8,7 @@ use glib::{ }; use crate::{ + ffi, format::{ CompatibleFormattedValue, FormattedValue, FormattedValueIntrinsic, GenericFormattedValue, }, diff --git a/gstreamer/src/format/clock_time.rs b/gstreamer/src/format/clock_time.rs index 7e510db25..15317133e 100644 --- a/gstreamer/src/format/clock_time.rs +++ b/gstreamer/src/format/clock_time.rs @@ -6,7 +6,7 @@ use std::{ time::Duration, }; -use crate::prelude::*; +use crate::{ffi, prelude::*}; use glib::translate::*; use super::{ diff --git a/gstreamer/src/format/specific.rs b/gstreamer/src/format/specific.rs index d36c01dcb..182c50ce5 100644 --- a/gstreamer/src/format/specific.rs +++ b/gstreamer/src/format/specific.rs @@ -6,6 +6,7 @@ use super::{ Format, FormattedValue, FormattedValueError, FormattedValueFullRange, FormattedValueIntrinsic, FormattedValueNoneBuilder, GenericFormattedValue, }; +use crate::ffi; pub trait SpecificFormattedValue: FormattedValue {} diff --git a/gstreamer/src/functions.rs b/gstreamer/src/functions.rs index 4e382ccc4..f9413902b 100644 --- a/gstreamer/src/functions.rs +++ b/gstreamer/src/functions.rs @@ -12,6 +12,7 @@ use crate::Tracer; pub use crate::auto::functions::{ main_executable_path, util_get_timestamp as get_timestamp, version, version_string, }; +use crate::ffi; #[cfg(feature = "v1_24")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] diff --git a/gstreamer/src/ghost_pad.rs b/gstreamer/src/ghost_pad.rs index fc8cfff16..085f89846 100644 --- a/gstreamer/src/ghost_pad.rs +++ b/gstreamer/src/ghost_pad.rs @@ -3,7 +3,7 @@ use glib::translate::*; use crate::{ - prelude::*, FlowError, FlowSuccess, GhostPad, LoggableError, Pad, PadBuilder, PadFlags, + ffi, prelude::*, FlowError, FlowSuccess, GhostPad, LoggableError, Pad, PadBuilder, PadFlags, PadGetRangeSuccess, PadMode, StaticPadTemplate, }; diff --git a/gstreamer/src/gtype.rs b/gstreamer/src/gtype.rs index 51100f679..2c1da127c 100644 --- a/gstreamer/src/gtype.rs +++ b/gstreamer/src/gtype.rs @@ -2,6 +2,7 @@ use std::ffi::c_void; +use crate::ffi; use glib::translate::*; pub trait PluginApiExt { diff --git a/gstreamer/src/iterator.rs b/gstreamer/src/iterator.rs index 6f1518f36..95d5c9b99 100644 --- a/gstreamer/src/iterator.rs +++ b/gstreamer/src/iterator.rs @@ -2,6 +2,7 @@ use std::{any::Any, fmt, iter, marker::PhantomData, mem, ptr, sync::Arc}; +use crate::ffi; use glib::{ ffi::{gconstpointer, gpointer}, prelude::*, diff --git a/gstreamer/src/lib.rs b/gstreamer/src/lib.rs index ca2401f9e..b1f3ab5d9 100644 --- a/gstreamer/src/lib.rs +++ b/gstreamer/src/lib.rs @@ -7,8 +7,8 @@ #![doc = include_str!("../README.md")] // Re-exported for the subclass gst_plugin_define! macro -pub use ffi; pub use glib; +pub use gstreamer_sys as ffi; pub use paste; #[doc(hidden)] diff --git a/gstreamer/src/log.rs b/gstreamer/src/log.rs index 68469371b..0cbceb6a1 100644 --- a/gstreamer/src/log.rs +++ b/gstreamer/src/log.rs @@ -8,7 +8,7 @@ use libc::c_char; use log; use once_cell::sync::Lazy; -use crate::DebugLevel; +use crate::{ffi, DebugLevel}; // import and rename those so they are namespaced as log::* pub use crate::auto::functions::debug_add_ring_buffer_logger as add_ring_buffer_logger; diff --git a/gstreamer/src/memory.rs b/gstreamer/src/memory.rs index 8c89546a0..bfa7e3558 100644 --- a/gstreamer/src/memory.rs +++ b/gstreamer/src/memory.rs @@ -10,7 +10,7 @@ use std::{ use glib::translate::*; -use crate::{AllocationParams, Allocator, MemoryFlags}; +use crate::{ffi, AllocationParams, Allocator, MemoryFlags}; mini_object_wrapper!(Memory, MemoryRef, ffi::GstMemory, || { ffi::gst_memory_get_type() diff --git a/gstreamer/src/memory_wrapped.rs b/gstreamer/src/memory_wrapped.rs index 743ff231e..861c1966f 100644 --- a/gstreamer/src/memory_wrapped.rs +++ b/gstreamer/src/memory_wrapped.rs @@ -4,7 +4,7 @@ use glib::{prelude::*, translate::*}; use std::{alloc, mem, ptr}; -use crate::Memory; +use crate::{ffi, Memory}; #[repr(C)] struct WrappedMemory { diff --git a/gstreamer/src/message.rs b/gstreamer/src/message.rs index 639f4288b..69f01ab76 100644 --- a/gstreamer/src/message.rs +++ b/gstreamer/src/message.rs @@ -5,6 +5,7 @@ use std::{borrow::Borrow, ffi::CStr, fmt, mem, num::NonZeroU32, ops::Deref, ptr} use glib::translate::*; use crate::{ + ffi, format::{CompatibleFormattedValue, FormattedValue}, prelude::*, structure::*, diff --git a/gstreamer/src/meta.rs b/gstreamer/src/meta.rs index 82b8cb4c6..dc5d45cd4 100644 --- a/gstreamer/src/meta.rs +++ b/gstreamer/src/meta.rs @@ -11,7 +11,7 @@ use std::{ use glib::translate::*; -use crate::{Buffer, BufferRef, Caps, CapsRef, ClockTime}; +use crate::{ffi, Buffer, BufferRef, Caps, CapsRef, ClockTime}; pub unsafe trait MetaAPI: Sync + Send + Sized { type GstType; @@ -1053,10 +1053,10 @@ pub trait MetaTag { #[macro_export] macro_rules! impl_meta_tag( - ($name:ident, $gst_tag:ident) => { + ($name:ident, $gst_tag:path) => { pub enum $name {} impl $crate::meta::MetaTag for $name { - const TAG_NAME: &'static glib::GStr = unsafe { glib::GStr::from_utf8_with_nul_unchecked(ffi::$gst_tag) }; + const TAG_NAME: &'static glib::GStr = unsafe { glib::GStr::from_utf8_with_nul_unchecked($gst_tag) }; fn quark() -> glib::Quark { static QUARK: std::sync::OnceLock = std::sync::OnceLock::new(); *QUARK.get_or_init(|| glib::Quark::from_static_str(Self::TAG_NAME)) @@ -1066,8 +1066,11 @@ macro_rules! impl_meta_tag( ); pub mod tags { - impl_meta_tag!(Memory, GST_META_TAG_MEMORY_STR); - impl_meta_tag!(MemoryReference, GST_META_TAG_MEMORY_REFERENCE_STR); + impl_meta_tag!(Memory, crate::ffi::GST_META_TAG_MEMORY_STR); + impl_meta_tag!( + MemoryReference, + crate::ffi::GST_META_TAG_MEMORY_REFERENCE_STR + ); } pub unsafe trait MetaTransform<'a> { diff --git a/gstreamer/src/miniobject.rs b/gstreamer/src/miniobject.rs index 1b859a10f..2e4eb731e 100644 --- a/gstreamer/src/miniobject.rs +++ b/gstreamer/src/miniobject.rs @@ -2,7 +2,7 @@ use std::fmt; -use crate::prelude::*; +use crate::{ffi, prelude::*}; use glib::translate::*; pub trait IsMiniObject: diff --git a/gstreamer/src/object.rs b/gstreamer/src/object.rs index 09ba94921..a3ff05417 100644 --- a/gstreamer/src/object.rs +++ b/gstreamer/src/object.rs @@ -2,7 +2,7 @@ use glib::{prelude::*, signal::SignalHandlerId, translate::*}; -use crate::{ClockTime, Object, ObjectFlags}; +use crate::{ffi, ClockTime, Object, ObjectFlags}; mod sealed { pub trait Sealed {} diff --git a/gstreamer/src/pad.rs b/gstreamer/src/pad.rs index 7e9d853e4..c7b4abd5d 100644 --- a/gstreamer/src/pad.rs +++ b/gstreamer/src/pad.rs @@ -11,6 +11,7 @@ use std::{ use glib::{ffi::gpointer, prelude::*, translate::*}; use crate::{ + ffi, format::{FormattedValue, SpecificFormattedValueFullRange, SpecificFormattedValueIntrinsic}, prelude::*, Buffer, BufferList, Event, FlowError, FlowReturn, FlowSuccess, Format, GenericFormattedValue, diff --git a/gstreamer/src/pad_template.rs b/gstreamer/src/pad_template.rs index 9bd65548d..aa9c13542 100644 --- a/gstreamer/src/pad_template.rs +++ b/gstreamer/src/pad_template.rs @@ -4,7 +4,7 @@ use std::ffi::CStr; use glib::{prelude::*, translate::*}; -use crate::{Caps, PadDirection, PadPresence, PadTemplate, StaticPadTemplate}; +use crate::{ffi, Caps, PadDirection, PadPresence, PadTemplate, StaticPadTemplate}; impl PadTemplate { #[doc(alias = "gst_pad_template_new_from_static_pad_template_with_gtype")] diff --git a/gstreamer/src/param_spec.rs b/gstreamer/src/param_spec.rs index d7f87b379..82c739062 100644 --- a/gstreamer/src/param_spec.rs +++ b/gstreamer/src/param_spec.rs @@ -1,5 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. +use crate::ffi; use glib::{gobject_ffi, prelude::*, translate::*, ParamSpec}; glib::wrapper! { diff --git a/gstreamer/src/parse.rs b/gstreamer/src/parse.rs index 59a8bf46e..9c6b4d87f 100644 --- a/gstreamer/src/parse.rs +++ b/gstreamer/src/parse.rs @@ -4,7 +4,7 @@ use std::ptr; use glib::{prelude::*, translate::*}; -use crate::{Bin, Element, Object, ParseContext, ParseFlags}; +use crate::{ffi, Bin, Element, Object, ParseContext, ParseFlags}; pub use crate::auto::functions::parse_bin_from_description as bin_from_description; pub use crate::auto::functions::parse_launch as launch; diff --git a/gstreamer/src/parse_context.rs b/gstreamer/src/parse_context.rs index eb94b5672..c865890c9 100644 --- a/gstreamer/src/parse_context.rs +++ b/gstreamer/src/parse_context.rs @@ -1,5 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. +use crate::ffi; use glib::translate::*; glib::wrapper! { diff --git a/gstreamer/src/pipeline.rs b/gstreamer/src/pipeline.rs index 4e1dea0e3..48e41670c 100644 --- a/gstreamer/src/pipeline.rs +++ b/gstreamer/src/pipeline.rs @@ -2,7 +2,7 @@ use glib::{prelude::*, translate::*}; -use crate::{prelude::*, Pipeline, PipelineFlags}; +use crate::{ffi, prelude::*, Pipeline, PipelineFlags}; impl Pipeline { // rustdoc-stripper-ignore-next diff --git a/gstreamer/src/plugin.rs b/gstreamer/src/plugin.rs index c2badfd52..d88c9b7c5 100644 --- a/gstreamer/src/plugin.rs +++ b/gstreamer/src/plugin.rs @@ -2,7 +2,7 @@ use glib::{prelude::*, translate::*}; -use crate::{prelude::*, Plugin, PluginFlags, StructureRef}; +use crate::{ffi, prelude::*, Plugin, PluginFlags, StructureRef}; impl Plugin { #[doc(alias = "get_cache_data")] diff --git a/gstreamer/src/plugin_feature.rs b/gstreamer/src/plugin_feature.rs index 3b8cb97a1..1e82b58d0 100644 --- a/gstreamer/src/plugin_feature.rs +++ b/gstreamer/src/plugin_feature.rs @@ -5,7 +5,7 @@ use glib::{ translate::{from_glib, FromGlibPtrFull, IntoGlib, ToGlibPtr}, }; -use crate::{PluginFeature, Rank}; +use crate::{ffi, PluginFeature, Rank}; mod sealed { pub trait Sealed {} diff --git a/gstreamer/src/promise.rs b/gstreamer/src/promise.rs index d44a6082f..1dcdbda5e 100644 --- a/gstreamer/src/promise.rs +++ b/gstreamer/src/promise.rs @@ -9,7 +9,7 @@ use std::{ use glib::translate::*; -use crate::{PromiseResult, Structure, StructureRef}; +use crate::{ffi, PromiseResult, Structure, StructureRef}; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] diff --git a/gstreamer/src/proxy_pad.rs b/gstreamer/src/proxy_pad.rs index eab816ce8..73f4f9b33 100644 --- a/gstreamer/src/proxy_pad.rs +++ b/gstreamer/src/proxy_pad.rs @@ -4,7 +4,7 @@ use std::ptr; use glib::{prelude::*, translate::*}; -use crate::{Buffer, BufferList, FlowError, FlowSuccess, Pad, ProxyPad}; +use crate::{ffi, Buffer, BufferList, FlowError, FlowSuccess, Pad, ProxyPad}; impl ProxyPad { #[doc(alias = "gst_proxy_pad_chain_default")] diff --git a/gstreamer/src/query.rs b/gstreamer/src/query.rs index 7e467ef73..13e95b25c 100644 --- a/gstreamer/src/query.rs +++ b/gstreamer/src/query.rs @@ -11,6 +11,7 @@ use std::{ use glib::{object::IsA, translate::*}; use crate::{ + ffi, format::{CompatibleFormattedValue, FormattedValue, GenericFormattedValue}, structure::*, }; diff --git a/gstreamer/src/rank.rs b/gstreamer/src/rank.rs index 6d8d508b1..3b72c7684 100644 --- a/gstreamer/src/rank.rs +++ b/gstreamer/src/rank.rs @@ -1,5 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. +use crate::ffi; use glib::{prelude::*, translate::*}; use std::fmt; use std::ops; diff --git a/gstreamer/src/registry.rs b/gstreamer/src/registry.rs index 739d98d53..826e8d4fa 100644 --- a/gstreamer/src/registry.rs +++ b/gstreamer/src/registry.rs @@ -2,7 +2,7 @@ use glib::translate::*; -use crate::{Plugin, PluginFeature, Registry}; +use crate::{ffi, Plugin, PluginFeature, Registry}; impl Registry { #[doc(alias = "gst_registry_update")] diff --git a/gstreamer/src/sample.rs b/gstreamer/src/sample.rs index 522601665..2415eec5d 100644 --- a/gstreamer/src/sample.rs +++ b/gstreamer/src/sample.rs @@ -5,8 +5,8 @@ use std::{fmt, ptr}; use glib::translate::{from_glib_full, from_glib_none, IntoGlibPtr, ToGlibPtr}; use crate::{ - format::FormattedValueIntrinsic, Buffer, BufferList, BufferListRef, BufferRef, Caps, CapsRef, - FormattedSegment, Segment, Structure, StructureRef, + ffi, format::FormattedValueIntrinsic, Buffer, BufferList, BufferListRef, BufferRef, Caps, + CapsRef, FormattedSegment, Segment, Structure, StructureRef, }; mini_object_wrapper!(Sample, SampleRef, ffi::GstSample, || { diff --git a/gstreamer/src/segment.rs b/gstreamer/src/segment.rs index 15fca0826..07e8d34f6 100644 --- a/gstreamer/src/segment.rs +++ b/gstreamer/src/segment.rs @@ -5,6 +5,7 @@ use std::{fmt, marker::PhantomData, mem}; use glib::{prelude::*, translate::*}; use crate::{ + ffi, format::{ CompatibleFormattedValue, FormattedValue, FormattedValueFullRange, FormattedValueIntrinsic, FormattedValueNoneBuilder, NoneSignedBuilder, UnsignedIntoSigned, diff --git a/gstreamer/src/static_caps.rs b/gstreamer/src/static_caps.rs index e8c2dd4fa..020350b17 100644 --- a/gstreamer/src/static_caps.rs +++ b/gstreamer/src/static_caps.rs @@ -4,7 +4,7 @@ use std::{fmt, marker::PhantomData, ptr}; use glib::{prelude::*, translate::*}; -use crate::Caps; +use crate::{ffi, Caps}; #[doc(alias = "GstStaticCaps")] #[derive(Clone, Copy)] diff --git a/gstreamer/src/static_pad_template.rs b/gstreamer/src/static_pad_template.rs index d34d07c5b..162fbc4bc 100644 --- a/gstreamer/src/static_pad_template.rs +++ b/gstreamer/src/static_pad_template.rs @@ -4,7 +4,7 @@ use std::{ffi::CStr, fmt, marker::PhantomData, ptr}; use glib::{prelude::*, translate::*}; -use crate::{Caps, PadTemplate}; +use crate::{ffi, Caps, PadTemplate}; #[doc(alias = "GstStaticPadTemplate")] #[derive(Clone, Copy)] diff --git a/gstreamer/src/stream_collection.rs b/gstreamer/src/stream_collection.rs index d2ba5e495..09d4fd9d0 100644 --- a/gstreamer/src/stream_collection.rs +++ b/gstreamer/src/stream_collection.rs @@ -8,7 +8,7 @@ use glib::{ translate::*, }; -use crate::{Stream, StreamCollection}; +use crate::{ffi, Stream, StreamCollection}; #[derive(Debug)] pub struct Iter<'a> { diff --git a/gstreamer/src/structure.rs b/gstreamer/src/structure.rs index bdaa5cc19..a43ff190b 100644 --- a/gstreamer/src/structure.rs +++ b/gstreamer/src/structure.rs @@ -16,7 +16,7 @@ use glib::{ IntoGStr, }; -use crate::Fraction; +use crate::{ffi, Fraction}; #[derive(Clone, Debug, Eq, PartialEq, thiserror::Error)] pub enum GetError { diff --git a/gstreamer/src/subclass/allocator.rs b/gstreamer/src/subclass/allocator.rs index 0d149c180..411f97379 100644 --- a/gstreamer/src/subclass/allocator.rs +++ b/gstreamer/src/subclass/allocator.rs @@ -5,7 +5,7 @@ use std::ptr; use glib::{bool_error, prelude::*, subclass::prelude::*, translate::*, BoolError}; use super::prelude::*; -use crate::{AllocationParams, Allocator, Memory}; +use crate::{ffi, AllocationParams, Allocator, Memory}; pub trait AllocatorImpl: AllocatorImplExt + GstObjectImpl + Send + Sync { fn alloc(&self, size: usize, params: Option<&AllocationParams>) -> Result { diff --git a/gstreamer/src/subclass/bin.rs b/gstreamer/src/subclass/bin.rs index bb6fb3343..7b6b96b8d 100644 --- a/gstreamer/src/subclass/bin.rs +++ b/gstreamer/src/subclass/bin.rs @@ -3,7 +3,7 @@ use glib::{prelude::*, subclass::prelude::*, translate::*}; use super::prelude::*; -use crate::{Bin, Element, LoggableError, Message}; +use crate::{ffi, Bin, Element, LoggableError, Message}; pub trait BinImpl: BinImplExt + ElementImpl { fn add_element(&self, element: &Element) -> Result<(), LoggableError> { diff --git a/gstreamer/src/subclass/buffer_pool.rs b/gstreamer/src/subclass/buffer_pool.rs index 95bba7b74..bcb7baa7a 100644 --- a/gstreamer/src/subclass/buffer_pool.rs +++ b/gstreamer/src/subclass/buffer_pool.rs @@ -10,7 +10,7 @@ use glib::{ use libc::c_char; use super::prelude::*; -use crate::{BufferPool, BufferPoolAcquireParams, BufferPoolConfigRef}; +use crate::{ffi, BufferPool, BufferPoolAcquireParams, BufferPoolConfigRef}; pub trait BufferPoolImpl: BufferPoolImplExt + GstObjectImpl + Send + Sync { fn acquire_buffer( diff --git a/gstreamer/src/subclass/child_proxy.rs b/gstreamer/src/subclass/child_proxy.rs index 79159301f..7ddcaae6c 100644 --- a/gstreamer/src/subclass/child_proxy.rs +++ b/gstreamer/src/subclass/child_proxy.rs @@ -3,7 +3,7 @@ use glib::{prelude::*, subclass::prelude::*, translate::*}; use super::prelude::*; -use crate::ChildProxy; +use crate::{ffi, ChildProxy}; pub trait ChildProxyImpl: GstObjectImpl + Send + Sync { fn child_by_name(&self, name: &str) -> Option { diff --git a/gstreamer/src/subclass/clock.rs b/gstreamer/src/subclass/clock.rs index 3d72e7d41..70bb16365 100644 --- a/gstreamer/src/subclass/clock.rs +++ b/gstreamer/src/subclass/clock.rs @@ -3,7 +3,7 @@ use glib::{prelude::*, subclass::prelude::*, translate::*}; use super::prelude::*; -use crate::{Clock, ClockError, ClockId, ClockReturn, ClockSuccess, ClockTime, ClockTimeDiff}; +use crate::{ffi, Clock, ClockError, ClockId, ClockReturn, ClockSuccess, ClockTime, ClockTimeDiff}; pub trait ClockImpl: ClockImplExt + GstObjectImpl + Send + Sync { fn change_resolution(&self, old_resolution: ClockTime, new_resolution: ClockTime) -> ClockTime { diff --git a/gstreamer/src/subclass/device.rs b/gstreamer/src/subclass/device.rs index 1772e9b11..1ae74ef73 100644 --- a/gstreamer/src/subclass/device.rs +++ b/gstreamer/src/subclass/device.rs @@ -5,7 +5,7 @@ use std::ptr; use glib::{prelude::*, subclass::prelude::*, translate::*}; use super::prelude::*; -use crate::{Device, Element, LoggableError}; +use crate::{ffi, Device, Element, LoggableError}; pub trait DeviceImpl: DeviceImplExt + GstObjectImpl + Send + Sync { fn create_element(&self, name: Option<&str>) -> Result { diff --git a/gstreamer/src/subclass/device_provider.rs b/gstreamer/src/subclass/device_provider.rs index 9cc70180d..c87a56911 100644 --- a/gstreamer/src/subclass/device_provider.rs +++ b/gstreamer/src/subclass/device_provider.rs @@ -5,7 +5,7 @@ use std::borrow::Cow; use glib::{prelude::*, subclass::prelude::*, translate::*}; use super::prelude::*; -use crate::{Device, DeviceProvider, LoggableError}; +use crate::{ffi, Device, DeviceProvider, LoggableError}; #[derive(Debug, Clone)] pub struct DeviceProviderMetadata { diff --git a/gstreamer/src/subclass/element.rs b/gstreamer/src/subclass/element.rs index d740b13e7..4fd081fb4 100644 --- a/gstreamer/src/subclass/element.rs +++ b/gstreamer/src/subclass/element.rs @@ -6,7 +6,7 @@ use glib::{subclass::prelude::*, translate::*}; use super::prelude::*; use crate::{ - prelude::*, Element, Event, PadTemplate, QueryRef, StateChange, StateChangeError, + ffi, prelude::*, Element, Event, PadTemplate, QueryRef, StateChange, StateChangeError, StateChangeReturn, StateChangeSuccess, }; diff --git a/gstreamer/src/subclass/pad.rs b/gstreamer/src/subclass/pad.rs index 0b23883b3..cba86c401 100644 --- a/gstreamer/src/subclass/pad.rs +++ b/gstreamer/src/subclass/pad.rs @@ -3,7 +3,7 @@ use glib::{prelude::*, subclass::prelude::*, translate::*}; use super::prelude::*; -use crate::Pad; +use crate::{ffi, Pad}; pub trait PadImpl: PadImplExt + GstObjectImpl + Send + Sync { fn linked(&self, peer: &Pad) { diff --git a/gstreamer/src/subclass/task_pool.rs b/gstreamer/src/subclass/task_pool.rs index bfc0b59c2..e1f83a1c8 100644 --- a/gstreamer/src/subclass/task_pool.rs +++ b/gstreamer/src/subclass/task_pool.rs @@ -9,7 +9,7 @@ use std::{ use glib::{ffi::gpointer, subclass::prelude::*, translate::*}; use super::prelude::*; -use crate::{TaskHandle, TaskPool}; +use crate::{ffi, TaskHandle, TaskPool}; pub trait TaskPoolImpl: GstObjectImpl + Send + Sync { // rustdoc-stripper-ignore-next diff --git a/gstreamer/src/subclass/uri_handler.rs b/gstreamer/src/subclass/uri_handler.rs index a6769c5dd..3164383c5 100644 --- a/gstreamer/src/subclass/uri_handler.rs +++ b/gstreamer/src/subclass/uri_handler.rs @@ -4,7 +4,7 @@ use std::ptr; use glib::{prelude::*, subclass::prelude::*, translate::*}; -use crate::{URIHandler, URIType}; +use crate::{ffi, URIHandler, URIType}; pub trait URIHandlerImpl: super::element::ElementImpl { const URI_TYPE: URIType; diff --git a/gstreamer/src/tag_setter.rs b/gstreamer/src/tag_setter.rs index 15aa9ce87..270050052 100644 --- a/gstreamer/src/tag_setter.rs +++ b/gstreamer/src/tag_setter.rs @@ -2,7 +2,7 @@ use glib::{prelude::*, translate::*}; -use crate::{tags::*, TagMergeMode, TagSetter}; +use crate::{ffi, tags::*, TagMergeMode, TagSetter}; mod sealed { pub trait Sealed {} diff --git a/gstreamer/src/tags.rs b/gstreamer/src/tags.rs index 9e84e6b59..6a46c63b3 100644 --- a/gstreamer/src/tags.rs +++ b/gstreamer/src/tags.rs @@ -8,7 +8,7 @@ use glib::{ value::{FromValue, SendValue, ToSendValue, Value}, }; -use crate::{Sample, TagError, TagMergeMode, TagScope}; +use crate::{ffi, Sample, TagError, TagMergeMode, TagScope}; pub trait Tag<'a> { type TagType: StaticType + FromValue<'a> + ToSendValue + Send + Sync; diff --git a/gstreamer/src/tags_serde.rs b/gstreamer/src/tags_serde.rs index dff6ec3aa..80b3e99e5 100644 --- a/gstreamer/src/tags_serde.rs +++ b/gstreamer/src/tags_serde.rs @@ -172,7 +172,7 @@ impl<'de, 'a> Visitor<'de> for TagValuesVisitor<'a> { fn visit_seq>(self, mut seq: A) -> Result<(), A::Error> { let tag_type: glib::Type = unsafe { let tag_name = self.0.to_glib_none(); - from_glib(ffi::gst_tag_get_type(tag_name.0)) + from_glib(crate::ffi::gst_tag_get_type(tag_name.0)) }; loop { diff --git a/gstreamer/src/task.rs b/gstreamer/src/task.rs index da1da6ead..a3fb5f4b9 100644 --- a/gstreamer/src/task.rs +++ b/gstreamer/src/task.rs @@ -4,7 +4,7 @@ use std::{mem, ptr, sync::Arc}; use glib::{prelude::*, translate::*}; -use crate::Task; +use crate::{ffi, Task}; #[allow(clippy::type_complexity)] pub struct TaskBuilder { diff --git a/gstreamer/src/task_pool.rs b/gstreamer/src/task_pool.rs index 64d6eae54..a9e40f8da 100644 --- a/gstreamer/src/task_pool.rs +++ b/gstreamer/src/task_pool.rs @@ -4,7 +4,7 @@ use std::ptr; use glib::{ffi::gpointer, prelude::*, translate::*}; -use crate::TaskPool; +use crate::{ffi, TaskPool}; unsafe extern "C" fn task_pool_trampoline(data: gpointer) { let func = Box::from_raw(data as *mut P); diff --git a/gstreamer/src/toc.rs b/gstreamer/src/toc.rs index b5be6e08b..9fdffe96d 100644 --- a/gstreamer/src/toc.rs +++ b/gstreamer/src/toc.rs @@ -7,7 +7,7 @@ use glib::translate::{ ToGlibPtr, }; -use crate::{TagList, TagMergeMode, TocEntryType, TocLoopType, TocScope}; +use crate::{ffi, TagList, TagMergeMode, TocEntryType, TocLoopType, TocScope}; mini_object_wrapper!(Toc, TocRef, ffi::GstToc, || { ffi::gst_toc_get_type() }); diff --git a/gstreamer/src/tracer.rs b/gstreamer/src/tracer.rs index 2df9cd293..e24af4e9d 100644 --- a/gstreamer/src/tracer.rs +++ b/gstreamer/src/tracer.rs @@ -14,7 +14,7 @@ impl Tracer { skip_assert_initialized!(); unsafe { glib::result_from_gboolean!( - ffi::gst_tracer_register( + crate::ffi::gst_tracer_register( plugin.to_glib_none().0, name.to_glib_none().0, type_.into_glib() diff --git a/gstreamer/src/tracer_factory.rs b/gstreamer/src/tracer_factory.rs index b8573d302..6066cd38e 100644 --- a/gstreamer/src/tracer_factory.rs +++ b/gstreamer/src/tracer_factory.rs @@ -9,6 +9,6 @@ impl TracerFactory { #[doc(alias = "get_list")] pub fn factories() -> glib::List { assert_initialized_main_thread!(); - unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_tracer_factory_get_list()) } + unsafe { FromGlibPtrContainer::from_glib_full(crate::ffi::gst_tracer_factory_get_list()) } } } diff --git a/gstreamer/src/typefind.rs b/gstreamer/src/typefind.rs index 4a5acbcf7..94ebe2f58 100644 --- a/gstreamer/src/typefind.rs +++ b/gstreamer/src/typefind.rs @@ -4,7 +4,7 @@ use std::{ptr, slice}; use glib::translate::*; -use crate::{Caps, Plugin, Rank, TypeFindFactory, TypeFindProbability}; +use crate::{ffi, Caps, Plugin, Rank, TypeFindFactory, TypeFindProbability}; #[repr(transparent)] #[derive(Debug)] diff --git a/gstreamer/src/typefind_factory.rs b/gstreamer/src/typefind_factory.rs index 0b8d523a6..1954610e8 100644 --- a/gstreamer/src/typefind_factory.rs +++ b/gstreamer/src/typefind_factory.rs @@ -9,6 +9,8 @@ impl TypeFindFactory { #[doc(alias = "get_list")] pub fn factories() -> glib::List { assert_initialized_main_thread!(); - unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_type_find_factory_get_list()) } + unsafe { + FromGlibPtrContainer::from_glib_full(crate::ffi::gst_type_find_factory_get_list()) + } } } diff --git a/gstreamer/src/value.rs b/gstreamer/src/value.rs index a30109c9b..04f2dda75 100644 --- a/gstreamer/src/value.rs +++ b/gstreamer/src/value.rs @@ -2,6 +2,7 @@ use std::{cmp, fmt, ops, slice}; +use crate::ffi; use glib::{prelude::*, translate::*}; use num_rational::Rational32;