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
|
|
|
|
2023-05-04 05:55:48 +00:00
|
|
|
#![cfg_attr(docsrs, feature(doc_cfg))]
|
2021-07-30 19:23:46 +00:00
|
|
|
#![allow(clippy::missing_safety_doc)]
|
2021-07-30 16:03:12 +00:00
|
|
|
#![doc = include_str!("../README.md")]
|
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
|
|
|
() => {
|
2022-06-27 07:28:28 +00:00
|
|
|
if !gst::INITIALIZED.load(std::sync::atomic::Ordering::SeqCst) {
|
2023-01-05 14:40:15 +00:00
|
|
|
gst::assert_initialized();
|
2017-08-30 09:48:01 +00:00
|
|
|
}
|
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
|
|
|
}
|
|
|
|
|
2021-07-30 10:19:24 +00:00
|
|
|
#[allow(clippy::needless_borrow)]
|
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
|
|
|
|
2022-11-21 09:38:45 +00:00
|
|
|
mod enums;
|
|
|
|
|
2022-09-12 16:32:16 +00:00
|
|
|
#[cfg(feature = "serde")]
|
2022-05-05 10:40:07 +00:00
|
|
|
mod flag_serde;
|
|
|
|
|
2022-06-22 17:03:47 +00:00
|
|
|
mod caps;
|
|
|
|
pub use crate::caps::VideoCapsBuilder;
|
|
|
|
|
2020-05-22 19:27:56 +00:00
|
|
|
mod caps_features;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, 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;
|
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::*;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
2023-04-06 18:10:36 +00:00
|
|
|
mod video_info_dma_drm;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
2023-04-06 18:10:36 +00:00
|
|
|
pub use crate::video_info_dma_drm::*;
|
2018-01-01 11:26:31 +00:00
|
|
|
pub mod video_frame;
|
2023-09-27 13:59:03 +00:00
|
|
|
pub use crate::video_frame::{VideoFrame, VideoFrameExt, VideoFrameRef};
|
2017-08-11 12:03:16 +00:00
|
|
|
mod video_overlay;
|
2021-04-24 20:41:35 +00:00
|
|
|
pub use crate::video_overlay::is_video_overlay_prepare_window_handle_message;
|
2021-12-22 01:26:20 +00:00
|
|
|
|
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::{
|
2021-12-23 14:25:20 +00:00
|
|
|
DownstreamForceKeyUnitEvent, ForceKeyUnitEvent, NavigationEvent, StillFrameEvent,
|
|
|
|
UpstreamForceKeyUnitEvent,
|
2020-06-25 16:22:25 +00:00
|
|
|
};
|
2021-12-22 01:26:20 +00:00
|
|
|
|
|
|
|
pub mod video_message;
|
|
|
|
pub use crate::video_message::{NavigationEventMessage, NavigationMessage};
|
|
|
|
|
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::*;
|
2021-10-17 08:24:33 +00:00
|
|
|
pub mod video_overlay_composition;
|
|
|
|
pub use crate::video_overlay_composition::{
|
|
|
|
VideoOverlayComposition, VideoOverlayCompositionRef, VideoOverlayRectangle,
|
|
|
|
VideoOverlayRectangleRef,
|
|
|
|
};
|
2020-06-02 08:18:42 +00:00
|
|
|
pub mod video_meta;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_meta::VideoCaptionMeta;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, 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,
|
|
|
|
};
|
2018-12-15 12:50:11 +00:00
|
|
|
mod video_time_code;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_time_code::{ValidVideoTimeCode, VideoTimeCode, VideoTimeCodeMeta};
|
2018-12-15 12:50:11 +00:00
|
|
|
mod video_time_code_interval;
|
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;
|
2019-05-25 08:11:06 +00:00
|
|
|
mod video_encoder;
|
2024-01-05 13:35:40 +00:00
|
|
|
mod video_filter;
|
2020-11-22 09:53:17 +00:00
|
|
|
pub use crate::video_codec_frame::VideoCodecFrame;
|
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;
|
|
|
|
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2021-09-25 11:49:33 +00:00
|
|
|
mod video_hdr;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2021-09-25 11:49:33 +00:00
|
|
|
pub use crate::video_hdr::*;
|
|
|
|
|
2021-11-15 20:37:18 +00:00
|
|
|
mod color_balance_channel;
|
|
|
|
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2022-03-21 17:18:54 +00:00
|
|
|
mod video_aggregator;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2022-03-21 17:18:54 +00:00
|
|
|
mod video_aggregator_convert_pad;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2022-03-21 17:18:54 +00:00
|
|
|
mod video_aggregator_pad;
|
|
|
|
|
2023-10-09 18:15:23 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
mod video_vbi;
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
pub use video_vbi::*;
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
mod video_vbi_encoder;
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
pub use video_vbi_encoder::*;
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
mod video_vbi_parser;
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
pub use video_vbi_parser::*;
|
|
|
|
|
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
|
2021-04-27 07:30:13 +00:00
|
|
|
// can always "use gst_video::prelude::*" without getting conflicts
|
2017-08-17 14:58:15 +00:00
|
|
|
pub mod prelude {
|
2020-12-20 17:39:15 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
pub use gst_base::prelude::*;
|
2017-08-17 14:58:15 +00:00
|
|
|
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2022-03-21 17:18:54 +00:00
|
|
|
pub use crate::video_aggregator::VideoAggregatorExtManual;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2022-03-21 17:18:54 +00:00
|
|
|
pub use crate::video_aggregator_convert_pad::VideoAggregatorConvertPadExtManual;
|
2023-05-04 05:55:48 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2022-03-21 17:18:54 +00:00
|
|
|
pub use crate::video_aggregator_pad::VideoAggregatorPadExtManual;
|
2023-09-27 13:59:03 +00:00
|
|
|
pub use crate::VideoFrameExt;
|
2023-01-03 18:58:25 +00:00
|
|
|
pub use crate::{
|
2023-01-03 19:08:39 +00:00
|
|
|
auto::traits::*, video_buffer_pool::VideoBufferPoolConfig,
|
2023-01-03 18:58:25 +00:00
|
|
|
video_decoder::VideoDecoderExtManual, video_encoder::VideoEncoderExtManual,
|
2024-01-05 13:35:40 +00:00
|
|
|
video_filter::VideoFilterExtManual, video_format::VideoFormatIteratorExt,
|
|
|
|
video_frame::VideoBufferExt, video_overlay::VideoOverlayExtManual,
|
2023-01-03 18:58:25 +00:00
|
|
|
};
|
2017-08-17 14:58:15 +00:00
|
|
|
}
|
2019-05-11 12:58:39 +00:00
|
|
|
|
|
|
|
pub mod subclass;
|