suffix errors with period.

Original commit message from CVS:
suffix errors with period.
use (NULL) over NULL
This commit is contained in:
Thomas Vander Stichele 2004-01-31 19:30:31 +00:00
parent 4fb17846d4
commit 5f91e9ad66
23 changed files with 135 additions and 133 deletions

View file

@ -1,3 +1,31 @@
2004-01-31 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/autoplug/gstspideridentity.c:
(gst_spider_identity_sink_loop_type_finding):
* gst/elements/gstfakesink.c: (gst_fakesink_change_state):
* gst/elements/gstfilesink.c: (gst_filesink_open_file),
(gst_filesink_close_file), (gst_filesink_handle_event),
(gst_filesink_chain):
* gst/elements/gstfilesrc.c: (gst_filesrc_map_region),
(gst_filesrc_get_read), (gst_filesrc_open_file):
* gst/elements/gstidentity.c: (gst_identity_chain):
* gst/elements/gstmultidisksrc.c: (gst_multidisksrc_open_file):
* gst/elements/gstpipefilter.c: (gst_pipefilter_get),
(gst_pipefilter_chain), (gst_pipefilter_open_file):
* gst/elements/gsttypefind.c: (gst_type_find_element_chain):
* gst/gsterror.c: (_gst_core_errors_init),
(_gst_library_errors_init), (_gst_resource_errors_init),
(_gst_stream_errors_init), (gst_error_get_message):
* gst/gstpad.c: (gst_pad_set_explicit_caps),
(gst_pad_recover_caps_error), (gst_pad_pull):
* gst/gstqueue.c: (gst_queue_chain), (gst_queue_get):
* gst/schedulers/gstbasicscheduler.c:
(gst_basic_scheduler_chainhandler_proxy),
(gst_basic_scheduler_gethandler_proxy),
(gst_basic_scheduler_cothreaded_chain):
Suffix error messages with period.
Use (NULL) instead of NULL
2004-01-31 Thomas Vander Stichele <thomas at apestaart dot org> 2004-01-31 Thomas Vander Stichele <thomas at apestaart dot org>
* docs/gst/tmpl/gstelement.sgml: * docs/gst/tmpl/gstelement.sgml:

View file

@ -498,7 +498,7 @@ gst_spider_identity_sink_loop_type_finding (GstSpiderIdentity *ident)
} }
if (find.best_probability > 0) if (find.best_probability > 0)
goto plug; goto plug;
GST_ELEMENT_ERROR (ident, STREAM, TYPE_NOT_FOUND, NULL, NULL); GST_ELEMENT_ERROR (ident, STREAM, TYPE_NOT_FOUND, (NULL), (NULL));
find.buffer = GST_BUFFER (gst_event_new (GST_EVENT_EOS)); find.buffer = GST_BUFFER (gst_event_new (GST_EVENT_EOS));
end: end:

View file

@ -391,8 +391,7 @@ gst_fakesink_change_state (GstElement *element)
return GST_STATE_SUCCESS; return GST_STATE_SUCCESS;
error: error:
GST_ELEMENT_ERROR (element, CORE, STATE_CHANGE, GST_ELEMENT_ERROR (element, CORE, STATE_CHANGE, (NULL), (NULL));
NULL, NULL);
return GST_STATE_FAILURE; return GST_STATE_FAILURE;
} }

View file

@ -234,14 +234,14 @@ gst_filesink_open_file (GstFileSink *sink)
if (!sink->filename) if (!sink->filename)
{ {
GST_ELEMENT_ERROR (sink, RESOURCE, NOT_FOUND, GST_ELEMENT_ERROR (sink, RESOURCE, NOT_FOUND,
(_("No filename specified")), NULL); (_("No filename specified.")), (NULL));
return FALSE; return FALSE;
} }
sink->file = fopen (sink->filename, "w"); sink->file = fopen (sink->filename, "w");
if (sink->file == NULL) { if (sink->file == NULL) {
GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE, GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open file \"%s\" for writing"), sink->filename), (_("Could not open file \"%s\" for writing."), sink->filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return FALSE; return FALSE;
} }
@ -261,7 +261,7 @@ gst_filesink_close_file (GstFileSink *sink)
if (fclose (sink->file) != 0) if (fclose (sink->file) != 0)
{ {
GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE, GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Error closing file \"%s\""), sink->filename), (_("Error closing file \"%s\"."), sink->filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
} }
else { else {
@ -328,7 +328,7 @@ gst_filesink_handle_event (GstPad *pad, GstEvent *event)
if (GST_EVENT_SEEK_FLAGS (event) & GST_SEEK_FLAG_FLUSH) if (GST_EVENT_SEEK_FLAGS (event) & GST_SEEK_FLAG_FLUSH)
if (fflush (filesink->file)) if (fflush (filesink->file))
GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE, GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE,
(_("Error while writing to file \"%s\""), filesink->filename), (_("Error while writing to file \"%s\"."), filesink->filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
switch (GST_EVENT_SEEK_METHOD(event)) switch (GST_EVENT_SEEK_METHOD(event))
@ -360,7 +360,7 @@ gst_filesink_handle_event (GstPad *pad, GstEvent *event)
case GST_EVENT_FLUSH: case GST_EVENT_FLUSH:
if (fflush (filesink->file)) { if (fflush (filesink->file)) {
GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE, GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE,
(_("Error while writing to file \"%s\""), filesink->filename), (_("Error while writing to file \"%s\"."), filesink->filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
} }
break; break;
@ -412,7 +412,7 @@ gst_filesink_chain (GstPad *pad, GstData *_data)
filesink->file); filesink->file);
if (wrote <= 0) { if (wrote <= 0) {
GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE, GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE,
(_("Error while writing to file \"%s\""), filesink->filename), (_("Error while writing to file \"%s\"."), filesink->filename),
("Only %d of %d bytes written: %s", ("Only %d of %d bytes written: %s",
bytes_written, GST_BUFFER_SIZE (buf), bytes_written, GST_BUFFER_SIZE (buf),
strerror (errno))); strerror (errno)));

View file

@ -394,9 +394,7 @@ gst_filesrc_map_region (GstFileSrc *src, off_t offset, size_t size)
mmapregion = mmap (NULL, size, PROT_READ, MAP_SHARED, src->fd, offset); mmapregion = mmap (NULL, size, PROT_READ, MAP_SHARED, src->fd, offset);
if (mmapregion == NULL) { if (mmapregion == NULL) {
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL), ("mmap call failed."));
NULL,
("mmap call failed"));
return NULL; return NULL;
} }
else if (mmapregion == MAP_FAILED) { else if (mmapregion == MAP_FAILED) {
@ -641,15 +639,11 @@ gst_filesrc_get_read (GstFileSrc *src)
ret = read (src->fd, GST_BUFFER_DATA (buf), readsize); ret = read (src->fd, GST_BUFFER_DATA (buf), readsize);
if (ret < 0){ if (ret < 0){
GST_ELEMENT_ERROR (src, RESOURCE, READ, GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
NULL,
GST_ERROR_SYSTEM);
return NULL; return NULL;
} }
if (ret < readsize) { if (ret < readsize) {
GST_ELEMENT_ERROR (src, RESOURCE, READ, GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL), ("unexpected end of file."));
NULL,
("unexpected end of file"));
return NULL; return NULL;
} }
@ -726,16 +720,14 @@ gst_filesrc_open_file (GstFileSrc *src)
if (src->filename == NULL) if (src->filename == NULL)
{ {
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
(_("No filename specified")), (_("No filename specified.")), (NULL));
NULL);
return FALSE; return FALSE;
} }
if (src->filename == NULL) if (src->filename == NULL)
{ {
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
(_("No file specified for reading")), (_("No file specified for reading.")), (NULL));
NULL);
return FALSE; return FALSE;
} }
@ -747,7 +739,7 @@ gst_filesrc_open_file (GstFileSrc *src)
if (src->fd < 0) if (src->fd < 0)
{ {
if (errno == ENOENT) if (errno == ENOENT)
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, NULL, NULL); GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, (NULL), (NULL));
else else
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
(_("Could not open file \"%s\" for reading"), src->filename), (_("Could not open file \"%s\" for reading"), src->filename),
@ -761,8 +753,8 @@ gst_filesrc_open_file (GstFileSrc *src)
if (!S_ISREG(stat_results.st_mode)) { if (!S_ISREG(stat_results.st_mode)) {
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
(_("File \"%s\" isn't a regular file"), src->filename), (_("File \"%s\" isn't a regular file."), src->filename),
NULL); (NULL));
close(src->fd); close(src->fd);
return FALSE; return FALSE;
} }

View file

@ -167,8 +167,8 @@ gst_identity_chain (GstPad *pad, GstData *_data)
if (identity->error_after == 0) { if (identity->error_after == 0) {
gst_buffer_unref (buf); gst_buffer_unref (buf);
GST_ELEMENT_ERROR (identity, CORE, FAILED, GST_ELEMENT_ERROR (identity, CORE, FAILED,
(_("Failed after iterations as requested")), (_("Failed after iterations as requested.")),
NULL); (NULL));
return; return;
} }
} }

View file

@ -255,9 +255,8 @@ gboolean gst_multidisksrc_open_file (GstMultiDiskSrc *src, GstPad *srcpad)
/* collapse state if that failed */ /* collapse state if that failed */
if (src->map == NULL) { if (src->map == NULL) {
close (src->fd); close (src->fd);
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL),
NULL, ("mmap call failed."));
("mmap call failed"));
return FALSE; return FALSE;
} }
GST_FLAG_SET (src, GST_MULTIDISKSRC_OPEN); GST_FLAG_SET (src, GST_MULTIDISKSRC_OPEN);

View file

@ -255,9 +255,8 @@ gboolean gst_multidisksrc_open_file (GstMultiDiskSrc *src, GstPad *srcpad)
/* collapse state if that failed */ /* collapse state if that failed */
if (src->map == NULL) { if (src->map == NULL) {
close (src->fd); close (src->fd);
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL),
NULL, ("mmap call failed."));
("mmap call failed"));
return FALSE; return FALSE;
} }
GST_FLAG_SET (src, GST_MULTIDISKSRC_OPEN); GST_FLAG_SET (src, GST_MULTIDISKSRC_OPEN);

View file

@ -169,7 +169,7 @@ gst_pipefilter_get (GstPad *pad)
readbytes = read(pipefilter->fdout[0], GST_BUFFER_DATA(newbuf), pipefilter->bytes_per_read); readbytes = read(pipefilter->fdout[0], GST_BUFFER_DATA(newbuf), pipefilter->bytes_per_read);
GST_DEBUG ("read %ld bytes", readbytes); GST_DEBUG ("read %ld bytes", readbytes);
if (readbytes < 0) { if (readbytes < 0) {
GST_ELEMENT_ERROR (pipefilter, RESOURCE, READ, NULL, GST_ERROR_SYSTEM); GST_ELEMENT_ERROR (pipefilter, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
return NULL; return NULL;
} }
/* if we didn't get as many bytes as we asked for, we're at EOF */ /* if we didn't get as many bytes as we asked for, we're at EOF */
@ -212,7 +212,7 @@ gst_pipefilter_chain (GstPad *pad,GstData *_data)
writebytes = write(pipefilter->fdin[1],data,size); writebytes = write(pipefilter->fdin[1],data,size);
GST_DEBUG ("written %ld bytes", writebytes); GST_DEBUG ("written %ld bytes", writebytes);
if (writebytes < 0) { if (writebytes < 0) {
GST_ELEMENT_ERROR (pipefilter, RESOURCE, WRITE, NULL, GST_ERROR_SYSTEM); GST_ELEMENT_ERROR (pipefilter, RESOURCE, WRITE, (NULL), GST_ERROR_SYSTEM);
return; return;
} }
gst_buffer_unref(buf); gst_buffer_unref(buf);
@ -267,7 +267,7 @@ gst_pipefilter_open_file (GstPipefilter *src)
if((src->childpid = fork()) == -1) if((src->childpid = fork()) == -1)
{ {
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, NULL, GST_ERROR_SYSTEM); GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL), GST_ERROR_SYSTEM);
return FALSE; return FALSE;
} }
@ -280,7 +280,7 @@ gst_pipefilter_open_file (GstPipefilter *src)
dup2(src->fdout[1], STDOUT_FILENO); /* set the childs output stream */ dup2(src->fdout[1], STDOUT_FILENO); /* set the childs output stream */
execvp(src->command[0], &src->command[0]); execvp(src->command[0], &src->command[0]);
/* will only be reached if execvp has an error */ /* will only be reached if execvp has an error */
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, NULL, GST_ERROR_SYSTEM); GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL), GST_ERROR_SYSTEM);
return FALSE; return FALSE;
} }

View file

@ -555,8 +555,7 @@ gst_type_find_element_chain (GstPad *pad, GstData *data)
if (typefind->caps) { if (typefind->caps) {
stop_typefinding (typefind); stop_typefinding (typefind);
} else if (typefind->possibilities == NULL) { } else if (typefind->possibilities == NULL) {
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, (NULL), (NULL));
NULL, NULL);
} else { } else {
/* set up typefind element for next iteration */ /* set up typefind element for next iteration */
typefind->possibilities = g_list_sort (typefind->possibilities, compare_type_find_entry); typefind->possibilities = g_list_sort (typefind->possibilities, compare_type_find_entry);

View file

@ -41,30 +41,30 @@ static gchar ** _gst_core_errors_init ()
t = g_new0 (gchar *, GST_CORE_ERROR_NUM_ERRORS); t = g_new0 (gchar *, GST_CORE_ERROR_NUM_ERRORS);
TABLE (t, CORE, FAILED, TABLE (t, CORE, FAILED,
N_("GStreamer encountered a general core library error")); N_("GStreamer encountered a general core library error."));
TABLE (t, CORE, TOO_LAZY, TABLE (t, CORE, TOO_LAZY,
N_("GStreamer developers were too lazy to assign an error code " N_("GStreamer developers were too lazy to assign an error code "
"to this error. Please file a bug")); "to this error. Please file a bug."));
TABLE (t, CORE, NOT_IMPLEMENTED, TABLE (t, CORE, NOT_IMPLEMENTED,
N_("Internal GStreamer error: code not implemented. File a bug")); N_("Internal GStreamer error: code not implemented. File a bug."));
TABLE (t, CORE, STATE_CHANGE, TABLE (t, CORE, STATE_CHANGE,
N_("Internal GStreamer error: state change failed. File a bug")); N_("Internal GStreamer error: state change failed. File a bug."));
TABLE (t, CORE, PAD, TABLE (t, CORE, PAD,
N_("Internal GStreamer error: pad problem. File a bug")); N_("Internal GStreamer error: pad problem. File a bug."));
TABLE (t, CORE, THREAD, TABLE (t, CORE, THREAD,
N_("Internal GStreamer error: thread problem. File a bug")); N_("Internal GStreamer error: thread problem. File a bug."));
TABLE (t, CORE, SCHEDULER, TABLE (t, CORE, SCHEDULER,
N_("Internal GStreamer error: scheduler problem. File a bug")); N_("Internal GStreamer error: scheduler problem. File a bug."));
TABLE (t, CORE, NEGOTIATION, TABLE (t, CORE, NEGOTIATION,
N_("Internal GStreamer error: negotiation problem. File a bug")); N_("Internal GStreamer error: negotiation problem. File a bug."));
TABLE (t, CORE, EVENT, TABLE (t, CORE, EVENT,
N_("Internal GStreamer error: event problem. File a bug")); N_("Internal GStreamer error: event problem. File a bug."));
TABLE (t, CORE, SEEK, TABLE (t, CORE, SEEK,
N_("Internal GStreamer error: seek problem. File a bug")); N_("Internal GStreamer error: seek problem. File a bug."));
TABLE (t, CORE, CAPS, TABLE (t, CORE, CAPS,
N_("Internal GStreamer error: caps problem. File a bug")); N_("Internal GStreamer error: caps problem. File a bug."));
TABLE (t, CORE, TAG, TABLE (t, CORE, TAG,
N_("Internal GStreamer error: tag problem. File a bug")); N_("Internal GStreamer error: tag problem. File a bug."));
return t; return t;
} }
@ -77,16 +77,16 @@ static gchar ** _gst_library_errors_init ()
t = g_new0 (gchar *, GST_LIBRARY_ERROR_NUM_ERRORS); t = g_new0 (gchar *, GST_LIBRARY_ERROR_NUM_ERRORS);
TABLE (t, LIBRARY, FAILED, TABLE (t, LIBRARY, FAILED,
N_("GStreamer encountered a general supporting library error")); N_("GStreamer encountered a general supporting library error."));
TABLE (t, LIBRARY, TOO_LAZY, TABLE (t, LIBRARY, TOO_LAZY,
N_("GStreamer developers were too lazy to assign an error code " N_("GStreamer developers were too lazy to assign an error code "
"to this error. Please file a bug")); "to this error. Please file a bug."));
TABLE (t, LIBRARY, INIT, TABLE (t, LIBRARY, INIT,
N_("Could not initialize supporting library")); N_("Could not initialize supporting library."));
TABLE (t, LIBRARY, SHUTDOWN, TABLE (t, LIBRARY, SHUTDOWN,
N_("Could not close supporting library")); N_("Could not close supporting library."));
TABLE (t, LIBRARY, SETTINGS, TABLE (t, LIBRARY, SETTINGS,
N_("Could not close supporting library")); N_("Could not close supporting library."));
return t; return t;
} }
@ -99,32 +99,32 @@ static gchar ** _gst_resource_errors_init ()
t = g_new0 (gchar *, GST_RESOURCE_ERROR_NUM_ERRORS); t = g_new0 (gchar *, GST_RESOURCE_ERROR_NUM_ERRORS);
TABLE (t, RESOURCE, FAILED, TABLE (t, RESOURCE, FAILED,
N_("GStreamer encountered a general supporting library error")); N_("GStreamer encountered a general supporting library error."));
TABLE (t, RESOURCE, TOO_LAZY, TABLE (t, RESOURCE, TOO_LAZY,
N_("GStreamer developers were too lazy to assign an error code " N_("GStreamer developers were too lazy to assign an error code "
"to this error. Please file a bug")); "to this error. Please file a bug."));
TABLE (t, RESOURCE, NOT_FOUND, TABLE (t, RESOURCE, NOT_FOUND,
N_("Resource not found")); N_("Resource not found."));
TABLE (t, RESOURCE, BUSY, TABLE (t, RESOURCE, BUSY,
N_("Resource busy or not available")); N_("Resource busy or not available."));
TABLE (t, RESOURCE, OPEN_READ, TABLE (t, RESOURCE, OPEN_READ,
N_("Could not open resource for reading")); N_("Could not open resource for reading."));
TABLE (t, RESOURCE, OPEN_WRITE, TABLE (t, RESOURCE, OPEN_WRITE,
N_("Could not open resource for writing")); N_("Could not open resource for writing."));
TABLE (t, RESOURCE, OPEN_READ_WRITE, TABLE (t, RESOURCE, OPEN_READ_WRITE,
N_("Could not open resource for reading and writing")); N_("Could not open resource for reading and writing."));
TABLE (t, RESOURCE, CLOSE, TABLE (t, RESOURCE, CLOSE,
N_("Could not close resource")); N_("Could not close resource."));
TABLE (t, RESOURCE, READ, TABLE (t, RESOURCE, READ,
N_("Could not read from resource")); N_("Could not read from resource."));
TABLE (t, RESOURCE, WRITE, TABLE (t, RESOURCE, WRITE,
N_("Could not write to resource")); N_("Could not write to resource."));
TABLE (t, RESOURCE, SEEK, TABLE (t, RESOURCE, SEEK,
N_("Could not perform seek on resource")); N_("Could not perform seek on resource."));
TABLE (t, RESOURCE, SYNC, TABLE (t, RESOURCE, SYNC,
N_("Could not synchronize on resource")); N_("Could not synchronize on resource."));
TABLE (t, RESOURCE, SETTINGS, TABLE (t, RESOURCE, SETTINGS,
N_("Could not get/set settings from/on resource")); N_("Could not get/set settings from/on resource."));
return t; return t;
} }
@ -137,27 +137,27 @@ static gchar ** _gst_stream_errors_init ()
t = g_new0 (gchar *, GST_STREAM_ERROR_NUM_ERRORS); t = g_new0 (gchar *, GST_STREAM_ERROR_NUM_ERRORS);
TABLE (t, STREAM, FAILED, TABLE (t, STREAM, FAILED,
N_("GStreamer encountered a general supporting library error")); N_("GStreamer encountered a general supporting library error."));
TABLE (t, STREAM, TOO_LAZY, TABLE (t, STREAM, TOO_LAZY,
N_("GStreamer developers were too lazy to assign an error code " N_("GStreamer developers were too lazy to assign an error code "
"to this error. Please file a bug")); "to this error. Please file a bug."));
TABLE (t, STREAM, NOT_IMPLEMENTED, TABLE (t, STREAM, NOT_IMPLEMENTED,
N_("Element doesn't implement handling of this stream. " N_("Element doesn't implement handling of this stream. "
"Please file a bug")); "Please file a bug."));
TABLE (t, STREAM, TYPE_NOT_FOUND, TABLE (t, STREAM, TYPE_NOT_FOUND,
N_("Could not determine type of stream")); N_("Could not determine type of stream."));
TABLE (t, STREAM, WRONG_TYPE, TABLE (t, STREAM, WRONG_TYPE,
N_("The stream is of a different type than handled by this element")); N_("The stream is of a different type than handled by this element."));
TABLE (t, STREAM, DECODE, TABLE (t, STREAM, DECODE,
N_("Could not decode stream")); N_("Could not decode stream."));
TABLE (t, STREAM, ENCODE, TABLE (t, STREAM, ENCODE,
N_("Could not encode stream")); N_("Could not encode stream."));
TABLE (t, STREAM, DEMUX, TABLE (t, STREAM, DEMUX,
N_("Could not demultiplex stream")); N_("Could not demultiplex stream."));
TABLE (t, STREAM, MUX, TABLE (t, STREAM, MUX,
N_("Could not multiplex stream")); N_("Could not multiplex stream."));
TABLE (t, STREAM, FORMAT, TABLE (t, STREAM, FORMAT,
N_("Stream is of the wrong format")); N_("Stream is of the wrong format."));
return t; return t;
} }
@ -209,6 +209,6 @@ gst_error_get_message (GQuark domain, gint code)
if (message) if (message)
return g_strdup (_(message)); return g_strdup (_(message));
else else
return g_strdup_printf (_("No standard error message for domain %s and code %d"), return g_strdup_printf (_("No standard error message for domain %s and code %d."),
g_quark_to_string (domain), code); g_quark_to_string (domain), code);
} }

View file

@ -2255,8 +2255,7 @@ gst_pad_set_explicit_caps (GstPad *pad, const GstCaps *caps)
} }
link_ret = gst_pad_try_set_caps (pad, caps); link_ret = gst_pad_try_set_caps (pad, caps);
if (link_ret == GST_PAD_LINK_REFUSED) { if (link_ret == GST_PAD_LINK_REFUSED) {
GST_ELEMENT_ERROR (gst_pad_get_parent (pad), CORE, PAD, GST_ELEMENT_ERROR (gst_pad_get_parent (pad), CORE, PAD, (NULL),
NULL,
("failed to negotiate (try_set_caps returned REFUSED)")); ("failed to negotiate (try_set_caps returned REFUSED)"));
return FALSE; return FALSE;
} }
@ -2633,8 +2632,7 @@ gst_pad_recover_caps_error (GstPad *pad, const GstCaps *allowed)
/* report error */ /* report error */
parent = gst_pad_get_parent (pad); parent = gst_pad_get_parent (pad);
GST_ELEMENT_ERROR (parent, CORE, PAD, GST_ELEMENT_ERROR (parent, CORE, PAD, (NULL),
NULL,
("negotiation failed on pad %s:%s", GST_DEBUG_PAD_NAME (pad))); ("negotiation failed on pad %s:%s", GST_DEBUG_PAD_NAME (pad)));
#endif #endif
return FALSE; return FALSE;
@ -2939,7 +2937,7 @@ gst_pad_pull (GstPad *pad)
peer = GST_RPAD_PEER (pad); peer = GST_RPAD_PEER (pad);
if (!peer) { if (!peer) {
GST_ELEMENT_ERROR (GST_PAD_PARENT (pad), CORE, PAD, NULL, GST_ELEMENT_ERROR (GST_PAD_PARENT (pad), CORE, PAD, (NULL),
("pull on pad %s:%s but it was unlinked", GST_DEBUG_PAD_NAME (pad))); ("pull on pad %s:%s but it was unlinked", GST_DEBUG_PAD_NAME (pad)));
} }
else { else {
@ -2961,10 +2959,10 @@ restart:
} }
/* no null buffers allowed */ /* no null buffers allowed */
GST_ELEMENT_ERROR (GST_PAD_PARENT (pad), CORE, PAD, NULL, GST_ELEMENT_ERROR (GST_PAD_PARENT (pad), CORE, PAD, (NULL),
("NULL buffer during pull on %s:%s", GST_DEBUG_PAD_NAME (pad))); ("NULL buffer during pull on %s:%s", GST_DEBUG_PAD_NAME (pad)));
} else { } else {
GST_ELEMENT_ERROR (GST_PAD_PARENT (pad), CORE, PAD, NULL, GST_ELEMENT_ERROR (GST_PAD_PARENT (pad), CORE, PAD, (NULL),
("pull on pad %s:%s but the peer pad %s:%s has no gethandler", ("pull on pad %s:%s but the peer pad %s:%s has no gethandler",
GST_DEBUG_PAD_NAME (pad), GST_DEBUG_PAD_NAME (peer))); GST_DEBUG_PAD_NAME (pad), GST_DEBUG_PAD_NAME (peer)));
} }

View file

@ -561,7 +561,7 @@ restart:
if (!queue->may_deadlock) { if (!queue->may_deadlock) {
g_mutex_unlock (queue->qlock); g_mutex_unlock (queue->qlock);
gst_data_unref (data); gst_data_unref (data);
GST_ELEMENT_ERROR (queue, CORE, THREAD, NULL, GST_ELEMENT_ERROR (queue, CORE, THREAD, (NULL),
("deadlock found, shutting down source pad elements")); ("deadlock found, shutting down source pad elements"));
/* we don't go to out_unref here, since we want to /* we don't go to out_unref here, since we want to
* unref the buffer *before* calling GST_ELEMENT_ERROR */ * unref the buffer *before* calling GST_ELEMENT_ERROR */
@ -676,7 +676,7 @@ restart:
/* this means the other end is shut down */ /* this means the other end is shut down */
if (!queue->may_deadlock) { if (!queue->may_deadlock) {
g_mutex_unlock (queue->qlock); g_mutex_unlock (queue->qlock);
GST_ELEMENT_ERROR (queue, CORE, THREAD, NULL, GST_ELEMENT_ERROR (queue, CORE, THREAD, (NULL),
("deadlock found, shutting down sink pad elements")); ("deadlock found, shutting down sink pad elements"));
goto restart; goto restart;
} else { } else {

View file

@ -460,7 +460,7 @@ gst_basic_scheduler_chainhandler_proxy (GstPad * pad, GstData * data)
} }
if (loop_count == 0) { if (loop_count == 0) {
GST_ELEMENT_ERROR (parent, CORE, SCHEDULER, NULL, GST_ELEMENT_ERROR (parent, CORE, SCHEDULER, (NULL),
("(internal error) basic: maximum number of switches exceeded")); ("(internal error) basic: maximum number of switches exceeded"));
return; return;
} }
@ -528,7 +528,7 @@ gst_basic_scheduler_gethandler_proxy (GstPad * pad)
GST_CAT_DEBUG (debug_dataflow, "new pad in mid-switch!"); GST_CAT_DEBUG (debug_dataflow, "new pad in mid-switch!");
pad = (GstPad *) GST_RPAD_PEER (peer); pad = (GstPad *) GST_RPAD_PEER (peer);
if (!pad) { if (!pad) {
GST_ELEMENT_ERROR (parent, CORE, PAD, NULL, ("pad unlinked")); GST_ELEMENT_ERROR (parent, CORE, PAD, (NULL), ("pad unlinked"));
} }
parent = GST_PAD_PARENT (pad); parent = GST_PAD_PARENT (pad);
peer = GST_RPAD_PEER (pad); peer = GST_RPAD_PEER (pad);
@ -659,7 +659,7 @@ gst_basic_scheduler_cothreaded_chain (GstBin * bin, GstSchedulerChain * chain)
* either, we have an error */ * either, we have an error */
if (different_sched && !peer_decoupled) if (different_sched && !peer_decoupled)
{ {
GST_ELEMENT_ERROR (element, CORE, SCHEDULER, NULL, GST_ELEMENT_ERROR (element, CORE, SCHEDULER, (NULL),
("element \"%s\" is not decoupled but has pads in different schedulers", ("element \"%s\" is not decoupled but has pads in different schedulers",
GST_ELEMENT_NAME (element))); GST_ELEMENT_NAME (element)));
return FALSE; return FALSE;
@ -727,7 +727,7 @@ gst_basic_scheduler_cothreaded_chain (GstBin * bin, GstSchedulerChain * chain)
chain->sched->context, chain->sched->context,
wrapper_function, 0, (char **) element); wrapper_function, 0, (char **) element);
if (GST_ELEMENT_THREADSTATE (element) == NULL) { if (GST_ELEMENT_THREADSTATE (element) == NULL) {
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, NULL, ("could not create cothread for \"%s\"", GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, (NULL), ("could not create cothread for \"%s\"",
GST_ELEMENT_NAME (element))); GST_ELEMENT_NAME (element)));
return FALSE; return FALSE;
} }

View file

@ -391,8 +391,7 @@ gst_fakesink_change_state (GstElement *element)
return GST_STATE_SUCCESS; return GST_STATE_SUCCESS;
error: error:
GST_ELEMENT_ERROR (element, CORE, STATE_CHANGE, GST_ELEMENT_ERROR (element, CORE, STATE_CHANGE, (NULL), (NULL));
NULL, NULL);
return GST_STATE_FAILURE; return GST_STATE_FAILURE;
} }

View file

@ -234,14 +234,14 @@ gst_filesink_open_file (GstFileSink *sink)
if (!sink->filename) if (!sink->filename)
{ {
GST_ELEMENT_ERROR (sink, RESOURCE, NOT_FOUND, GST_ELEMENT_ERROR (sink, RESOURCE, NOT_FOUND,
(_("No filename specified")), NULL); (_("No filename specified.")), (NULL));
return FALSE; return FALSE;
} }
sink->file = fopen (sink->filename, "w"); sink->file = fopen (sink->filename, "w");
if (sink->file == NULL) { if (sink->file == NULL) {
GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE, GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open file \"%s\" for writing"), sink->filename), (_("Could not open file \"%s\" for writing."), sink->filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return FALSE; return FALSE;
} }
@ -261,7 +261,7 @@ gst_filesink_close_file (GstFileSink *sink)
if (fclose (sink->file) != 0) if (fclose (sink->file) != 0)
{ {
GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE, GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Error closing file \"%s\""), sink->filename), (_("Error closing file \"%s\"."), sink->filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
} }
else { else {
@ -328,7 +328,7 @@ gst_filesink_handle_event (GstPad *pad, GstEvent *event)
if (GST_EVENT_SEEK_FLAGS (event) & GST_SEEK_FLAG_FLUSH) if (GST_EVENT_SEEK_FLAGS (event) & GST_SEEK_FLAG_FLUSH)
if (fflush (filesink->file)) if (fflush (filesink->file))
GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE, GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE,
(_("Error while writing to file \"%s\""), filesink->filename), (_("Error while writing to file \"%s\"."), filesink->filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
switch (GST_EVENT_SEEK_METHOD(event)) switch (GST_EVENT_SEEK_METHOD(event))
@ -360,7 +360,7 @@ gst_filesink_handle_event (GstPad *pad, GstEvent *event)
case GST_EVENT_FLUSH: case GST_EVENT_FLUSH:
if (fflush (filesink->file)) { if (fflush (filesink->file)) {
GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE, GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE,
(_("Error while writing to file \"%s\""), filesink->filename), (_("Error while writing to file \"%s\"."), filesink->filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
} }
break; break;
@ -412,7 +412,7 @@ gst_filesink_chain (GstPad *pad, GstData *_data)
filesink->file); filesink->file);
if (wrote <= 0) { if (wrote <= 0) {
GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE, GST_ELEMENT_ERROR (filesink, RESOURCE, WRITE,
(_("Error while writing to file \"%s\""), filesink->filename), (_("Error while writing to file \"%s\"."), filesink->filename),
("Only %d of %d bytes written: %s", ("Only %d of %d bytes written: %s",
bytes_written, GST_BUFFER_SIZE (buf), bytes_written, GST_BUFFER_SIZE (buf),
strerror (errno))); strerror (errno)));

View file

@ -394,9 +394,7 @@ gst_filesrc_map_region (GstFileSrc *src, off_t offset, size_t size)
mmapregion = mmap (NULL, size, PROT_READ, MAP_SHARED, src->fd, offset); mmapregion = mmap (NULL, size, PROT_READ, MAP_SHARED, src->fd, offset);
if (mmapregion == NULL) { if (mmapregion == NULL) {
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL), ("mmap call failed."));
NULL,
("mmap call failed"));
return NULL; return NULL;
} }
else if (mmapregion == MAP_FAILED) { else if (mmapregion == MAP_FAILED) {
@ -641,15 +639,11 @@ gst_filesrc_get_read (GstFileSrc *src)
ret = read (src->fd, GST_BUFFER_DATA (buf), readsize); ret = read (src->fd, GST_BUFFER_DATA (buf), readsize);
if (ret < 0){ if (ret < 0){
GST_ELEMENT_ERROR (src, RESOURCE, READ, GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
NULL,
GST_ERROR_SYSTEM);
return NULL; return NULL;
} }
if (ret < readsize) { if (ret < readsize) {
GST_ELEMENT_ERROR (src, RESOURCE, READ, GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL), ("unexpected end of file."));
NULL,
("unexpected end of file"));
return NULL; return NULL;
} }
@ -726,16 +720,14 @@ gst_filesrc_open_file (GstFileSrc *src)
if (src->filename == NULL) if (src->filename == NULL)
{ {
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
(_("No filename specified")), (_("No filename specified.")), (NULL));
NULL);
return FALSE; return FALSE;
} }
if (src->filename == NULL) if (src->filename == NULL)
{ {
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
(_("No file specified for reading")), (_("No file specified for reading.")), (NULL));
NULL);
return FALSE; return FALSE;
} }
@ -747,7 +739,7 @@ gst_filesrc_open_file (GstFileSrc *src)
if (src->fd < 0) if (src->fd < 0)
{ {
if (errno == ENOENT) if (errno == ENOENT)
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, NULL, NULL); GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, (NULL), (NULL));
else else
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
(_("Could not open file \"%s\" for reading"), src->filename), (_("Could not open file \"%s\" for reading"), src->filename),
@ -761,8 +753,8 @@ gst_filesrc_open_file (GstFileSrc *src)
if (!S_ISREG(stat_results.st_mode)) { if (!S_ISREG(stat_results.st_mode)) {
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
(_("File \"%s\" isn't a regular file"), src->filename), (_("File \"%s\" isn't a regular file."), src->filename),
NULL); (NULL));
close(src->fd); close(src->fd);
return FALSE; return FALSE;
} }

View file

@ -167,8 +167,8 @@ gst_identity_chain (GstPad *pad, GstData *_data)
if (identity->error_after == 0) { if (identity->error_after == 0) {
gst_buffer_unref (buf); gst_buffer_unref (buf);
GST_ELEMENT_ERROR (identity, CORE, FAILED, GST_ELEMENT_ERROR (identity, CORE, FAILED,
(_("Failed after iterations as requested")), (_("Failed after iterations as requested.")),
NULL); (NULL));
return; return;
} }
} }

View file

@ -255,9 +255,8 @@ gboolean gst_multidisksrc_open_file (GstMultiDiskSrc *src, GstPad *srcpad)
/* collapse state if that failed */ /* collapse state if that failed */
if (src->map == NULL) { if (src->map == NULL) {
close (src->fd); close (src->fd);
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL),
NULL, ("mmap call failed."));
("mmap call failed"));
return FALSE; return FALSE;
} }
GST_FLAG_SET (src, GST_MULTIDISKSRC_OPEN); GST_FLAG_SET (src, GST_MULTIDISKSRC_OPEN);

View file

@ -255,9 +255,8 @@ gboolean gst_multidisksrc_open_file (GstMultiDiskSrc *src, GstPad *srcpad)
/* collapse state if that failed */ /* collapse state if that failed */
if (src->map == NULL) { if (src->map == NULL) {
close (src->fd); close (src->fd);
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL),
NULL, ("mmap call failed."));
("mmap call failed"));
return FALSE; return FALSE;
} }
GST_FLAG_SET (src, GST_MULTIDISKSRC_OPEN); GST_FLAG_SET (src, GST_MULTIDISKSRC_OPEN);

View file

@ -169,7 +169,7 @@ gst_pipefilter_get (GstPad *pad)
readbytes = read(pipefilter->fdout[0], GST_BUFFER_DATA(newbuf), pipefilter->bytes_per_read); readbytes = read(pipefilter->fdout[0], GST_BUFFER_DATA(newbuf), pipefilter->bytes_per_read);
GST_DEBUG ("read %ld bytes", readbytes); GST_DEBUG ("read %ld bytes", readbytes);
if (readbytes < 0) { if (readbytes < 0) {
GST_ELEMENT_ERROR (pipefilter, RESOURCE, READ, NULL, GST_ERROR_SYSTEM); GST_ELEMENT_ERROR (pipefilter, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
return NULL; return NULL;
} }
/* if we didn't get as many bytes as we asked for, we're at EOF */ /* if we didn't get as many bytes as we asked for, we're at EOF */
@ -212,7 +212,7 @@ gst_pipefilter_chain (GstPad *pad,GstData *_data)
writebytes = write(pipefilter->fdin[1],data,size); writebytes = write(pipefilter->fdin[1],data,size);
GST_DEBUG ("written %ld bytes", writebytes); GST_DEBUG ("written %ld bytes", writebytes);
if (writebytes < 0) { if (writebytes < 0) {
GST_ELEMENT_ERROR (pipefilter, RESOURCE, WRITE, NULL, GST_ERROR_SYSTEM); GST_ELEMENT_ERROR (pipefilter, RESOURCE, WRITE, (NULL), GST_ERROR_SYSTEM);
return; return;
} }
gst_buffer_unref(buf); gst_buffer_unref(buf);
@ -267,7 +267,7 @@ gst_pipefilter_open_file (GstPipefilter *src)
if((src->childpid = fork()) == -1) if((src->childpid = fork()) == -1)
{ {
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, NULL, GST_ERROR_SYSTEM); GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL), GST_ERROR_SYSTEM);
return FALSE; return FALSE;
} }
@ -280,7 +280,7 @@ gst_pipefilter_open_file (GstPipefilter *src)
dup2(src->fdout[1], STDOUT_FILENO); /* set the childs output stream */ dup2(src->fdout[1], STDOUT_FILENO); /* set the childs output stream */
execvp(src->command[0], &src->command[0]); execvp(src->command[0], &src->command[0]);
/* will only be reached if execvp has an error */ /* will only be reached if execvp has an error */
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, NULL, GST_ERROR_SYSTEM); GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL), GST_ERROR_SYSTEM);
return FALSE; return FALSE;
} }

View file

@ -561,7 +561,7 @@ restart:
if (!queue->may_deadlock) { if (!queue->may_deadlock) {
g_mutex_unlock (queue->qlock); g_mutex_unlock (queue->qlock);
gst_data_unref (data); gst_data_unref (data);
GST_ELEMENT_ERROR (queue, CORE, THREAD, NULL, GST_ELEMENT_ERROR (queue, CORE, THREAD, (NULL),
("deadlock found, shutting down source pad elements")); ("deadlock found, shutting down source pad elements"));
/* we don't go to out_unref here, since we want to /* we don't go to out_unref here, since we want to
* unref the buffer *before* calling GST_ELEMENT_ERROR */ * unref the buffer *before* calling GST_ELEMENT_ERROR */
@ -676,7 +676,7 @@ restart:
/* this means the other end is shut down */ /* this means the other end is shut down */
if (!queue->may_deadlock) { if (!queue->may_deadlock) {
g_mutex_unlock (queue->qlock); g_mutex_unlock (queue->qlock);
GST_ELEMENT_ERROR (queue, CORE, THREAD, NULL, GST_ELEMENT_ERROR (queue, CORE, THREAD, (NULL),
("deadlock found, shutting down sink pad elements")); ("deadlock found, shutting down sink pad elements"));
goto restart; goto restart;
} else { } else {

View file

@ -555,8 +555,7 @@ gst_type_find_element_chain (GstPad *pad, GstData *data)
if (typefind->caps) { if (typefind->caps) {
stop_typefinding (typefind); stop_typefinding (typefind);
} else if (typefind->possibilities == NULL) { } else if (typefind->possibilities == NULL) {
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, (NULL), (NULL));
NULL, NULL);
} else { } else {
/* set up typefind element for next iteration */ /* set up typefind element for next iteration */
typefind->possibilities = g_list_sort (typefind->possibilities, compare_type_find_entry); typefind->possibilities = g_list_sort (typefind->possibilities, compare_type_find_entry);