gstreamermm 1.10.0
Gst::AudioFilter Class Reference

A base class for simple audio filters. More...

#include <gstreamermm/audiofilter.h>

Inheritance diagram for Gst::AudioFilter:

Public Member Functions

 AudioFilter (AudioFilter&& src) noexcept
AudioFilteroperator= (AudioFilter&& src) noexcept
 ~AudioFilter () noexcept override
GstAudioFilter* gobj ()
 Provides access to the underlying C GObject.
const GstAudioFilter* gobj () const
 Provides access to the underlying C GObject.
GstAudioFilter* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
virtual bool setup_vfunc (const Gst::AudioInfo& info)
 Virtual function, called whenever the format changes.
Public Member Functions inherited from Gst::BaseTransform
 BaseTransform (BaseTransform&& src) noexcept
BaseTransformoperator= (BaseTransform&& src) noexcept
 ~BaseTransform () noexcept override
GstBaseTransform* gobj ()
 Provides access to the underlying C GObject.
const GstBaseTransform* gobj () const
 Provides access to the underlying C GObject.
GstBaseTransform* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool is_passthrough () const
 See if trans is configured as a passthrough transform.
void set_passthrough (bool passthrough)
 Set passthrough mode for this filter by default.
bool is_in_place () const
 See if trans is configured as a in_place transform.
void set_in_place (bool in_place)
 Determines whether a non-writable buffer will be copied before passing to the transform_ip function.
bool is_qos_enabled () const
 Queries if the transform will handle QoS.
void set_qos_enabled (bool enabled)
 Enable or disable QoS handling in the transform.
void update_qos (double proportion, Gst::ClockTimeDiff diff, Gst::ClockTime timestamp)
 Set the QoS parameters in the transform.
void set_gap_aware (bool gap_aware)
 If gap_aware is false (the default), output buffers will have the Gst::BUFFER_FLAG_GAP flag unset.
void reconfigure_sink ()
 Instructs trans to request renegotiation upstream.
void reconfigure_src ()
 Instructs trans to renegotiate a new downstream transform on the next buffer.
void set_prefer_passthrough (bool prefer_passthrough)
 If prefer_passthrough is true (the default), trans will check and prefer passthrough caps from the list of caps returned by the transform_caps vmethod.
bool update_src_caps (const Glib::RefPtr< Gst::Caps >& updated_caps)
 Updates the srcpad caps and send the caps downstream.
Glib::RefPtr< Gst::Allocatorget_allocator (Gst::AllocationParams& params)
Glib::RefPtr< Gst::Padget_sink_pad ()
 Gives the refptr to the sink Gst::Pad object of the element.
Glib::RefPtr< const Gst::Padget_sink_pad () const
Glib::RefPtr< Gst::Padget_src_pad ()
 Gives the refptr to the source Gst::Pad object of the element.
Glib::RefPtr< const Gst::Padget_src_pad () const
Glib::PropertyProxy< bool > property_qos ()
 Handle Quality-of-Service events.
Glib::PropertyProxy_ReadOnly< bool > property_qos () const
 Handle Quality-of-Service events.
virtual Glib::RefPtr< Gst::Capstransform_caps_vfunc (PadDirection direction, const Glib::RefPtr< Gst::Caps >& caps, const Glib::RefPtr< Gst::Caps >& filter)
 Optional.
virtual Glib::RefPtr< Gst::Capsfixate_caps_vfunc (PadDirection direction, const Glib::RefPtr< Gst::Caps >& caps, const Glib::RefPtr< Gst::Caps >& othercaps)
 Optional.
virtual bool get_unit_size_vfunc (const Glib::RefPtr< Gst::Caps >& caps, gsize&size) const
 Optional.
virtual bool set_caps_vfunc (const Glib::RefPtr< Gst::Caps >& incaps, const Glib::RefPtr< Gst::Caps >& outcaps)
 Allows the subclass to be notified of the actual caps set.
virtual FlowReturn transform_vfunc (const Glib::RefPtr< Gst::Buffer >& inbuf, const Glib::RefPtr< Gst::Buffer >& outbuf)
 Required if the element does not operate in-place.
