From f3def77907d46d8c253ff800fc874849404da92b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 14 Feb 2006 18:52:52 +0000 Subject: [PATCH] gst/audioconvert/plugin.c: Register the GstAudioChannelPosition enum type with the type system in the plugin_init fun... Original commit message from CVS: * gst/audioconvert/plugin.c: (plugin_init): Register the GstAudioChannelPosition enum type with the type system in the plugin_init function, so that it is known before any element actually makes use of multi-channel stuff. This is required for example if one wants to be able to deserialise/use a caps string with channel positions before any pipeline has been setup and started, like with gst-launch. --- ChangeLog | 10 ++++++++++ gst/audioconvert/plugin.c | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index ce2824882d..e3417f5406 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-02-14 Tim-Philipp Müller + + * gst/audioconvert/plugin.c: (plugin_init): + Register the GstAudioChannelPosition enum type with the type + system in the plugin_init function, so that it is known before + any element actually makes use of multi-channel stuff. This is + required for example if one wants to be able to deserialise/use + a caps string with channel positions before any pipeline has + been setup and started, like with gst-launch. + 2006-02-14 Wim Taymans * gst-libs/gst/audio/gstringbuffer.c: diff --git a/gst/audioconvert/plugin.c b/gst/audioconvert/plugin.c index 0452ac3d4a..643737a8ad 100644 --- a/gst/audioconvert/plugin.c +++ b/gst/audioconvert/plugin.c @@ -25,9 +25,15 @@ #include "plugin.h" +#include + static gboolean plugin_init (GstPlugin * plugin) { + /* ensure GstAudioChannelPosition type is registered */ + if (!gst_audio_channel_position_get_type ()) + return FALSE; + if (!gst_element_register (plugin, "audioconvert", GST_RANK_PRIMARY, gst_audio_convert_get_type ())) return FALSE;