2 * Copyright (C) 1999 Erik Walthinsen <omega@cse.ogi.edu>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __GST_CD_PARANOIA_SRC_H__
21 #define __GST_CD_PARANOIA_SRC_H__
23 #include "gst/cdda/gstcddabasesrc.h"
30 /* on OSX the cdparanoia headers include IOKit framework headers (in particular
31 * SCSICmds_INQUIRY_Definitions.h) which define a structure that has a member
32 * named VERSION, so we must #undef VERSION here for things to compile on OSX */
33 static char GST_PLUGINS_BASE_VERSION[] = VERSION;
36 #ifdef CDPARANOIA_HEADERS_IN_DIR
37 #include <cdda/cdda_interface.h>
38 #include <cdda/cdda_paranoia.h>
40 #include <cdda_interface.h>
41 #include <cdda_paranoia.h>
44 #define GST_TYPE_CD_PARANOIA_SRC (gst_cd_paranoia_src_get_type())
45 #define GST_CD_PARANOIA_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CD_PARANOIA_SRC,GstCdParanoiaSrc))
46 #define GST_CD_PARANOIA_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CD_PARANOIA_SRC,GstCdParanoiaSrcClass))
47 #define GST_IS_CD_PARANOIA_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CD_PARANOIA_SRC))
48 #define GST_IS_CD_PARANOIA_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CD_PARANOIA_SRC))
49 #define GST_CD_PARANOIA_SRC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_CDDA_BASAE_SRC, GstCdParanoiaSrcClass))
51 typedef struct _GstCdParanoiaSrc GstCdParanoiaSrc;
52 typedef struct _GstCdParanoiaSrcClass GstCdParanoiaSrcClass;
57 * The cdparanoia object structure.
59 struct _GstCdParanoiaSrc {
60 GstCddaBaseSrc cddabasesrc;
66 gint next_sector; /* -1 or next sector we expect to
67 * read, so we know when to do a seek */
74 gchar *generic_device;
77 struct _GstCdParanoiaSrcClass {
78 GstCddaBaseSrcClass parent_class;
80 /* signal callbacks */
82 * GstCdParanoiaSrcClass::transport-error:
83 * @src: the GstCddaBaseSrc source element object
84 * @sector: the sector at which the error happened
86 * This signal is emitted when a sector could not be read
87 * because of a transport error.
89 void (*transport_error) (GstCdParanoiaSrc * src, gint sector);
91 * GstCdParanoiaSrcClass::uncorrected-error:
92 * @src: the GstCddaBaseSrc source element object
93 * @sector: the sector at which the error happened
95 * This signal is emitted when a sector could not be read
96 * because of a transport error.
98 void (*uncorrected_error) (GstCdParanoiaSrc * src, gint sector);
101 GType gst_cd_paranoia_src_get_type (void);
105 #endif /* __GST_CD_PARANOIA_SRC_H__ */