#include <basetransform.h>
Public Member Functions | |
virtual | ~BaseTransform () |
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 () |
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 () |
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 () |
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, ClockTimeDiff diff, 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 | lock () |
Obtain a lock to protect the transform function from concurrent access. | |
void | unlock () |
Release the lock that protects the transform function from concurrent access. | |
Glib::RefPtr<Gst::Pad> | get_sink_pad () const |
Gives the refptr to the sink Gst::Pad object of the element. | |
Glib::RefPtr<Gst::Pad> | get_src_pad () const |
Gives the refptr to the source Gst::Pad object of the element. | |
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::Caps> | transform_caps_vfunc (PadDirection direction, const Glib::RefPtr<Gst::Caps>& caps) |
Optional. | |
virtual void | fixate_caps_vfunc (PadDirection direction, const Glib::RefPtr<Gst::Caps>& caps, const Glib::RefPtr<Gst::Caps>& othercaps) |
Optional. | |
virtual FlowReturn | transform_vfunc (const Glib::RefPtr<Gst::Buffer>& inbuf, const Glib::RefPtr<Gst::Buffer>& outbuf) |
Optional. | |
virtual FlowReturn | transform_ip_vfunc (const Glib::RefPtr<Gst::Buffer>& buf) |
Required if the element operates in-place. | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr<Gst::BaseTransform> | wrap (GstBaseTransform* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
This base class is for filter elements that process data.
It provides for:
Sub-class settable flags on Gst::BaseTransform
virtual Gst::BaseTransform::~BaseTransform | ( | ) | [virtual] |
virtual void Gst::BaseTransform::fixate_caps_vfunc | ( | PadDirection | direction, | |
const Glib::RefPtr<Gst::Caps>& | caps, | |||
const Glib::RefPtr<Gst::Caps>& | othercaps | |||
) | [virtual] |
Optional.
Given the pad in this direction and the given caps, fixate the caps on the other pad.
Glib::RefPtr<Gst::Pad> Gst::BaseTransform::get_sink_pad | ( | ) | const |
Gives the refptr to the sink Gst::Pad object of the element.
Glib::RefPtr<Gst::Pad> Gst::BaseTransform::get_src_pad | ( | ) | const |
Gives the refptr to the source Gst::Pad object of the element.
const GstBaseTransform* Gst::BaseTransform::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
Reimplemented from Gst::Element.
Reimplemented in Gst::CapsFilter, Gst::Identity, GstBase::AudioConvert, GstBase::AudioFilter, GstBase::AudioResample, GstBase::FfmpegColorSpace, GstBase::VideoScale, and GstBase::Volume.
GstBaseTransform* Gst::BaseTransform::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
Reimplemented from Gst::Element.
Reimplemented in Gst::CapsFilter, Gst::Identity, GstBase::AudioConvert, GstBase::AudioFilter, GstBase::AudioResample, GstBase::FfmpegColorSpace, GstBase::VideoScale, and GstBase::Volume.
GstBaseTransform* Gst::BaseTransform::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Reimplemented from Gst::Element.
Reimplemented in Gst::CapsFilter, Gst::Identity, GstBase::AudioConvert, GstBase::AudioFilter, GstBase::AudioResample, GstBase::FfmpegColorSpace, GstBase::VideoScale, and GstBase::Volume.
bool Gst::BaseTransform::is_in_place | ( | ) |
See if trans is configured as a in_place transform.
true
is the transform is configured in in_place mode.bool Gst::BaseTransform::is_passthrough | ( | ) |
See if trans is configured as a passthrough transform.
true
is the transform is configured in passthrough mode.bool Gst::BaseTransform::is_qos_enabled | ( | ) |
Queries if the transform will handle QoS.
true
if QoS is enabled.Since: 0.10.5.
void Gst::BaseTransform::lock | ( | ) |
Obtain a lock to protect the transform function from concurrent access.
Glib::PropertyProxy_ReadOnly<bool> Gst::BaseTransform::property_qos | ( | ) | const |
Handle Quality-of-Service events.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<bool> Gst::BaseTransform::property_qos | ( | ) |
Handle Quality-of-Service events.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
void Gst::BaseTransform::set_gap_aware | ( | bool | gap_aware | ) |
If gap_aware is false
(the default), output buffers will have the Gst::BUFFER_FLAG_GAP flag unset.
If set to true
, the element must handle output buffers with this flag set correctly, i.e. it can assume that the buffer contains neutral data but must unset the flag if the output is no neutral data.
MT safe.
Since: 0.10.16
gap_aware | New state. |
void Gst::BaseTransform::set_in_place | ( | bool | in_place | ) |
Determines whether a non-writable buffer will be copied before passing to the transform_ip function.
<itemizedlist> <listitem>Always true
if no transform function is implemented.</listitem> <listitem>Always false
if ONLY transform function is implemented.</listitem> </itemizedlist>
MT safe.
in_place | Boolean value indicating that we would like to operate on in_place buffers. |
void Gst::BaseTransform::set_passthrough | ( | bool | passthrough | ) |
Set passthrough mode for this filter by default.
This is mostly useful for filters that do not care about negotiation.
Always true
for filters which don't implement either a transform or transform_ip method.
MT safe.
passthrough | Boolean indicating passthrough mode. |
void Gst::BaseTransform::set_qos_enabled | ( | bool | enabled | ) |
Enable or disable QoS handling in the transform.
MT safe.
Since: 0.10.5
enabled | New state. |
virtual Glib::RefPtr<Gst::Caps> Gst::BaseTransform::transform_caps_vfunc | ( | PadDirection | direction, | |
const Glib::RefPtr<Gst::Caps>& | caps | |||
) | [virtual] |
Optional.
Given the pad in this direction and the given caps, what caps are allowed on the other pad in this element ?
virtual FlowReturn Gst::BaseTransform::transform_ip_vfunc | ( | const Glib::RefPtr<Gst::Buffer>& | buf | ) | [virtual] |
Required if the element operates in-place.
Transform the incoming buffer in-place.
virtual FlowReturn Gst::BaseTransform::transform_vfunc | ( | const Glib::RefPtr<Gst::Buffer>& | inbuf, | |
const Glib::RefPtr<Gst::Buffer>& | outbuf | |||
) | [virtual] |
Optional.
Given the size of a buffer in the given direction with the given caps, calculate the size in bytes of a buffer on the other pad with the given other caps. The default implementation uses get_unit_size_vfunc() and keeps the number of units the same. Required if the transform is not in-place. Get the size in bytes of one unit for the given caps. Allows the subclass to be notified of the actual caps set. Optional. Called when the element starts processing. Allows opening external resources. Optional. Called when the element stops processing. Allows closing external resources. Optional. Event handler on the sink pad. This function should return TRUE if the base class should forward the event. Required if the element does not operate in-place. Transforms one incoming buffer to one outgoing buffer. The function is allowed to change size/timestamp/duration of the outgoing buffer.
void Gst::BaseTransform::unlock | ( | ) |
Release the lock that protects the transform function from concurrent access.
void Gst::BaseTransform::update_qos | ( | double | proportion, | |
ClockTimeDiff | diff, | |||
ClockTime | timestamp | |||
) |
Set the QoS parameters in the transform.
This function is called internally when a QOS event is received but subclasses can provide custom information when needed.
MT safe.
Since: 0.10.5
proportion | The proportion. | |
diff | The diff against the clock. | |
timestamp | The timestamp of the buffer generating the QoS expressed in running_time. |
Glib::RefPtr<Gst::BaseTransform> wrap | ( | GstBaseTransform * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. | |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |