GstBaseTransform: GStreamer 1.0 Library Reference Manual

## GstBaseTransform GstBaseTransform |

## Functions

gboolean | gst_base_transform_is_passthrough ()
void | gst_base_transform_set_passthrough ()
void | gst_base_transform_set_prefer_passthrough ()
gboolean | gst_base_transform_is_in_place ()
void | gst_base_transform_set_in_place ()
gboolean | gst_base_transform_is_qos_enabled ()
void | gst_base_transform_set_qos_enabled ()
void | gst_base_transform_update_qos ()
void | gst_base_transform_set_gap_aware ()
void | gst_base_transform_get_allocator ()
GstBufferPool * | gst_base_transform_get_buffer_pool ()
void | gst_base_transform_reconfigure_sink ()
void | gst_base_transform_reconfigure_src ()
gboolean | gst_base_transform_update_src_caps ()
#define | GST_BASE_TRANSFORM_SINK_PAD()
#define | GST_BASE_TRANSFORM_SRC_PAD()

## Properties

gboolean | qos | Read / Write

## Types and Values

struct | GstBaseTransform
struct | GstBaseTransformClass
#define | GST_BASE_TRANSFORM_SINK_NAME
#define | GST_BASE_TRANSFORM_SRC_NAME
#define | GST_BASE_TRANSFORM_FLOW_DROPPED

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstBaseTransform

## Includes

    #include <gst/base/gstbasetransform.h>

## Description

## Functions

### gst_base_transform_is_passthrough ()

    gboolean
    gst_base_transform_is_passthrough (GstBaseTransform *trans);

### gst_base_transform_set_passthrough ()

    void
    gst_base_transform_set_passthrough (GstBaseTransform *trans,
                                        gboolean passthrough);

### gst_base_transform_set_prefer_passthrough ()

    void
    gst_base_transform_set_prefer_passthrough
                                   (GstBaseTransform *trans,
                                    gboolean prefer_passthrough);

### gst_base_transform_is_in_place ()

    gboolean
    gst_base_transform_is_in_place (GstBaseTransform *trans);

### gst_base_transform_set_in_place ()

    void
    gst_base_transform_set_in_place (GstBaseTransform *trans,
                                     gboolean in_place);

### gst_base_transform_is_qos_enabled ()

    gboolean
    gst_base_transform_is_qos_enabled (GstBaseTransform *trans);

### gst_base_transform_set_qos_enabled ()

    void
    gst_base_transform_set_qos_enabled (GstBaseTransform *trans,
                                        gboolean enabled);

### gst_base_transform_update_qos ()

    void
    gst_base_transform_update_qos (GstBaseTransform *trans,
                                   gdouble proportion,
                                   GstClockTimeDiff diff,
                                   GstClockTime timestamp);

### gst_base_transform_set_gap_aware ()

    void
    gst_base_transform_set_gap_aware (GstBaseTransform *trans,
                                      gboolean gap_aware);

### gst_base_transform_get_allocator ()

    void
    gst_base_transform_get_allocator (GstBaseTransform *trans,
                                      GstAllocator **allocator,
                                      GstAllocationParams *params);

### gst_base_transform_get_buffer_pool ()

    GstBufferPool *
    gst_base_transform_get_buffer_pool (GstBaseTransform *trans);

### gst_base_transform_reconfigure_sink ()

    void
    gst_base_transform_reconfigure_sink (GstBaseTransform *trans);

### gst_base_transform_reconfigure_src ()

    void
    gst_base_transform_reconfigure_src (GstBaseTransform *trans);

### gst_base_transform_update_src_caps ()

    gboolean
    gst_base_transform_update_src_caps (GstBaseTransform *trans,
                                        GstCaps *updated_caps);

### GST_BASE_TRANSFORM_SINK_PAD()

    #define GST_BASE_TRANSFORM_SINK_PAD(obj) (GST_BASE_TRANSFORM_CAST (obj)->sinkpad)

