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-08-10 21:41:55 +00:00
|
|
|
|
2020-11-27 13:37:49 +00:00
|
|
|
#![cfg_attr(feature = "dox", feature(doc_cfg))]
|
2020-11-18 12:48:41 +00:00
|
|
|
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use ffi;
|
2020-12-20 17:39:15 +00:00
|
|
|
pub use glib;
|
|
|
|
pub use gst;
|
|
|
|
pub use gst_base;
|
2020-06-05 10:22:08 +00:00
|
|
|
|
2017-08-30 09:48:01 +00:00
|
|
|
macro_rules! assert_initialized_main_thread {
|
2018-04-01 08:30:03 +00:00
|
|
|
() => {
|
2020-11-22 09:53:17 +00:00
|
|
|
if unsafe { gst::ffi::gst_is_initialized() } != glib::ffi::GTRUE {
|
2017-08-30 09:48:01 +00:00
|
|
|
panic!("GStreamer has not been initialized. Call `gst::init` first.");
|
|
|
|
}
|
2018-04-01 08:30:03 +00:00
|
|
|
};
|
2017-08-30 09:48:01 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 21:41:55 +00:00
|
|
|
macro_rules! skip_assert_initialized {
|
2018-04-01 08:30:03 +00:00
|
|
|
() => {};
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
|
2019-02-28 08:32:13 +00:00
|
|
|
#[allow(clippy::unreadable_literal)]
|
|
|
|
#[allow(clippy::too_many_arguments)]
|
|
|
|
#[allow(clippy::match_same_arms)]
|
2017-08-10 21:41:55 +00:00
|
|
|
mod auto;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::auto::*;
|
2017-08-10 21:41:55 +00:00
|
|
|
|
2020-05-22 19:27:56 +00:00
|
|
|
mod caps_features;
|
2020-11-27 13:37:49 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::caps_features::{CAPS_FEATURES_FORMAT_INTERLACED, CAPS_FEATURE_FORMAT_INTERLACED};
|
|
|
|
pub use crate::caps_features::{
|
2020-07-03 09:23:52 +00:00
|
|
|
CAPS_FEATURES_META_GST_VIDEO_AFFINE_TRANSFORMATION_META,
|
2020-05-22 19:27:56 +00:00
|
|
|
CAPS_FEATURES_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, CAPS_FEATURES_META_GST_VIDEO_META,
|
2020-07-03 09:23:52 +00:00
|
|
|
CAPS_FEATURES_META_GST_VIDEO_OVERLAY_COMPOSITION,
|
2020-05-22 19:27:56 +00:00
|
|
|
CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META,
|
|
|
|
CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, CAPS_FEATURE_META_GST_VIDEO_META,
|
|
|
|
CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
|
|
|
|
};
|
2020-11-18 20:23:23 +00:00
|
|
|
mod video_color_matrix;
|
|
|
|
pub use video_color_matrix::*;
|
2017-08-10 21:41:55 +00:00
|
|
|
mod video_format;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_format::*;
|
2017-08-10 21:41:55 +00:00
|
|
|
mod video_format_info;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_format_info::*;
|
2017-08-11 09:29:23 +00:00
|
|
|
mod video_info;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_info::*;
|
2018-01-01 11:26:31 +00:00
|
|
|
pub mod video_frame;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_frame::{VideoBufferExt, VideoFrame, VideoFrameRef};
|
2017-08-11 12:03:16 +00:00
|
|
|
mod video_overlay;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_overlay::{
|
|
|
|
is_video_overlay_prepare_window_handle_message, VideoOverlayExtManual,
|
|
|
|
};
|
2020-06-25 16:22:25 +00:00
|
|
|
pub mod video_event;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_event::{
|
2020-06-25 16:22:25 +00:00
|
|
|
DownstreamForceKeyUnitEvent, ForceKeyUnitEvent, StillFrameEvent, UpstreamForceKeyUnitEvent,
|
|
|
|
};
|
2017-12-24 12:30:38 +00:00
|
|
|
mod functions;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::functions::*;
|
2017-12-26 16:55:53 +00:00
|
|
|
mod video_rectangle;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_rectangle::*;
|
2018-09-28 14:36:50 +00:00
|
|
|
mod video_overlay_composition;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_overlay_composition::*;
|
2020-06-02 08:18:42 +00:00
|
|
|
pub mod video_meta;
|
2020-11-27 13:37:49 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_meta::VideoCaptionMeta;
|
2020-11-27 13:37:49 +00:00
|
|
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_meta::{VideoAFDMeta, VideoBarMeta};
|
|
|
|
pub use crate::video_meta::{
|
2020-06-02 08:18:42 +00:00
|
|
|
VideoAffineTransformationMeta, VideoCropMeta, VideoMeta, VideoOverlayCompositionMeta,
|
|
|
|
VideoRegionOfInterestMeta,
|
|
|
|
};
|
2020-11-27 13:37:49 +00:00
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
|
2018-12-15 12:50:11 +00:00
|
|
|
mod video_time_code;
|
2020-11-27 13:37:49 +00:00
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_time_code::{ValidVideoTimeCode, VideoTimeCode, VideoTimeCodeMeta};
|
2020-11-27 13:37:49 +00:00
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
2018-12-15 12:50:11 +00:00
|
|
|
mod video_time_code_interval;
|
2020-11-27 13:37:49 +00:00
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_time_code_interval::VideoTimeCodeInterval;
|
2019-05-23 13:07:02 +00:00
|
|
|
mod video_buffer_pool;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_buffer_pool::{
|
2019-10-17 10:04:29 +00:00
|
|
|
VideoAlignment, VideoBufferPoolConfig, BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META,
|
2019-05-12 15:17:33 +00:00
|
|
|
BUFFER_POOL_OPTION_VIDEO_ALIGNMENT, BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META,
|
|
|
|
BUFFER_POOL_OPTION_VIDEO_META,
|
2019-05-23 13:07:02 +00:00
|
|
|
};
|
2020-01-30 21:15:08 +00:00
|
|
|
pub mod video_converter;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_converter::{VideoConverter, VideoConverterConfig};
|
2017-08-17 14:58:15 +00:00
|
|
|
|
2019-05-11 12:58:39 +00:00
|
|
|
mod video_codec_frame;
|
|
|
|
mod video_decoder;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_decoder::VideoDecoderExtManual;
|
2019-05-25 08:11:06 +00:00
|
|
|
mod video_encoder;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_codec_frame::VideoCodecFrame;
|
|
|
|
pub use crate::video_encoder::VideoEncoderExtManual;
|
2019-05-11 12:58:39 +00:00
|
|
|
pub mod video_codec_state;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_codec_state::{VideoCodecState, VideoCodecStateContext};
|
2019-05-11 12:58:39 +00:00
|
|
|
mod utils;
|
|
|
|
|
2019-08-14 17:22:55 +00:00
|
|
|
pub const VIDEO_ENCODER_FLOW_NEED_DATA: gst::FlowSuccess = gst::FlowSuccess::CustomSuccess;
|
|
|
|
pub const VIDEO_DECODER_FLOW_NEED_DATA: gst::FlowSuccess = gst::FlowSuccess::CustomSuccess;
|
|
|
|
|
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::*;
|
2020-12-20 17:39:15 +00:00
|
|
|
#[doc(hidden)]
|
2017-08-17 14:58:15 +00:00
|
|
|
pub use gst::prelude::*;
|
2020-12-20 17:39:15 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
pub use gst_base::prelude::*;
|
2017-08-17 14:58:15 +00:00
|
|
|
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::auto::traits::*;
|
|
|
|
pub use crate::video_buffer_pool::VideoBufferPoolConfig;
|
|
|
|
pub use crate::video_decoder::VideoDecoderExtManual;
|
|
|
|
pub use crate::video_encoder::VideoEncoderExtManual;
|
|
|
|
pub use crate::video_format::VideoFormatIteratorExt;
|
|
|
|
pub use crate::video_frame::VideoBufferExt;
|
|
|
|
pub use crate::video_overlay::VideoOverlayExtManual;
|
2017-08-17 14:58:15 +00:00
|
|
|
}
|
2019-05-11 12:58:39 +00:00
|
|
|
|
|
|
|
pub mod subclass;
|