• Wim Taymans's avatar
    pad: change the semantics of get/pull_range a little · db1318ab
    Wim Taymans authored
    Make it so that one can specify a buffer for get/pull_range where the downstream
    element should write into. When passing NULL, upstream should allocate a buffer,
    like in 0.10.
    We also need to change the probes a little because before the pull probe, there
    could already be a buffer passed. This then allows us to use the same PROBE
    macro for before and after pulling.
    While we're at the probes, make the query probe more powerful by handling the
    GST_PAD_PROBE_DROP return value. Returning _DROP from a query probe will now
    return TRUE upstream and will not forward the probe to the peer or handler.
    Also handle _DROP for get/pull_range properly by not dispatching to the
    peer/handler or by generating EOS when the probe returns DROP and no buffer.
    Make filesrc handle the non-NULL buffer passed in the get_range function and
    skip the allocation in that case, writing directly into the downstream provided
    Update tests because now we need to make sure to not pass a random value in the
    buffer pointer to get/pull_range
gstpad.h 39.8 KB