mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-25 16:48:11 +00:00
va: decoder: Group decoder methods.
Move up gst_va_decoder_get_config() to group decoders function in the same file area. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2417>
This commit is contained in:
parent
ea8b372ceb
commit
b45754b478
2 changed files with 28 additions and 27 deletions
|
@ -716,6 +716,29 @@ gst_va_decoder_config_is_equal (GstVaDecoder * self, VAProfile new_profile,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gst_va_decoder_get_config (GstVaDecoder * self, VAProfile * profile,
|
||||||
|
guint * rt_format, gint * width, gint * height)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GST_IS_VA_DECODER (self), FALSE);
|
||||||
|
|
||||||
|
if (!gst_va_decoder_is_open (self))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
GST_OBJECT_LOCK (self);
|
||||||
|
if (profile)
|
||||||
|
*profile = self->profile;
|
||||||
|
if (rt_format)
|
||||||
|
*rt_format = self->rt_format;
|
||||||
|
if (width)
|
||||||
|
*width = self->coded_width;
|
||||||
|
if (height)
|
||||||
|
*height = self->coded_height;
|
||||||
|
GST_OBJECT_UNLOCK (self);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_destroy_buffers (GstVaDecodePicture * pic)
|
_destroy_buffers (GstVaDecodePicture * pic)
|
||||||
{
|
{
|
||||||
|
@ -824,24 +847,3 @@ gst_va_decode_picture_dup (GstVaDecodePicture * pic)
|
||||||
dup->gstbuffer = gst_buffer_ref (pic->gstbuffer);
|
dup->gstbuffer = gst_buffer_ref (pic->gstbuffer);
|
||||||
return dup;
|
return dup;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_va_decoder_get_config (GstVaDecoder * decoder, VAProfile * profile,
|
|
||||||
guint * rt_format, gint * width, gint * height)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (decoder, FALSE);
|
|
||||||
|
|
||||||
if (!gst_va_decoder_is_open (decoder))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
if (profile)
|
|
||||||
*profile = decoder->profile;
|
|
||||||
if (rt_format)
|
|
||||||
*rt_format = decoder->rt_format;
|
|
||||||
if (width)
|
|
||||||
*width = decoder->coded_width;
|
|
||||||
if (height)
|
|
||||||
*height = decoder->coded_height;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
|
@ -91,6 +91,11 @@ gboolean gst_va_decoder_config_is_equal (GstVaDecoder * decode
|
||||||
guint new_rtformat,
|
guint new_rtformat,
|
||||||
gint new_width,
|
gint new_width,
|
||||||
gint new_height);
|
gint new_height);
|
||||||
|
gboolean gst_va_decoder_get_config (GstVaDecoder * decoder,
|
||||||
|
VAProfile * profile,
|
||||||
|
guint * rt_format,
|
||||||
|
gint * width,
|
||||||
|
gint * height);
|
||||||
|
|
||||||
GstVaDecodePicture * gst_va_decode_picture_new (GstVaDecoder * self,
|
GstVaDecodePicture * gst_va_decode_picture_new (GstVaDecoder * self,
|
||||||
GstBuffer * buffer);
|
GstBuffer * buffer);
|
||||||
|
@ -99,10 +104,4 @@ VASurfaceID gst_va_decode_picture_get_aux_surface (GstVaDecodePicture
|
||||||
void gst_va_decode_picture_free (GstVaDecodePicture * pic);
|
void gst_va_decode_picture_free (GstVaDecodePicture * pic);
|
||||||
GstVaDecodePicture * gst_va_decode_picture_dup (GstVaDecodePicture * pic);
|
GstVaDecodePicture * gst_va_decode_picture_dup (GstVaDecodePicture * pic);
|
||||||
|
|
||||||
gboolean gst_va_decoder_get_config (GstVaDecoder * decoder,
|
|
||||||
VAProfile * profile,
|
|
||||||
guint * rt_format,
|
|
||||||
gint * width,
|
|
||||||
gint * height);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
Loading…
Reference in a new issue