2017-08-10 21:41:55 +00:00
|
|
|
// Copyright (C) 2017 Sebastian Dröge <sebastian@centricular.com>
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate bitflags;
|
2019-05-23 13:07:02 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate lazy_static;
|
2017-08-10 21:41:55 +00:00
|
|
|
extern crate libc;
|
|
|
|
|
2017-09-10 11:55:29 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate glib;
|
2019-03-19 07:58:20 +00:00
|
|
|
extern crate glib_sys;
|
|
|
|
extern crate gobject_sys;
|
2018-09-28 14:36:50 +00:00
|
|
|
#[macro_use]
|
2017-09-10 11:55:29 +00:00
|
|
|
extern crate gstreamer as gst;
|
2017-12-30 13:30:07 +00:00
|
|
|
extern crate gstreamer_base as gst_base;
|
2019-05-11 12:58:39 +00:00
|
|
|
extern crate gstreamer_base_sys as gst_base_sys;
|
2019-03-19 07:58:20 +00:00
|
|
|
extern crate gstreamer_sys as gst_sys;
|
|
|
|
extern crate gstreamer_video_sys as gst_video_sys;
|
2017-08-10 21:41:55 +00:00
|
|
|
|
2017-08-30 09:48:01 +00:00
|
|
|
macro_rules! assert_initialized_main_thread {
|
2018-04-01 08:30:03 +00:00
|
|
|
() => {
|
2019-03-19 07:58:20 +00:00
|
|
|
if unsafe { ::gst_sys::gst_is_initialized() } != ::glib_sys::GTRUE {
|
2017-08-30 09:48:01 +00:00
|
|
|
panic!("GStreamer has not been initialized. Call `gst::init` first.");
|
|
|
|
}
|
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
|
|
|
}
|
|
|
|
|
|
|
|
pub use glib::{Cast, Continue, Error, IsA, StaticType, ToValue, Type, TypedValue, Value};
|
|
|
|
|
2019-02-28 08:32:13 +00:00
|
|
|
#[allow(clippy::unreadable_literal)]
|
|
|
|
#[allow(clippy::too_many_arguments)]
|
|
|
|
#[allow(clippy::match_same_arms)]
|
2017-08-10 21:41:55 +00:00
|
|
|
mod auto;
|
|
|
|
pub use auto::*;
|
|
|
|
|
|
|
|
mod video_format;
|
|
|
|
pub use video_format::*;
|
|
|
|
mod video_format_info;
|
|
|
|
pub use video_format_info::*;
|
2017-08-11 09:29:23 +00:00
|
|
|
mod video_info;
|
|
|
|
pub use video_info::*;
|
2018-01-01 11:26:31 +00:00
|
|
|
pub mod video_frame;
|
2019-07-16 08:30:57 +00:00
|
|
|
pub use video_frame::{VideoBufferExt, VideoFrame, VideoFrameRef};
|
2017-08-11 12:03:16 +00:00
|
|
|
mod video_overlay;
|
2018-09-13 19:56:47 +00:00
|
|
|
pub use video_overlay::*;
|
2017-12-10 09:57:11 +00:00
|
|
|
mod video_event;
|
|
|
|
pub use video_event::*;
|
2017-12-24 12:30:38 +00:00
|
|
|
mod functions;
|
|
|
|
pub use functions::*;
|
2017-12-26 16:55:53 +00:00
|
|
|
mod video_rectangle;
|
|
|
|
pub use video_rectangle::*;
|
2018-09-28 14:36:50 +00:00
|
|
|
mod video_overlay_composition;
|
|
|
|
pub use video_overlay_composition::*;
|
2018-09-29 09:01:26 +00:00
|
|
|
mod video_meta;
|
|
|
|
pub use video_meta::*;
|
2018-12-15 12:50:11 +00:00
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
|
|
|
mod video_time_code;
|
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
2018-12-15 12:36:51 +00:00
|
|
|
pub use video_time_code::{ValidVideoTimeCode, VideoTimeCode, VideoTimeCodeMeta};
|
2018-12-15 12:50:11 +00:00
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
|
|
mod video_time_code_interval;
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
|
|
pub use video_time_code_interval::VideoTimeCodeInterval;
|
2019-05-23 13:07:02 +00:00
|
|
|
mod video_buffer_pool;
|
|
|
|
pub use video_buffer_pool::{
|
2019-05-12 15:17:33 +00:00
|
|
|
VideoAlignment, BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META,
|
|
|
|
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
|
|
|
};
|
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;
|
2019-05-11 12:58:39 +00:00
|
|
|
pub use video_codec_frame::VideoCodecFrame;
|
|
|
|
pub mod video_codec_state;
|
|
|
|
pub use video_codec_state::VideoCodecState;
|
|
|
|
mod utils;
|
|
|
|
|
2017-08-17 14:58:15 +00:00
|
|
|
// Re-export all the traits in a prelude module, so that applications
|
|
|
|
// can always "use gst::prelude::*" without getting conflicts
|
|
|
|
pub mod prelude {
|
|
|
|
pub use glib::prelude::*;
|
|
|
|
pub use gst::prelude::*;
|
|
|
|
|
|
|
|
pub use auto::traits::*;
|
2019-05-12 15:17:33 +00:00
|
|
|
pub use video_buffer_pool::VideoBufferPoolConfig;
|
2019-05-11 12:58:39 +00:00
|
|
|
pub use video_decoder::VideoDecoderExtManual;
|
2019-05-25 08:11:06 +00:00
|
|
|
pub use video_encoder::VideoEncoderExtManual;
|
2019-07-16 08:30:57 +00:00
|
|
|
pub use video_frame::VideoBufferExt;
|
2017-08-17 14:58:15 +00:00
|
|
|
pub use video_overlay::VideoOverlayExtManual;
|
|
|
|
}
|
2019-05-11 12:58:39 +00:00
|
|
|
|
|
|
|
#[cfg(feature = "subclassing")]
|
|
|
|
pub mod subclass;
|