Skip to main content

gstrsclosedcaption/
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#![recursion_limit = "128"]
10
11/**
12 * plugin-rsclosedcaption:
13 *
14 * Since: plugins-rs-0.4.0
15 */
16use gst::glib;
17#[cfg(feature = "doc")]
18use gst::prelude::*;
19
20mod ccdetect;
21mod cctost2038anc;
22mod ccutils;
23mod cdpserviceinject;
24mod cea608overlay;
25mod cea608tocea708;
26mod cea608tojson;
27mod cea608tott;
28mod cea608utils;
29mod cea708mux;
30mod cea708overlay;
31mod cea708utils;
32mod jsontovtt;
33mod line_reader;
34mod mcc_enc;
35mod mcc_parse;
36mod parser_utils;
37mod scc_enc;
38mod scc_parse;
39mod st2038anc_utils;
40mod st2038ancdemux;
41mod st2038ancmux;
42mod st2038anctocc;
43mod st2038combiner;
44mod st2038extractor;
45mod transcriberbin;
46mod translationbin;
47mod tttocea608;
48mod tttocea708;
49mod tttojson;
50mod ttutils;
51
52fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
53    #[cfg(feature = "doc")]
54    {
55        cea608utils::Cea608Mode::static_type().mark_as_plugin_api(gst::PluginAPIFlags::empty());
56        cea708utils::Cea708Mode::static_type().mark_as_plugin_api(gst::PluginAPIFlags::empty());
57    }
58    mcc_parse::register(plugin)?;
59    mcc_enc::register(plugin)?;
60    scc_parse::register(plugin)?;
61    scc_enc::register(plugin)?;
62    cea608tott::register(plugin)?;
63    tttocea608::register(plugin)?;
64    cea608overlay::register(plugin)?;
65    ccdetect::register(plugin)?;
66    tttojson::register(plugin)?;
67    cea608tojson::register(plugin)?;
68    jsontovtt::register(plugin)?;
69    transcriberbin::register(plugin)?;
70    translationbin::register(plugin)?;
71    cea608tocea708::register(plugin)?;
72    cea708mux::register(plugin)?;
73    tttocea708::register(plugin)?;
74    cea708overlay::register(plugin)?;
75    st2038ancdemux::register(plugin)?;
76    st2038ancmux::register(plugin)?;
77    st2038anctocc::register(plugin)?;
78    st2038combiner::register(plugin)?;
79    st2038extractor::register(plugin)?;
80    cctost2038anc::register(plugin)?;
81    cdpserviceinject::register(plugin)?;
82    Ok(())
83}
84
85gst::plugin_define!(
86    rsclosedcaption,
87    env!("CARGO_PKG_DESCRIPTION"),
88    plugin_init,
89    concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")),
90    // FIXME: MPL-2.0 is only allowed since 1.18.3 (as unknown) and 1.20 (as known)
91    "MPL",
92    env!("CARGO_PKG_NAME"),
93    env!("CARGO_PKG_NAME"),
94    env!("CARGO_PKG_REPOSITORY"),
95    env!("BUILD_REL_DATE")
96);