mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
vaencoder: Add gst_va_encoder_get_reconstruct_pool_config()
This method will return the caps configured in the reconstruct buffer pool, and its maxium number of buffers to allocate. The caps are needed later to know if the internal encoder has to be reopened if the stream properties change. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2466>
This commit is contained in:
parent
ded3e7c81a
commit
38f1a4ee3d
2 changed files with 25 additions and 0 deletions
|
@ -534,6 +534,28 @@ gst_va_encoder_new (GstVaDisplay * display, guint32 codec,
|
|||
return self;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_va_encoder_get_reconstruct_pool_config (GstVaEncoder * self,
|
||||
GstCaps ** caps, guint * max_surfaces)
|
||||
{
|
||||
GstStructure *config;
|
||||
gboolean ret;
|
||||
|
||||
g_return_val_if_fail (GST_IS_VA_ENCODER (self), FALSE);
|
||||
|
||||
if (!gst_va_encoder_is_open (self))
|
||||
return FALSE;
|
||||
|
||||
if (!self->recon_pool)
|
||||
return FALSE;
|
||||
|
||||
config = gst_buffer_pool_get_config (self->recon_pool);
|
||||
ret = gst_buffer_pool_config_get_params (config, caps, NULL, NULL,
|
||||
max_surfaces);
|
||||
gst_structure_free (config);
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_va_encoder_has_profile (GstVaEncoder * self, VAProfile profile)
|
||||
{
|
||||
|
|
|
@ -56,6 +56,9 @@ gboolean gst_va_encoder_open (GstVaEncoder * self,
|
|||
guint rc_ctrl,
|
||||
guint32 packed_headers);
|
||||
gboolean gst_va_encoder_close (GstVaEncoder * self);
|
||||
gboolean gst_va_encoder_get_reconstruct_pool_config (GstVaEncoder * self,
|
||||
GstCaps ** caps,
|
||||
guint * max_surfaces);
|
||||
gboolean gst_va_encoder_has_profile (GstVaEncoder * self,
|
||||
VAProfile profile);
|
||||
gint gst_va_encoder_get_max_slice_num (GstVaEncoder * self,
|
||||
|
|
Loading…
Reference in a new issue