Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2020-11-22 20:21:45 +0300
committerSebastian Dröge <sebastian@centricular.com>2020-11-23 11:28:35 +0300
commitf81d7b61b5923eea4247548c1778d1c71d94ed92 (patch)
tree16ba3459d302dff6435db34f5effbafe94568d20 /video/closedcaption/src/cea608overlay/imp.rs
parent767ed3afaeab3a88255e6718c4ed008539438c41 (diff)
video: Update to 2018 edition
Diffstat (limited to 'video/closedcaption/src/cea608overlay/imp.rs')
-rw-r--r--video/closedcaption/src/cea608overlay/imp.rs23
1 files changed, 12 insertions, 11 deletions
diff --git a/video/closedcaption/src/cea608overlay/imp.rs b/video/closedcaption/src/cea608overlay/imp.rs
index e55c16c8c..61f6a9899 100644
--- a/video/closedcaption/src/cea608overlay/imp.rs
+++ b/video/closedcaption/src/cea608overlay/imp.rs
@@ -19,23 +19,24 @@ use glib::subclass;
use glib::subclass::prelude::*;
use gst::prelude::*;
use gst::subclass::prelude::*;
+use gst::{gst_element_error, gst_error, gst_log, gst_trace};
use gst_video::prelude::*;
+use once_cell::sync::Lazy;
+
use std::sync::Mutex;
use pango::prelude::*;
use crate::caption_frame::{CaptionFrame, Status};
-lazy_static! {
- static ref CAT: gst::DebugCategory = {
- gst::DebugCategory::new(
- "cea608overlay",
- gst::DebugColorFlags::empty(),
- Some("CEA 608 overlay element"),
- )
- };
-}
+static CAT: Lazy<gst::DebugCategory> = Lazy::new(|| {
+ gst::DebugCategory::new(
+ "cea608overlay",
+ gst::DebugColorFlags::empty(),
+ Some("CEA 608 overlay element"),
+ )
+});
struct State {
video_info: Option<gst_video::VideoInfo>,
@@ -209,7 +210,7 @@ impl Cea608Overlay {
// anymore mutably.
unsafe {
assert_eq!(
- cairo_sys::cairo_surface_get_reference_count(surface.to_raw_none()),
+ cairo::ffi::cairo_surface_get_reference_count(surface.to_raw_none()),
1
);
let buffer = glib::translate::from_glib_none(buffer_ptr);
@@ -391,7 +392,7 @@ impl ObjectSubclass for Cea608Overlay {
type Instance = gst::subclass::ElementInstanceStruct<Self>;
type Class = subclass::simple::ClassStruct<Self>;
- glib_object_subclass!();
+ glib::glib_object_subclass!();
fn with_class(klass: &Self::Class) -> Self {
let templ = klass.get_pad_template("sink").unwrap();