GQueue ref_list;
GQueue output_list;
- guint preferred_output_delay;
/* H264 fields */
gint mb_width;
{
GstVaH264Enc *self = GST_VA_H264_ENC (encoder);
- /* TODO: how to poll and wait for the encoded buffer. */
- self->preferred_output_delay = 0;
-
/* Set the minimum pts to some huge value (1000 hours). This keeps
* the dts at the start of the stream from needing to be
* negative. */
if (ret != GST_FLOW_OK)
goto error_encode;
- while (g_queue_get_length (&self->output_list) >
- self->preferred_output_delay) {
+ while (g_queue_get_length (&self->output_list) > 0) {
frame_out = g_queue_pop_head (&self->output_list);
ret = _push_buffer_to_downstream (self, frame_out);
if (ret != GST_FLOW_OK)
if (!(allocator = _allocator_from_caps (self, caps)))
return FALSE;
- pool = gst_va_pool_new_with_config (caps,
- size, self->preferred_output_delay, 0, usage_hint, allocator, ¶ms);
+ pool = gst_va_pool_new_with_config (caps, size, 1, 0, usage_hint, allocator,
+ ¶ms);
if (!pool) {
gst_object_unref (allocator);
goto config_failed;
}
gst_query_add_allocation_param (query, allocator, ¶ms);
- gst_query_add_allocation_pool (query, pool, size,
- self->preferred_output_delay, 0);
+ gst_query_add_allocation_pool (query, pool, size, 0, 0);
GST_DEBUG_OBJECT (self,
"proposing %" GST_PTR_FORMAT " with allocator %" GST_PTR_FORMAT,
return FALSE;
}
- reconstruct_buffer_num = self->gop.num_ref_frames
- + self->preferred_output_delay + 3 /* scratch frames */ ;
+ reconstruct_buffer_num = self->gop.num_ref_frames + 3 /* scratch frames */ ;
if (!gst_va_encoder_open (self->encoder, self->profile, self->entrypoint,
GST_VIDEO_INFO_FORMAT (&self->in_info), self->rt_format,
self->mb_width * 16, self->mb_height * 16, self->codedbuf_size,