Skip to main content

gstspeechmatics/
lib.rs

1// Copyright (C) 2024 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-speechmatics:
13 *
14 * Since: plugins-rs-0.14.0
15 */
16use gst::glib;
17
18mod transcriber;
19
20fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
21    transcriber::register(plugin)?;
22
23    if !gst::meta::CustomMeta::is_registered("SpeechmaticsItemMeta") {
24        gst::meta::CustomMeta::register("SpeechmaticsItemMeta", &[]);
25    }
26
27    Ok(())
28}
29
30gst::plugin_define!(
31    speechmatics,
32    env!("CARGO_PKG_DESCRIPTION"),
33    plugin_init,
34    concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")),
35    "MPL",
36    env!("CARGO_PKG_NAME"),
37    env!("CARGO_PKG_NAME"),
38    env!("CARGO_PKG_REPOSITORY"),
39    env!("BUILD_REL_DATE")
40);