Skip to content

videoencoder: Allocate output bitstreams from bufferpool

Implement allocation of output bitstreams from a GstBufferPool. Subclass can configure the buffer pool buffer_size, min_buffers and max_buffers options by implementing the decide_allocation virtual method.

  • gst_video_encoder_allocate_output_buffer(encoder, size) and gst_video_encoder_allocate_output_frame(encoder, frame, size) will try to acquire a buffer from the buffer pool. If an error occured or if the acquired buffer size is less than size, a fresh buffer will be created with gst_buffer_new_allocate as fallback
  • gst_video_encoder_allocate_output_frame_with_params was added. It does the same as gst_video_encoder_allocate_output_frame except it allows passing GstBufferPoolAcquireParams to the sub call gst_buffer_pool_acquire_buffer
Edited by Adrien De Coninck

Merge request reports