[Bug 767176] vaapiencode: implement flush() vmethod

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jul 5 17:45:17 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=767176

Víctor Manuel Jáquez Leal <vjaquez at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #330413|none                        |needs-work
             status|                            |

--- Comment #32 from Víctor Manuel Jáquez Leal <vjaquez at igalia.com> ---
Review of attachment 330413:
 --> (https://bugzilla.gnome.org/review?bug=767176&attachment=330413)

I've been playing with this patch for a while. I suspect it can be simplified.
The trick is to recognize that it is necessary to reset the VA encoder, as
Hyunjun discovered.

::: gst/vaapi/gstvaapiencode.c
@@ +404,3 @@
   g_return_val_if_fail (klass->alloc_encoder, FALSE);

+  if (encode->encoder && !gst_vaapiencode_reset (encode))

NAK.

The purpose of ensure_encode() is to create the encoder *if* it doesn't exist.
But it *shall not* destroy it if there's already one. It would be semantically
incorrect.

@@ +455,3 @@
+{
+  gst_vaapi_encoder_replace (&encode->encoder, NULL);
+  gst_vaapi_plugin_base_close (GST_VAAPI_PLUGIN_BASE (encode));

In my opinion there is no need to "close" the plugin. To close the plugin means
to destroy the buffer pools, allocators, caps configuration, etc. And we don't
want that, we only need to "reset" (the replace to NULL) the encoder.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list