virtual FlowReturn transform_ip_vfunc (const Glib::RefPtr< Gst::Buffer >& buf)
 Required if the element operates in-place.
virtual FlowReturn prepare_output_buffer_vfunc (const Glib::RefPtr< Gst::Buffer >& input, Glib::RefPtr< Gst::Buffer >& buffer)
 Optional.
virtual bool src_event_vfunc (const Glib::RefPtr< Gst::Event >& event)
 Optional.
virtual bool sink_event_vfunc (const Glib::RefPtr< Gst::Event >& event)
 Optional.
virtual void before_transform_vfunc (const Glib::RefPtr< Gst::Buffer >& buffer)
 Optional.
virtual bool accept_caps_vfunc (PadDirection direction, const Glib::RefPtr< const Gst::Caps >& caps)
 Optional.
virtual bool start_vfunc ()
 Optional.
virtual bool stop_vfunc ()
 Optional.
virtual bool decide_allocation_vfunc (const Glib::RefPtr< Gst::Query >&query)
 Setup the allocation parameters for allocating output buffers.
virtual bool filter_meta_vfunc (const Glib::RefPtr< Gst::Query >&query, GType api, const Gst::Structure& params)
 Return TRUE if the metadata API should be proposed in the upstream allocation query.
virtual bool propose_allocation_vfunc (const Glib::RefPtr< Gst::Query >& decide_query, const Glib::RefPtr< Gst::Query >&query)
 Propose buffer allocation parameters for upstream elements.
virtual Gst::FlowReturn submit_input_buffer_vfunc (bool is_discont, const Glib::RefPtr< Gst::Buffer >& input)
 Function which accepts a new input buffer and pre-processes it.
virtual Gst::FlowReturn generate_output_vfunc (Glib::RefPtr< Gst::Buffer >& buffer)
 Called after each new input buffer is submitted repeatedly until it either generates an error or fails to generate an output buffer.
virtual bool copy_metadata_vfunc (const Glib::RefPtr< Gst::Buffer >& input, const Glib::RefPtr< Gst::Buffer >& outbuf)
 Optional.
bool base_transform_query_vfunc (Gst::PadDirection direction, const Glib::RefPtr< Gst::Query >&query)
 Optional.
Public Member Functions inherited from Gst::Element
 Element (Element&& src) noexcept
Elementoperator= (Element&& src) noexcept
 ~Element () noexcept override
GstElement* gobj ()
 Provides access to the underlying C GObject.
const GstElement* gobj () const
 Provides access to the underlying C GObject.
GstElement* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::RefPtr< Gst::Elementlink (const Glib::RefPtr< Gst::Element >& dest)
 Links this source element to the dest element.
bool add_pad (const Glib::RefPtr< Gst::Pad >& pad)
 Adds a pad (link point) to element.
void create_all_pads ()
 Creates a pad for each pad template that is always available.
Glib::RefPtr< Gst::Padcreate_compatible_pad (const Glib::RefPtr< const Gst::Pad >& pad, const Glib::RefPtr< const Gst::Caps >& caps)
 Looks for an unlinked pad to which the given pad can link.
Glib::RefPtr< Gst::PadTemplateget_compatible_pad_template (const Glib::RefPtr< const Gst::PadTemplate >& compattempl)
 Retrieves a pad template from element that is compatible with compattempl.
Glib::RefPtr< const Gst::PadTemplateget_compatible_pad_template (const Glib::RefPtr< const Gst::PadTemplate >& compattempl) const
 Retrieves a pad template from element that is compatible with compattempl.
Glib::RefPtr< Gst::Padget_request_pad (const Glib::ustring& name)
 Retrieves a pad from the element by name (e.g. "src_\\%d").
Glib::RefPtr< Gst::Padrequest_pad (const Glib::RefPtr< Gst::PadTemplate >& templ, const Glib::ustring& name, const Glib::RefPtr< const Gst::Caps >& caps)
 Retrieves a request pad from the element according to the provided template.
Glib::RefPtr< Gst::Padrequest_pad (const Glib::RefPtr< Gst::PadTemplate >& templ, const Glib::ustring& name)
 A request_pad() convenience overload.
Glib::RefPtr< Gst::Padrequest_pad (const Glib::RefPtr< Gst::PadTemplate >& templ, const Glib::RefPtr< const Gst::Caps >& caps)
 A request_pad() convenience overload.
Glib::RefPtr< Gst::Padrequest_pad (const Glib::RefPtr< Gst::PadTemplate >& templ)
 A request_pad() convenience overload.
Glib::RefPtr< Gst::Padget_static_pad (const Glib::ustring& name)
 Retrieves a pad from element by name.
Glib::RefPtr< const Gst::Padget_static_pad (const Glib::ustring& name) const
 Retrieves a pad from element by name.
void no_more_pads ()
 Use this function to signal that the element does not expect any more pads to show up in the current pipeline.
void release_request_pad (const Glib::RefPtr< Gst::Pad >& pad)
 Makes the element free the previously requested pad as obtained with get_request_pad().
bool remove_pad (const Glib::RefPtr< Gst::Pad >& pad)
 Removes pad from element.
Gst::Iterator< Gst::Paditerate_pads ()
 Retrieves an iterator of element's pads.
Gst::Iterator< const Gst::Paditerate_pads () const
 Retrieves an iterator of element's pads.
Gst::Iterator< Gst::Paditerate_sink_pads ()
 Retrieves an iterator of element's sink pads.
Gst::Iterator< const Gst::Paditerate_sink_pads () const
 Retrieves an iterator of element's sink pads.
Gst::Iterator< Gst::Paditerate_src_pads ()
 Retrieves an iterator of element's source pads.
Gst::Iterator< const Gst::Paditerate_src_pads () const
 Retrieves an iterator of element's source pads.
void unlink (const Glib::RefPtr< Gst::Element >& dest)
 Unlinks all source pads of the source element with all sink pads of the sink element to which they are linked.
void set_context (const Glib::RefPtr< Gst::Context >& context)
 Sets the context of the element.
bool link_pads (const Glib::ustring& srcpadname, const Glib::RefPtr< Gst::Element >& dest, const Glib::ustring& destpadname)
 Links the two named pads of the source and destination elements.
void unlink_pads (const Glib::ustring& srcpadname, const Glib::RefPtr< Gst::Element >& dest, const Glib::ustring& destpadname)
 Unlinks the two named pads of the source and destination elements.
bool link_pads (const Glib::ustring& srcpadname, const Glib::RefPtr< Gst::Element >& dest, const Glib::ustring& destpadname, const Glib::RefPtr< Gst::Caps >& filter)
 Links the two named pads of the source and destination elements.
bool link_pads (const Glib::ustring& srcpadname, const Glib::RefPtr< Gst::Element >& dest, const Glib::ustring& destpadname, PadLinkCheck flags)
 Links the two named pads of the source and destination elements.
Glib::RefPtr< Gst::Elementlink (const Glib::RefPtr< Gst::Element >& dest, const Glib::RefPtr< Gst::Caps >& filter)
 Links src to dest using the given caps as filtercaps.
void set_base_time (ClockTime time)
 Set the base time of an element.
ClockTime get_base_time () const
 Returns the base time of the element.
void set_start_time (Gst::ClockTime time)
 Set the start time of an element.
Gst::ClockTime get_start_time () const
 Returns the start time of the element.
void set_bus (const Glib::RefPtr< Gst::Bus >& bus)
 Sets the bus of the element.
Glib::RefPtr< Gst::Busget_bus ()
 Returns the bus of the element.
Glib::RefPtr< const Gst::Busget_bus () const
 Returns the bus of the element.
Glib::RefPtr< Gst::ElementFactoryget_factory ()
 Retrieves the factory that was used to create this element.
Glib::RefPtr< const Gst::ElementFactoryget_factory () const
 Retrieves the factory that was used to create this element.
bool set_clock (const Glib::RefPtr< Gst::Clock >& clock)
 Sets the clock for the element.
