gstrstracers/
lib.rs

1// Copyright (C) 2022 OneStream Live <guillaume.desmottes@onestream.live>
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/**
11 * plugin-rstracers:
12 *
13 * Since: plugins-rs-0.9.0
14 */
15use gst::glib;
16
17mod buffer_lateness;
18mod pad_push_timings;
19#[cfg(unix)]
20mod pipeline_snapshot;
21mod queue_levels;
22
23fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
24    #[cfg(unix)]
25    pipeline_snapshot::register(plugin)?;
26    queue_levels::register(plugin)?;
27    buffer_lateness::register(plugin)?;
28    pad_push_timings::register(plugin)?;
29    Ok(())
30}
31
32gst::plugin_define!(
33    rstracers,
34    env!("CARGO_PKG_DESCRIPTION"),
35    plugin_init,
36    concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")),
37    // FIXME: MPL-2.0 is only allowed since 1.18.3 (as unknown) and 1.20 (as known)
38    "MPL",
39    env!("CARGO_PKG_NAME"),
40    env!("CARGO_PKG_NAME"),
41    env!("CARGO_PKG_REPOSITORY"),
42    env!("BUILD_REL_DATE")
43);