• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  * Copyright (C) 1999 Erik Walthinsen <omega@cse.ogi.edu>
3  *
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.
8  *
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.
13  *
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., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef __GST_CD_PARANOIA_SRC_H__
21 #define __GST_CD_PARANOIA_SRC_H__
22 
23 #include <gst/audio/gstaudiocdsrc.h>
24 
25 G_BEGIN_DECLS
26 
27 /* on OSX the cdparanoia headers include IOKit framework headers (in particular
28  * SCSICmds_INQUIRY_Definitions.h) which define a structure that has a member
29  * named VERSION, so we must #undef VERSION here for things to compile on OSX */
30 static const char GST_PLUGINS_BASE_VERSION[] = VERSION;
31 #undef VERSION
32 
33 #ifdef CDPARANOIA_HEADERS_IN_DIR
34   #include <cdda/cdda_interface.h>
35   #include <cdda/cdda_paranoia.h>
36 #else
37   #include <cdda_interface.h>
38   #include <cdda_paranoia.h>
39 #endif
40 
41 #define GST_TYPE_CD_PARANOIA_SRC            (gst_cd_paranoia_src_get_type())
42 #define GST_CD_PARANOIA_SRC(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CD_PARANOIA_SRC,GstCdParanoiaSrc))
43 #define GST_CD_PARANOIA_SRC_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CD_PARANOIA_SRC,GstCdParanoiaSrcClass))
44 #define GST_IS_CD_PARANOIA_SRC(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CD_PARANOIA_SRC))
45 #define GST_IS_CD_PARANOIA_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CD_PARANOIA_SRC))
46 
47 typedef struct _GstCdParanoiaSrc GstCdParanoiaSrc;
48 typedef struct _GstCdParanoiaSrcClass GstCdParanoiaSrcClass;
49 
50 /**
51  * GstCdParanoiaSrc:
52  *
53  * The cdparanoia object structure.
54  */
55 struct _GstCdParanoiaSrc {
56   GstAudioCdSrc   audiocdsrc;
57 
58   /*< private >*/
59   cdrom_drive     *d;
60   cdrom_paranoia  *p;
61 
62   gint             next_sector; /* -1 or next sector we expect to
63                                  * read, so we know when to do a seek */
64 
65   gint             paranoia_mode;
66   gint             read_speed;
67   gint             search_overlap;
68   gint             cache_size;
69 
70   gchar           *generic_device;
71 };
72 
73 struct _GstCdParanoiaSrcClass {
74   GstAudioCdSrcClass parent_class;
75 
76   /* signal callbacks */
77   /**
78    * GstCdParanoiaSrcClass::transport-error:
79    * @src: the GstAudioCdSrc source element object
80    * @sector: the sector at which the error happened
81    *
82    * This signal is emitted when a sector could not be read
83    * because of a transport error.
84    */
85   void (*transport_error)	(GstCdParanoiaSrc * src, gint sector);
86   /**
87    * GstCdParanoiaSrcClass::uncorrected-error:
88    * @src: the GstAudioCdSrc source element object
89    * @sector: the sector at which the error happened
90    *
91    * This signal is emitted when a sector could not be read
92    * because of a transport error.
93    */
94   void (*uncorrected_error)	(GstCdParanoiaSrc * src, gint sector);
95 };
96 
97 GST_ELEMENT_REGISTER_DECLARE (cdparanoiasrc);
98 
99 GType    gst_cd_paranoia_src_get_type (void);
100 
101 G_END_DECLS
102 
103 #endif /* __GST_CD_PARANOIA_SRC_H__ */
104 
105