## proxysrc proxysrc |

## Properties

GstProxySink * | proxysink | Read / Write

## Types and Values

struct | GstProxySrc

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstBin
                        ╰── GstProxySrc

## Implemented Interfaces

GstProxySrc implements GstChildProxy.

## Description

Proxysrc is a source element that proxies events, queries, and buffers from another pipeline that contains a matching proxysink element. The purpose is to allow two decoupled pipelines to function as though they are one without having to manually shuttle buffers, events, queries, etc between the two.

The element queues buffers from the matching proxysink to an internal queue, so everything downstream is properly decoupled from the upstream pipeline. However, the queue may get filled up if the downstream pipeline does not accept buffers quickly enough; perhaps because it is not yet PLAYING.

#### Usage

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    GstElement *pipe1, *pipe2, *psink, *psrc;
    GstClock *clock;

    pipe1 = gst_parse_launch ("audiotestsrc ! proxysink name=psink", NULL);
    psink = gst_bin_get_by_name (GST_BIN (pipe1), "psink");

    pipe2 = gst_parse_launch ("proxysrc name=psrc ! autoaudiosink", NULL);
    psrc = gst_bin_get_by_name (GST_BIN (pipe2), "psrc");

    // Connect the two pipelines
    g_object_set (psrc, "proxysink", psink, NULL);

    // Both pipelines must agree on the timing information or we'll get glitches
    // or overruns/underruns. Ideally, we should tell pipe1 to use the same clock
    // as pipe2, but since that will be set asynchronously to the audio clock, it
    // is simpler and likely accurate enough to use the system clock for both
    // pipelines. If no element in either pipeline will provide a clock, this
    // is not needed.
    clock = gst_system_clock_obtain ();
    gst_pipeline_use_clock (GST_PIPELINE (pipe1), clock);
    gst_pipeline_use_clock (GST_PIPELINE (pipe2), clock);
    g_object_unref (clock);

    // This is not really needed in this case since the pipelines are created and
    // started at the same time. However, an application that dynamically
    // generates pipelines must ensure that all the pipelines that will be
    // connected together share the same base time.
    gst_element_set_base_time (pipe1, 0);
    gst_element_set_base_time (pipe2, 0);

    gst_element_set_state (pipe1, GST_STATE_PLAYING);
    gst_element_set_state (pipe2, GST_STATE_PLAYING);

## Synopsis

### Element Information

plugin | proxy
author | Sebastian Dröge <sebastian@centricular.com>
class | Source

### Element Pads

name | src
direction | source
presence | always
details | ANY

## Functions

## Types and Values

### struct GstProxySrc

    struct GstProxySrc;

## Property Details

### The `“proxysink”` property

      “proxysink”                GstProxySink *

Matching proxysink.

Flags: Read / Write