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