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 | |
7 | pub use ffi; |
8 | pub use glib; |
9 | pub use gst; |
10 | pub use gst_base; |
11 | |
12 | macro_rules! assert_initialized_main_thread { |
13 | () => { |
14 | if !gst::INITIALIZED.load(std::sync::atomic::Ordering::SeqCst) { |
15 | gst::assert_initialized(); |
16 | } |
17 | }; |
18 | } |
19 | |
20 | macro_rules! skip_assert_initialized { |
21 | () => {}; |
22 | } |
23 | |
24 | #[allow (clippy::needless_borrow)] |
25 | mod auto; |
26 | pub use crate::auto::*; |
27 | |
28 | mod enums; |
29 | |
30 | #[cfg (feature = "serde" )] |
31 | mod flag_serde; |
32 | |
33 | mod caps; |
34 | pub use crate::caps::VideoCapsBuilder; |
35 | |
36 | mod caps_features; |
37 | #[cfg (feature = "v1_16" )] |
38 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
39 | pub use crate::caps_features::{CAPS_FEATURES_FORMAT_INTERLACED, CAPS_FEATURE_FORMAT_INTERLACED}; |
40 | pub 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 | }; |
48 | mod video_color_matrix; |
49 | pub use video_color_matrix::*; |
50 | mod video_format; |
51 | pub use crate::video_format::*; |
52 | mod video_format_info; |
53 | pub use crate::video_format_info::*; |
54 | mod video_info; |
55 | pub use crate::video_info::*; |
56 | #[cfg (feature = "v1_24" )] |
57 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
58 | mod video_info_dma_drm; |
59 | #[cfg (feature = "v1_24" )] |
60 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
61 | pub use crate::video_info_dma_drm::*; |
62 | pub mod video_frame; |
63 | pub use crate::video_frame::{VideoFrame, VideoFrameRef}; |
64 | mod video_overlay; |
65 | pub use crate::video_overlay::is_video_overlay_prepare_window_handle_message; |
66 | |
67 | pub mod video_event; |
68 | pub use crate::video_event::{ |
69 | DownstreamForceKeyUnitEvent, ForceKeyUnitEvent, NavigationEvent, StillFrameEvent, |
70 | UpstreamForceKeyUnitEvent, |
71 | }; |
72 | |
73 | pub mod video_message; |
74 | pub use crate::video_message::{NavigationEventMessage, NavigationMessage}; |
75 | |
76 | mod functions; |
77 | pub use crate::functions::*; |
78 | mod video_rectangle; |
79 | pub use crate::video_rectangle::*; |
80 | pub mod video_overlay_composition; |
81 | pub use crate::video_overlay_composition::{ |
82 | VideoOverlayComposition, VideoOverlayCompositionRef, VideoOverlayRectangle, |
83 | VideoOverlayRectangleRef, |
84 | }; |
85 | pub mod video_meta; |
86 | #[cfg (feature = "v1_16" )] |
87 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
88 | pub use crate::video_meta::VideoCaptionMeta; |
89 | #[cfg (feature = "v1_18" )] |
90 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
91 | pub use crate::video_meta::{VideoAFDMeta, VideoBarMeta}; |
92 | pub use crate::video_meta::{ |
93 | VideoAffineTransformationMeta, VideoCropMeta, VideoMeta, VideoOverlayCompositionMeta, |
94 | VideoRegionOfInterestMeta, |
95 | }; |
96 | mod video_time_code; |
97 | pub use crate::video_time_code::{ValidVideoTimeCode, VideoTimeCode, VideoTimeCodeMeta}; |
98 | mod video_time_code_interval; |
99 | pub use crate::video_time_code_interval::VideoTimeCodeInterval; |
100 | mod video_buffer_pool; |
101 | pub 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 | }; |
106 | pub mod video_converter; |
107 | pub use crate::video_converter::{VideoConverter, VideoConverterConfig}; |
108 | |
109 | mod video_codec_frame; |
110 | mod video_decoder; |
111 | mod video_encoder; |
112 | pub use crate::video_codec_frame::VideoCodecFrame; |
113 | pub mod video_codec_state; |
114 | pub use crate::video_codec_state::{VideoCodecState, VideoCodecStateContext}; |
115 | mod utils; |
116 | |
117 | #[cfg (feature = "v1_18" )] |
118 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
119 | mod video_hdr; |
120 | #[cfg (feature = "v1_18" )] |
121 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
122 | pub use crate::video_hdr::*; |
123 | |
124 | mod color_balance_channel; |
125 | |
126 | #[cfg (feature = "v1_16" )] |
127 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
128 | mod video_aggregator; |
129 | #[cfg (feature = "v1_16" )] |
130 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
131 | mod video_aggregator_convert_pad; |
132 | #[cfg (feature = "v1_16" )] |
133 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
134 | mod video_aggregator_pad; |
135 | |
136 | #[cfg (feature = "v1_16" )] |
137 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
138 | mod video_vbi; |
139 | #[cfg (feature = "v1_16" )] |
140 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
141 | pub use video_vbi::*; |
142 | |
143 | #[cfg (feature = "v1_16" )] |
144 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
145 | mod video_vbi_encoder; |
146 | #[cfg (feature = "v1_16" )] |
147 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
148 | pub use video_vbi_encoder::*; |
149 | |
150 | #[cfg (feature = "v1_16" )] |
151 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
152 | mod video_vbi_parser; |
153 | #[cfg (feature = "v1_16" )] |
154 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
155 | pub use video_vbi_parser::*; |
156 | |
157 | pub const VIDEO_ENCODER_FLOW_NEED_DATA: gst::FlowSuccess = gst::FlowSuccess::CustomSuccess; |
158 | pub 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 |
162 | pub 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 | |
183 | pub mod subclass; |
184 | |