Clean up various imports everywhere

This commit is contained in:
Sebastian Dröge 2021-04-26 15:15:53 +03:00
parent 5d11bba67e
commit 1d59ea91c5
58 changed files with 60 additions and 89 deletions

View file

@ -2,7 +2,7 @@
use crate::AudioDecoder; use crate::AudioDecoder;
use crate::AudioInfo; use crate::AudioInfo;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use std::mem; use std::mem;
use std::ptr; use std::ptr;

View file

@ -1,7 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::AudioEncoder; use crate::AudioEncoder;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use std::mem; use std::mem;
use std::ptr; use std::ptr;

View file

@ -1,14 +1,11 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::Aggregator; use crate::Aggregator;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::prelude::*; use glib::prelude::*;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::signal::{connect_raw, SignalHandlerId}; use glib::signal::{connect_raw, SignalHandlerId};
use glib::translate::*; use glib::translate::*;
use glib::IsA;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::Value; use glib::Value;

View file

@ -1,7 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::AggregatorPad; use crate::AggregatorPad;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
pub trait AggregatorPadExtManual: 'static { pub trait AggregatorPadExtManual: 'static {

View file

@ -2,7 +2,7 @@
use crate::BaseParse; use crate::BaseParse;
use crate::BaseParseFrame; use crate::BaseParseFrame;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use gst::FormattedValue; use gst::FormattedValue;
use std::convert::TryFrom; use std::convert::TryFrom;

View file

@ -1,7 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::BaseSink; use crate::BaseSink;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use std::mem; use std::mem;

View file

@ -1,6 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use std::mem; use std::mem;
use std::ptr; use std::ptr;

View file

@ -1,7 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::BaseTransform; use crate::BaseTransform;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use std::mem; use std::mem;
use std::ptr; use std::ptr;

View file

@ -1,6 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
glib::wrapper! { glib::wrapper! {

View file

@ -1,6 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use std::mem; use std::mem;

View file

@ -1,7 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::TestClock; use crate::TestClock;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use gst::prelude::*; use gst::prelude::*;
use std::marker::PhantomData; use std::marker::PhantomData;

View file

@ -1,7 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::TimelineElement; use crate::TimelineElement;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use std::ptr; use std::ptr;

View file

@ -1,8 +1,8 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::GLDisplay; use crate::GLDisplay;
use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use glib::IsA;
use gst::ContextRef; use gst::ContextRef;
use std::ptr; use std::ptr;

View file

@ -1,4 +1,4 @@
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use crate::GLAllocationParams; use crate::GLAllocationParams;

View file

@ -4,8 +4,8 @@ use crate::GLContext;
use crate::GLDisplay; use crate::GLDisplay;
use crate::GLPlatform; use crate::GLPlatform;
use crate::GLAPI; use crate::GLAPI;
use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use glib::IsA;
use libc::uintptr_t; use libc::uintptr_t;
impl GLContext { impl GLContext {

View file

@ -58,8 +58,7 @@ impl fmt::Debug for NetAddressMeta {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use gio::InetAddressExt; use gio::prelude::*;
use gio::InetSocketAddressExt;
#[test] #[test]
fn test_add_get_meta() { fn test_add_get_meta() {

View file

@ -2,7 +2,7 @@
use crate::NetClientClock; use crate::NetClientClock;
use glib::object::Cast; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
impl NetClientClock { impl NetClientClock {

View file

@ -2,8 +2,8 @@
use crate::NetTimeProvider; use crate::NetTimeProvider;
use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use glib::IsA;
impl NetTimeProvider { impl NetTimeProvider {
pub fn new<P: IsA<gst::Clock>>(clock: &P, address: Option<&str>, port: i32) -> NetTimeProvider { pub fn new<P: IsA<gst::Clock>>(clock: &P, address: Option<&str>, port: i32) -> NetTimeProvider {

View file

@ -2,7 +2,7 @@
use crate::NtpClock; use crate::NtpClock;
use glib::object::Cast; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
impl NtpClock { impl NtpClock {

View file

@ -2,7 +2,7 @@
use crate::PtpClock; use crate::PtpClock;
use glib::object::Cast; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
impl PtpClock { impl PtpClock {

View file

@ -2,11 +2,10 @@
use crate::auto::Discoverer; use crate::auto::Discoverer;
use glib::object::{Cast, ObjectType}; use glib::prelude::*;
use glib::signal::connect_raw; use glib::signal::connect_raw;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
use glib::translate::*; use glib::translate::*;
use glib::IsA;
use glib::Value; use glib::Value;
use std::boxed::Box as Box_; use std::boxed::Box as Box_;

View file

@ -2,7 +2,7 @@
use thiserror::Error; use thiserror::Error;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use crate::auto::EncodingAudioProfile; use crate::auto::EncodingAudioProfile;

View file

@ -1,8 +1,8 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::PlayerVideoOverlayVideoRenderer; use crate::PlayerVideoOverlayVideoRenderer;
use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use glib::IsA;
use std::ptr; use std::ptr;

View file

@ -2,9 +2,9 @@
use crate::{Player, PlayerVideoRenderer}; use crate::{Player, PlayerVideoRenderer};
use glib::prelude::*;
use glib::subclass::prelude::*; use glib::subclass::prelude::*;
use glib::translate::*; use glib::translate::*;
use glib::Cast;
pub trait PlayerVideoRendererImpl: ObjectImpl { pub trait PlayerVideoRendererImpl: ObjectImpl {
fn create_video_sink(&self, video_renderer: &Self::Type, player: &Player) -> gst::Element; fn create_video_sink(&self, video_renderer: &Self::Type, player: &Player) -> gst::Element;

View file

@ -3,7 +3,7 @@
use crate::RTSPAddress; use crate::RTSPAddress;
use crate::RTSPAddressPool; use crate::RTSPAddressPool;
use crate::RTSPAddressPoolResult; use crate::RTSPAddressPoolResult;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use std::ptr; use std::ptr;

View file

@ -1,7 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use glib::object::Cast; use glib::prelude::*;
use glib::object::IsA;
use glib::signal::connect_raw; use glib::signal::connect_raw;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
use glib::translate::*; use glib::translate::*;

View file

@ -1,7 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::RTSPClient; use crate::RTSPClient;
use glib::object::IsA; use glib::prelude::*;
use glib::source::SourceId; use glib::source::SourceId;
use glib::translate::*; use glib::translate::*;

View file

@ -1,6 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use crate::RTSPMedia; use crate::RTSPMedia;

View file

@ -2,10 +2,10 @@
use crate::RTSPMediaFactory; use crate::RTSPMediaFactory;
use glib::prelude::*;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use glib::translate::*; use glib::translate::*;
use glib::IsA;
pub trait RTSPMediaFactoryExtManual: 'static { pub trait RTSPMediaFactoryExtManual: 'static {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]

View file

@ -1,7 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::RTSPServer; use crate::RTSPServer;
use glib::object::IsA; use glib::prelude::*;
use glib::source::SourceId; use glib::source::SourceId;
use glib::translate::*; use glib::translate::*;

View file

@ -2,7 +2,7 @@
use crate::RTSPSessionPool; use crate::RTSPSessionPool;
use glib::ffi::{gboolean, gpointer}; use glib::ffi::{gboolean, gpointer};
use glib::object::IsA; use glib::prelude::*;
use glib::source::{Continue, Priority}; use glib::source::{Continue, Priority};
use glib::translate::*; use glib::translate::*;
use std::cell::RefCell; use std::cell::RefCell;

View file

@ -1,7 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::RTSPStream; use crate::RTSPStream;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
pub trait RTSPStreamExtManual: 'static { pub trait RTSPStreamExtManual: 'static {

View file

@ -1,7 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::RTSPStreamTransport; use crate::RTSPStreamTransport;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
pub trait RTSPStreamTransportExtManual: 'static { pub trait RTSPStreamTransportExtManual: 'static {

View file

@ -8,7 +8,7 @@ use crate::VideoFormat;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use crate::VideoInterlaceMode; use crate::VideoInterlaceMode;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use std::mem; use std::mem;
use std::ptr; use std::ptr;

View file

@ -4,7 +4,7 @@ use crate::utils::HasStreamLock;
use crate::video_codec_state::{InNegotiation, Readable, VideoCodecState, VideoCodecStateContext}; use crate::video_codec_state::{InNegotiation, Readable, VideoCodecState, VideoCodecStateContext};
use crate::VideoCodecFrame; use crate::VideoCodecFrame;
use crate::VideoEncoder; use crate::VideoEncoder;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use std::mem; use std::mem;
use std::ptr; use std::ptr;

View file

@ -1,10 +1,10 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::VideoOverlay; use crate::VideoOverlay;
use glib::translate::*;
use libc::uintptr_t; use libc::uintptr_t;
use glib::IsA; use glib::prelude::*;
use glib::translate::*;
pub trait VideoOverlayExtManual: 'static { pub trait VideoOverlayExtManual: 'static {
unsafe fn set_window_handle(&self, handle: uintptr_t); unsafe fn set_window_handle(&self, handle: uintptr_t);

View file

@ -5,13 +5,10 @@
use crate::WebRTCDataChannelState; use crate::WebRTCDataChannelState;
use crate::WebRTCPriorityType; use crate::WebRTCPriorityType;
use glib::object::ObjectExt; use glib::prelude::*;
use glib::object::ObjectType as ObjectType_;
use glib::signal::connect_raw; use glib::signal::connect_raw;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
use glib::translate::*; use glib::translate::*;
use glib::StaticType;
use glib::ToValue;
use std::boxed::Box as Box_; use std::boxed::Box as Box_;
use std::mem::transmute; use std::mem::transmute;

View file

@ -5,8 +5,7 @@ use crate::BinFlags;
use crate::Element; use crate::Element;
use crate::LoggableError; use crate::LoggableError;
use glib::object::Cast; use glib::prelude::*;
use glib::object::IsA;
use glib::signal::connect_raw; use glib::signal::connect_raw;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
use glib::translate::*; use glib::translate::*;

View file

@ -5,8 +5,8 @@ use crate::Allocator;
use crate::BufferPool; use crate::BufferPool;
use crate::Structure; use crate::Structure;
use glib::prelude::*;
use glib::translate::{from_glib, from_glib_full, from_glib_none, ToGlib, ToGlibPtr, ToGlibPtrMut}; use glib::translate::{from_glib, from_glib_full, from_glib_none, ToGlib, ToGlibPtr, ToGlibPtrMut};
use glib::IsA;
use std::mem; use std::mem;
use std::ops; use std::ops;

View file

@ -1,7 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::ChildProxy; use crate::ChildProxy;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use std::ptr; use std::ptr;

View file

@ -9,11 +9,8 @@ use crate::ClockSuccess;
use crate::ClockTime; use crate::ClockTime;
use crate::ClockTimeDiff; use crate::ClockTimeDiff;
use glib::ffi::{gboolean, gpointer}; use glib::ffi::{gboolean, gpointer};
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::prelude::*; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use glib::IsA;
use libc::c_void; use libc::c_void;
use std::cmp; use std::cmp;
use std::convert; use std::convert;

View file

@ -2,7 +2,7 @@
use crate::ClockTime; use crate::ClockTime;
use crate::ControlBinding; use crate::ControlBinding;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
pub trait ControlBindingExtManual: 'static { pub trait ControlBindingExtManual: 'static {

View file

@ -2,7 +2,7 @@
use crate::ClockTime; use crate::ClockTime;
use crate::ControlSource; use crate::ControlSource;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
pub trait ControlSourceExtManual: 'static { pub trait ControlSourceExtManual: 'static {

View file

@ -3,7 +3,7 @@
use crate::Caps; use crate::Caps;
use crate::DeviceMonitor; use crate::DeviceMonitor;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use std::num::NonZeroU32; use std::num::NonZeroU32;

View file

@ -4,9 +4,8 @@ use crate::DeviceProvider;
use crate::Plugin; use crate::Plugin;
use crate::Rank; use crate::Rank;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::ToGlib; use glib::translate::*;
use glib::translate::ToGlibPtr;
use std::ffi::CStr; use std::ffi::CStr;

View file

@ -22,16 +22,9 @@ use crate::StateChange;
use crate::StateChangeError; use crate::StateChangeError;
use crate::StateChangeReturn; use crate::StateChangeReturn;
use crate::StateChangeSuccess; use crate::StateChangeSuccess;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use glib::prelude::*;
use glib::object::Cast; use glib::translate::*;
use glib::object::IsA;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use glib::translate::FromGlibPtrBorrow;
use glib::translate::{
from_glib, from_glib_full, from_glib_none, FromGlib, FromGlibPtrContainer, ToGlib, ToGlibPtr,
};
use std::ffi::CStr; use std::ffi::CStr;
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]

View file

@ -2,7 +2,7 @@
use thiserror::Error; use thiserror::Error;
use glib::IsA; use glib::prelude::*;
#[macro_export] #[macro_export]
macro_rules! error_msg( macro_rules! error_msg(

View file

@ -1,8 +1,8 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use crate::auto::functions::parse_bin_from_description; use crate::auto::functions::parse_bin_from_description;
use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use glib::Cast;
use std::ptr; use std::ptr;
use crate::Bin; use crate::Bin;

View file

@ -1,7 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use glib::prelude::*;
use glib::translate::ToGlibPtr; use glib::translate::ToGlibPtr;
use glib::IsA;
pub trait GObjectExtManualGst: 'static { pub trait GObjectExtManualGst: 'static {
fn set_property_from_str(&self, name: &str, value: &str); fn set_property_from_str(&self, name: &str, value: &str);

View file

@ -11,8 +11,8 @@ use std::ptr;
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use glib::ffi::gpointer; use glib::ffi::gpointer;
use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use glib::IsA;
#[derive(PartialEq, Eq)] #[derive(PartialEq, Eq)]
pub struct DebugMessage(ptr::NonNull<ffi::GstDebugMessage>); pub struct DebugMessage(ptr::NonNull<ffi::GstDebugMessage>);

View file

@ -16,10 +16,8 @@ use std::num::NonZeroU32;
use std::ops::Deref; use std::ops::Deref;
use std::ptr; use std::ptr;
use glib::prelude::*;
use glib::translate::{from_glib, from_glib_full, from_glib_none, mut_override, ToGlib, ToGlibPtr}; use glib::translate::{from_glib, from_glib_full, from_glib_none, mut_override, ToGlib, ToGlibPtr};
use glib::value::ToSendValue;
use glib::Cast;
use glib::IsA;
mini_object_wrapper!(Message, MessageRef, ffi::GstMessage, || { mini_object_wrapper!(Message, MessageRef, ffi::GstMessage, || {
ffi::gst_message_get_type() ffi::gst_message_get_type()

View file

@ -1,9 +1,8 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use glib::object::{Cast, ObjectExt}; use glib::prelude::*;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
use glib::translate::*; use glib::translate::*;
use glib::IsA;
use crate::ClockTime; use crate::ClockTime;
use crate::ObjectFlags; use crate::ObjectFlags;

View file

@ -29,11 +29,10 @@ use std::num::NonZeroU64;
use std::ptr; use std::ptr;
use glib::ffi::gpointer; use glib::ffi::gpointer;
use glib::object::{Cast, IsA}; use glib::prelude::*;
use glib::translate::{ use glib::translate::{
from_glib, from_glib_borrow, from_glib_full, FromGlib, FromGlibPtrBorrow, ToGlib, ToGlibPtr, from_glib, from_glib_borrow, from_glib_full, FromGlib, FromGlibPtrBorrow, ToGlib, ToGlibPtr,
}; };
use glib::StaticType;
#[derive(Debug, PartialEq, Eq)] #[derive(Debug, PartialEq, Eq)]
pub struct PadProbeId(NonZeroU64); pub struct PadProbeId(NonZeroU64);
@ -1653,8 +1652,6 @@ impl<T: IsA<Pad> + IsA<glib::Object> + glib::object::IsClass> PadBuilder<T> {
pub fn from_template(templ: &crate::PadTemplate, name: Option<&str>) -> Self { pub fn from_template(templ: &crate::PadTemplate, name: Option<&str>) -> Self {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
use glib::ObjectExt;
let mut type_ = T::static_type(); let mut type_ = T::static_type();
// Since 1.14 templates can keep a pad GType with them, so we need to do some // Since 1.14 templates can keep a pad GType with them, so we need to do some

View file

@ -1,7 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file. // Take a look at the license at the top of the repository in the LICENSE file.
use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use glib::IsA;
use crate::PipelineFlags; use crate::PipelineFlags;

View file

@ -5,8 +5,8 @@ use crate::PluginFlags;
use crate::Structure; use crate::Structure;
use crate::StructureRef; use crate::StructureRef;
use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use glib::IsA;
impl Plugin { impl Plugin {
pub fn cache_data(&self) -> Option<&StructureRef> { pub fn cache_data(&self) -> Option<&StructureRef> {

View file

@ -3,7 +3,7 @@
use crate::PluginFeature; use crate::PluginFeature;
use crate::Rank; use crate::Rank;
use glib::object::{Cast, IsA}; use glib::prelude::*;
use glib::translate::{from_glib, FromGlibPtrFull, ToGlib, ToGlibPtr}; use glib::translate::{from_glib, FromGlibPtrFull, ToGlib, ToGlibPtr};
pub trait PluginFeatureExtManual: Sized + 'static { pub trait PluginFeatureExtManual: Sized + 'static {
@ -40,7 +40,6 @@ impl<O: IsA<PluginFeature>> PluginFeatureExtManual for O {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::prelude::*;
#[test] #[test]
fn test_load() { fn test_load() {

View file

@ -10,7 +10,7 @@ use crate::Pad;
use crate::ProxyPad; use crate::ProxyPad;
use std::ptr; use std::ptr;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::{from_glib, from_glib_full, ToGlibPtr}; use glib::translate::{from_glib, from_glib_full, ToGlibPtr};
pub trait ProxyPadExtManual: 'static { pub trait ProxyPadExtManual: 'static {

View file

@ -3,9 +3,8 @@
use crate::tags::*; use crate::tags::*;
use crate::TagMergeMode; use crate::TagMergeMode;
use crate::TagSetter; use crate::TagSetter;
use glib::object::IsA; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use glib::ToSendValue;
pub trait TagSetterExtManual: 'static { pub trait TagSetterExtManual: 'static {
fn add<'a, T: Tag<'a>>(&self, value: &T::TagType, mode: TagMergeMode); fn add<'a, T: Tag<'a>>(&self, value: &T::TagType, mode: TagMergeMode);