### GST_BASE_TRANSFORM_SRC_PAD()

    #define GST_BASE_TRANSFORM_SRC_PAD(obj)		(GST_BASE_TRANSFORM_CAST (obj)->srcpad)

## Types and Values

### struct GstBaseTransform

    struct GstBaseTransform;

### struct GstBaseTransformClass

    struct GstBaseTransformClass {
      GstElementClass parent_class;

      gboolean       passthrough_on_same_caps;
      gboolean       transform_ip_on_passthrough;

      /* virtual methods for subclasses */
      GstCaps* (*transform_caps) (GstBaseTransform *trans,
                                       GstPadDirection direction,
                                       GstCaps *caps, GstCaps *filter);
      GstCaps* (*fixate_caps)	  (GstBaseTransform *trans,
                                       GstPadDirection direction, GstCaps *caps,
                                       GstCaps *othercaps);
      gboolean      (*accept_caps)    (GstBaseTransform *trans, GstPadDirection direction,
                                       GstCaps *caps);
      gboolean      (*set_caps)       (GstBaseTransform *trans, GstCaps *incaps,
                                       GstCaps *outcaps);
      gboolean      (*query)          (GstBaseTransform *trans, GstPadDirection direction,
                                       GstQuery *query);

      /* decide allocation query for output buffers */
      gboolean      (*decide_allocation)  (GstBaseTransform *trans, GstQuery *query);
      gboolean      (*filter_meta)        (GstBaseTransform *trans, GstQuery *query,
                                           GType api, const GstStructure *params);

      /* propose allocation query parameters for input buffers */
      gboolean      (*propose_allocation) (GstBaseTransform *trans, GstQuery *decide_query,
                                           GstQuery *query);

      /* transform size */
      gboolean      (*transform_size) (GstBaseTransform *trans,
                                       GstPadDirection direction,
                                       GstCaps *caps, gsize size,
                                       GstCaps *othercaps, gsize *othersize);

      gboolean      (*get_unit_size)  (GstBaseTransform *trans, GstCaps *caps,
                                       gsize *size);

      /* states */
      gboolean      (*start)        (GstBaseTransform *trans);
      gboolean      (*stop)         (GstBaseTransform *trans);

      /* sink and src pad event handlers */
      gboolean      (*sink_event)   (GstBaseTransform *trans, GstEvent *event);
      gboolean      (*src_event)    (GstBaseTransform *trans, GstEvent *event);

      GstFlowReturn (*prepare_output_buffer) (GstBaseTransform * trans,
                                              GstBuffer *input, GstBuffer **outbuf);

      /* metadata */
      gboolean      (*copy_metadata)     (GstBaseTransform *trans, GstBuffer *input,
                                          GstBuffer *outbuf);
      gboolean      (*transform_meta)    (GstBaseTransform *trans, GstBuffer *outbuf,
                                          GstMeta *meta, GstBuffer *inbuf);

      void          (*before_transform)  (GstBaseTransform *trans, GstBuffer *buffer);

      /* transform */
      GstFlowReturn (*transform)    (GstBaseTransform *trans, GstBuffer *inbuf,
                                     GstBuffer *outbuf);
      GstFlowReturn (*transform_ip) (GstBaseTransform *trans, GstBuffer *buf);

      GstFlowReturn (*submit_input_buffer) (GstBaseTransform *trans, gboolean is_discont, GstBuffer *input);
      GstFlowReturn (*generate_output) (GstBaseTransform *trans, GstBuffer **outbuf);
    };

### GST_BASE_TRANSFORM_SINK_NAME

    #define GST_BASE_TRANSFORM_SINK_NAME "sink"

### GST_BASE_TRANSFORM_SRC_NAME

    #define GST_BASE_TRANSFORM_SRC_NAME "src"

### GST_BASE_TRANSFORM_FLOW_DROPPED

    #define GST_BASE_TRANSFORM_FLOW_DROPPED   GST_FLOW_CUSTOM_SUCCESS

## Property Details

### The `“qos”` property

      “qos”                      gboolean

Handle Quality-of-Service events.

Flags: Read / Write

Default value: FALSE