| 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 gst_video; |
| 12 | pub use gstreamer_gl_sys as ffi; |
| 13 | |
| 14 | macro_rules! assert_initialized_main_thread { |
| 15 | () => { |
| 16 | if !gst::INITIALIZED.load(std::sync::atomic::Ordering::SeqCst) { |
| 17 | gst::assert_initialized(); |
| 18 | } |
| 19 | }; |
| 20 | } |
| 21 | |
| 22 | macro_rules! skip_assert_initialized { |
| 23 | () => {}; |
| 24 | } |
| 25 | |
| 26 | #[allow (unused_imports)] |
| 27 | mod auto; |
| 28 | pub use crate::auto::*; |
| 29 | |
| 30 | #[cfg (feature = "serde" )] |
| 31 | mod flag_serde; |
| 32 | |
| 33 | mod caps_features; |
| 34 | pub use crate::caps_features::CAPS_FEATURES_MEMORY_GL_MEMORY; |
| 35 | mod context; |
| 36 | pub mod functions; |
| 37 | pub use crate::functions::*; |
| 38 | mod gl_context; |
| 39 | mod gl_display; |
| 40 | mod gl_sync_meta; |
| 41 | pub mod gl_video_frame; |
| 42 | pub use crate::gl_sync_meta::*; |
| 43 | pub use crate::gl_video_frame::{GLVideoFrame, GLVideoFrameExt, GLVideoFrameRef}; |
| 44 | mod gl_base_memory; |
| 45 | pub use self::gl_base_memory::*; |
| 46 | mod gl_memory; |
| 47 | pub use crate::gl_memory::*; |
| 48 | mod gl_framebuffer; |
| 49 | mod gl_memory_pbo; |
| 50 | pub use crate::gl_memory_pbo::*; |
| 51 | |
| 52 | // Re-export all the traits in a prelude module, so that applications |
| 53 | // can always "use gst_gl::prelude::*" without getting conflicts |
| 54 | pub mod prelude { |
| 55 | #[doc (hidden)] |
| 56 | pub use gst_video::prelude::*; |
| 57 | |
| 58 | pub use crate::{ |
| 59 | auto::traits::*, context::ContextGLExt, gl_context::GLContextExtManual, |
| 60 | gl_display::GLDisplayExtManual, gl_framebuffer::GLFramebufferExtManual, |
| 61 | gl_video_frame::GLVideoFrameExt, gl_video_frame::IsGLVideoFrame, |
| 62 | }; |
| 63 | } |
| 64 | |
| 65 | pub mod subclass; |
| 66 | |