gstreamer,pbutils: Only import traits from prelude

Future changes will make all traits - both manual and auto - unavailable
from the crate root; they can then only be imported from the `prelude`.
This commit is contained in:
Marijn Suijten 2021-04-25 20:40:13 +02:00
parent 827ff99965
commit 2c40ce10ab
6 changed files with 6 additions and 37 deletions

View file

@ -1,7 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::prelude::*;
use crate::DiscovererStreamInfo;
use crate::DiscovererStreamInfoExt;
#[derive(Debug)]
pub struct Iter {

View file

@ -487,8 +487,8 @@ impl<'a> EncodingContainerProfileBuilder<'a> {
mod tests {
use super::*;
use crate::auto::EncodingContainerProfile;
use crate::auto::EncodingProfileExt;
use crate::auto::EncodingVideoProfile;
use crate::prelude::*;
const AUDIO_PROFILE_NAME: &str = "audio-profile";
const AUDIO_PROFILE_DESCRIPTION: &str = "audio-profile-description";

View file

@ -495,6 +495,7 @@ impl<O: IsA<Clock>> ClockExtManual for O {
#[cfg(test)]
mod tests {
use super::super::prelude::*;
use super::super::*;
use super::*;
use std::sync::mpsc::channel;

View file

@ -4,6 +4,7 @@ use crate::Element;
use once_cell::sync::Lazy;
use crate::prelude::*;
use crate::ClockTime;
use crate::ElementFlags;
use crate::Event;
@ -821,8 +822,6 @@ impl<O: IsA<Element>> ElementExtManual for O {
}
fn current_running_time(&self) -> crate::ClockTime {
use crate::ElementExt;
let base_time = self.base_time();
let clock_time = self.current_clock_time();
@ -830,9 +829,6 @@ impl<O: IsA<Element>> ElementExtManual for O {
}
fn current_clock_time(&self) -> crate::ClockTime {
use crate::ClockExt;
use crate::ElementExt;
if let Some(clock) = self.clock() {
clock.time()
} else {
@ -1379,7 +1375,6 @@ macro_rules! element_info(
#[cfg(test)]
mod tests {
use super::*;
use crate::prelude::*;
use glib::GString;
#[cfg(feature = "v1_10")]
use std::sync::mpsc::channel;

View file

@ -1,6 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::prelude::{PadExt, PadExtManual};
use crate::prelude::*;
use crate::FlowError;
use crate::FlowSuccess;
use crate::GhostPad;
@ -12,7 +12,6 @@ use crate::PadFlags;
use crate::PadGetRangeSuccess;
use crate::PadMode;
use crate::StaticPadTemplate;
use glib::prelude::*;
use glib::translate::*;
impl GhostPad {
@ -128,8 +127,6 @@ impl<T: IsA<GhostPad> + IsA<Pad>> PadBuilder<T> {
+ Sync
+ 'static,
{
use crate::ProxyPadExt;
unsafe {
let proxy = self
.0
@ -154,8 +151,6 @@ impl<T: IsA<GhostPad> + IsA<Pad>> PadBuilder<T> {
+ Sync
+ 'static,
{
use crate::ProxyPadExt;
unsafe {
let proxy = self
.0
@ -179,8 +174,6 @@ impl<T: IsA<GhostPad> + IsA<Pad>> PadBuilder<T> {
+ Sync
+ 'static,
{
use crate::ProxyPadExt;
unsafe {
let proxy = self
.0
@ -204,8 +197,6 @@ impl<T: IsA<GhostPad> + IsA<Pad>> PadBuilder<T> {
+ Sync
+ 'static,
{
use crate::ProxyPadExt;
unsafe {
let proxy = self
.0
@ -225,8 +216,6 @@ impl<T: IsA<GhostPad> + IsA<Pad>> PadBuilder<T> {
+ Sync
+ 'static,
{
use crate::ProxyPadExt;
unsafe {
let proxy = self
.0
@ -250,8 +239,6 @@ impl<T: IsA<GhostPad> + IsA<Pad>> PadBuilder<T> {
+ Sync
+ 'static,
{
use crate::ProxyPadExt;
unsafe {
let proxy = self
.0
@ -277,8 +264,6 @@ impl<T: IsA<GhostPad> + IsA<Pad>> PadBuilder<T> {
+ Sync
+ 'static,
{
use crate::ProxyPadExt;
unsafe {
let proxy = self
.0
@ -298,8 +283,6 @@ impl<T: IsA<GhostPad> + IsA<Pad>> PadBuilder<T> {
+ Sync
+ 'static,
{
use crate::ProxyPadExt;
unsafe {
let proxy = self
.0
@ -323,8 +306,6 @@ impl<T: IsA<GhostPad> + IsA<Pad>> PadBuilder<T> {
+ Sync
+ 'static,
{
use crate::ProxyPadExt;
unsafe {
let proxy = self
.0
@ -344,8 +325,6 @@ impl<T: IsA<GhostPad> + IsA<Pad>> PadBuilder<T> {
+ Sync
+ 'static,
{
use crate::ProxyPadExt;
unsafe {
let proxy = self
.0
@ -362,8 +341,6 @@ impl<T: IsA<GhostPad> + IsA<Pad>> PadBuilder<T> {
where
F: Fn(&crate::ProxyPad, Option<&crate::Object>) + Send + Sync + 'static,
{
use crate::ProxyPadExt;
unsafe {
let proxy = self
.0
@ -377,8 +354,6 @@ impl<T: IsA<GhostPad> + IsA<Pad>> PadBuilder<T> {
}
pub fn proxy_pad_flags(self, flags: PadFlags) -> Self {
use crate::ProxyPadExt;
unsafe {
let proxy = self
.0
@ -392,8 +367,6 @@ impl<T: IsA<GhostPad> + IsA<Pad>> PadBuilder<T> {
}
pub fn build_with_target<P: IsA<Pad>>(self, target: &P) -> Result<T, glib::BoolError> {
use crate::GhostPadExt;
assert_eq!(self.0.direction(), target.direction());
self.0.set_target(Some(target))?;

View file

@ -1,9 +1,9 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::prelude::*;
use crate::structure::*;
use crate::GenericFormattedValue;
use crate::GroupId;
use crate::GstObjectExt;
use crate::MessageType;
use crate::Object;
use crate::Seqnum;