1 /* GStreamer chromaprint audio fingerprinting element 2 * Copyright (C) 2006 M. Derezynski 3 * Copyright (C) 2008 Eric Buehl 4 * Copyright (C) 2008 Sebastian Dröge <slomo@circular-chaos.org> 5 * Copyright (C) 2011 Lukáš Lalinský <<user@hostname.org>> 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Library General Public 9 * License as published by the Free Software Foundation; either 10 * version 2 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Library General Public License for more details. 16 * 17 * You should have received a copy of the GNU Library General Public 18 * License along with this library; if not, write to the 19 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 20 * Boston, MA 02110-1301, USA. 21 */ 22 23 #ifndef __GST_CHROMAPRINT_H__ 24 #define __GST_CHROMAPRINT_H__ 25 26 #include <gst/gst.h> 27 #include <gst/base/gstadapter.h> 28 #include <gst/audio/gstaudiofilter.h> 29 #include <gst/audio/audio.h> 30 #include <chromaprint.h> 31 32 G_BEGIN_DECLS 33 34 #define GST_TYPE_CHROMAPRINT \ 35 (gst_chromaprint_get_type()) 36 #define GST_CHROMAPRINT(obj) \ 37 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CHROMAPRINT,GstChromaprint)) 38 #define GST_CHROMAPRINT_CLASS(klass) \ 39 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CHROMAPRINT,GstChromaprintClass)) 40 #define GST_IS_CHROMAPRINT(obj) \ 41 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CHROMAPRINT)) 42 #define GST_IS_CHROMAPRINT_CLASS(klass) \ 43 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CHROMAPRINT)) 44 45 #define GST_TAG_CHROMAPRINT_FINGERPRINT "chromaprint-fingerprint" 46 47 typedef struct _GstChromaprint GstChromaprint; 48 typedef struct _GstChromaprintClass GstChromaprintClass; 49 50 /** 51 * GstChromaprint: 52 * 53 * Opaque #GstChromaprint element structure 54 */ 55 struct _GstChromaprint 56 { 57 GstAudioFilter element; 58 59 /*< private >*/ 60 ChromaprintContext * context; 61 char * fingerprint; 62 gboolean record; 63 guint64 nsamples; 64 guint duration; 65 guint max_duration; 66 }; 67 68 struct _GstChromaprintClass 69 { 70 GstAudioFilterClass parent_class; 71 }; 72 73 GType gst_chromaprint_get_type (void); 74 75 GST_ELEMENT_REGISTER_DECLARE (chromaprint); 76 77 G_END_DECLS 78 79 #endif /* __GST_CHROMAPRINT_H__ */ 80