mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-22 17:08:18 +00:00
port all plugins to new register API
Rank is now an enum rather than a u32
This commit is contained in:
parent
ea14f36a0d
commit
53e530f7db
24 changed files with 125 additions and 26 deletions
|
@ -316,7 +316,12 @@ impl BaseTransformImpl for AudioEcho {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "rsaudioecho", 0, AudioEcho::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"rsaudioecho",
|
||||
gst::Rank::None,
|
||||
AudioEcho::get_type(),
|
||||
)
|
||||
}
|
||||
|
||||
struct RingBuffer {
|
||||
|
|
|
@ -630,5 +630,5 @@ impl ElementImpl for MccEnc {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "mccenc", 0, MccEnc::get_type())
|
||||
gst::Element::register(Some(plugin), "mccenc", gst::Rank::None, MccEnc::get_type())
|
||||
}
|
||||
|
|
|
@ -1291,5 +1291,10 @@ impl ElementImpl for MccParse {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "mccparse", 0, MccParse::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"mccparse",
|
||||
gst::Rank::None,
|
||||
MccParse::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -450,5 +450,5 @@ impl ElementImpl for SccEnc {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "sccenc", 0, SccEnc::get_type())
|
||||
gst::Element::register(Some(plugin), "sccenc", gst::Rank::None, SccEnc::get_type())
|
||||
}
|
||||
|
|
|
@ -561,5 +561,10 @@ impl ElementImpl for SccParse {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "sccparse", 0, SccParse::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"sccparse",
|
||||
gst::Rank::None,
|
||||
SccParse::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -327,5 +327,10 @@ impl URIHandlerImpl for FileSink {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "rsfilesink", 256 + 100, FileSink::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"rsfilesink",
|
||||
gst::Rank::Primary + 100,
|
||||
FileSink::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -381,5 +381,10 @@ impl URIHandlerImpl for FileSrc {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "rsfilesrc", 256 + 100, FileSrc::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"rsfilesrc",
|
||||
gst::Rank::Primary + 100,
|
||||
FileSrc::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1580,5 +1580,10 @@ impl Metadata {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "rsflvdemux", 256 + 100, FlvDemux::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"rsflvdemux",
|
||||
gst::Rank::Primary + 100,
|
||||
FlvDemux::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -459,5 +459,10 @@ impl ObjectSubclass for HttpSrc {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "rshttpsrc", 256 + 100, HttpSrc::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"rshttpsrc",
|
||||
gst::Rank::Primary + 100,
|
||||
HttpSrc::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -725,5 +725,10 @@ impl Rav1Enc {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "rav1enc", 0, Rav1Enc::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"rav1enc",
|
||||
gst::Rank::None,
|
||||
Rav1Enc::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -458,5 +458,5 @@ impl BaseSrcImpl for S3Src {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "s3src", 0, S3Src::get_type())
|
||||
gst::Element::register(Some(plugin), "s3src", gst::Rank::None, S3Src::get_type())
|
||||
}
|
||||
|
|
|
@ -693,5 +693,10 @@ impl ElementImpl for Decrypter {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "sodiumdecrypter", 0, Decrypter::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"sodiumdecrypter",
|
||||
gst::Rank::None,
|
||||
Decrypter::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -565,5 +565,10 @@ impl ElementImpl for Encrypter {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "sodiumencrypter", 0, Encrypter::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"sodiumencrypter",
|
||||
gst::Rank::None,
|
||||
Encrypter::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -42,13 +42,12 @@ mod decrypter;
|
|||
mod encrypter;
|
||||
|
||||
fn typefind_register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
use glib::translate::ToGlib;
|
||||
use gst::{Caps, TypeFind, TypeFindProbability};
|
||||
|
||||
TypeFind::register(
|
||||
Some(plugin),
|
||||
"sodium_encrypted_typefind",
|
||||
gst::Rank::Primary.to_glib() as u32,
|
||||
gst::Rank::Primary,
|
||||
None,
|
||||
Some(&Caps::new_simple("application/x-sodium-encrypted", &[])),
|
||||
|typefind| {
|
||||
|
|
|
@ -686,5 +686,10 @@ impl ElementImpl for AppSrc {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "ts-appsrc", 0, AppSrc::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"ts-appsrc",
|
||||
gst::Rank::None,
|
||||
AppSrc::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1348,6 +1348,16 @@ impl ElementImpl for ProxySrc {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "ts-proxysink", 0, ProxySink::get_type())?;
|
||||
gst::Element::register(Some(plugin), "ts-proxysrc", 0, ProxySrc::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"ts-proxysink",
|
||||
gst::Rank::None,
|
||||
ProxySink::get_type(),
|
||||
)?;
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"ts-proxysrc",
|
||||
gst::Rank::None,
|
||||
ProxySrc::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -957,5 +957,5 @@ impl ElementImpl for Queue {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "ts-queue", 0, Queue::get_type())
|
||||
gst::Element::register(Some(plugin), "ts-queue", gst::Rank::None, Queue::get_type())
|
||||
}
|
||||
|
|
|
@ -755,5 +755,10 @@ impl ElementImpl for TcpClientSrc {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "ts-tcpclientsrc", 0, TcpClientSrc::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"ts-tcpclientsrc",
|
||||
gst::Rank::None,
|
||||
TcpClientSrc::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1135,5 +1135,10 @@ impl ElementImpl for UdpSrc {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "ts-udpsrc", 0, UdpSrc::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"ts-udpsrc",
|
||||
gst::Rank::None,
|
||||
UdpSrc::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1399,5 +1399,10 @@ impl ElementImpl for ToggleRecord {
|
|||
}
|
||||
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "togglerecord", 0, ToggleRecord::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"togglerecord",
|
||||
gst::Rank::None,
|
||||
ToggleRecord::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -274,5 +274,10 @@ impl ElementImpl for Identity {
|
|||
// the name "rsidentity" for being able to instantiate it via e.g.
|
||||
// gst::ElementFactory::make().
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "rsidentity", 0, Identity::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"rsidentity",
|
||||
gst::Rank::None,
|
||||
Identity::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -177,5 +177,10 @@ impl BinImpl for ProgressBin {
|
|||
// the name "rsprogressbin" for being able to instantiate it via e.g.
|
||||
// gst::ElementFactory::make().
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "rsprogressbin", 0, ProgressBin::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"rsprogressbin",
|
||||
gst::Rank::None,
|
||||
ProgressBin::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -567,5 +567,10 @@ impl BaseTransformImpl for Rgb2Gray {
|
|||
// the name "rsrgb2gray" for being able to instantiate it via e.g.
|
||||
// gst::ElementFactory::make().
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "rsrgb2gray", 0, Rgb2Gray::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"rsrgb2gray",
|
||||
gst::Rank::None,
|
||||
Rgb2Gray::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -858,5 +858,10 @@ impl BaseSrcImpl for SineSrc {
|
|||
// the name "sinesrc" for being able to instantiate it via e.g.
|
||||
// gst::ElementFactory::make().
|
||||
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
gst::Element::register(Some(plugin), "rssinesrc", 0, SineSrc::get_type())
|
||||
gst::Element::register(
|
||||
Some(plugin),
|
||||
"rssinesrc",
|
||||
gst::Rank::None,
|
||||
SineSrc::get_type(),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue