1 /* GStreamer ReplayGain analysis 2 * 3 * Copyright (C) 2006 Rene Stadler <mail@renestadler.de> 4 * 5 * gstrganalysis.h: Element that performs the ReplayGain analysis 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public License 9 * as published by the Free Software Foundation; either version 2.1 of 10 * the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, but 13 * WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 20 * 02110-1301 USA 21 */ 22 23 #ifndef __GST_RG_ANALYSIS_H__ 24 #define __GST_RG_ANALYSIS_H__ 25 26 #include <gst/gst.h> 27 #include <gst/base/gstbasetransform.h> 28 29 #include "rganalysis.h" 30 31 G_BEGIN_DECLS 32 33 #define GST_TYPE_RG_ANALYSIS \ 34 (gst_rg_analysis_get_type()) 35 #define GST_RG_ANALYSIS(obj) \ 36 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RG_ANALYSIS,GstRgAnalysis)) 37 #define GST_RG_ANALYSIS_CLASS(klass) \ 38 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RG_ANALYSIS,GstRgAnalysisClass)) 39 #define GST_IS_RG_ANALYSIS(obj) \ 40 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RG_ANALYSIS)) 41 #define GST_IS_RG_ANALYSIS_CLASS(klass) \ 42 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RG_ANALYSIS)) 43 typedef struct _GstRgAnalysis GstRgAnalysis; 44 typedef struct _GstRgAnalysisClass GstRgAnalysisClass; 45 46 /** 47 * GstRgAnalysis: 48 * 49 * Opaque data structure. 50 */ 51 struct _GstRgAnalysis 52 { 53 GstBaseTransform element; 54 55 /*< private >*/ 56 57 RgAnalysisCtx *ctx; 58 void (*analyze) (RgAnalysisCtx * ctx, gconstpointer data, gsize size, 59 guint depth); 60 gint depth; 61 62 /* Property values. */ 63 guint num_tracks; 64 gdouble reference_level; 65 gboolean forced; 66 gboolean message; 67 68 /* State machinery for skipping. */ 69 gboolean ignore_tags; 70 gboolean skip; 71 gboolean has_track_gain; 72 gboolean has_track_peak; 73 gboolean has_album_gain; 74 gboolean has_album_peak; 75 }; 76 77 struct _GstRgAnalysisClass 78 { 79 GstBaseTransformClass parent_class; 80 }; 81 82 GType gst_rg_analysis_get_type (void); 83 84 G_END_DECLS 85 86 #endif /* __GST_RG_ANALYSIS_H__ */ 87