Skip to main content

gstthreadshare/
lib.rs

1// Copyright (C) 2018 Sebastian Dröge <sebastian@centricular.com>
2//
3// This Source Code Form is subject to the terms of the Mozilla Public License, v2.0.
4// If a copy of the MPL was not distributed with this file, You can obtain one at
5// <https://mozilla.org/MPL/2.0/>.
6//
7// SPDX-License-Identifier: MPL-2.0
8#![allow(clippy::non_send_fields_in_send_ty, unused_doc_comments)]
9
10//! A collection of GStreamer plugins which leverage the `threadshare` [`runtime`].
11//!
12//! [`runtime`]: runtime/index.html
13/**
14 * plugin-threadshare:
15 *
16 * Since: plugins-rs-0.4.0
17 */
18#[macro_use]
19pub mod runtime;
20
21mod appsrc;
22mod audiotestsrc;
23mod blocking_adapter;
24pub mod dataqueue;
25mod inputselector;
26mod inter;
27mod proxy;
28mod queue;
29mod rtpdtmfsrc;
30pub mod socket;
31mod tcpclientsrc;
32mod udpsink;
33mod udpsrc;
34
35pub mod net;
36
37use gst::glib;
38
39fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
40    appsrc::register(plugin)?;
41    audiotestsrc::register(plugin)?;
42    blocking_adapter::register(plugin)?;
43    inputselector::register(plugin)?;
44    inter::register(plugin)?;
45    proxy::register(plugin)?;
46    queue::register(plugin)?;
47    rtpdtmfsrc::register(plugin)?;
48    tcpclientsrc::register(plugin)?;
49    udpsink::register(plugin)?;
50    udpsrc::register(plugin)?;
51
52    Ok(())
53}
54
55gst::plugin_define!(
56    threadshare,
57    env!("CARGO_PKG_DESCRIPTION"),
58    plugin_init,
59    concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")),
60    // FIXME: MPL-2.0 is only allowed since GStreamer 1.18.3 (as unknown) and 1.20 (as known)
61    "MPL",
62    env!("CARGO_PKG_NAME"),
63    env!("CARGO_PKG_NAME"),
64    env!("CARGO_PKG_REPOSITORY"),
65    env!("BUILD_REL_DATE")
66);