use glib::prelude::*;
mod imp;
glib::wrapper! {
pub struct AnalyticsCombiner(ObjectSubclass<imp::AnalyticsCombiner>) @extends gst_base::Aggregator, gst::Element, gst::Object, @implements gst::ChildProxy;
}
glib::wrapper! {
pub struct AnalyticsCombinerSinkPad(ObjectSubclass<imp::AnalyticsCombinerSinkPad>) @extends gst_base::AggregatorPad, gst::Pad, gst::Object;
}
#[derive(Debug, Copy, Clone, Default, PartialEq, Eq, glib::Enum)]
#[enum_type(name = "GstAnalyticsCombinerBatchStrategy")]
#[repr(C)]
pub enum BatchStrategy {
#[default]
#[enum_value(
name = "All: Include all buffers that start inside the batch.",
nick = "all"
)]
All,
#[enum_value(
name = "FirstInBatch: Include only the first buffer that starts inside the batch.",
nick = "first-in-batch"
)]
FirstInBatch,
#[enum_value(
name = "FirstInBatchWithOverlap: Include only the first buffer that starts inside the batch unless there was a previously unused buffer at most half a batch duration earlier. If no buffer is available, allow taking a buffer up to half a batch duration later. The buffer closest to the batch start is included.",
nick = "first-in-batch-with-overlap"
)]
FirstInBatchWithOverlap,
#[enum_value(
name = "LastInBatch: Include only the last buffer that starts inside the batch.",
nick = "last-in-batch"
)]
LastInBatch,
}
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
#[cfg(feature = "doc")]
{
use gst::prelude::*;
BatchStrategy::static_type().mark_as_plugin_api(gst::PluginAPIFlags::empty());
AnalyticsCombinerSinkPad::static_type().mark_as_plugin_api(gst::PluginAPIFlags::empty());
}
gst::Element::register(
Some(plugin),
"analyticscombiner",
gst::Rank::NONE,
AnalyticsCombiner::static_type(),
)
}