summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurélien Zanelli <aurelien.zanelli@parrot.com>2016-06-21 11:41:15 +0200
committerSebastian Dröge <sebastian@centricular.com>2016-06-21 15:02:02 +0300
commit0c265c1e0eed04107dcd9cbb3374fa0a9b17db8e (patch)
tree109f517b19ac0a4e509670cee83b23b46143426d
parenta78756c63fac10597e78e93d81767f385b920e81 (diff)
omxvideoenc: implement GstPreset interface
To allow user to use GstPreset to quickly save and load a set of parameters. https://bugzilla.gnome.org/show_bug.cgi?id=767907
-rw-r--r--omx/gstomxvideoenc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c
index b2a1f8e..bfad2f3 100644
--- a/omx/gstomxvideoenc.c
+++ b/omx/gstomxvideoenc.c
@@ -111,13 +111,15 @@ enum
#define GST_OMX_VIDEO_ENC_QUANT_B_FRAMES_DEFAULT (0xffffffff)
/* class initialization */
-
-#define DEBUG_INIT \
+#define do_init \
+{ \
GST_DEBUG_CATEGORY_INIT (gst_omx_video_enc_debug_category, "omxvideoenc", 0, \
- "debug category for gst-omx video encoder base class");
+ "debug category for gst-omx video encoder base class"); \
+ G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET, NULL); \
+}
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstOMXVideoEnc, gst_omx_video_enc,
- GST_TYPE_VIDEO_ENCODER, DEBUG_INIT);
+ GST_TYPE_VIDEO_ENCODER, do_init);
static void
gst_omx_video_enc_class_init (GstOMXVideoEncClass * klass)