gstjson/
lib.rs

1// Copyright (C) 2020 Mathieu Duponchelle <mathieu@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#![recursion_limit = "128"]
10
11/**
12 * plugin-json:
13 *
14 * Since: plugins-rs-0.5.0
15 */
16use gst::glib;
17
18mod jsongstenc;
19mod jsongstparse;
20mod line_reader;
21
22fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
23    jsongstparse::register(plugin)?;
24    jsongstenc::register(plugin)?;
25    Ok(())
26}
27
28gst::plugin_define!(
29    json,
30    env!("CARGO_PKG_DESCRIPTION"),
31    plugin_init,
32    concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")),
33    // FIXME: MPL-2.0 is only allowed since 1.18.3 (as unknown) and 1.20 (as known)
34    "MPL",
35    env!("CARGO_PKG_NAME"),
36    env!("CARGO_PKG_NAME"),
37    env!("CARGO_PKG_REPOSITORY"),
38    env!("BUILD_REL_DATE")
39);