1 /* GStreamer ReplayGain volume adjustment 2 * 3 * Copyright (C) 2007 Rene Stadler <mail@renestadler.de> 4 * 5 * gstrgvolume.h: Element to apply ReplayGain volume adjustment 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_VOLUME_H__ 24 #define __GST_RG_VOLUME_H__ 25 26 #include <gst/gst.h> 27 28 G_BEGIN_DECLS 29 30 #define GST_TYPE_RG_VOLUME \ 31 (gst_rg_volume_get_type()) 32 #define GST_RG_VOLUME(obj) \ 33 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RG_VOLUME,GstRgVolume)) 34 #define GST_RG_VOLUME_CLASS(klass) \ 35 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RG_VOLUME,GstRgVolumeClass)) 36 #define GST_IS_RG_VOLUME(obj) \ 37 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RG_VOLUME)) 38 #define GST_IS_RG_VOLUME_CLASS(klass) \ 39 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RG_VOLUME)) 40 41 typedef struct _GstRgVolume GstRgVolume; 42 typedef struct _GstRgVolumeClass GstRgVolumeClass; 43 44 /** 45 * GstRgVolume: 46 * 47 * Opaque data structure. 48 */ 49 struct _GstRgVolume 50 { 51 GstBin bin; 52 53 /*< private >*/ 54 55 GstElement *volume_element; 56 gdouble max_volume; 57 58 gboolean album_mode; 59 gdouble headroom; 60 gdouble pre_amp; 61 gdouble fallback_gain; 62 63 gdouble target_gain; 64 gdouble result_gain; 65 66 gdouble track_gain; 67 gdouble track_peak; 68 gdouble album_gain; 69 gdouble album_peak; 70 71 gboolean has_track_gain; 72 gboolean has_track_peak; 73 gboolean has_album_gain; 74 gboolean has_album_peak; 75 76 gdouble reference_level; 77 }; 78 79 struct _GstRgVolumeClass 80 { 81 GstBinClass parent_class; 82 }; 83 84 GType gst_rg_volume_get_type (void); 85 86 GST_ELEMENT_REGISTER_DECLARE (rgvolume); 87 88 G_END_DECLS 89 90 #endif /* __GST_RG_VOLUME_H__ */ 91