Gjsify LogoGjsify Logo

Hierarchy

  • PadBufferAllocFunction

Callable

  • Ask the sinkpad pad to allocate a buffer with offset, size and caps. The result will be stored in buf. The purpose of this function is to allocate a buffer that is optimal to be processed by pad. The function is mostly overridden by elements that can provide a hardware buffer in order to avoid additional memcpy operations. The function can return a buffer that has caps different from the requested new caps. If a format change was requested, the returned buffer will be one to hold the data of said new caps, so its size might be different from the requested When this function returns anything else than #GST_FLOW_OK, the buffer allocation failed and buf does not contain valid data. If the function returns #GST_FLOW_OK and the buf is NULL, a #GstBuffer will be created with caps, offset and size. By default this function returns a new buffer of size and with caps containing purely malloced data. The buffer should be freed with gst_buffer_unref() after usage. value means buf does not hold a valid buffer.

    Parameters

    • pad: Gst.Pad

      a sink #GstPad

    • offset: number

      the desired offset of the buffer

    • size: number

      the desired size of the buffer

    • caps: Gst.Caps

      the desired caps of the buffer

    • buf: Gst.Buffer

      pointer to hold the allocated buffer.

    Returns Gst.FlowReturn

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method