## RBPlayerGstFilter

RBPlayerGstFilter — player interface for inserting filter elements

## Functions

gboolean | rb_player_gst_filter_add_filter ()
gboolean | rb_player_gst_filter_remove_filter ()

## Signals

void | filter-inserted | No Recursion
void | filter-pre-remove | No Recursion

## Types and Values

| RBPlayerGstFilter
struct | RBPlayerGstFilterIface

## Object Hierarchy

        GInterface
        ╰── RBPlayerGstFilter

## Includes

    #include <rb-player-gst-filter.h>

## Description

This interface allows a caller to add filter elements to the GStreamer playback pipeline.

## Functions

### rb_player_gst_filter_add_filter ()

    gboolean
    rb_player_gst_filter_add_filter (RBPlayerGstFilter *player,
                                     GstElement *element);

Adds a new filter to the playback pipeline. The filter may not be inserted immediately. The 'filter-inserted' signal will be emitted when this actually happens.

#### Parameters

player | RBPlayerGstFilter implementation |
element | new filter element (or bin) to add |

#### Returns

TRUE if the filter will be added

### rb_player_gst_filter_remove_filter ()

    gboolean
    rb_player_gst_filter_remove_filter (RBPlayerGstFilter *player,
                                        GstElement *element);

Removes a filter from the playback pipeline. The filter may not be removed immediately. The 'filter-pre-remove' signal will be emitted immediately before this actually happens.

#### Parameters

player | RBPlayerGstFilter implementation |
element | the filter element (or bin) to remove |

#### Returns

TRUE if the filter was found and will be removed

## Types and Values

### RBPlayerGstFilter

    typedef struct _RBPlayerGstFilter RBPlayerGstFilter;

### struct RBPlayerGstFilterIface

    struct RBPlayerGstFilterIface {
    	GTypeInterface g_iface;

    	/* virtual functions */
    	gboolean (*add_filter)		(RBPlayerGstFilter *player, GstElement *element);
    	gboolean (*remove_filter) (RBPlayerGstFilter *player, GstElement *element);

    	/* signals */
    	void		(*filter_inserted) (RBPlayerGstFilter *player, GstElement *filter);
    	void		(*filter_pre_remove) (RBPlayerGstFilter *player, GstElement *filter);
    };

## Signal Details

### The `“filter-inserted”` signal

    void
    user_function (RBPlayerGstFilter *player,
                   GObject           *filter,
                   gpointer           user_data)

The 'filter-inserted' signal is emitted when the tee element has been inserted into the pipeline and fully linked

#### Parameters

player | the RBPlayerGstFilter implementation |
filter | the element which has been inserted |
user_data | user data set when the signal handler was connected. |

Flags: No Recursion

### The `“filter-pre-remove”` signal

    void
    user_function (RBPlayerGstFilter *player,
                   GObject           *filter,
                   gpointer           user_data)

The 'filter-pre-remove' signal is emitted immediately before the element is unlinked and removed from the pipeline

#### Parameters

player | the RBPlayerGstFilter implementation |
filter | the element which is about to be removed |
user_data | user data set when the signal handler was connected. |

Flags: No Recursion