1// Take a look at the license at the top of the repository in the LICENSE file.
2
3#![cfg_attr(docsrs, feature(doc_cfg))]
4#![allow(clippy::missing_safety_doc)]
5#![doc = include_str!("../README.md")]
6
7pub use ffi;
8pub use glib;
9pub use gst;
10pub use gst_base;
11
12macro_rules! assert_initialized_main_thread {
13 () => {
14 if !gst::INITIALIZED.load(std::sync::atomic::Ordering::SeqCst) {
15 gst::assert_initialized();
16 }
17 };
18}
19
20macro_rules! skip_assert_initialized {
21 () => {};
22}
23
24#[allow(clippy::needless_borrow)]
25mod auto;
26pub use crate::auto::*;
27
28mod enums;
29
30#[cfg(feature = "serde")]
31mod flag_serde;
32
33mod caps;
34pub use crate::caps::VideoCapsBuilder;
35
36mod caps_features;
37#[cfg(feature = "v1_16")]
38#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
39pub use crate::caps_features::{CAPS_FEATURES_FORMAT_INTERLACED, CAPS_FEATURE_FORMAT_INTERLACED};
40pub use crate::caps_features::{
41 CAPS_FEATURES_META_GST_VIDEO_AFFINE_TRANSFORMATION_META,
42 CAPS_FEATURES_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, CAPS_FEATURES_META_GST_VIDEO_META,
43 CAPS_FEATURES_META_GST_VIDEO_OVERLAY_COMPOSITION,
44 CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META,
45 CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, CAPS_FEATURE_META_GST_VIDEO_META,
46 CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
47};
48mod video_color_matrix;
49pub use video_color_matrix::*;
50mod video_format;
51pub use crate::video_format::*;
52mod video_format_info;
53pub use crate::video_format_info::*;
54mod video_info;
55pub use crate::video_info::*;
56#[cfg(feature = "v1_24")]
57#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
58mod video_info_dma_drm;
59#[cfg(feature = "v1_24")]
60#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
61pub use crate::video_info_dma_drm::*;
62pub mod video_frame;
63pub use crate::video_frame::{VideoFrame, VideoFrameRef};
64mod video_overlay;
65pub use crate::video_overlay::is_video_overlay_prepare_window_handle_message;
66
67pub mod video_event;
68pub use crate::video_event::{
69 DownstreamForceKeyUnitEvent, ForceKeyUnitEvent, NavigationEvent, StillFrameEvent,
70 UpstreamForceKeyUnitEvent,
71};
72
73pub mod video_message;
74pub use crate::video_message::{NavigationEventMessage, NavigationMessage};
75
76mod functions;
77pub use crate::functions::*;
78mod video_rectangle;
79pub use crate::video_rectangle::*;
80pub mod video_overlay_composition;
81pub use crate::video_overlay_composition::{
82 VideoOverlayComposition, VideoOverlayCompositionRef, VideoOverlayRectangle,
83 VideoOverlayRectangleRef,
84};
85pub mod video_meta;
86#[cfg(feature = "v1_16")]
87#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
88pub use crate::video_meta::VideoCaptionMeta;
89#[cfg(feature = "v1_18")]
90#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
91pub use crate::video_meta::{VideoAFDMeta, VideoBarMeta};
92pub use crate::video_meta::{
93 VideoAffineTransformationMeta, VideoCropMeta, VideoMeta, VideoOverlayCompositionMeta,
94 VideoRegionOfInterestMeta,
95};
96mod video_time_code;
97pub use crate::video_time_code::{ValidVideoTimeCode, VideoTimeCode, VideoTimeCodeMeta};
98mod video_time_code_interval;
99pub use crate::video_time_code_interval::VideoTimeCodeInterval;
100mod video_buffer_pool;
101pub use crate::video_buffer_pool::{
102 VideoAlignment, VideoBufferPoolConfig, BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META,
103 BUFFER_POOL_OPTION_VIDEO_ALIGNMENT, BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META,
104 BUFFER_POOL_OPTION_VIDEO_META,
105};
106pub mod video_converter;
107pub use crate::video_converter::{VideoConverter, VideoConverterConfig};
108
109mod video_codec_frame;
110mod video_decoder;
111mod video_encoder;
112pub use crate::video_codec_frame::VideoCodecFrame;
113pub mod video_codec_state;
114pub use crate::video_codec_state::{VideoCodecState, VideoCodecStateContext};
115mod utils;
116
117#[cfg(feature = "v1_18")]
118#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
119mod video_hdr;
120#[cfg(feature = "v1_18")]
121#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
122pub use crate::video_hdr::*;
123
124mod color_balance_channel;
125
126#[cfg(feature = "v1_16")]
127#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
128mod video_aggregator;
129#[cfg(feature = "v1_16")]
130#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
131mod video_aggregator_convert_pad;
132#[cfg(feature = "v1_16")]
133#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
134mod video_aggregator_pad;
135
136#[cfg(feature = "v1_16")]
137#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
138mod video_vbi;
139#[cfg(feature = "v1_16")]
140#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
141pub use video_vbi::*;
142
143#[cfg(feature = "v1_16")]
144#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
145mod video_vbi_encoder;
146#[cfg(feature = "v1_16")]
147#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
148pub use video_vbi_encoder::*;
149
150#[cfg(feature = "v1_16")]
151#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
152mod video_vbi_parser;
153#[cfg(feature = "v1_16")]
154#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
155pub use video_vbi_parser::*;
156
157pub const VIDEO_ENCODER_FLOW_NEED_DATA: gst::FlowSuccess = gst::FlowSuccess::CustomSuccess;
158pub const VIDEO_DECODER_FLOW_NEED_DATA: gst::FlowSuccess = gst::FlowSuccess::CustomSuccess;
159
160// Re-export all the traits in a prelude module, so that applications
161// can always "use gst_video::prelude::*" without getting conflicts
162pub mod prelude {
163 #[doc(hidden)]
164 pub use gst_base::prelude::*;
165
166 #[cfg(feature = "v1_16")]
167 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
168 pub use crate::video_aggregator::VideoAggregatorExtManual;
169 #[cfg(feature = "v1_16")]
170 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
171 pub use crate::video_aggregator_convert_pad::VideoAggregatorConvertPadExtManual;
172 #[cfg(feature = "v1_16")]
173 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
174 pub use crate::video_aggregator_pad::VideoAggregatorPadExtManual;
175 pub use crate::{
176 auto::traits::*, video_buffer_pool::VideoBufferPoolConfig,
177 video_decoder::VideoDecoderExtManual, video_encoder::VideoEncoderExtManual,
178 video_format::VideoFormatIteratorExt, video_frame::VideoBufferExt,
179 video_overlay::VideoOverlayExtManual,
180 };
181}
182
183pub mod subclass;
184