summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurélien Zanelli <aurelien.zanelli@parrot.com>2016-06-21 11:43:13 +0200
committerSebastian Dröge <sebastian@centricular.com>2016-06-21 15:02:02 +0300
commitd07aa49943887f4c57c2448dda1b91a9c1eff598 (patch)
treecfaeaf00d3ab4a081f3be8d19d83c16b78d8cc87
parent0c265c1e0eed04107dcd9cbb3374fa0a9b17db8e (diff)
omxaudioenc: 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/gstomxaudioenc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/omx/gstomxaudioenc.c b/omx/gstomxaudioenc.c
index 3791279..3b098d8 100644
--- a/omx/gstomxaudioenc.c
+++ b/omx/gstomxaudioenc.c
@@ -55,13 +55,15 @@ enum
};
/* class initialization */
-
-#define DEBUG_INIT \
+#define do_init \
+{ \
GST_DEBUG_CATEGORY_INIT (gst_omx_audio_enc_debug_category, "omxaudioenc", 0, \
- "debug category for gst-omx audio encoder base class");
+ "debug category for gst-omx audio encoder base class"); \
+ G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET, NULL); \
+}
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstOMXAudioEnc, gst_omx_audio_enc,
- GST_TYPE_AUDIO_ENCODER, DEBUG_INIT);
+ GST_TYPE_AUDIO_ENCODER, do_init);
static void
gst_omx_audio_enc_class_init (GstOMXAudioEncClass * klass)