Glib::RefPtr< Gst::Clockget_clock ()
 Gets the currently configured clock of the element.
Glib::RefPtr< const Gst::Clockget_clock () const
 Gets the currently configured clock of the element.
Glib::RefPtr< Gst::Clockprovide_clock ()
 Get the clock provided by the given element.
Glib::RefPtr< const Gst::Clockprovide_clock () const
 Get the clock provided by the given element.
StateChangeReturn set_state (State state)
 Sets the state of the element.
StateChangeReturn get_state (State& state, State& pending, ClockTime timeout) const
 Gets the state of the element.
bool set_locked_state (gboolean locked_state)
 Locks the state of an element, so state changes of the parent don't affect this element anymore.
bool is_locked_state () const
 Checks if the state of an element is locked.
void abort_state ()
 Abort the state change of the element.
StateChangeReturn continue_state (StateChangeReturn ret)
 Commit the state change of the element and proceed to the next pending state if any.
void lost_state ()
 Brings the element to the lost state.
bool sync_state_with_parent ()
 Tries to change the state of the element to the same as its parent.
StateChangeReturn change_state (StateChange transition)
 Perform transition on element.
void post_message (int code, int line, MessageType type=Gst::MESSAGE_INFO, const Glib::QueryQuark& domain=get_core_error_quark(), const Glib::ustring& text=Glib::ustring(), const Glib::ustring& debug=Glib::ustring(), const Glib::ustring& file=Glib::ustring(), const Glib::ustring& function=Glib::ustring())
 Post an error, warning or info message on the bus from inside an element.
bool post_message (Glib::RefPtr< Gst::Message >&& message)
 Post a message on the element's Gst::Bus.
bool query (const Glib::RefPtr< Gst::Query >& query) const
 Performs a query on the given element.
bool query_convert (Gst::Format src_format, gint64 src_val, Format dest_format, gint64& dest_val) const
 Queries an element to convert src_val in src_format to dest_format.
bool query_position (Gst::Format format, gint64& cur) const
 Queries an element (usually top-level pipeline or playbin element) for the stream position in nanoseconds.
bool query_position (Gst::Format format) const
 A query_position() convenience overload.
bool query_duration (Gst::Format format, gint64& duration) const
 Queries an element (usually top-level pipeline or playbin element) for the total stream duration in nanoseconds.
bool query_duration (Gst::Format format) const
 A query_duration() convenience overload.
bool seek (Format format, SeekFlags seek_flags, gint64 seek_pos)
 Simple API to perform a seek on the given element, meaning it just seeks to the given position relative to the start of the stream.
bool seek (double rate, Format format, SeekFlags flags, SeekType cur_type, gint64 cur, SeekType stop_type, gint64 stop)
 Sends a seek event to an element.
bool send_event (Glib::RefPtr< Gst::Event >&& event)
 Sends an event to an element.
bool send_event (const Glib::RefPtr< Gst::Event >& event)
 A send_event() convenience overload. Allows to re-use event parameter after function call.
Glib::RefPtr< Gst::Contextget_context (const Glib::ustring& context_type)
 Gets the context with context_type set on the element or nullptr.
Glib::RefPtr< Gst::Contextget_context_unlocked (const Glib::ustring& context_type)
 Gets the context with context_type set on the element or nullptr.
std::vector< Glib::RefPtr< Gst::Context > > get_contexts ()
 Gets the contexts set on the element.
Glib::SignalProxy< void > signal_no_more_pads ()
Glib::SignalProxy< void, const Glib::RefPtr< Gst::Pad >& > signal_pad_added ()
Glib::SignalProxy< void, const Glib::RefPtr< Gst::Pad >& > signal_pad_removed ()
virtual void release_pad_vfunc (const Glib::RefPtr< Gst::Pad >& pad)
 Called when a request pad is to be released.
virtual Glib::RefPtr< Gst::Padrequest_new_pad_vfunc (Glib::RefPtr< Gst::PadTemplate > templ, const Glib::ustring& name, const Glib::RefPtr< const Gst::Caps >& caps)
 Called when a new pad is requested.
