Function

GstAudio-1.0GstAudioaudio_buffer_clip

  • Clip the buffer to the given %GstSegment.

    After calling this function the caller does not own a reference to buffer anymore.

    Parameters

    • buffer: Gst.Buffer

      The buffer to clip.

    • segment: Segment

      Segment in Gst.Format.TIME or Gst.Format.DEFAULT to which the buffer should be clipped.

    • rate: number

      sample rate.

    • bpf: number

      size of one audio frame in bytes. This is the size of one sample * number of channels.

    Returns Gst.Buffer

    null if the buffer is completely outside the configured segment, otherwise the clipped buffer is returned. If the buffer has no timestamp, it is assumed to be inside the segment and is not clipped