Group and merge imports in all manual code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182>
This commit is contained in:
Sebastian Dröge 2023-01-03 20:58:25 +02:00
parent 45c145ad50
commit 567ce0a3bf
329 changed files with 1466 additions and 1929 deletions

View file

@ -10,15 +10,12 @@
// This is the format we request:
// Audio / Signed 16bit / 1 channel / arbitrary sample rate
use gst::element_error;
use gst::prelude::*;
use byte_slice_cast::*;
use std::i16;
use anyhow::Error;
use byte_slice_cast::*;
use derive_more::{Display, Error};
use gst::{element_error, prelude::*};
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -10,10 +10,9 @@
// The application provides data of the following format:
// Video / BGRx (4 bytes) / 2 fps
use gst::prelude::*;
use anyhow::Error;
use derive_more::{Display, Error};
use gst::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -1,29 +1,27 @@
// This example demonstrates how to implement a custom compositor based on cairo.
#![allow(clippy::non_send_fields_in_send_ty)]
use anyhow::{Context, Error};
use gst::prelude::*;
use gst_base::prelude::*;
use anyhow::{Context, Error};
#[path = "../examples-common.rs"]
mod examples_common;
// Our custom compositor element is defined in this module.
mod cairo_compositor {
use super::*;
use gst_base::subclass::prelude::*;
use gst_video::prelude::*;
use gst_video::subclass::prelude::*;
use gst_video::{prelude::*, subclass::prelude::*};
use once_cell::sync::Lazy;
use super::*;
// In the imp submodule we include the actual implementation of the compositor.
mod imp {
use super::*;
use std::sync::Mutex;
use super::*;
// Settings of the compositor.
#[derive(Clone)]
struct Settings {
@ -413,9 +411,10 @@ mod cairo_compositor {
// This doesn't implement any additional logic but only provides properties for configuring the
// appearance of the stream corresponding to this pad and the storage of the property values.
mod imp_pad {
use super::*;
use std::sync::Mutex;
use super::*;
// Settings of our pad.
#[derive(Clone)]
pub(super) struct Settings {

View file

@ -4,16 +4,15 @@
// an appsrc and retrieves them again from an appsink.
#![allow(clippy::non_send_fields_in_send_ty)]
use gst::element_error;
use gst::prelude::*;
use gst::{element_error, prelude::*};
#[path = "../examples-common.rs"]
mod examples_common;
mod custom_meta {
use std::{fmt, mem};
use gst::prelude::*;
use std::fmt;
use std::mem;
// Public Rust type for the custom meta.
#[repr(transparent)]
@ -70,10 +69,10 @@ mod custom_meta {
// Actual unsafe implementation of the meta.
mod imp {
use std::{mem, ptr};
use glib::translate::*;
use once_cell::sync::Lazy;
use std::mem;
use std::ptr;
pub(super) struct CustomMetaParams {
pub label: String,

View file

@ -7,15 +7,20 @@
// directly to the on the DXGI swapchain's backbuffer via Windows API in
// strictly zero-copy manner
use gst::glib;
use gst::prelude::*;
use std::collections::VecDeque;
use std::sync::{Arc, Mutex};
use std::time::SystemTime;
use std::{
collections::VecDeque,
sync::{Arc, Mutex},
time::SystemTime,
};
use gst::{glib, prelude::*};
use windows::{
core::*,
Win32::Graphics::{
Direct2D::Common::*, Direct2D::*, Direct3D11::*, DirectWrite::*, Dxgi::Common::*, Dxgi::*,
Direct2D::{Common::*, *},
Direct3D11::*,
DirectWrite::*,
Dxgi::{Common::*, *},
},
};

View file

@ -5,10 +5,10 @@
//
// It's possible to dump the logs at any time in an application,
// not just on exit like is done here.
use gst::prelude::*;
use std::process;
use gst::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -29,15 +29,14 @@
// Especially Windows APIs tend to be quite picky about samplerate and sample-format.
// The same applies to videostreams.
use gst::element_error;
use gst::element_warning;
use gst::prelude::*;
use std::env;
use std::sync::{Arc, Mutex};
use std::{
env,
sync::{Arc, Mutex},
};
use anyhow::Error;
use derive_more::{Display, Error};
use gst::{element_error, element_warning, prelude::*};
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -8,15 +8,11 @@
// Discovered information could for example contain the stream's duration or whether it is
// seekable (filesystem) or not (some http servers).
use gst_pbutils::prelude::*;
use gst_pbutils::DiscovererInfo;
use gst_pbutils::DiscovererStreamInfo;
use std::env;
use anyhow::Error;
use derive_more::{Display, Error};
use std::env;
use gst_pbutils::{prelude::*, DiscovererInfo, DiscovererStreamInfo};
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -12,16 +12,15 @@
// {uridecodebin} -| {encodebin}-{filesink}
// \-{queue}-{videoconvert}-{videoscale}----/
use gst::element_error;
use gst::element_warning;
use gst_pbutils::prelude::*;
use std::env;
use std::sync::{Arc, Mutex};
use std::{
env,
sync::{Arc, Mutex},
};
use anyhow::Error;
use derive_more::{Display, Error};
use gst::{element_error, element_warning};
use gst_pbutils::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -14,20 +14,18 @@
// how the file descriptor of FdMemory can be accessed in a pipeline.
// Note that instead of manual mapping the file descriptor it is also possible
// to use map_writable, which will also map the file descriptor.
use futures::StreamExt;
use gst::{element_error, prelude::*};
use anyhow::Error;
use derive_more::{Display, Error};
use memmap2::MmapMut;
use uds::UnixStreamExt;
use std::{
os::unix::{net::UnixStream, prelude::AsRawFd},
sync::{Arc, Mutex},
};
use anyhow::Error;
use derive_more::{Display, Error};
use futures::StreamExt;
use gst::{element_error, prelude::*};
use memmap2::MmapMut;
use uds::UnixStreamExt;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -3,13 +3,11 @@
// or for an EOS message. When a message notifying about either of both
// is received, the future is resolved.
use gst::prelude::*;
use futures::executor::LocalPool;
use futures::prelude::*;
use std::env;
use futures::{executor::LocalPool, prelude::*};
use gst::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -35,11 +35,10 @@
// those with lowers (higher number). Thus, Layers with higher priority are "in the front".
// - The timeline is the enclosing element, grouping all layers and providing a timeframe.
use gst::prelude::*;
use std::env;
use ges::prelude::*;
use std::env;
use gst::prelude::*;
#[allow(unused_imports)]
#[path = "../examples-common.rs"]

View file

@ -28,16 +28,18 @@ void main () {
"#;
mod mirror {
use super::{gl, FRAGMENT_SHADER};
use gst_base::subclass::BaseTransformMode;
use gst_gl::prelude::*;
use gst_gl::subclass::prelude::*;
use gst_gl::subclass::GLFilterMode;
use gst_gl::*;
use once_cell::sync::Lazy;
use std::sync::Mutex;
use gst_base::subclass::BaseTransformMode;
use gst_gl::{
prelude::*,
subclass::{prelude::*, GLFilterMode},
*,
};
use once_cell::sync::Lazy;
use super::{gl, FRAGMENT_SHADER};
pub static CAT: Lazy<gst::DebugCategory> = Lazy::new(|| {
gst::DebugCategory::new(
"rsglmirrorfilter",

View file

@ -1,8 +1,7 @@
use gst::prelude::*;
use std::env;
use futures::prelude::*;
use std::env;
use gst::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -10,14 +10,12 @@
// (|)
// {videotestsrc} - {glsinkbin}
use gst::prelude::*;
use std::cell::RefCell;
use gio::prelude::*;
use gst::prelude::*;
use gtk::prelude::*;
use std::cell::RefCell;
fn create_ui(app: &gtk::Application) {
let pipeline = gst::Pipeline::default();
let src = gst::ElementFactory::make("videotestsrc").build().unwrap();

View file

@ -17,18 +17,12 @@
// {videotestsrc} - {xvimagesink(on linux)}
// {videotestsrc} - {glimagesink(on mac)}
use gst_video::prelude::*;
use std::{cell::RefCell, os::raw::c_void, process};
use gio::prelude::*;
use gst_video::prelude::*;
use gtk::prelude::*;
use std::os::raw::c_void;
use std::cell::RefCell;
use std::process;
#[cfg(all(target_os = "linux", feature = "gtkvideooverlay-x11"))]
fn create_video_sink() -> gst::Element {
// When we are on linux with the Xorg display server, we use the

View file

@ -3,10 +3,9 @@
// as launch syntax.
// When the parsing succeeded, the pipeline is run until the stream ends or an error happens.
use gst::prelude::*;
use std::{env, process};
use std::env;
use std::process;
use gst::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -7,10 +7,10 @@
// things from the main loop (timeouts, UI events, socket events, ...) instead
// of just handling messages from GStreamer's bus.
use gst::prelude::*;
use std::env;
use gst::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -8,15 +8,15 @@
// The capsfilter element allows us to dictate the video resolution we want for the
// videotestsrc and the overlaycomposition element.
use gst::prelude::*;
use pango::prelude::*;
use std::ops;
use std::sync::{Arc, Mutex};
use std::{
ops,
sync::{Arc, Mutex},
};
use anyhow::Error;
use derive_more::{Display, Error};
use gst::prelude::*;
use pango::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -8,11 +8,10 @@
// {audiotestsrc} - {fakesink}
#![allow(clippy::question_mark)]
use gst::prelude::*;
use std::i16;
use byte_slice_cast::*;
use std::i16;
use gst::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -11,15 +11,15 @@
// The capsfilter element allows us to dictate the video resolution we want for the
// videotestsrc and the cairooverlay element.
use gst::prelude::*;
use pango::prelude::*;
use std::ops;
use std::sync::{Arc, Mutex};
use std::{
ops,
sync::{Arc, Mutex},
};
use anyhow::Error;
use derive_more::{Display, Error};
use gst::prelude::*;
use pango::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -9,10 +9,10 @@
// Much of the playbin's behavior can be controlled by so-called flags, as well
// as the playbin's properties and signals.
use gst::prelude::*;
use std::env;
use gst::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -5,12 +5,13 @@
// audio / subtitle streams or changing the volume) are all supported by simple
// one-line function calls on the GstPlayer.
use gst::prelude::*;
use std::env;
use std::sync::{Arc, Mutex};
use std::{
env,
sync::{Arc, Mutex},
};
use anyhow::Error;
use gst::prelude::*;
#[allow(unused_imports)]
#[path = "../examples-common.rs"]

View file

@ -12,10 +12,10 @@
// For convenience, the API has a set of pre-defined queries, but also
// allows custom queries (which can be defined and used by your own elements).
use gst::prelude::*;
use std::env;
use gst::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -1,8 +1,7 @@
use gst::element_error;
use gst::prelude::*;
use std::env;
use gst::{element_error, prelude::*};
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -1,5 +1,4 @@
use gst::element_error;
use gst::prelude::*;
use gst::{element_error, prelude::*};
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -4,14 +4,12 @@
// send to the server. For this, the launch syntax pipeline, that is passed
// to this example's cli is spawned and the client's media is streamed into it.
use std::env;
use std::ptr;
use glib::translate::*;
use gst_rtsp_server::prelude::*;
use std::{env, ptr};
use anyhow::Error;
use derive_more::{Display, Error};
use glib::translate::*;
use gst_rtsp_server::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -8,10 +8,9 @@
// the client machinery and printing some status.
#![allow(clippy::non_send_fields_in_send_ty)]
use gst_rtsp_server::prelude::*;
use anyhow::Error;
use derive_more::{Display, Error};
use gst_rtsp_server::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;
@ -81,10 +80,10 @@ fn main_loop() -> Result<(), Error> {
// Our custom media factory that creates a media input manually
mod media_factory {
use super::*;
use gst_rtsp_server::subclass::prelude::*;
use super::*;
// In the imp submodule we include the actual implementation
mod imp {
use super::*;
@ -211,10 +210,10 @@ mod media {
// Our custom RTSP server subclass that reports when clients are connecting and uses
// our custom RTSP client subclass for each client
mod server {
use super::*;
use gst_rtsp_server::subclass::prelude::*;
use super::*;
// In the imp submodule we include the actual implementation
mod imp {
use super::*;

View file

@ -5,10 +5,9 @@
use std::env;
use gst_rtsp_server::prelude::*;
use anyhow::Error;
use derive_more::{Display, Error};
use gst_rtsp_server::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -7,20 +7,17 @@
// coefficients are provided via Rust API on the filter as a Vec<f32>.
#![allow(clippy::non_send_fields_in_send_ty)]
use gst::prelude::*;
use anyhow::Error;
use derive_more::{Display, Error};
use gst::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;
// Our custom FIR filter element is defined in this module
mod fir_filter {
use gst_base::subclass::prelude::*;
use byte_slice_cast::*;
use gst_base::subclass::prelude::*;
use once_cell::sync::Lazy;
// The debug category we use below for our filter
@ -34,9 +31,9 @@ mod fir_filter {
// In the imp submodule we include the actual implementation
mod imp {
use std::{collections::VecDeque, sync::Mutex};
use super::*;
use std::collections::VecDeque;
use std::sync::Mutex;
// This is the private data of our filter
#[derive(Default)]

View file

@ -18,11 +18,9 @@
// (More modes of operation are possible, see: gst::TagMergeMode)
// This merge-mode can also be supplied to any method that adds new tags.
use gst::prelude::*;
use anyhow::anyhow;
use anyhow::Error;
use anyhow::{anyhow, Error};
use derive_more::{Display, Error};
use gst::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -7,11 +7,9 @@
// with the correct stride from GStreamer to the image crate as GStreamer does not necessarily
// produce tightly packed pixels, and in case of RGBx never.
use gst::element_error;
use gst::prelude::*;
use anyhow::Error;
use derive_more::{Display, Error};
use gst::{element_error, prelude::*};
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -9,10 +9,10 @@
// {filesrc} - {decodebin} - {queue} - {fakesink}
// \- ...
use gst::prelude::*;
use std::env;
use gst::prelude::*;
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -17,13 +17,11 @@
// {src} - {typefind} - {demuxer} -| {multiqueue} - {matroskamux} - {filesink}
// \-[video]-/
use gst::element_error;
use gst::prelude::*;
use std::env;
use anyhow::Error;
use derive_more::{Display, Error};
use gst::{element_error, prelude::*};
#[path = "../examples-common.rs"]
mod examples_common;

View file

@ -17,10 +17,10 @@ pub fn run<T, F: FnOnce() -> T + Send + 'static>(main: F) -> T
where
T: Send + 'static,
{
use cocoa::appkit::NSApplication;
use std::thread;
use cocoa::appkit::NSApplication;
unsafe {
let app = cocoa::appkit::NSApp();
let t = thread::spawn(|| {

View file

@ -4,17 +4,12 @@
// {videotestsrc} - { glsinkbin }
use gst::element_error;
use gst_gl::prelude::*;
use std::ffi::CStr;
use std::mem;
use std::ptr;
use std::sync;
use std::{ffi::CStr, mem, ptr, sync};
use anyhow::Error;
use derive_more::{Display, Error};
use gst::element_error;
use gst_gl::prelude::*;
#[derive(Debug, Display, Error)]
#[display(fmt = "Received error from {}: {} (debug: {:?})", src, error, debug)]
@ -343,10 +338,9 @@ impl App {
let shared_context: gst_gl::GLContext;
if cfg!(target_os = "linux") {
use glutin::platform::unix::RawHandle;
#[cfg(any(feature = "gst-gl-x11", feature = "gst-gl-wayland"))]
use glutin::platform::unix::WindowExtUnix;
use glutin::platform::ContextTraitExt;
use glutin::platform::{unix::RawHandle, ContextTraitExt};
let api = App::map_gl_api(windowed_context.get_api());

View file

@ -1,7 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use gst::CapsFeatures;
use once_cell::sync::Lazy;
pub static CAPS_FEATURES_MEMORY_DMABUF: Lazy<CapsFeatures> =

View file

@ -4,7 +4,6 @@ use std::{
};
use glib::{translate::*, Cast};
use gst::{Memory, MemoryRef};
#[cfg(any(feature = "v1_16", feature = "dox"))]

View file

@ -1,7 +1,6 @@
use std::{fmt, os::unix::prelude::RawFd};
use glib::{translate::*, Cast};
use gst::{Memory, MemoryRef};
use crate::{FdAllocator, FdMemoryFlags};

View file

@ -1,7 +1,6 @@
use std::fmt;
use glib::translate::*;
use gst::{Memory, MemoryRef};
gst::memory_object_wrapper!(

View file

@ -1,23 +1,21 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::AppSink;
use glib::ffi::gpointer;
use glib::prelude::*;
use glib::translate::*;
use std::mem;
use std::panic;
use std::ptr;
use std::sync::atomic::{AtomicBool, Ordering};
use {
futures_core::Stream,
std::{
pin::Pin,
sync::{Arc, Mutex},
task::{Context, Poll, Waker},
use std::{
mem, panic,
pin::Pin,
ptr,
sync::{
atomic::{AtomicBool, Ordering},
Arc, Mutex,
},
task::{Context, Poll, Waker},
};
use futures_core::Stream;
use glib::{ffi::gpointer, prelude::*, translate::*};
use crate::AppSink;
#[allow(clippy::type_complexity)]
pub struct AppSinkCallbacks {
eos: Option<Box<dyn FnMut(&AppSink) + Send + 'static>>,
@ -1205,10 +1203,11 @@ impl Stream for AppSinkStream {
#[cfg(test)]
mod tests {
use super::*;
use futures_util::StreamExt;
use gst::prelude::*;
use super::*;
#[test]
fn test_app_sink_stream() {
gst::init().unwrap();

View file

@ -1,18 +1,24 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use std::{
mem, panic,
pin::Pin,
ptr,
sync::{
atomic::{AtomicBool, Ordering},
Arc, Mutex,
},
task::{Context, Poll, Waker},
};
use futures_sink::Sink;
use glib::ffi::{gboolean, gpointer};
use glib::prelude::*;
use glib::translate::*;
use glib::{
ffi::{gboolean, gpointer},
prelude::*,
translate::*,
};
use crate::AppSrc;
use std::mem;
use std::panic;
use std::pin::Pin;
use std::ptr;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, Mutex};
use std::task::{Context, Poll, Waker};
#[allow(clippy::type_complexity)]
pub struct AppSrcCallbacks {
@ -678,10 +684,12 @@ impl Sink<gst::Sample> for AppSrcSink {
#[cfg(test)]
mod tests {
use super::*;
use std::sync::atomic::{AtomicUsize, Ordering};
use futures_util::{sink::SinkExt, stream::StreamExt};
use gst::prelude::*;
use std::sync::atomic::{AtomicUsize, Ordering};
use super::*;
#[test]
fn test_app_src_sink() {

View file

@ -1,15 +1,14 @@
use crate::auto::AudioAggregator;
use crate::auto::AudioAggregatorPad;
#[cfg(any(feature = "v1_18", feature = "dox"))]
use glib::object::Cast;
use glib::object::IsA;
#[cfg(any(feature = "v1_18", feature = "dox"))]
use glib::signal::{connect_raw, SignalHandlerId};
use glib::translate::*;
#[cfg(any(feature = "v1_18", feature = "dox"))]
use std::mem::transmute;
#[cfg(any(feature = "v1_18", feature = "dox"))]
use glib::object::Cast;
#[cfg(any(feature = "v1_18", feature = "dox"))]
use glib::signal::{connect_raw, SignalHandlerId};
use glib::{object::IsA, translate::*};
use crate::auto::{AudioAggregator, AudioAggregatorPad};
pub trait AudioAggregatorExtManual: 'static {
#[doc(alias = "gst_audio_aggregator_set_sink_caps")]
fn set_sink_caps(&self, pad: &impl IsA<AudioAggregatorPad>, caps: &gst::CapsRef);

View file

@ -1,11 +1,14 @@
use crate::auto::AudioAggregatorConvertPad;
use glib::object::IsA;
use glib::signal::{connect_raw, SignalHandlerId};
use glib::translate::*;
use glib::Cast;
use std::mem::transmute;
use glib::{
object::IsA,
signal::{connect_raw, SignalHandlerId},
translate::*,
Cast,
};
use crate::auto::AudioAggregatorConvertPad;
pub trait AudioAggregatorConvertPadExtManual: 'static {
#[doc(alias = "converter-config")]
fn converter_config(&self) -> Option<crate::AudioConverterConfig>;

View file

@ -1,6 +1,6 @@
use glib::{object::IsA, translate::*};
use crate::auto::AudioAggregatorPad;
use glib::object::IsA;
use glib::translate::*;
pub trait AudioAggregatorPadExtManual: 'static {
fn audio_info(&self) -> Option<crate::AudioInfo>;

View file

@ -1,13 +1,8 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::translate::{from_glib, Borrowed, FromGlibPtrNone, ToGlibPtr};
use std::{fmt, marker::PhantomData, mem, ops, ptr, slice};
use std::fmt;
use std::marker::PhantomData;
use std::mem;
use std::ops;
use std::ptr;
use std::slice;
use glib::translate::{from_glib, Borrowed, FromGlibPtrNone, ToGlibPtr};
pub enum Readable {}
pub enum Writable {}

View file

@ -1,11 +1,11 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::AudioChannelPosition;
use std::mem;
use glib::translate::{from_glib, IntoGlib};
use crate::AudioChannelPosition;
impl AudioChannelPosition {
pub fn to_mask(self) -> u64 {
let pos = self.into_glib();

View file

@ -1,9 +1,9 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::prelude::*;
use std::ops;
use glib::prelude::*;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct AudioConverterConfig(gst::Structure);

View file

@ -1,11 +1,10 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::AudioDecoder;
use crate::AudioInfo;
use glib::prelude::*;
use glib::translate::*;
use std::mem;
use std::ptr;
use std::{mem, ptr};
use glib::{prelude::*, translate::*};
use crate::{AudioDecoder, AudioInfo};
extern "C" {
fn _gst_audio_decoder_error(

View file

@ -1,10 +1,10 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use std::{mem, ptr};
use glib::{prelude::*, translate::*};
use crate::AudioEncoder;
use glib::prelude::*;
use glib::translate::*;
use std::mem;
use std::ptr;
pub trait AudioEncoderExtManual: 'static {
#[doc(alias = "gst_audio_encoder_finish_frame")]

View file

@ -1,10 +1,8 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use std::ffi::CStr;
use std::str;
use std::{ffi::CStr, str};
use glib::translate::{from_glib, IntoGlib};
use once_cell::sync::Lazy;
#[cfg(feature = "v1_18")]

View file

@ -1,13 +1,11 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use std::cmp::Ordering;
use std::ffi::CStr;
use std::fmt;
use std::marker::PhantomData;
use std::str;
use std::{cmp::Ordering, ffi::CStr, fmt, marker::PhantomData, str};
use glib::translate::{from_glib, from_glib_none, FromGlib, IntoGlib, ToGlibPtr, ToGlibPtrMut};
use glib::StaticType;
use glib::{
translate::{from_glib, from_glib_none, FromGlib, IntoGlib, ToGlibPtr, ToGlibPtrMut},
StaticType,
};
#[derive(PartialEq, Eq, Copy, Clone, Debug, Hash)]
pub enum AudioEndianness {

View file

@ -1,15 +1,12 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use std::{fmt, marker::PhantomData, mem, ptr};
use glib::translate::{
from_glib, from_glib_full, from_glib_none, IntoGlib, ToGlibPtr, ToGlibPtrMut,
};
use gst::prelude::*;
use std::fmt;
use std::marker::PhantomData;
use std::mem;
use std::ptr;
#[doc(alias = "GstAudioInfo")]
pub struct AudioInfo(ffi::GstAudioInfo, [crate::AudioChannelPosition; 64]);

View file

@ -1,13 +1,11 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::ffi::GstAudioRingBufferSpec;
use std::fmt;
use glib::translate::*;
use gst::Caps;
use crate::AudioInfo;
use crate::AudioRingBufferFormatType;
use std::fmt;
use crate::{ffi::GstAudioRingBufferSpec, AudioInfo, AudioRingBufferFormatType};
#[repr(transparent)]
pub struct AudioRingBufferSpec(pub(crate) GstAudioRingBufferSpec);

View file

@ -1,9 +1,10 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::AudioStreamAlign;
use std::mem;
use glib::translate::*;
use std::mem;
use crate::AudioStreamAlign;
impl AudioStreamAlign {
#[doc(alias = "gst_audio_stream_align_process")]

View file

@ -1,7 +1,8 @@
use crate::{AudioFormat, AudioLayout};
use std::ops::{Bound::*, RangeBounds};
use gst::Caps;
use std::ops::Bound::*;
use std::ops::RangeBounds;
use crate::{AudioFormat, AudioLayout};
pub struct AudioCapsBuilder<T> {
builder: gst::caps::Builder<T>,

View file

@ -1,7 +1,9 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::translate::{from_glib, ToGlibPtr};
use glib::{FlagsClass, StaticType, ToValue};
use glib::{
translate::{from_glib, ToGlibPtr},
FlagsClass, StaticType, ToValue,
};
use gst::bitflags_serde_impl;
bitflags_serde_impl!(crate::AudioFlags);

View file

@ -1,9 +1,9 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::translate::{from_glib_full, IntoGlibPtr, ToGlibPtr};
use std::i32;
use glib::translate::{from_glib_full, IntoGlibPtr, ToGlibPtr};
#[doc(alias = "gst_audio_buffer_clip")]
pub fn audio_buffer_clip(
buffer: gst::Buffer,

View file

@ -81,14 +81,13 @@ pub mod prelude {
#[doc(hidden)]
pub use gst_base::prelude::*;
pub use super::audio_decoder::AudioDecoderExtManual;
pub use super::audio_encoder::AudioEncoderExtManual;
pub use crate::audio_aggregator::AudioAggregatorExtManual;
pub use crate::audio_aggregator_convert_pad::AudioAggregatorConvertPadExtManual;
pub use crate::audio_aggregator_pad::AudioAggregatorPadExtManual;
pub use crate::audio_format::AudioFormatIteratorExt;
pub use crate::auto::traits::*;
pub use super::{audio_decoder::AudioDecoderExtManual, audio_encoder::AudioEncoderExtManual};
pub use crate::{
audio_aggregator::AudioAggregatorExtManual,
audio_aggregator_convert_pad::AudioAggregatorConvertPadExtManual,
audio_aggregator_pad::AudioAggregatorPadExtManual, audio_format::AudioFormatIteratorExt,
auto::traits::*,
};
}
pub mod subclass;

View file

@ -1,14 +1,11 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::translate::*;
use gst_base::prelude::*;
use gst_base::subclass::prelude::*;
use std::ptr;
use crate::AudioAggregator;
use crate::AudioAggregatorPad;
use glib::translate::*;
use gst_base::{prelude::*, subclass::prelude::*};
use crate::{AudioAggregator, AudioAggregatorPad};
pub trait AudioAggregatorImpl: AudioAggregatorImplExt + AggregatorImpl {
fn create_output_buffer(&self, num_frames: u32) -> Option<gst::Buffer> {

View file

@ -1,12 +1,10 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::translate::*;
use gst_base::prelude::*;
use gst_base::subclass::prelude::*;
use std::ptr;
use glib::translate::*;
use gst_base::{prelude::*, subclass::prelude::*};
use crate::AudioAggregatorPad;
pub trait AudioAggregatorPadImpl: AudioAggregatorPadImplExt + AggregatorPadImpl {

View file

@ -1,15 +1,11 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::translate::*;
use std::{mem, ptr};
use glib::translate::*;
use gst::subclass::prelude::*;
use std::mem;
use std::ptr;
use crate::prelude::*;
use crate::AudioDecoder;
use crate::{prelude::*, AudioDecoder};
pub trait AudioDecoderImpl: AudioDecoderImplExt + ElementImpl {
fn open(&self) -> Result<(), gst::ErrorMessage> {

View file

@ -1,15 +1,11 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::translate::*;
use gst::subclass::prelude::*;
use std::ptr;
use crate::prelude::*;
use glib::translate::*;
use gst::subclass::prelude::*;
use crate::AudioEncoder;
use crate::AudioInfo;
use crate::{prelude::*, AudioEncoder, AudioInfo};
pub trait AudioEncoderImpl: AudioEncoderImplExt + ElementImpl {
fn open(&self) -> Result<(), gst::ErrorMessage> {

View file

@ -1,12 +1,9 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::translate::*;
use gst_base::{prelude::*, subclass::prelude::*};
use gst_base::prelude::*;
use gst_base::subclass::prelude::*;
use crate::AudioFilter;
use crate::AudioInfo;
use crate::{AudioFilter, AudioInfo};
pub trait AudioFilterImpl: AudioFilterImplExt + BaseTransformImpl {
fn allowed_caps() -> &'static gst::Caps;

View file

@ -1,14 +1,11 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::prelude::*;
use glib::translate::*;
use super::prelude::*;
use glib::{prelude::*, translate::*};
use gst::LoggableError;
use gst_base::subclass::prelude::*;
use crate::AudioRingBufferSpec;
use crate::AudioSink;
use super::prelude::*;
use crate::{AudioRingBufferSpec, AudioSink};
pub trait AudioSinkImpl: AudioSinkImplExt + AudioBaseSinkImpl {
fn close(&self) -> Result<(), LoggableError> {

View file

@ -2,15 +2,12 @@
use std::mem;
use glib::prelude::*;
use glib::translate::*;
use super::prelude::*;
use glib::{prelude::*, translate::*};
use gst::LoggableError;
use gst_base::subclass::prelude::*;
use crate::AudioRingBufferSpec;
use crate::AudioSrc;
use super::prelude::*;
use crate::{AudioRingBufferSpec, AudioSrc};
pub trait AudioSrcImpl: AudioSrcImplExt + AudioBaseSrcImpl {
fn close(&self) -> Result<(), LoggableError> {

View file

@ -17,14 +17,16 @@ pub mod prelude {
#[doc(hidden)]
pub use gst_base::subclass::prelude::*;
pub use super::audio_aggregator::{AudioAggregatorImpl, AudioAggregatorImplExt};
pub use super::audio_aggregator_convert_pad::AudioAggregatorConvertPadImpl;
pub use super::audio_aggregator_pad::{AudioAggregatorPadImpl, AudioAggregatorPadImplExt};
pub use super::audio_base_sink::AudioBaseSinkImpl;
pub use super::audio_base_src::AudioBaseSrcImpl;
pub use super::audio_decoder::{AudioDecoderImpl, AudioDecoderImplExt};
pub use super::audio_encoder::{AudioEncoderImpl, AudioEncoderImplExt};
pub use super::audio_filter::{AudioFilterImpl, AudioFilterImplExt};
pub use super::audio_sink::{AudioSinkImpl, AudioSinkImplExt};
pub use super::audio_src::{AudioSrcImpl, AudioSrcImplExt};
pub use super::{
audio_aggregator::{AudioAggregatorImpl, AudioAggregatorImplExt},
audio_aggregator_convert_pad::AudioAggregatorConvertPadImpl,
audio_aggregator_pad::{AudioAggregatorPadImpl, AudioAggregatorPadImplExt},
audio_base_sink::AudioBaseSinkImpl,
audio_base_src::AudioBaseSrcImpl,
audio_decoder::{AudioDecoderImpl, AudioDecoderImplExt},
audio_encoder::{AudioEncoderImpl, AudioEncoderImplExt},
audio_filter::{AudioFilterImpl, AudioFilterImplExt},
audio_sink::{AudioSinkImpl, AudioSinkImplExt},
audio_src::{AudioSrcImpl, AudioSrcImplExt},
};
}

View file

@ -1,10 +1,10 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::Adapter;
use std::{io, mem, ops};
use glib::translate::*;
use std::io;
use std::mem;
use std::ops;
use crate::Adapter;
impl Adapter {
#[doc(alias = "gst_adapter_copy")]

View file

@ -1,20 +1,20 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::Aggregator;
use glib::prelude::*;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::signal::{connect_raw, SignalHandlerId};
use glib::translate::*;
use gst::format::FormattedValue;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use std::boxed::Box as Box_;
use std::mem;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use std::mem::transmute;
use std::ptr;
use std::{mem, ptr};
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::signal::{connect_raw, SignalHandlerId};
use glib::{prelude::*, translate::*};
use gst::format::FormattedValue;
use crate::Aggregator;
pub trait AggregatorExtManual: 'static {
#[doc(alias = "get_allocator")]

View file

@ -1,8 +1,8 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::{prelude::*, translate::*};
use crate::AggregatorPad;
use glib::prelude::*;
use glib::translate::*;
pub trait AggregatorPadExtManual: 'static {
#[doc(alias = "get_segment")]

View file

@ -1,12 +1,12 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::BaseParse;
use crate::BaseParseFrame;
use glib::prelude::*;
use glib::translate::*;
use gst::format::{FormattedValue, SpecificFormattedValueFullRange};
use std::mem;
use glib::{prelude::*, translate::*};
use gst::format::{FormattedValue, SpecificFormattedValueFullRange};
use crate::{BaseParse, BaseParseFrame};
pub trait BaseParseExtManual: 'static {
#[doc(alias = "get_sink_pad")]
fn sink_pad(&self) -> &gst::Pad;

View file

@ -1,12 +1,10 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::translate::*;
use std::fmt;
use std::marker::PhantomData;
use std::ptr;
use std::{fmt, marker::PhantomData, ptr};
use crate::BaseParse;
use crate::BaseParseFrameFlags;
use glib::translate::*;
use crate::{BaseParse, BaseParseFrameFlags};
pub struct BaseParseFrame<'a>(
ptr::NonNull<ffi::GstBaseParseFrame>,

View file

@ -1,10 +1,11 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::BaseSink;
use glib::prelude::*;
use glib::translate::*;
use std::mem;
use glib::{prelude::*, translate::*};
use crate::BaseSink;
pub trait BaseSinkExtManual: 'static {
#[doc(alias = "get_segment")]
fn segment(&self) -> gst::Segment;

View file

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

View file

@ -1,10 +1,10 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use std::{mem, ptr};
use glib::{prelude::*, translate::*};
use crate::BaseTransform;
use glib::prelude::*;
use glib::translate::*;
use std::mem;
use std::ptr;
pub trait BaseTransformExtManual: 'static {
#[doc(alias = "get_allocator")]

View file

@ -1,7 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::prelude::*;
use glib::translate::*;
use glib::{prelude::*, translate::*};
glib::wrapper! {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]

View file

@ -1,9 +1,9 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::prelude::*;
use glib::translate::*;
use std::mem;
use glib::{prelude::*, translate::*};
#[doc(alias = "gst_type_find_helper_for_data")]
pub fn type_find_helper_for_data(
obj: Option<&impl IsA<gst::Object>>,

View file

@ -33,8 +33,7 @@ macro_rules! skip_assert_initialized {
#[allow(clippy::use_self)]
#[allow(unused_imports)]
mod auto;
pub use crate::auto::functions::*;
pub use crate::auto::*;
pub use crate::auto::{functions::*, *};
pub mod functions;
pub use crate::functions::*;
@ -63,13 +62,11 @@ pub mod prelude {
#[doc(hidden)]
pub use gst::prelude::*;
pub use crate::aggregator::AggregatorExtManual;
pub use crate::aggregator_pad::AggregatorPadExtManual;
pub use crate::auto::traits::*;
pub use crate::base_parse::BaseParseExtManual;
pub use crate::base_sink::BaseSinkExtManual;
pub use crate::base_src::BaseSrcExtManual;
pub use crate::base_transform::BaseTransformExtManual;
pub use crate::{
aggregator::AggregatorExtManual, aggregator_pad::AggregatorPadExtManual, auto::traits::*,
base_parse::BaseParseExtManual, base_sink::BaseSinkExtManual, base_src::BaseSrcExtManual,
base_transform::BaseTransformExtManual,
};
}
mod utils;

View file

@ -1,14 +1,11 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::prelude::*;
use glib::translate::*;
use gst::subclass::prelude::*;
use std::ptr;
use crate::Aggregator;
use crate::AggregatorPad;
use glib::{prelude::*, translate::*};
use gst::subclass::prelude::*;
use crate::{Aggregator, AggregatorPad};
pub trait AggregatorImpl: AggregatorImplExt + ElementImpl {
fn flush(&self) -> Result<gst::FlowSuccess, gst::FlowError> {

View file

@ -1,12 +1,9 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::prelude::*;
use glib::translate::*;
use glib::{prelude::*, translate::*};
use gst::subclass::prelude::*;
use crate::Aggregator;
use crate::AggregatorPad;
use crate::{Aggregator, AggregatorPad};
pub trait AggregatorPadImpl: AggregatorPadImplExt + PadImpl {
fn flush(&self, aggregator: &Aggregator) -> Result<gst::FlowSuccess, gst::FlowError> {

View file

@ -2,13 +2,10 @@
use std::mem;
use crate::prelude::*;
use glib::translate::*;
use gst::subclass::prelude::*;
use crate::BaseParse;
use crate::BaseParseFrame;
use crate::{prelude::*, BaseParse, BaseParseFrame};
pub trait BaseParseImpl: BaseParseImplExt + ElementImpl {
fn start(&self) -> Result<(), gst::ErrorMessage> {

View file

@ -1,12 +1,10 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::prelude::*;
use glib::translate::*;
use gst::subclass::prelude::*;
use std::ptr;
use glib::{prelude::*, translate::*};
use gst::subclass::prelude::*;
use crate::BaseSink;
pub trait BaseSinkImpl: BaseSinkImplExt + ElementImpl {

View file

@ -1,18 +1,12 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::prelude::*;
use glib::translate::*;
use gst::prelude::*;
use gst::subclass::prelude::*;
use std::mem;
use std::ptr;
use std::{mem, ptr};
use atomic_refcell::AtomicRefCell;
use glib::{prelude::*, translate::*};
use gst::{prelude::*, subclass::prelude::*};
use crate::prelude::BaseSrcExtManual;
use crate::BaseSrc;
use crate::{prelude::BaseSrcExtManual, BaseSrc};
#[derive(Default)]
pub(super) struct InstanceData {

View file

@ -1,15 +1,11 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::prelude::*;
use std::{mem, ptr};
use glib::translate::*;
use gst::subclass::prelude::*;
use std::mem;
use std::ptr;
use crate::BaseTransform;
use crate::{prelude::*, BaseTransform};
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum BaseTransformMode {

View file

@ -19,11 +19,13 @@ pub mod prelude {
#[doc(hidden)]
pub use gst::subclass::prelude::*;
pub use super::aggregator::{AggregatorImpl, AggregatorImplExt};
pub use super::aggregator_pad::{AggregatorPadImpl, AggregatorPadImplExt};
pub use super::base_parse::{BaseParseImpl, BaseParseImplExt};
pub use super::base_sink::{BaseSinkImpl, BaseSinkImplExt};
pub use super::base_src::{BaseSrcImpl, BaseSrcImplExt};
pub use super::base_transform::{BaseTransformImpl, BaseTransformImplExt};
pub use super::push_src::{PushSrcImpl, PushSrcImplExt};
pub use super::{
aggregator::{AggregatorImpl, AggregatorImplExt},
aggregator_pad::{AggregatorPadImpl, AggregatorPadImplExt},
base_parse::{BaseParseImpl, BaseParseImplExt},
base_sink::{BaseSinkImpl, BaseSinkImplExt},
base_src::{BaseSrcImpl, BaseSrcImplExt},
base_transform::{BaseTransformImpl, BaseTransformImplExt},
push_src::{PushSrcImpl, PushSrcImplExt},
};
}

View file

@ -1,15 +1,12 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::prelude::*;
use glib::subclass::prelude::*;
use glib::translate::*;
use gst::prelude::*;
use std::ptr;
use glib::{prelude::*, subclass::prelude::*, translate::*};
use gst::prelude::*;
use super::base_src::{BaseSrcImpl, CreateSuccess};
use crate::prelude::BaseSrcExtManual;
use crate::PushSrc;
use crate::{prelude::BaseSrcExtManual, PushSrc};
pub trait PushSrcImpl: PushSrcImplExt + BaseSrcImpl {
fn fill(&self, buffer: &mut gst::BufferRef) -> Result<gst::FlowSuccess, gst::FlowError> {

View file

@ -1,13 +1,11 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::TestClock;
use std::{marker::PhantomData, mem, ops, path, ptr};
use glib::translate::*;
use gst::prelude::*;
use std::marker::PhantomData;
use std::mem;
use std::ops;
use std::path;
use std::ptr;
use crate::TestClock;
#[derive(Debug)]
#[doc(alias = "GstHarness")]

View file

@ -1,9 +1,11 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::TestClock;
use glib::translate::*;
use std::ptr;
use glib::translate::*;
use crate::TestClock;
impl TestClock {
#[doc(alias = "gst_test_clock_has_id")]
pub fn has_id(&self, id: &gst::ClockId) -> bool {

View file

@ -1,7 +1,9 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::translate::{from_glib, ToGlibPtr};
use glib::{FlagsClass, StaticType, ToValue};
use glib::{
translate::{from_glib, ToGlibPtr},
FlagsClass, StaticType, ToValue,
};
use gst::bitflags_serde_impl;
bitflags_serde_impl!(crate::MarkerFlags, "v1_20");

View file

@ -5,17 +5,16 @@
#![allow(clippy::non_send_fields_in_send_ty)]
#![doc = include_str!("../README.md")]
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;
use std::sync::Once;
use glib::translate::from_glib;
static GES_INIT: Once = Once::new();
#[doc(alias = "ges_init")]

View file

@ -6,12 +6,12 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use crate::GLDisplayEGL;
use glib::ffi::gpointer;
use glib::translate::*;
use glib::{ffi::gpointer, translate::*};
use gst_gl::GLDisplayType;
use libc::uintptr_t;
use crate::GLDisplayEGL;
impl GLDisplayEGL {
pub unsafe fn with_egl_display(
display: uintptr_t,

View file

@ -1,7 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use gst::CapsFeatures;
use once_cell::sync::Lazy;
pub static CAPS_FEATURES_MEMORY_GL_MEMORY: Lazy<CapsFeatures> =

View file

@ -1,11 +1,12 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::GLDisplay;
use glib::prelude::*;
use glib::translate::*;
use gst::ContextRef;
use std::ptr;
use glib::{prelude::*, translate::*};
use gst::ContextRef;
use crate::GLDisplay;
pub trait ContextGLExt {
#[doc(alias = "get_gl_display")]
#[doc(alias = "gst_context_get_gl_display")]

View file

@ -1,7 +1,9 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::translate::{from_glib, ToGlibPtr};
use glib::{FlagsClass, StaticType, ToValue};
use glib::{
translate::{from_glib, ToGlibPtr},
FlagsClass, StaticType, ToValue,
};
use gst::bitflags_serde_impl;
bitflags_serde_impl!(crate::GLAPI);

View file

@ -1,9 +1,9 @@
use crate::GLContext;
use crate::GLDisplay;
use glib::object::IsA;
use glib::translate::*;
use std::ptr;
use glib::{object::IsA, translate::*};
use crate::{GLContext, GLDisplay};
#[doc(alias = "gst_gl_handle_context_query")]
pub fn gl_handle_context_query(
element: &impl IsA<gst::Element>,

View file

@ -1,12 +1,8 @@
use glib::prelude::*;
use glib::translate::*;
use gst::Memory;
use crate::GLAllocationParams;
use crate::GLBaseMemoryAllocator;
use ffi::GstGLBaseMemory;
use gst::MemoryRef;
use glib::{prelude::*, translate::*};
use gst::{Memory, MemoryRef};
use crate::{GLAllocationParams, GLBaseMemoryAllocator};
gst::memory_object_wrapper!(
GLBaseMemory,

View file

@ -1,13 +1,10 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::GLContext;
use crate::GLDisplay;
use crate::GLPlatform;
use crate::GLAPI;
use glib::prelude::*;
use glib::translate::*;
use glib::{prelude::*, translate::*};
use libc::uintptr_t;
use crate::{GLContext, GLDisplay, GLPlatform, GLAPI};
impl GLContext {
pub unsafe fn new_wrapped<T: IsA<GLDisplay>>(
display: &T,

View file

@ -1,13 +1,8 @@
use glib::translate::*;
use crate::GLBaseMemory;
use crate::GLBaseMemoryRef;
use crate::GLFormat;
use crate::GLTextureTarget;
use ffi::GstGLMemory;
use gst::{result_from_gboolean, LoggableError, CAT_RUST};
use gst::{Memory, MemoryRef};
use glib::translate::*;
use gst::{result_from_gboolean, LoggableError, Memory, MemoryRef, CAT_RUST};
use crate::{GLBaseMemory, GLBaseMemoryRef, GLFormat, GLTextureTarget};
gst::memory_object_wrapper!(
GLMemory,

View file

@ -1,9 +1,8 @@
use ffi::GstGLMemoryPBO;
use glib::translate::*;
use gst::{Memory, MemoryRef};
use crate::{GLBaseMemory, GLBaseMemoryRef, GLMemory, GLMemoryRef};
use gst::{Memory, MemoryRef};
gst::memory_object_wrapper!(
GLMemoryPBO,

View file

@ -1,10 +1,10 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use std::mem;
use glib::translate::{from_glib, ToGlibPtr};
use gst_video::video_frame::Readable;
use std::mem;
pub trait VideoFrameGLExt {
fn from_buffer_readable_gl(
buffer: gst::Buffer,

Some files were not shown because too many files have changed in this diff Show more