virtual StateChangeReturn get_state_vfunc (State& state, State& pending, ClockTime timeout) const
 Get the state of the element.
virtual StateChangeReturn set_state_vfunc (State state)
 Set a new state on the element.
virtual StateChangeReturn change_state_vfunc (StateChange transition)
 Called by set_state to perform an incremental state change.
virtual void state_changed_vfunc (Gst::State oldstate, Gst::State newstate, Gst::State pending)
 Called immediately after a new state was set.
virtual void set_bus_vfunc (const Glib::RefPtr< Gst::Bus >& bus)
 Set a Gst::Bus on the element.
virtual Glib::RefPtr< Gst::Clockprovide_clock_vfunc ()
 Gets the Gst::Clock provided by the element.
virtual bool set_clock_vfunc (const Glib::RefPtr< Gst::Clock >& clock)
 Set the Gst::Clock on the element.
virtual bool send_event_vfunc (const Glib::RefPtr< Gst::Event >& event)
 Send a Gst::Event to the element.
virtual bool query_vfunc (const Glib::RefPtr< Gst::Query >&query) const
 Perform a Gst::Query on the element.
virtual void set_context_vfunc (const Glib::RefPtr< Gst::Context >& context)
 Set a Gst::Context on the element.
virtual bool post_message_vfunc (const Glib::RefPtr< Gst::Message >& message)
 Called when a message is posted on the element.
Glib::RefPtr< Gst::PadTemplateget_pad_template (const Glib::ustring& factory_name) const
template<typename T>
Glib::RefPtr< Gst::Elementproperty (const Glib::ustring& name, const T& value)
 Sets specified property.
Public Member Functions inherited from Gst::Object
 Object (Object&& src) noexcept
Objectoperator= (Object&& src) noexcept
 ~Object () noexcept override
GstObject* gobj ()
 Provides access to the underlying C GObject.
const GstObject* gobj () const
 Provides access to the underlying C GObject.
GstObject* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool is_element () const
bool is_element_factory () const
bool is_pad () const
bool is_pad_template () const
bool is_bin () const
guint32 get_flags () const
 Returns the entire set of flags for the object.
bool set_name (const Glib::ustring& name)
 Sets the name of object, or gives object a guaranteed unique name (if name is nullptr).
Glib::ustring get_name () const
 Returns a copy of the name of object.
bool set_parent (const Glib::RefPtr< Gst::Object >& parent)
 Sets the parent of object to parent.
Glib::RefPtr< Gst::Objectget_parent ()
 Returns the parent of object.
Glib::RefPtr< const Gst::Objectget_parent () const
 Returns the parent of object.
void unparent ()
 Clear the parent of object, removing the associated reference.
void set_control_rate (Gst::ClockTime control_rate)
 Change the control-rate for this object.
Gst::ClockTime get_control_rate () const
 Obtain the control-rate for this object.
Gst::ClockTime suggest_next_sync () const
 Returns a suggestion for timestamps where buffers should be split to get best controller results.
bool sync_values (Gst::ClockTime timestamp)
 Sets the properties of the object, according to the Gst::ControlSources that (maybe) handle them and for the given timestamp.
void set_control_bindings_disabled (bool disabled)
 This function is used to disable all controlled properties of the object for some time, i.e. sync_values() will do nothing.
bool has_asctive_control_bindings () const
 Check if the object has an active controlled properties.
bool has_ancestor (const Glib::RefPtr< const Gst::Object >& ancestor) const
 Check if object has an ancestor ancestor somewhere up in the hierarchy.
bool has_as_ancestor (const Glib::RefPtr< Gst::Object >& ancestor) const
 Check if object has an ancestor ancestor somewhere up in the hierarchy.
bool has_as_parent (const Glib::RefPtr< Gst::Object >& parent) const
 Check if parent is the parent of object.
Glib::ustring get_path_string ()
 Generates a string describing the path of object in the object hierarchy.
Glib::PropertyProxy< Glib::ustring > property_name ()
 The name of the object.
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_name () const
 The name of the object.
