}
}
+/* FIXME: remove these if we don't actually go for deep alloc positions */
+void
+gst_audio_info_init (GstAudioInfo * info)
+{
+ memset (info, 0, sizeof (GstAudioInfo));
+}
+
+void
+gst_audio_info_clear (GstAudioInfo * info)
+{
+ memset (info, 0, sizeof (GstAudioInfo));
+}
+
+GstAudioInfo *
+gst_audio_info_copy (GstAudioInfo * info)
+{
+ return (GstAudioInfo *) g_slice_copy (sizeof (GstAudioInfo), info);
+}
+
+void
+gst_audio_info_free (GstAudioInfo * info)
+{
+ g_slice_free (GstAudioInfo, info);
+}
+
static void
gst_audio_info_set_format (GstAudioInfo * info, GstAudioFormat format,
gint rate, gint channels)
#define GST_AUDIO_INFO_BPF(info) ((info)->bpf)
#define GST_AUDIO_INFO_POSITION(info,c) ((info)->position[c])
-#if 0
-void gst_audio_info_init (GstAudioInfo *info);
-void gst_audio_info_set_format (GstAudioInfo *info, GstAudioFormat format,
- gint rate, gint channels);
-#endif
-/* FIXME: need alloc/free for GstAudioInfo */
-gboolean gst_audio_info_from_caps (GstAudioInfo *info, const GstCaps *caps);
-GstCaps * gst_audio_info_to_caps (GstAudioInfo *info);
+void gst_audio_info_init (GstAudioInfo * info);
+void gst_audio_info_clear (GstAudioInfo * info);
+
+GstAudioInfo * gst_audio_info_copy (GstAudioInfo * info);
+void gst_audio_info_free (GstAudioInfo * info);
+
+gboolean gst_audio_info_from_caps (GstAudioInfo * info, const GstCaps * caps);
+GstCaps * gst_audio_info_to_caps (GstAudioInfo * info);
-gboolean gst_audio_info_convert (GstAudioInfo * info,
- GstFormat src_fmt, gint64 src_val,
+gboolean gst_audio_info_convert (GstAudioInfo * info,
+ GstFormat src_fmt, gint64 src_val,
GstFormat dest_fmt, gint64 * dest_val);
/* For people that are looking at this source: the purpose of these defines is