2004-03-09 Thomas Vander Stichele <thomas at apestaart dot org>
+ * ext/cdparanoia/gstcdparanoia.c: (cdparanoia_base_init),
+ (cdparanoia_open), (cdparanoia_event):
+ fix/add error handling
+ * po/POTFILES.in:
+ add cdparanoia source
+ * tools/Makefile.am:
+ make scripts executable
+
+2004-03-09 Thomas Vander Stichele <thomas at apestaart dot org>
+
* configure.ac:
* ext/vorbis/Makefile.am:
* sys/Makefile.am:
#include <sys/types.h>
#include <dirent.h>
#include <errno.h>
+#include "gst/gst-i18n-plugin.h"
/* taken from linux/cdrom.h */
#define CD_MSF_OFFSET 150 /* MSF numbering offset of first frame */
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&cdparanoia_src_template));
gst_element_class_set_details (element_class, &cdparanoia_details);
+
}
static void
/* fail if the device couldn't be found */
if (src->d == NULL) {
- GST_DEBUG ("couldn't open device");
+ GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
+ (_("Could not open CD device for reading")),
+ ("cdda_identify failed"));
return FALSE;
}
/* open the disc */
if (cdda_open (src->d)) {
- GST_DEBUG ("couldn't open disc");
+ GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
+ (_("Could not open CD device for reading")),
+ ("cdda_open failed"));
cdda_close (src->d);
src->d = NULL;
return FALSE;
/* create the paranoia struct and set it up */
src->p = paranoia_init (src->d);
if (src->p == NULL) {
- GST_DEBUG ("couldn't create paranoia struct");
+ GST_ELEMENT_ERROR (src, LIBRARY, INIT, (NULL), (NULL));
return FALSE;
}
src = CDPARANOIA (gst_pad_get_parent (pad));
if (!GST_FLAG_IS_SET (src, CDPARANOIA_OPEN)) {
- g_print ("Not open\n");
+ GST_DEBUG ("device not open, cannot handle event");
goto error;
- }
+ }
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK: