mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-11 16:55:23 +00:00
plugins: encode: vp9: Implement vp9's allowed_profiles() func.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/188>
This commit is contained in:
parent
b86489eb8c
commit
35c3de234c
1 changed files with 12 additions and 1 deletions
|
@ -36,6 +36,7 @@
|
||||||
#include "gstcompat.h"
|
#include "gstcompat.h"
|
||||||
#include <gst/vaapi/gstvaapidisplay.h>
|
#include <gst/vaapi/gstvaapidisplay.h>
|
||||||
#include <gst/vaapi/gstvaapiencoder_vp9.h>
|
#include <gst/vaapi/gstvaapiencoder_vp9.h>
|
||||||
|
#include <gst/vaapi/gstvaapiutils_vpx.h>
|
||||||
#include "gstvaapiencode_vp9.h"
|
#include "gstvaapiencode_vp9.h"
|
||||||
#include "gstvaapipluginutil.h"
|
#include "gstvaapipluginutil.h"
|
||||||
#include "gstvaapivideomemory.h"
|
#include "gstvaapivideomemory.h"
|
||||||
|
@ -52,7 +53,8 @@ GST_DEBUG_CATEGORY_STATIC (gst_vaapi_vp9_encode_debug);
|
||||||
#define EXTRA_FORMATS {}
|
#define EXTRA_FORMATS {}
|
||||||
|
|
||||||
/* vp9 encode */
|
/* vp9 encode */
|
||||||
GST_VAAPI_ENCODE_REGISTER_TYPE (vp9, VP9, VP9, EXTRA_FORMATS, NULL);
|
GST_VAAPI_ENCODE_REGISTER_TYPE (vp9, VP9, VP9, EXTRA_FORMATS,
|
||||||
|
gst_vaapi_utils_vp9_get_profile_string);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_vaapiencode_vp9_init (GstVaapiEncodeVP9 * encode)
|
gst_vaapiencode_vp9_init (GstVaapiEncodeVP9 * encode)
|
||||||
|
@ -66,6 +68,14 @@ gst_vaapiencode_vp9_finalize (GObject * object)
|
||||||
G_OBJECT_CLASS (gst_vaapiencode_vp9_parent_class)->finalize (object);
|
G_OBJECT_CLASS (gst_vaapiencode_vp9_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GArray *
|
||||||
|
gst_vaapiencode_vp9_get_allowed_profiles (GstVaapiEncode * encode,
|
||||||
|
GstCaps * allowed)
|
||||||
|
{
|
||||||
|
return gst_vaapi_encoder_get_profiles_from_caps (allowed,
|
||||||
|
gst_vaapi_utils_vp9_get_profile_from_string);
|
||||||
|
}
|
||||||
|
|
||||||
static GstCaps *
|
static GstCaps *
|
||||||
gst_vaapiencode_vp9_get_caps (GstVaapiEncode * base_encode)
|
gst_vaapiencode_vp9_get_caps (GstVaapiEncode * base_encode)
|
||||||
{
|
{
|
||||||
|
@ -99,6 +109,7 @@ gst_vaapiencode_vp9_class_init (GstVaapiEncodeVP9Class * klass, gpointer data)
|
||||||
object_class->set_property = gst_vaapiencode_set_property_subclass;
|
object_class->set_property = gst_vaapiencode_set_property_subclass;
|
||||||
object_class->get_property = gst_vaapiencode_get_property_subclass;
|
object_class->get_property = gst_vaapiencode_get_property_subclass;
|
||||||
|
|
||||||
|
encode_class->get_allowed_profiles = gst_vaapiencode_vp9_get_allowed_profiles;
|
||||||
encode_class->get_caps = gst_vaapiencode_vp9_get_caps;
|
encode_class->get_caps = gst_vaapiencode_vp9_get_caps;
|
||||||
encode_class->alloc_encoder = gst_vaapiencode_vp9_alloc_encoder;
|
encode_class->alloc_encoder = gst_vaapiencode_vp9_alloc_encoder;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue