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>2021-11-22 12:04:26 +0300
committerSebastian Dröge <sebastian@centricular.com>2021-11-22 12:04:26 +0300
commit86f422592b160f9aff2eb58c5ab05a0612c152e5 (patch)
treecd15a1e6f8a9f5344e50bc4f450d23dc614579f8
parent651ea7de5ff0947ed3e6641a65e9b05d1c36a74a (diff)
Update for `glib::Enum` / `glib::Boxed` / `glib::flags!` macro renames
-rw-r--r--audio/audiofx/src/ebur128level/imp.rs14
-rw-r--r--generic/fmp4/src/fmp4mux/mod.rs4
-rw-r--r--generic/threadshare/tests/pad.rs5
-rw-r--r--net/reqwest/src/reqwesthttpsrc/imp.rs4
-rw-r--r--net/rusoto/src/aws_transcriber/mod.rs10
-rw-r--r--tutorial/src/progressbin/mod.rs8
-rw-r--r--utils/fallbackswitch/src/fallbacksrc/mod.rs8
-rw-r--r--utils/fallbackswitch/src/fallbackswitch/imp.rs8
-rw-r--r--video/closedcaption/src/ttutils.rs4
-rw-r--r--video/rspng/src/pngenc/mod.rs29
10 files changed, 46 insertions, 48 deletions
diff --git a/audio/audiofx/src/ebur128level/imp.rs b/audio/audiofx/src/ebur128level/imp.rs
index abc2bfedf..792b9dc35 100644
--- a/audio/audiofx/src/ebur128level/imp.rs
+++ b/audio/audiofx/src/ebur128level/imp.rs
@@ -33,22 +33,22 @@ static CAT: Lazy<gst::DebugCategory> = Lazy::new(|| {
)
});
-#[glib::gflags("EbuR128LevelMode")]
+#[glib::flags(name = "EbuR128LevelMode")]
enum Mode {
- #[gflags(name = "Calculate momentary loudness (400ms)", nick = "momentary")]
+ #[flags_value(name = "Calculate momentary loudness (400ms)", nick = "momentary")]
MOMENTARY = 0b00000001,
- #[gflags(name = "Calculate short-term loudness (3s)", nick = "short-term")]
+ #[flags_value(name = "Calculate short-term loudness (3s)", nick = "short-term")]
SHORT_TERM = 0b00000010,
- #[gflags(
+ #[flags_value(
name = "Calculate relative threshold and global loudness",
nick = "global"
)]
GLOBAL = 0b00000100,
- #[gflags(name = "Calculate loudness range", nick = "loudness-range")]
+ #[flags_value(name = "Calculate loudness range", nick = "loudness-range")]
LOUDNESS_RANGE = 0b00001000,
- #[gflags(name = "Calculate sample peak", nick = "sample-peak")]
+ #[flags_value(name = "Calculate sample peak", nick = "sample-peak")]
SAMPLE_PEAK = 0b00010000,
- #[gflags(name = "Calculate true peak", nick = "true-peak")]
+ #[flags_value(name = "Calculate true peak", nick = "true-peak")]
TRUE_PEAK = 0b00100000,
}
diff --git a/generic/fmp4/src/fmp4mux/mod.rs b/generic/fmp4/src/fmp4mux/mod.rs
index 914d78752..eadfb017f 100644
--- a/generic/fmp4/src/fmp4mux/mod.rs
+++ b/generic/fmp4/src/fmp4mux/mod.rs
@@ -108,9 +108,9 @@ pub(crate) struct FragmentOffset {
}
#[allow(clippy::upper_case_acronyms)]
-#[derive(Debug, Clone, Copy, PartialEq, Eq, glib::GEnum)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, glib::Enum)]
#[repr(i32)]
-#[genum(type_name = "GstFMP4MuxHeaderUpdateMode")]
+#[enum_type(name = "GstFMP4MuxHeaderUpdateMode")]
pub(crate) enum HeaderUpdateMode {
None,
Rewrite,
diff --git a/generic/threadshare/tests/pad.rs b/generic/threadshare/tests/pad.rs
index 91476c462..bfe5ac690 100644
--- a/generic/threadshare/tests/pad.rs
+++ b/generic/threadshare/tests/pad.rs
@@ -21,7 +21,6 @@ use futures::future::BoxFuture;
use futures::lock::Mutex as FutMutex;
use futures::prelude::*;
-use glib::GBoxed;
use gst::glib;
use gst::prelude::*;
@@ -61,8 +60,8 @@ pub enum Item {
Event(gst::Event),
}
-#[derive(Clone, Debug, GBoxed)]
-#[gboxed(type_name = "TsTestItemSender")]
+#[derive(Clone, Debug, glib::Boxed)]
+#[boxed_type(name = "TsTestItemSender")]
struct ItemSender {
sender: mpsc::Sender<Item>,
}
diff --git a/net/reqwest/src/reqwesthttpsrc/imp.rs b/net/reqwest/src/reqwesthttpsrc/imp.rs
index bf04d096b..1af019be7 100644
--- a/net/reqwest/src/reqwesthttpsrc/imp.rs
+++ b/net/reqwest/src/reqwesthttpsrc/imp.rs
@@ -112,8 +112,8 @@ fn proxy_from_str(s: Option<String>) -> Result<Option<String>, glib::Error> {
const REQWEST_CLIENT_CONTEXT: &str = "gst.reqwest.client";
-#[derive(Clone, Debug, glib::GBoxed)]
-#[gboxed(type_name = "ReqwestClientContext")]
+#[derive(Clone, Debug, glib::Boxed)]
+#[boxed_type(name = "ReqwestClientContext")]
struct ClientContext(Arc<ClientContextInner>);
#[derive(Debug)]
diff --git a/net/rusoto/src/aws_transcriber/mod.rs b/net/rusoto/src/aws_transcriber/mod.rs
index 7907d29cd..fc44742a3 100644
--- a/net/rusoto/src/aws_transcriber/mod.rs
+++ b/net/rusoto/src/aws_transcriber/mod.rs
@@ -21,18 +21,18 @@ use gst::prelude::*;
mod imp;
mod packet;
-#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::GEnum)]
+#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::Enum)]
#[repr(u32)]
-#[genum(type_name = "GstAwsTranscriberResultStability")]
+#[enum_type(name = "GstAwsTranscriberResultStability")]
pub enum AwsTranscriberResultStability {
- #[genum(name = "High: stabilize results as fast as possible", nick = "high")]
+ #[enum_value(name = "High: stabilize results as fast as possible", nick = "high")]
High = 0,
- #[genum(
+ #[enum_value(
name = "Medium: balance between stability and accuracy",
nick = "medium"
)]
Medium = 1,
- #[genum(
+ #[enum_value(
name = "Low: relatively less stable partial transcription results with higher accuracy",
nick = "low"
)]
diff --git a/tutorial/src/progressbin/mod.rs b/tutorial/src/progressbin/mod.rs
index 0e38f75a9..a7bf70e62 100644
--- a/tutorial/src/progressbin/mod.rs
+++ b/tutorial/src/progressbin/mod.rs
@@ -14,16 +14,16 @@ mod imp;
// This enum may be used to control what type of output the progressbin should produce.
// It also serves the secondary purpose of illustrating how to add enum-type properties
// to a plugin written in rust.
-#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::GEnum)]
+#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::Enum)]
#[repr(u32)]
-#[genum(type_name = "GstProgressBinOutput")]
+#[enum_type(name = "GstProgressBinOutput")]
pub enum ProgressBinOutput {
- #[genum(
+ #[enum_value(
name = "Println: Outputs the progress using a println! macro.",
nick = "println"
)]
Println = 0,
- #[genum(
+ #[enum_value(
name = "Debug Category: Outputs the progress as info logs under the element's debug category.",
nick = "debug-category"
)]
diff --git a/utils/fallbackswitch/src/fallbacksrc/mod.rs b/utils/fallbackswitch/src/fallbacksrc/mod.rs
index 33a66ba36..7532dc309 100644
--- a/utils/fallbackswitch/src/fallbacksrc/mod.rs
+++ b/utils/fallbackswitch/src/fallbacksrc/mod.rs
@@ -22,9 +22,9 @@ mod custom_source;
mod imp;
mod video_fallback;
-#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::GEnum)]
+#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::Enum)]
#[repr(u32)]
-#[genum(type_name = "GstFallbackSourceRetryReason")]
+#[enum_type(name = "GstFallbackSourceRetryReason")]
enum RetryReason {
None,
Error,
@@ -33,9 +33,9 @@ enum RetryReason {
Timeout,
}
-#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::GEnum)]
+#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::Enum)]
#[repr(u32)]
-#[genum(type_name = "GstFallbackSourceStatus")]
+#[enum_type(name = "GstFallbackSourceStatus")]
enum Status {
Stopped,
Buffering,
diff --git a/utils/fallbackswitch/src/fallbackswitch/imp.rs b/utils/fallbackswitch/src/fallbackswitch/imp.rs
index 5a0a1f51a..7162d94b8 100644
--- a/utils/fallbackswitch/src/fallbackswitch/imp.rs
+++ b/utils/fallbackswitch/src/fallbackswitch/imp.rs
@@ -26,13 +26,13 @@ use once_cell::sync::Lazy;
use std::sync::{Mutex, RwLock};
-#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::GEnum)]
+#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::Enum)]
#[repr(u32)]
-#[genum(type_name = "GstFallbackSwitchStreamHealth")]
+#[enum_type(name = "GstFallbackSwitchStreamHealth")]
pub(crate) enum StreamHealth {
- #[genum(name = "Data flow is inactive or late", nick = "inactive")]
+ #[enum_value(name = "Data flow is inactive or late", nick = "inactive")]
Inactive = 0,
- #[genum(name = "Data is currently flowing in the stream", nick = "present")]
+ #[enum_value(name = "Data is currently flowing in the stream", nick = "present")]
Present = 1,
}
diff --git a/video/closedcaption/src/ttutils.rs b/video/closedcaption/src/ttutils.rs
index 19ce7c072..5223f282d 100644
--- a/video/closedcaption/src/ttutils.rs
+++ b/video/closedcaption/src/ttutils.rs
@@ -19,10 +19,10 @@ use gst::glib;
use serde::{Deserialize, Serialize};
#[derive(
- Serialize, Deserialize, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::GEnum,
+ Serialize, Deserialize, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::Enum,
)]
#[repr(u32)]
-#[genum(type_name = "GstTtToCea608Mode")]
+#[enum_type(name = "GstTtToCea608Mode")]
pub enum Cea608Mode {
PopOn,
PaintOn,
diff --git a/video/rspng/src/pngenc/mod.rs b/video/rspng/src/pngenc/mod.rs
index 9abe76ba9..c16497432 100644
--- a/video/rspng/src/pngenc/mod.rs
+++ b/video/rspng/src/pngenc/mod.rs
@@ -6,50 +6,49 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use glib::GEnum;
use gst::glib;
use gst::prelude::*;
mod imp;
-#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, GEnum)]
+#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::Enum)]
#[repr(u32)]
-#[genum(type_name = "GstRsPngCompressionLevel")]
+#[enum_type(name = "GstRsPngCompressionLevel")]
pub(crate) enum CompressionLevel {
- #[genum(name = "Default: Use the default compression level.", nick = "default")]
+ #[enum_value(name = "Default: Use the default compression level.", nick = "default")]
Default,
- #[genum(name = "Fast: A fast compression algorithm.", nick = "fast")]
+ #[enum_value(name = "Fast: A fast compression algorithm.", nick = "fast")]
Fast,
- #[genum(
+ #[enum_value(
name = "Best: Uses the algorithm with the best results.",
nick = "best"
)]
Best,
- #[genum(name = "Huffman: Huffman compression.", nick = "huffman")]
+ #[enum_value(name = "Huffman: Huffman compression.", nick = "huffman")]
Huffman,
- #[genum(name = "Rle: Rle compression.", nick = "rle")]
+ #[enum_value(name = "Rle: Rle compression.", nick = "rle")]
Rle,
}
-#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, GEnum)]
+#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::Enum)]
#[repr(u32)]
-#[genum(type_name = "GstRsPngFilterType")]
+#[enum_type(name = "GstRsPngFilterType")]
pub(crate) enum FilterType {
- #[genum(
+ #[enum_value(
name = "NoFilter: No filtering applied to the output.",
nick = "nofilter"
)]
NoFilter,
- #[genum(name = "Sub: filter applied to each pixel.", nick = "sub")]
+ #[enum_value(name = "Sub: filter applied to each pixel.", nick = "sub")]
Sub,
- #[genum(name = "Up: Up filter similar to Sub.", nick = "up")]
+ #[enum_value(name = "Up: Up filter similar to Sub.", nick = "up")]
Up,
- #[genum(
+ #[enum_value(
name = "Avg: The Average filter uses the average of the two neighboring pixels.",
nick = "avg"
)]
Avg,
- #[genum(
+ #[enum_value(
name = "Paeth: The Paeth filter computes a simple linear function of the three neighboring pixels.",
nick = "paeth"
)]