2020-12-15 10:53:31 +00:00
|
|
|
// Take a look at the license at the top of the repository in the LICENSE file.
|
2017-07-07 11:47:28 +00:00
|
|
|
|
2023-05-04 05:55:48 +00:00
|
|
|
#![cfg_attr(docsrs, feature(doc_cfg))]
|
2017-07-31 11:16:42 +00:00
|
|
|
#![recursion_limit = "256"]
|
2021-07-30 19:23:46 +00:00
|
|
|
#![allow(clippy::missing_safety_doc)]
|
|
|
|
#![allow(clippy::manual_range_contains)]
|
2021-07-30 16:03:12 +00:00
|
|
|
#![doc = include_str!("../README.md")]
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2018-11-18 12:20:16 +00:00
|
|
|
// Re-exported for the subclass gst_plugin_define! macro
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use ffi;
|
|
|
|
pub use glib;
|
2023-01-03 18:58:25 +00:00
|
|
|
pub use paste;
|
2017-07-03 09:26:40 +00:00
|
|
|
|
2022-06-27 07:28:28 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
pub static INITIALIZED: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false);
|
|
|
|
|
2023-01-05 14:40:15 +00:00
|
|
|
#[cold]
|
|
|
|
#[inline(never)]
|
|
|
|
#[track_caller]
|
|
|
|
pub fn assert_initialized() {
|
|
|
|
#[allow(unused_unsafe)]
|
|
|
|
if unsafe { ffi::gst_is_initialized() } != glib::ffi::GTRUE {
|
|
|
|
panic!("GStreamer has not been initialized. Call `gst::init` first.");
|
|
|
|
} else {
|
|
|
|
crate::INITIALIZED.store(true, std::sync::atomic::Ordering::SeqCst);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-10 09:36:15 +00:00
|
|
|
macro_rules! assert_initialized_main_thread {
|
2018-04-01 08:30:03 +00:00
|
|
|
() => {
|
2022-06-27 07:28:28 +00:00
|
|
|
if !crate::INITIALIZED.load(std::sync::atomic::Ordering::SeqCst) {
|
2023-01-05 14:40:15 +00:00
|
|
|
$crate::assert_initialized();
|
2017-08-30 09:48:01 +00:00
|
|
|
}
|
2018-04-01 08:30:03 +00:00
|
|
|
};
|
2017-07-10 09:36:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
macro_rules! skip_assert_initialized {
|
2018-04-01 08:30:03 +00:00
|
|
|
() => {};
|
2017-07-10 09:36:15 +00:00
|
|
|
}
|
|
|
|
|
2021-07-30 10:19:24 +00:00
|
|
|
#[allow(clippy::needless_borrow)]
|
2022-05-20 08:18:39 +00:00
|
|
|
#[allow(clippy::let_unit_value)]
|
2017-05-12 12:24:03 +00:00
|
|
|
mod auto;
|
2023-01-03 18:58:25 +00:00
|
|
|
pub use crate::auto::{functions::*, *};
|
2017-05-12 12:24:03 +00:00
|
|
|
|
2022-05-05 10:40:07 +00:00
|
|
|
#[macro_use]
|
2022-09-12 16:32:16 +00:00
|
|
|
#[cfg(feature = "serde")]
|
2022-05-05 10:40:07 +00:00
|
|
|
mod serde_macros;
|
2022-09-12 16:32:16 +00:00
|
|
|
#[cfg(feature = "serde")]
|
2022-05-05 10:40:07 +00:00
|
|
|
pub use crate::serde_macros::*;
|
|
|
|
|
2017-09-09 11:12:49 +00:00
|
|
|
#[macro_use]
|
|
|
|
mod log;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::log::*;
|
2017-09-09 11:12:49 +00:00
|
|
|
|
2017-12-20 17:52:57 +00:00
|
|
|
#[macro_use]
|
|
|
|
mod error;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::error::*;
|
2017-12-20 17:52:57 +00:00
|
|
|
|
2018-09-28 15:11:46 +00:00
|
|
|
#[macro_use]
|
2017-07-03 10:56:26 +00:00
|
|
|
pub mod miniobject;
|
2021-09-19 10:30:29 +00:00
|
|
|
pub use miniobject::{MiniObject, MiniObjectRef};
|
2017-07-03 10:56:26 +00:00
|
|
|
pub mod message;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::message::{Message, MessageErrorDomain, MessageRef, MessageView};
|
2018-07-16 19:46:10 +00:00
|
|
|
|
2018-06-21 18:44:51 +00:00
|
|
|
mod value;
|
2022-04-03 07:46:02 +00:00
|
|
|
pub use crate::value::{
|
|
|
|
Array, ArrayRef, Bitmask, Fraction, FractionRange, IntRange, List, ListRef,
|
|
|
|
};
|
2022-09-12 16:32:16 +00:00
|
|
|
#[cfg(feature = "serde")]
|
2018-07-16 19:46:10 +00:00
|
|
|
#[macro_use]
|
2018-07-30 19:10:34 +00:00
|
|
|
mod value_serde;
|
2018-07-16 19:46:10 +00:00
|
|
|
|
2022-09-12 16:32:16 +00:00
|
|
|
#[cfg(feature = "serde")]
|
2022-05-05 10:40:07 +00:00
|
|
|
mod flag_serde;
|
|
|
|
|
2017-07-07 13:04:54 +00:00
|
|
|
pub mod structure;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::structure::{Structure, StructureRef};
|
2022-09-12 16:32:16 +00:00
|
|
|
#[cfg(feature = "serde")]
|
2018-07-30 19:10:34 +00:00
|
|
|
mod structure_serde;
|
2018-07-16 19:46:10 +00:00
|
|
|
|
2017-07-10 21:02:08 +00:00
|
|
|
pub mod caps;
|
2022-01-08 21:34:19 +00:00
|
|
|
pub use crate::caps::{Caps, CapsFilterMapAction, CapsRef};
|
2018-09-28 09:01:14 +00:00
|
|
|
mod caps_features;
|
2022-09-12 16:32:16 +00:00
|
|
|
#[cfg(feature = "serde")]
|
2018-07-30 19:10:34 +00:00
|
|
|
mod caps_serde;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::caps_features::{
|
2018-09-28 09:01:14 +00:00
|
|
|
CapsFeatures, CapsFeaturesRef, CAPS_FEATURES_MEMORY_SYSTEM_MEMORY,
|
|
|
|
CAPS_FEATURE_MEMORY_SYSTEM_MEMORY,
|
|
|
|
};
|
2022-09-12 16:32:16 +00:00
|
|
|
#[cfg(feature = "serde")]
|
2018-09-28 09:00:08 +00:00
|
|
|
mod caps_features_serde;
|
2018-07-16 19:46:10 +00:00
|
|
|
|
2017-07-12 07:27:43 +00:00
|
|
|
pub mod tags;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::tags::{
|
2019-01-23 13:52:56 +00:00
|
|
|
tag_exists, tag_get_description, tag_get_flag, tag_get_nick, tag_get_type, Tag, TagList,
|
|
|
|
TagListRef,
|
|
|
|
};
|
2022-09-12 16:32:16 +00:00
|
|
|
#[cfg(feature = "serde")]
|
2018-07-30 19:10:34 +00:00
|
|
|
mod tags_serde;
|
2018-07-16 19:46:10 +00:00
|
|
|
|
2018-09-29 08:13:57 +00:00
|
|
|
pub mod meta;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::meta::MetaSeqnum;
|
2023-01-03 18:58:25 +00:00
|
|
|
pub use crate::meta::{
|
2023-06-30 05:50:03 +00:00
|
|
|
Meta, MetaAPI, MetaAPIExt, MetaRef, MetaRefMut, ParentBufferMeta, ProtectionMeta,
|
|
|
|
ReferenceTimestampMeta,
|
2023-01-03 18:58:25 +00:00
|
|
|
};
|
2017-07-25 12:01:24 +00:00
|
|
|
pub mod buffer;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::buffer::{
|
2020-04-07 09:56:22 +00:00
|
|
|
Buffer, BufferMap, BufferRef, MappedBuffer, BUFFER_COPY_ALL, BUFFER_COPY_METADATA,
|
2018-07-27 10:36:40 +00:00
|
|
|
};
|
2020-04-07 09:56:22 +00:00
|
|
|
mod buffer_cursor;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::buffer_cursor::{BufferCursor, BufferRefCursor};
|
2019-05-11 15:00:03 +00:00
|
|
|
pub mod memory;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::memory::{MappedMemory, Memory, MemoryMap, MemoryRef};
|
2022-09-12 16:32:16 +00:00
|
|
|
#[cfg(feature = "serde")]
|
2018-07-30 19:10:34 +00:00
|
|
|
mod buffer_serde;
|
2018-07-16 19:46:10 +00:00
|
|
|
|
2017-07-28 17:04:15 +00:00
|
|
|
pub mod sample;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::sample::{Sample, SampleRef};
|
2022-09-12 16:32:16 +00:00
|
|
|
#[cfg(feature = "serde")]
|
2018-07-30 19:10:34 +00:00
|
|
|
mod sample_serde;
|
2018-07-16 19:46:10 +00:00
|
|
|
|
2017-07-28 17:20:11 +00:00
|
|
|
pub mod bufferlist;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::bufferlist::{BufferList, BufferListRef};
|
2022-09-12 16:32:16 +00:00
|
|
|
#[cfg(feature = "serde")]
|
2018-07-30 19:10:34 +00:00
|
|
|
mod bufferlist_serde;
|
2018-07-16 19:46:10 +00:00
|
|
|
|
2017-07-29 11:58:54 +00:00
|
|
|
pub mod query;
|
2022-01-18 09:57:22 +00:00
|
|
|
pub use crate::query::{Query, QueryRef, QueryView, QueryViewMut};
|
2017-07-30 14:06:44 +00:00
|
|
|
pub mod event;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::event::{Event, EventRef, EventView, GroupId, Seqnum};
|
2017-08-02 17:34:37 +00:00
|
|
|
pub mod context;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::context::{Context, ContextRef};
|
2017-10-15 08:08:56 +00:00
|
|
|
mod static_caps;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::static_caps::*;
|
2017-10-15 08:08:56 +00:00
|
|
|
mod static_pad_template;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::static_pad_template::*;
|
2017-07-03 10:56:26 +00:00
|
|
|
|
2020-02-09 17:07:18 +00:00
|
|
|
pub mod promise;
|
|
|
|
pub use promise::{Promise, PromiseError};
|
2018-03-15 09:43:35 +00:00
|
|
|
|
2020-01-29 12:40:17 +00:00
|
|
|
pub mod bus;
|
2018-04-01 08:30:03 +00:00
|
|
|
mod element;
|
2022-10-19 11:13:57 +00:00
|
|
|
pub mod element_factory;
|
2018-03-19 10:53:01 +00:00
|
|
|
|
2018-11-19 16:37:00 +00:00
|
|
|
mod bin;
|
2023-02-25 17:12:42 +00:00
|
|
|
pub use bin::BinBuilder;
|
2018-11-19 23:22:22 +00:00
|
|
|
|
2019-05-12 13:38:16 +00:00
|
|
|
mod pipeline;
|
2023-02-25 17:12:42 +00:00
|
|
|
pub use pipeline::PipelineBuilder;
|
2019-05-12 13:38:16 +00:00
|
|
|
|
2019-05-11 15:00:03 +00:00
|
|
|
mod allocation_params;
|
|
|
|
pub use self::allocation_params::AllocationParams;
|
2022-11-08 16:24:15 +00:00
|
|
|
mod allocator;
|
2019-05-11 15:00:03 +00:00
|
|
|
|
2021-11-15 09:45:30 +00:00
|
|
|
mod element_factory_type;
|
|
|
|
pub use element_factory_type::*;
|
2021-02-19 10:53:35 +00:00
|
|
|
|
2021-08-15 10:00:32 +00:00
|
|
|
mod tracer;
|
2021-11-15 09:45:30 +00:00
|
|
|
mod tracer_factory;
|
2021-08-15 10:00:32 +00:00
|
|
|
|
2021-08-29 09:16:58 +00:00
|
|
|
// OS dependent Bus extensions (also import the other platform mod for doc)
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(any(unix, docsrs))]
|
2021-08-29 09:16:58 +00:00
|
|
|
mod bus_unix;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(any(windows, docsrs))]
|
2021-08-29 09:16:58 +00:00
|
|
|
mod bus_windows;
|
2018-03-19 10:53:01 +00:00
|
|
|
|
2017-07-29 14:10:10 +00:00
|
|
|
mod child_proxy;
|
2017-12-01 09:21:20 +00:00
|
|
|
mod date_time;
|
2022-09-12 16:32:16 +00:00
|
|
|
#[cfg(feature = "serde")]
|
2018-07-16 19:46:10 +00:00
|
|
|
mod date_time_serde;
|
2018-05-09 09:20:59 +00:00
|
|
|
mod device_monitor;
|
2018-04-01 08:30:03 +00:00
|
|
|
mod device_provider;
|
2021-11-15 09:45:30 +00:00
|
|
|
mod device_provider_factory;
|
2018-04-01 08:30:03 +00:00
|
|
|
mod enums;
|
|
|
|
mod ghost_pad;
|
|
|
|
mod gobject;
|
|
|
|
mod iterator;
|
|
|
|
mod object;
|
|
|
|
mod pad;
|
2022-04-03 07:46:02 +00:00
|
|
|
pub use pad::{
|
|
|
|
EventForeachAction, PadBuilder, PadGetRangeSuccess, PadProbeData, PadProbeId, PadProbeInfo,
|
|
|
|
StreamLock,
|
|
|
|
};
|
2020-06-09 01:06:49 +00:00
|
|
|
mod control_binding;
|
|
|
|
mod control_source;
|
2018-04-01 08:30:03 +00:00
|
|
|
mod parse_context;
|
|
|
|
mod proxy_pad;
|
2022-04-03 07:46:02 +00:00
|
|
|
mod registry;
|
2018-04-01 08:30:03 +00:00
|
|
|
mod tag_setter;
|
2022-04-02 08:44:55 +00:00
|
|
|
pub mod task;
|
|
|
|
pub use task::{TaskLock, TaskLockGuard};
|
2021-10-22 13:51:21 +00:00
|
|
|
mod task_pool;
|
2019-09-04 12:34:05 +00:00
|
|
|
pub use self::iterator::{Iterator, IteratorError, IteratorImpl, StdIterator};
|
2023-01-03 18:58:25 +00:00
|
|
|
pub use crate::{
|
|
|
|
device_monitor::DeviceMonitorFilterId,
|
|
|
|
element::{
|
|
|
|
ElementMessageType, NotifyWatchId, ELEMENT_METADATA_AUTHOR, ELEMENT_METADATA_DESCRIPTION,
|
|
|
|
ELEMENT_METADATA_DOC_URI, ELEMENT_METADATA_ICON_NAME, ELEMENT_METADATA_KLASS,
|
|
|
|
ELEMENT_METADATA_LONGNAME,
|
|
|
|
},
|
|
|
|
enums::{
|
2023-01-24 09:07:33 +00:00
|
|
|
ClockError, ClockSuccess, FlowError, FlowReturn, FlowSuccess, MessageType, PadLinkError,
|
|
|
|
PadLinkReturn, PadLinkSuccess, StateChangeError, StateChangeSuccess, TagError,
|
2023-01-03 18:58:25 +00:00
|
|
|
},
|
|
|
|
parse_context::ParseContext,
|
|
|
|
task_pool::{TaskHandle, TaskPoolTaskHandle},
|
2018-07-27 10:36:40 +00:00
|
|
|
};
|
2019-06-04 09:34:50 +00:00
|
|
|
mod plugin_feature;
|
2017-12-09 16:20:21 +00:00
|
|
|
|
2017-12-17 12:26:17 +00:00
|
|
|
mod plugin;
|
2020-04-14 17:29:43 +00:00
|
|
|
pub mod stream;
|
2018-07-27 10:36:40 +00:00
|
|
|
pub mod stream_collection;
|
2017-12-17 12:26:17 +00:00
|
|
|
|
2017-12-19 17:13:54 +00:00
|
|
|
mod typefind;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::typefind::*;
|
2021-11-15 09:45:30 +00:00
|
|
|
mod typefind_factory;
|
2017-12-19 17:13:54 +00:00
|
|
|
|
2017-12-09 16:20:21 +00:00
|
|
|
pub mod format;
|
2022-10-09 16:37:45 +00:00
|
|
|
pub use crate::format::{ClockTime, GenericFormattedValue, GenericSignedFormattedValue, Signed};
|
2017-07-05 08:09:49 +00:00
|
|
|
|
2017-07-31 09:45:04 +00:00
|
|
|
mod segment;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::segment::*;
|
2022-09-12 16:32:16 +00:00
|
|
|
#[cfg(feature = "serde")]
|
2018-07-30 19:10:34 +00:00
|
|
|
mod segment_serde;
|
2017-07-31 09:45:04 +00:00
|
|
|
|
2017-08-08 20:37:48 +00:00
|
|
|
pub mod toc;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::toc::{Toc, TocEntry, TocEntryRef, TocRef};
|
2022-09-12 16:32:16 +00:00
|
|
|
#[cfg(feature = "serde")]
|
2018-07-30 19:10:34 +00:00
|
|
|
mod toc_serde;
|
2017-08-08 20:37:48 +00:00
|
|
|
|
2017-08-13 22:40:43 +00:00
|
|
|
mod clock;
|
2021-04-24 20:41:35 +00:00
|
|
|
pub use crate::clock::{AtomicClockReturn, ClockId, PeriodicClockId, SingleShotClockId};
|
2017-08-13 22:40:43 +00:00
|
|
|
|
2018-03-07 09:07:30 +00:00
|
|
|
mod buffer_pool;
|
2022-04-03 07:46:02 +00:00
|
|
|
pub use crate::buffer_pool::{BufferPoolAcquireParams, BufferPoolConfig, BufferPoolConfigRef};
|
2018-03-07 09:07:30 +00:00
|
|
|
|
2018-03-15 08:46:49 +00:00
|
|
|
mod pad_template;
|
2022-05-06 13:40:01 +00:00
|
|
|
pub use pad_template::PadTemplateBuilder;
|
2018-03-15 08:46:49 +00:00
|
|
|
|
2022-02-21 16:14:37 +00:00
|
|
|
pub mod param_spec;
|
2023-01-03 18:58:25 +00:00
|
|
|
pub use crate::param_spec::{ParamSpecArray, ParamSpecFraction};
|
2018-11-29 19:18:06 +00:00
|
|
|
|
2017-08-17 13:17:02 +00:00
|
|
|
pub mod functions;
|
2020-11-21 13:46:48 +00:00
|
|
|
pub use crate::functions::*;
|
2017-08-17 13:17:02 +00:00
|
|
|
|
2020-10-27 17:27:16 +00:00
|
|
|
mod utils;
|
2023-02-05 16:55:32 +00:00
|
|
|
pub use crate::utils::ObjectLockGuard;
|
2020-10-27 17:27:16 +00:00
|
|
|
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2022-08-24 02:07:10 +00:00
|
|
|
mod gtype;
|
|
|
|
|
2017-05-12 12:24:03 +00:00
|
|
|
use std::ptr;
|
|
|
|
|
2021-05-19 20:35:47 +00:00
|
|
|
#[doc(alias = "gst_init_check")]
|
2017-07-03 09:26:40 +00:00
|
|
|
pub fn init() -> Result<(), glib::Error> {
|
2017-05-12 12:24:03 +00:00
|
|
|
unsafe {
|
2023-01-04 16:11:27 +00:00
|
|
|
use glib::translate::*;
|
|
|
|
|
2017-07-03 09:26:40 +00:00
|
|
|
let mut error = ptr::null_mut();
|
2020-11-21 13:46:48 +00:00
|
|
|
if from_glib(ffi::gst_init_check(
|
2017-07-10 21:33:24 +00:00
|
|
|
ptr::null_mut(),
|
|
|
|
ptr::null_mut(),
|
|
|
|
&mut error,
|
|
|
|
)) {
|
2022-06-27 07:28:28 +00:00
|
|
|
crate::INITIALIZED.store(true, std::sync::atomic::Ordering::SeqCst);
|
2017-07-03 09:26:40 +00:00
|
|
|
Ok(())
|
|
|
|
} else {
|
|
|
|
Err(from_glib_full(error))
|
|
|
|
}
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
2017-07-25 12:31:45 +00:00
|
|
|
|
2021-05-04 20:42:59 +00:00
|
|
|
// rustdoc-stripper-ignore-next
|
2019-11-14 10:44:17 +00:00
|
|
|
/// Deinitialize GStreamer
|
|
|
|
///
|
|
|
|
/// # Safety
|
|
|
|
///
|
|
|
|
/// This must only be called once during the lifetime of the process, once no GStreamer threads
|
|
|
|
/// are running anymore and all GStreamer resources are released.
|
2018-08-04 09:39:38 +00:00
|
|
|
pub unsafe fn deinit() {
|
2022-06-27 07:28:28 +00:00
|
|
|
crate::INITIALIZED.store(false, std::sync::atomic::Ordering::SeqCst);
|
2020-11-21 13:46:48 +00:00
|
|
|
ffi::gst_deinit();
|
2018-08-04 09:39:38 +00:00
|
|
|
}
|
|
|
|
|
2020-10-21 09:50:19 +00:00
|
|
|
pub const PARAM_FLAG_CONTROLLABLE: glib::ParamFlags = glib::ParamFlags::USER_1;
|
|
|
|
pub const PARAM_FLAG_MUTABLE_READY: glib::ParamFlags = glib::ParamFlags::USER_2;
|
|
|
|
pub const PARAM_FLAG_MUTABLE_PAUSED: glib::ParamFlags = glib::ParamFlags::USER_3;
|
|
|
|
pub const PARAM_FLAG_MUTABLE_PLAYING: glib::ParamFlags = glib::ParamFlags::USER_4;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2020-10-21 09:50:19 +00:00
|
|
|
pub const PARAM_FLAG_DOC_SHOW_DEFAULT: glib::ParamFlags = glib::ParamFlags::USER_5;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2020-10-21 09:50:19 +00:00
|
|
|
pub const PARAM_FLAG_CONDITIONALLY_AVAILABLE: glib::ParamFlags = glib::ParamFlags::USER_6;
|
|
|
|
|
2017-08-17 14:58:15 +00:00
|
|
|
// Re-export all the traits in a prelude module, so that applications
|
|
|
|
// can always "use gst::prelude::*" without getting conflicts
|
|
|
|
pub mod prelude {
|
2020-12-20 17:39:15 +00:00
|
|
|
#[doc(hidden)]
|
2017-08-17 14:58:15 +00:00
|
|
|
pub use glib::prelude::*;
|
2023-01-03 18:58:25 +00:00
|
|
|
pub use muldiv::MulDiv;
|
2021-10-05 13:35:58 +00:00
|
|
|
pub use opt_ops::prelude::*;
|
2017-08-17 14:58:15 +00:00
|
|
|
|
2021-04-24 20:41:35 +00:00
|
|
|
// OS dependent Bus extensions (also import the other platform trait for doc)
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(any(unix, docsrs))]
|
2021-08-29 09:16:58 +00:00
|
|
|
pub use crate::bus_unix::UnixBusExtManual;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(any(windows, docsrs))]
|
2021-08-29 09:16:58 +00:00
|
|
|
pub use crate::bus_windows::WindowsBusExtManual;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2022-08-24 02:07:10 +00:00
|
|
|
pub use crate::gtype::PluginApiExt;
|
2023-01-03 18:58:25 +00:00
|
|
|
pub use crate::{
|
|
|
|
auto::traits::*,
|
|
|
|
bin::GstBinExtManual,
|
|
|
|
buffer_pool::BufferPoolExtManual,
|
|
|
|
child_proxy::ChildProxyExtManual,
|
|
|
|
clock::ClockExtManual,
|
|
|
|
device_monitor::DeviceMonitorExtManual,
|
2023-10-11 12:47:37 +00:00
|
|
|
device_provider::{DeviceProviderClassExt, DeviceProviderExtManual},
|
2023-01-03 18:58:25 +00:00
|
|
|
element::{ElementClassExt, ElementExtManual},
|
|
|
|
format::prelude::*,
|
|
|
|
gobject::GObjectExtManualGst,
|
|
|
|
memory::MemoryType,
|
|
|
|
message::MessageErrorDomain,
|
2023-06-30 05:50:03 +00:00
|
|
|
meta::{MetaAPI, MetaAPIExt},
|
2023-01-03 18:58:25 +00:00
|
|
|
miniobject::IsMiniObject,
|
|
|
|
object::GstObjectExtManual,
|
|
|
|
pad::PadExtManual,
|
|
|
|
param_spec::GstParamSpecBuilderExt,
|
|
|
|
pipeline::GstPipelineExtManual,
|
|
|
|
plugin_feature::PluginFeatureExtManual,
|
|
|
|
tag_setter::TagSetterExtManual,
|
|
|
|
tags::{CustomTag, Tag},
|
|
|
|
task_pool::{TaskHandle, TaskPoolExtManual},
|
|
|
|
typefind::TypeFindImpl,
|
|
|
|
utils::Displayable,
|
|
|
|
value::GstValueExt,
|
|
|
|
};
|
2017-08-17 14:58:15 +00:00
|
|
|
}
|
2017-10-25 10:54:52 +00:00
|
|
|
|
2018-11-18 12:20:16 +00:00
|
|
|
#[macro_use]
|
|
|
|
pub mod subclass;
|