sodium: remove 'rs' prefix from elements

This commit is contained in:
Guillaume Desmottes 2019-05-29 15:43:56 +05:30
parent 3e01736caf
commit f867673853
6 changed files with 19 additions and 19 deletions

View file

@ -98,7 +98,7 @@ fn main() -> Result<(), Box<dyn Error>> {
let sender = &Keys::from_file(&sender_keys)?;
let filesrc = gst::ElementFactory::make("filesrc", None).unwrap();
let decrypter = gst::ElementFactory::make("rssodiumdecrypter", None).unwrap();
let decrypter = gst::ElementFactory::make("sodiumdecrypter", None).unwrap();
let typefind = gst::ElementFactory::make("typefind", None).unwrap();
let filesink = gst::ElementFactory::make("filesink", None).unwrap();

View file

@ -98,7 +98,7 @@ fn main() -> Result<(), Box<dyn Error>> {
let sender = &Keys::from_file(&sender_keys)?;
let filesrc = gst::ElementFactory::make("filesrc", None).unwrap();
let encrypter = gst::ElementFactory::make("rssodiumencrypter", None).unwrap();
let encrypter = gst::ElementFactory::make("sodiumencrypter", None).unwrap();
let filesink = gst::ElementFactory::make("filesink", None).unwrap();
filesrc

View file

@ -34,7 +34,7 @@ use std::sync::Mutex;
lazy_static! {
static ref CAT: gst::DebugCategory = {
gst::DebugCategory::new(
"rssodiumdecrypter",
"sodiumdecrypter",
gst::DebugColorFlags::empty(),
Some("Decrypter Element"),
)
@ -691,5 +691,5 @@ impl ElementImpl for Decrypter {
}
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
gst::Element::register(Some(plugin), "rssodiumdecrypter", 0, Decrypter::get_type())
gst::Element::register(Some(plugin), "sodiumdecrypter", 0, Decrypter::get_type())
}

View file

@ -37,7 +37,7 @@ use std::sync::Mutex;
lazy_static! {
static ref CAT: gst::DebugCategory = {
gst::DebugCategory::new(
"rssodiumencrypter",
"sodiumencrypter",
gst::DebugColorFlags::empty(),
Some("Encrypter Element"),
)
@ -563,5 +563,5 @@ impl ElementImpl for Encrypter {
}
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
gst::Element::register(Some(plugin), "rssodiumencrypter", 0, Encrypter::get_type())
gst::Element::register(Some(plugin), "sodiumencrypter", 0, Encrypter::get_type())
}

View file

@ -83,7 +83,7 @@ fn test_pipeline() {
.set_property("location", &input_path.to_str().unwrap())
.expect("failed to set property");
let dec = gst::ElementFactory::make("rssodiumdecrypter", None).unwrap();
let dec = gst::ElementFactory::make("sodiumdecrypter", None).unwrap();
dec.set_property("sender-key", &*SENDER_PUBLIC)
.expect("failed to set property");
dec.set_property("receiver-key", &*RECEIVER_PRIVATE)
@ -176,7 +176,7 @@ fn test_pull_range() {
.set_property("location", &input_path.to_str().unwrap())
.expect("failed to set property");
let dec = gst::ElementFactory::make("rssodiumdecrypter", None).unwrap();
let dec = gst::ElementFactory::make("sodiumdecrypter", None).unwrap();
dec.set_property("sender-key", &*SENDER_PUBLIC)
.expect("failed to set property");
dec.set_property("receiver-key", &*RECEIVER_PRIVATE)
@ -286,17 +286,17 @@ fn test_state_changes() {
// NullToReady without keys provided
{
let dec = gst::ElementFactory::make("rssodiumdecrypter", None).unwrap();
let dec = gst::ElementFactory::make("sodiumdecrypter", None).unwrap();
assert!(dec.change_state(gst::StateChange::NullToReady).is_err());
// Set only receiver key
let dec = gst::ElementFactory::make("rssodiumdecrypter", None).unwrap();
let dec = gst::ElementFactory::make("sodiumdecrypter", None).unwrap();
dec.set_property("receiver-key", &*RECEIVER_PRIVATE)
.expect("failed to set property");
assert!(dec.change_state(gst::StateChange::NullToReady).is_err());
// Set only sender key
let dec = gst::ElementFactory::make("rssodiumdecrypter", None).unwrap();
let dec = gst::ElementFactory::make("sodiumdecrypter", None).unwrap();
dec.set_property("sender-key", &*SENDER_PUBLIC)
.expect("failed to set property");
assert!(dec.change_state(gst::StateChange::NullToReady).is_err());
@ -304,7 +304,7 @@ fn test_state_changes() {
// NullToReady, no nonce provided
{
let dec = gst::ElementFactory::make("rssodiumdecrypter", None).unwrap();
let dec = gst::ElementFactory::make("sodiumdecrypter", None).unwrap();
dec.set_property("sender-key", &*SENDER_PUBLIC)
.expect("failed to set property");
dec.set_property("receiver-key", &*RECEIVER_PRIVATE)
@ -314,7 +314,7 @@ fn test_state_changes() {
// ReadyToNull
{
let dec = gst::ElementFactory::make("rssodiumdecrypter", None).unwrap();
let dec = gst::ElementFactory::make("sodiumdecrypter", None).unwrap();
dec.set_property("sender-key", &*SENDER_PUBLIC)
.expect("failed to set property");
dec.set_property("receiver-key", &*RECEIVER_PRIVATE)

View file

@ -75,7 +75,7 @@ fn encrypt_file() {
let mut adapter = gst_base::UniqueAdapter::new();
let enc = gst::ElementFactory::make("rssodiumencrypter", None).unwrap();
let enc = gst::ElementFactory::make("sodiumencrypter", None).unwrap();
enc.set_property("sender-key", &*SENDER_PRIVATE)
.expect("failed to set property");
enc.set_property("receiver-key", &*RECEIVER_PUBLIC)
@ -114,17 +114,17 @@ fn test_state_changes() {
// NullToReady without keys provided
{
let enc = gst::ElementFactory::make("rssodiumencrypter", None).unwrap();
let enc = gst::ElementFactory::make("sodiumencrypter", None).unwrap();
assert!(enc.change_state(gst::StateChange::NullToReady).is_err());
// Set only receiver key
let enc = gst::ElementFactory::make("rssodiumencrypter", None).unwrap();
let enc = gst::ElementFactory::make("sodiumencrypter", None).unwrap();
enc.set_property("receiver-key", &*RECEIVER_PUBLIC)
.expect("failed to set property");
assert!(enc.change_state(gst::StateChange::NullToReady).is_err());
// Set only sender key
let enc = gst::ElementFactory::make("rssodiumencrypter", None).unwrap();
let enc = gst::ElementFactory::make("sodiumencrypter", None).unwrap();
enc.set_property("sender-key", &*SENDER_PRIVATE)
.expect("failed to set property");
assert!(enc.change_state(gst::StateChange::NullToReady).is_err());
@ -132,7 +132,7 @@ fn test_state_changes() {
// NullToReady
{
let enc = gst::ElementFactory::make("rssodiumencrypter", None).unwrap();
let enc = gst::ElementFactory::make("sodiumencrypter", None).unwrap();
enc.set_property("sender-key", &*SENDER_PRIVATE)
.expect("failed to set property");
enc.set_property("receiver-key", &*RECEIVER_PUBLIC)
@ -142,7 +142,7 @@ fn test_state_changes() {
// ReadyToNull
{
let enc = gst::ElementFactory::make("rssodiumencrypter", None).unwrap();
let enc = gst::ElementFactory::make("sodiumencrypter", None).unwrap();
enc.set_property("sender-key", &*SENDER_PRIVATE)
.expect("failed to set property");
enc.set_property("receiver-key", &*RECEIVER_PUBLIC)