Glib::PropertyProxy< Glib::RefPtr< Gst::Object > > property_parent ()
 The parent of the object.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gst::Object > > property_parent () const
 The parent of the object.
Glib::SignalProxy< void, const Glib::RefPtr< Gst::Object >&, GParamSpec* > signal_deep_notify ()
int get_refcount () const

Static Public Member Functions

static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system.
Static Public Member Functions inherited from Gst::BaseTransform
static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system.
Static Public Member Functions inherited from Gst::Element
static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system.
Static Public Member Functions inherited from Gst::Object
static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system.
static bool check_uniqueness (const Glib::ListHandle< const Gst::Object >& list, const Glib::ustring& name)
 Checks to see if there is any object named name in list.

(Note that these are not member symbols.)

Glib::RefPtr< Gst::AudioFilterwrap (GstAudioFilter* object, bool take_copy=false)
 A Glib::wrap() method for this object.

Additional Inherited Members

Static Public Attributes inherited from Gst::BaseTransform
static const Glib::ustring SINK_NAME
 The name of the templates for the sink pad ("sink").
static const Glib::ustring SRC_NAME
 The name of the templates for the source pad ("src").
static constexpr Gst::FlowReturn FLOW_DROPPED = static_cast<Gst::FlowReturn>(GST_BASE_TRANSFORM_FLOW_DROPPED)
 A Gst::FlowReturn that can be returned from transform_vfunc and transform_ip_vfunc to indicate that no output buffer was generated.
Protected Member Functions inherited from Gst::Element
virtual void on_no_more_pads ()
 This is a default handler for the signal signal_no_more_pads().
virtual void on_pad_added (const Glib::RefPtr< Gst::Pad >& new_pad)
 This is a default handler for the signal signal_pad_added().
virtual void on_pad_removed (const Glib::RefPtr< Gst::Pad >& old_pad)
 This is a default handler for the signal signal_pad_removed().
Protected Member Functions inherited from Gst::Object
virtual void on_deep_notify (const Glib::RefPtr< Gst::Object >& prop_object, GParamSpec* prop)
 This is a default handler for the signal signal_deep_notify().

Detailed Description

A base class for simple audio filters.

Gst::AudioFilter is a Gst::BaseTransform-derived base class for simple audio filters, ie. those that output the same format that they get as input.

Gst::AudioFilter will parse the input format for you (with error checking) before calling your setup function. Also, elements deriving from Gst::AudioFilter may use gst_audio_filter_class_add_pad_templates() from their base_init function to easily configure the set of caps/formats that the element is able to handle.

Derived classes should override the Gst::AudioFilter::setup_vfunc() and Gst::BaseTransform::transform_ip_vfunc() and/or Gst::BaseTransform::transform_vfunc() virtual functions.

Last reviewed on 2016-04-23 (1.8.0).

Constructor & Destructor Documentation

◆ AudioFilter()

Gst::AudioFilter::AudioFilter ( AudioFilter && src)
noexcept

◆ ~AudioFilter()

Gst::AudioFilter::~AudioFilter ( )
overridenoexcept

Member Function Documentation

◆ get_type()

GType Gst::AudioFilter::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ gobj() [1/2]

GstAudioFilter * Gst::AudioFilter::gobj ( )
inline

Provides access to the underlying C GObject.

◆ gobj() [2/2]

const GstAudioFilter * Gst::AudioFilter::gobj ( ) const
inline

Provides access to the underlying C GObject.

◆ gobj_copy()

GstAudioFilter * Gst::AudioFilter::gobj_copy ( )

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

◆ operator=()

AudioFilter& Gst::AudioFilter::operator= ( AudioFilter&& src)
noexcept

◆ setup_vfunc()

virtual bool Gst::AudioFilter::setup_vfunc ( const Gst::AudioInfo& info)
virtual

Virtual function, called whenever the format changes.

◆ wrap()

Glib::RefPtr< Gst::AudioFilter > wrap ( GstAudioFilter * object,
bool take_copy = false )
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.