add/fix error handling in cdparanoia add it to translations make tools scripts executable

Original commit message from CVS:
add/fix error handling in cdparanoia
add it to translations
make tools scripts executable
This commit is contained in:
Thomas Vander Stichele 2004-03-09 16:36:30 +00:00
parent 0e352e0cea
commit dbdc8052d3
5 changed files with 28 additions and 6 deletions

View file

@ -1,3 +1,13 @@
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:

2
common

@ -1 +1 @@
Subproject commit 4eb02711e49a6aadf900d6fd9d220c17115fec2a
Subproject commit 5557aa074c4836b2cc9eac0e1519323df1cb876f

View file

@ -35,6 +35,7 @@
#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 */
@ -205,6 +206,7 @@ cdparanoia_base_init (gpointer g_class)
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
@ -632,7 +634,9 @@ cdparanoia_open (CDParanoia *src)
/* 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;
}
@ -647,7 +651,9 @@ cdparanoia_open (CDParanoia *src)
/* 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;
@ -686,7 +692,7 @@ cdparanoia_open (CDParanoia *src)
/* 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;
}
@ -800,9 +806,9 @@ cdparanoia_event (GstPad *pad, GstEvent *event)
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:

View file

@ -1,5 +1,6 @@
ext/audiofile/gstafsink.c
ext/audiofile/gstafsrc.c
ext/cdparanoia/gstcdparanoia.c
ext/gnomevfs/gstgnomevfssrc.c
ext/gnomevfs/gstgnomevfssink.c
ext/sndfile/gstsf.c

View file

@ -2,4 +2,9 @@ bin_SCRIPTS = gst-launch-ext gst-visualise
man_MANS = gst-launch-ext.1 gst-visualise.1
all: all-am chmod
EXTRA_DIST = $(bin_SCRIPTS) $(man_MANS) gst-launch-ext.in
chmod: $(bin_SCRIPTS)
chmod +x $^