Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
luzpaz
gstreamer
Commits
c5b612ed
Commit
c5b612ed
authored
Jan 29, 2004
by
Thomas Vander Stichele
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GST_ELEMENT_ERROR
Original commit message from CVS: GST_ELEMENT_ERROR
parent
ef6bdb01
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
111 additions
and
88 deletions
+111
-88
ChangeLog
ChangeLog
+28
-0
docs/gst/tmpl/gstelement.sgml
docs/gst/tmpl/gstelement.sgml
+1
-16
docs/gst/tmpl/gstreamer-unused.sgml
docs/gst/tmpl/gstreamer-unused.sgml
+14
-0
docs/gst/tmpl/gstxml.sgml
docs/gst/tmpl/gstxml.sgml
+3
-7
gst/autoplug/gstspideridentity.c
gst/autoplug/gstspideridentity.c
+1
-1
gst/elements/gstfakesink.c
gst/elements/gstfakesink.c
+1
-1
gst/elements/gstfilesink.c
gst/elements/gstfilesink.c
+6
-6
gst/elements/gstfilesrc.c
gst/elements/gstfilesrc.c
+8
-8
gst/elements/gstidentity.c
gst/elements/gstidentity.c
+1
-1
gst/elements/gstmultidisksrc.c
gst/elements/gstmultidisksrc.c
+2
-2
gst/elements/gstmultifilesrc.c
gst/elements/gstmultifilesrc.c
+2
-2
gst/elements/gstpipefilter.c
gst/elements/gstpipefilter.c
+4
-4
gst/elements/gsttypefind.c
gst/elements/gsttypefind.c
+1
-1
gst/gstelement.h
gst/gstelement.h
+1
-1
gst/gstpad.c
gst/gstpad.c
+5
-5
gst/gstqueue.c
gst/gstqueue.c
+2
-2
gst/schedulers/gstbasicscheduler.c
gst/schedulers/gstbasicscheduler.c
+4
-4
plugins/elements/gstfakesink.c
plugins/elements/gstfakesink.c
+1
-1
plugins/elements/gstfilesink.c
plugins/elements/gstfilesink.c
+6
-6
plugins/elements/gstfilesrc.c
plugins/elements/gstfilesrc.c
+8
-8
plugins/elements/gstidentity.c
plugins/elements/gstidentity.c
+1
-1
plugins/elements/gstmultidisksrc.c
plugins/elements/gstmultidisksrc.c
+2
-2
plugins/elements/gstmultifilesrc.c
plugins/elements/gstmultifilesrc.c
+2
-2
plugins/elements/gstpipefilter.c
plugins/elements/gstpipefilter.c
+4
-4
plugins/elements/gstqueue.c
plugins/elements/gstqueue.c
+2
-2
plugins/elements/gsttypefind.c
plugins/elements/gsttypefind.c
+1
-1
No files found.
ChangeLog
View file @
c5b612ed
...
...
@@ -9,6 +9,34 @@
different than EOS or DISCONT are received. Instead it process them so
that they go downstream.
2004-01-29 Thomas Vander Stichele <thomas at apestaart dot org>
* docs/gst/tmpl/gstelement.sgml:
* docs/gst/tmpl/gstreamer-unused.sgml:
* docs/gst/tmpl/gstxml.sgml:
* 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/gstelement.h:
* 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):
gst_element_error -> GST_ELEMENT_ERROR
2004-01-29 Thomas Vander Stichele <thomas at apestaart dot org>
* docs/Makefile.am:
...
...
docs/gst/tmpl/gstelement.sgml
View file @
c5b612ed
...
...
@@ -379,22 +379,6 @@ Sets the name of the element, getting rid of the old name if there was one.
@element:
<!-- ##### MACRO gst_element_error ##### -->
<para>
</para>
@el:
@domain:
@code:
@message:
@debug:
<!-- # Unused Parameters # -->
@element:
@error:
@Varargs:
<!-- ##### FUNCTION gst_element_set_eos ##### -->
<para>
...
...
@@ -996,6 +980,7 @@ Is triggered whenever an error occured.
@:
@:
@:
@:
@:
<!-- ##### SIGNAL GstElement::found-tag ##### -->
...
...
docs/gst/tmpl/gstreamer-unused.sgml
View file @
c5b612ed
...
...
@@ -8357,6 +8357,20 @@ of an element he doesn't need anymore.
@a:
@b:
<!-- ##### MACRO gst_element_error ##### -->
<para>
</para>
@el:
@domain:
@code:
@message:
@debug:
@element:
@error:
@Varargs:
<!-- ##### FUNCTION gst_element_factory_add_pad_template ##### -->
<para>
...
...
docs/gst/tmpl/gstxml.sgml
View file @
c5b612ed
...
...
@@ -110,10 +110,6 @@ All GstElements can be serialized to an XML presentation and subsequently loaded
</para>
@:
@:
@:
@gstxml: the object which received the signal.
@arg1:
@arg2:
...
...
@@ -123,7 +119,7 @@ All GstElements can be serialized to an XML presentation and subsequently loaded
</para>
@
gstxml: the object which received the signal.
@
arg1
:
@
arg2
:
@
:
@:
@:
gst/autoplug/gstspideridentity.c
View file @
c5b612ed
...
...
@@ -498,7 +498,7 @@ gst_spider_identity_sink_loop_type_finding (GstSpiderIdentity *ident)
}
if
(
find
.
best_probability
>
0
)
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
));
end:
...
...
gst/elements/gstfakesink.c
View file @
c5b612ed
...
...
@@ -391,7 +391,7 @@ gst_fakesink_change_state (GstElement *element)
return
GST_STATE_SUCCESS
;
error:
gst_element_error
(
element
,
CORE
,
STATE_CHANGE
,
GST_ELEMENT_ERROR
(
element
,
CORE
,
STATE_CHANGE
,
NULL
,
NULL
);
return
GST_STATE_FAILURE
;
}
...
...
gst/elements/gstfilesink.c
View file @
c5b612ed
...
...
@@ -233,14 +233,14 @@ gst_filesink_open_file (GstFileSink *sink)
/* open the file */
if
(
!
sink
->
filename
)
{
gst_element_error
(
sink
,
RESOURCE
,
NOT_FOUND
,
GST_ELEMENT_ERROR
(
sink
,
RESOURCE
,
NOT_FOUND
,
(
_
(
"No filename specified"
)),
NULL
);
return
FALSE
;
}
sink
->
file
=
fopen
(
sink
->
filename
,
"w"
);
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
),
GST_ERROR_SYSTEM
);
return
FALSE
;
...
...
@@ -260,7 +260,7 @@ gst_filesink_close_file (GstFileSink *sink)
if
(
fclose
(
sink
->
file
)
!=
0
)
{
gst_element_error
(
sink
,
RESOURCE
,
CLOSE
,
GST_ELEMENT_ERROR
(
sink
,
RESOURCE
,
CLOSE
,
(
_
(
"Error closing file
\"
%s
\"
"
),
sink
->
filename
),
GST_ERROR_SYSTEM
);
}
...
...
@@ -327,7 +327,7 @@ gst_filesink_handle_event (GstPad *pad, GstEvent *event)
if
(
GST_EVENT_SEEK_FLAGS
(
event
)
&
GST_SEEK_FLAG_FLUSH
)
if
(
fflush
(
filesink
->
file
))
gst_element_error
(
filesink
,
RESOURCE
,
WRITE
,
GST_ELEMENT_ERROR
(
filesink
,
RESOURCE
,
WRITE
,
(
_
(
"Error while writing to file
\"
%s
\"
"
),
filesink
->
filename
),
GST_ERROR_SYSTEM
);
...
...
@@ -359,7 +359,7 @@ gst_filesink_handle_event (GstPad *pad, GstEvent *event)
}
case
GST_EVENT_FLUSH
:
if
(
fflush
(
filesink
->
file
))
{
gst_element_error
(
filesink
,
RESOURCE
,
WRITE
,
GST_ELEMENT_ERROR
(
filesink
,
RESOURCE
,
WRITE
,
(
_
(
"Error while writing to file
\"
%s
\"
"
),
filesink
->
filename
),
GST_ERROR_SYSTEM
);
}
...
...
@@ -411,7 +411,7 @@ gst_filesink_chain (GstPad *pad, GstData *_data)
GST_BUFFER_SIZE
(
buf
)
-
bytes_written
,
filesink
->
file
);
if
(
wrote
<=
0
)
{
gst_element_error
(
filesink
,
RESOURCE
,
WRITE
,
GST_ELEMENT_ERROR
(
filesink
,
RESOURCE
,
WRITE
,
(
_
(
"Error while writing to file
\"
%s
\"
"
),
filesink
->
filename
),
(
"Only %d of %d bytes written: %s"
,
bytes_written
,
GST_BUFFER_SIZE
(
buf
),
...
...
gst/elements/gstfilesrc.c
View file @
c5b612ed
...
...
@@ -394,7 +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
);
if
(
mmapregion
==
NULL
)
{
gst_element_error
(
src
,
RESOURCE
,
TOO_LAZY
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
TOO_LAZY
,
NULL
,
(
"mmap call failed"
));
return
NULL
;
...
...
@@ -641,13 +641,13 @@ gst_filesrc_get_read (GstFileSrc *src)
ret
=
read
(
src
->
fd
,
GST_BUFFER_DATA
(
buf
),
readsize
);
if
(
ret
<
0
){
gst_element_error
(
src
,
RESOURCE
,
READ
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
READ
,
NULL
,
GST_ERROR_SYSTEM
);
return
NULL
;
}
if
(
ret
<
readsize
)
{
gst_element_error
(
src
,
RESOURCE
,
READ
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
READ
,
NULL
,
(
"unexpected end of file"
));
return
NULL
;
...
...
@@ -725,7 +725,7 @@ gst_filesrc_open_file (GstFileSrc *src)
if
(
src
->
filename
==
NULL
)
{
gst_element_error
(
src
,
RESOURCE
,
NOT_FOUND
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
NOT_FOUND
,
(
_
(
"No filename specified"
)),
NULL
);
return
FALSE
;
...
...
@@ -733,7 +733,7 @@ gst_filesrc_open_file (GstFileSrc *src)
if
(
src
->
filename
==
NULL
)
{
gst_element_error
(
src
,
RESOURCE
,
NOT_FOUND
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
NOT_FOUND
,
(
_
(
"No file specified for reading"
)),
NULL
);
return
FALSE
;
...
...
@@ -747,9 +747,9 @@ gst_filesrc_open_file (GstFileSrc *src)
if
(
src
->
fd
<
0
)
{
if
(
errno
==
ENOENT
)
gst_element_error
(
src
,
RESOURCE
,
NOT_FOUND
,
NULL
,
NULL
);
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
NOT_FOUND
,
NULL
,
NULL
);
else
gst_element_error
(
src
,
RESOURCE
,
OPEN_READ
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
OPEN_READ
,
(
_
(
"Could not open file
\"
%s
\"
for reading"
),
src
->
filename
),
GST_ERROR_SYSTEM
);
return
FALSE
;
...
...
@@ -760,7 +760,7 @@ gst_filesrc_open_file (GstFileSrc *src)
fstat
(
src
->
fd
,
&
stat_results
);
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
),
NULL
);
close
(
src
->
fd
);
...
...
gst/elements/gstidentity.c
View file @
c5b612ed
...
...
@@ -166,7 +166,7 @@ gst_identity_chain (GstPad *pad, GstData *_data)
identity
->
error_after
--
;
if
(
identity
->
error_after
==
0
)
{
gst_buffer_unref
(
buf
);
gst_element_error
(
identity
,
CORE
,
FAILED
,
GST_ELEMENT_ERROR
(
identity
,
CORE
,
FAILED
,
(
_
(
"Failed after iterations as requested"
)),
NULL
);
return
;
...
...
gst/elements/gstmultidisksrc.c
View file @
c5b612ed
...
...
@@ -240,7 +240,7 @@ gboolean gst_multidisksrc_open_file (GstMultiDiskSrc *src, GstPad *srcpad)
src
->
fd
=
open
((
const
char
*
)
src
->
currentfilename
,
O_RDONLY
);
if
(
src
->
fd
<
0
)
{
gst_element_error
(
src
,
RESOURCE
,
OPEN_READ
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
OPEN_READ
,
(
_
(
"Could not open file
\"
%s
\"
for reading"
),
src
->
currentfilename
),
GST_ERROR_SYSTEM
);
return
FALSE
;
...
...
@@ -255,7 +255,7 @@ gboolean gst_multidisksrc_open_file (GstMultiDiskSrc *src, GstPad *srcpad)
/* collapse state if that failed */
if
(
src
->
map
==
NULL
)
{
close
(
src
->
fd
);
gst_element_error
(
src
,
RESOURCE
,
TOO_LAZY
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
TOO_LAZY
,
NULL
,
(
"mmap call failed"
));
return
FALSE
;
...
...
gst/elements/gstmultifilesrc.c
View file @
c5b612ed
...
...
@@ -240,7 +240,7 @@ gboolean gst_multidisksrc_open_file (GstMultiDiskSrc *src, GstPad *srcpad)
src
->
fd
=
open
((
const
char
*
)
src
->
currentfilename
,
O_RDONLY
);
if
(
src
->
fd
<
0
)
{
gst_element_error
(
src
,
RESOURCE
,
OPEN_READ
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
OPEN_READ
,
(
_
(
"Could not open file
\"
%s
\"
for reading"
),
src
->
currentfilename
),
GST_ERROR_SYSTEM
);
return
FALSE
;
...
...
@@ -255,7 +255,7 @@ gboolean gst_multidisksrc_open_file (GstMultiDiskSrc *src, GstPad *srcpad)
/* collapse state if that failed */
if
(
src
->
map
==
NULL
)
{
close
(
src
->
fd
);
gst_element_error
(
src
,
RESOURCE
,
TOO_LAZY
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
TOO_LAZY
,
NULL
,
(
"mmap call failed"
));
return
FALSE
;
...
...
gst/elements/gstpipefilter.c
View file @
c5b612ed
...
...
@@ -169,7 +169,7 @@ gst_pipefilter_get (GstPad *pad)
readbytes
=
read
(
pipefilter
->
fdout
[
0
],
GST_BUFFER_DATA
(
newbuf
),
pipefilter
->
bytes_per_read
);
GST_DEBUG
(
"read %ld bytes"
,
readbytes
);
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
;
}
/* 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
);
GST_DEBUG
(
"written %ld bytes"
,
writebytes
);
if
(
writebytes
<
0
)
{
gst_element_error
(
pipefilter
,
RESOURCE
,
WRITE
,
NULL
,
GST_ERROR_SYSTEM
);
GST_ELEMENT_ERROR
(
pipefilter
,
RESOURCE
,
WRITE
,
NULL
,
GST_ERROR_SYSTEM
);
return
;
}
gst_buffer_unref
(
buf
);
...
...
@@ -267,7 +267,7 @@ gst_pipefilter_open_file (GstPipefilter *src)
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
;
}
...
...
@@ -280,7 +280,7 @@ gst_pipefilter_open_file (GstPipefilter *src)
dup2
(
src
->
fdout
[
1
],
STDOUT_FILENO
);
/* set the childs output stream */
execvp
(
src
->
command
[
0
],
&
src
->
command
[
0
]);
/* 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
;
}
...
...
gst/elements/gsttypefind.c
View file @
c5b612ed
...
...
@@ -555,7 +555,7 @@ gst_type_find_element_chain (GstPad *pad, GstData *data)
if
(
typefind
->
caps
)
{
stop_typefinding
(
typefind
);
}
else
if
(
typefind
->
possibilities
==
NULL
)
{
gst_element_error
(
typefind
,
STREAM
,
TYPE_NOT_FOUND
,
GST_ELEMENT_ERROR
(
typefind
,
STREAM
,
TYPE_NOT_FOUND
,
NULL
,
NULL
);
}
else
{
/* set up typefind element for next iteration */
...
...
gst/gstelement.h
View file @
c5b612ed
...
...
@@ -139,7 +139,7 @@ typedef enum {
#define GST_ELEMENT_CLOCK(obj) (((GstElement*)(obj))->clock)
#define GST_ELEMENT_PADS(obj) ((obj)->pads)
#define
gst_element_error
(el, domain, code, message, debug) G_STMT_START { \
#define
GST_ELEMENT_ERROR
(el, domain, code, message, debug) G_STMT_START { \
gst_element_error_full (GST_ELEMENT(el), \
GST_ ## domain ## _ERROR, GST_ ## domain ## _ERROR_ ## code, \
_gst_element_error_printf message, \
...
...
gst/gstpad.c
View file @
c5b612ed
...
...
@@ -2255,7 +2255,7 @@ gst_pad_set_explicit_caps (GstPad *pad, const GstCaps *caps)
}
link_ret
=
gst_pad_try_set_caps
(
pad
,
caps
);
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
,
(
"failed to negotiate (try_set_caps returned REFUSED)"
));
return
FALSE
;
...
...
@@ -2633,7 +2633,7 @@ gst_pad_recover_caps_error (GstPad *pad, const GstCaps *allowed)
/* report error */
parent = gst_pad_get_parent (pad);
gst_element_error
(parent, CORE, PAD,
GST_ELEMENT_ERROR
(parent, CORE, PAD,
NULL,
("negotiation failed on pad %s:%s", GST_DEBUG_PAD_NAME (pad)));
#endif
...
...
@@ -2939,7 +2939,7 @@ gst_pad_pull (GstPad *pad)
peer
=
GST_RPAD_PEER
(
pad
);
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
)));
}
else
{
...
...
@@ -2961,10 +2961,10 @@ restart:
}
/* 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
)));
}
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"
,
GST_DEBUG_PAD_NAME
(
pad
),
GST_DEBUG_PAD_NAME
(
peer
)));
}
...
...
gst/gstqueue.c
View file @
c5b612ed
...
...
@@ -561,7 +561,7 @@ restart:
if
(
!
queue
->
may_deadlock
)
{
g_mutex_unlock
(
queue
->
qlock
);
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"
));
/* we don't go to out_unref here, since we want to
* unref the buffer *before* calling GST_ELEMENT_ERROR */
...
...
@@ -676,7 +676,7 @@ restart:
/* this means the other end is shut down */
if
(
!
queue
->
may_deadlock
)
{
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"
));
goto
restart
;
}
else
{
...
...
gst/schedulers/gstbasicscheduler.c
View file @
c5b612ed
...
...
@@ -460,7 +460,7 @@ gst_basic_scheduler_chainhandler_proxy (GstPad * pad, GstData * data)
}
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"
));
return
;
}
...
...
@@ -528,7 +528,7 @@ gst_basic_scheduler_gethandler_proxy (GstPad * pad)
GST_CAT_DEBUG
(
debug_dataflow
,
"new pad in mid-switch!"
);
pad
=
(
GstPad
*
)
GST_RPAD_PEER
(
peer
);
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
);
peer
=
GST_RPAD_PEER
(
pad
);
...
...
@@ -659,7 +659,7 @@ gst_basic_scheduler_cothreaded_chain (GstBin * bin, GstSchedulerChain * chain)
* either, we have an error */
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"
,
GST_ELEMENT_NAME
(
element
)));
return
FALSE
;
...
...
@@ -727,7 +727,7 @@ gst_basic_scheduler_cothreaded_chain (GstBin * bin, GstSchedulerChain * chain)
chain
->
sched
->
context
,
wrapper_function
,
0
,
(
char
**
)
element
);
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
)));
return
FALSE
;
}
...
...
plugins/elements/gstfakesink.c
View file @
c5b612ed
...
...
@@ -391,7 +391,7 @@ gst_fakesink_change_state (GstElement *element)
return
GST_STATE_SUCCESS
;
error:
gst_element_error
(
element
,
CORE
,
STATE_CHANGE
,
GST_ELEMENT_ERROR
(
element
,
CORE
,
STATE_CHANGE
,
NULL
,
NULL
);
return
GST_STATE_FAILURE
;
}
...
...
plugins/elements/gstfilesink.c
View file @
c5b612ed
...
...
@@ -233,14 +233,14 @@ gst_filesink_open_file (GstFileSink *sink)
/* open the file */
if
(
!
sink
->
filename
)
{
gst_element_error
(
sink
,
RESOURCE
,
NOT_FOUND
,
GST_ELEMENT_ERROR
(
sink
,
RESOURCE
,
NOT_FOUND
,
(
_
(
"No filename specified"
)),
NULL
);
return
FALSE
;
}
sink
->
file
=
fopen
(
sink
->
filename
,
"w"
);
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
),
GST_ERROR_SYSTEM
);
return
FALSE
;
...
...
@@ -260,7 +260,7 @@ gst_filesink_close_file (GstFileSink *sink)
if
(
fclose
(
sink
->
file
)
!=
0
)
{
gst_element_error
(
sink
,
RESOURCE
,
CLOSE
,
GST_ELEMENT_ERROR
(
sink
,
RESOURCE
,
CLOSE
,
(
_
(
"Error closing file
\"
%s
\"
"
),
sink
->
filename
),
GST_ERROR_SYSTEM
);
}
...
...
@@ -327,7 +327,7 @@ gst_filesink_handle_event (GstPad *pad, GstEvent *event)
if
(
GST_EVENT_SEEK_FLAGS
(
event
)
&
GST_SEEK_FLAG_FLUSH
)
if
(
fflush
(
filesink
->
file
))
gst_element_error
(
filesink
,
RESOURCE
,
WRITE
,
GST_ELEMENT_ERROR
(
filesink
,
RESOURCE
,
WRITE
,
(
_
(
"Error while writing to file
\"
%s
\"
"
),
filesink
->
filename
),
GST_ERROR_SYSTEM
);
...
...
@@ -359,7 +359,7 @@ gst_filesink_handle_event (GstPad *pad, GstEvent *event)
}
case
GST_EVENT_FLUSH
:
if
(
fflush
(
filesink
->
file
))
{
gst_element_error
(
filesink
,
RESOURCE
,
WRITE
,
GST_ELEMENT_ERROR
(
filesink
,
RESOURCE
,
WRITE
,
(
_
(
"Error while writing to file
\"
%s
\"
"
),
filesink
->
filename
),
GST_ERROR_SYSTEM
);
}
...
...
@@ -411,7 +411,7 @@ gst_filesink_chain (GstPad *pad, GstData *_data)
GST_BUFFER_SIZE
(
buf
)
-
bytes_written
,
filesink
->
file
);
if
(
wrote
<=
0
)
{
gst_element_error
(
filesink
,
RESOURCE
,
WRITE
,
GST_ELEMENT_ERROR
(
filesink
,
RESOURCE
,
WRITE
,
(
_
(
"Error while writing to file
\"
%s
\"
"
),
filesink
->
filename
),
(
"Only %d of %d bytes written: %s"
,
bytes_written
,
GST_BUFFER_SIZE
(
buf
),
...
...
plugins/elements/gstfilesrc.c
View file @
c5b612ed
...
...
@@ -394,7 +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
);
if
(
mmapregion
==
NULL
)
{
gst_element_error
(
src
,
RESOURCE
,
TOO_LAZY
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
TOO_LAZY
,
NULL
,
(
"mmap call failed"
));
return
NULL
;
...
...
@@ -641,13 +641,13 @@ gst_filesrc_get_read (GstFileSrc *src)
ret
=
read
(
src
->
fd
,
GST_BUFFER_DATA
(
buf
),
readsize
);
if
(
ret
<
0
){
gst_element_error
(
src
,
RESOURCE
,
READ
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
READ
,
NULL
,
GST_ERROR_SYSTEM
);
return
NULL
;
}
if
(
ret
<
readsize
)
{
gst_element_error
(
src
,
RESOURCE
,
READ
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
READ
,
NULL
,
(
"unexpected end of file"
));
return
NULL
;
...
...
@@ -725,7 +725,7 @@ gst_filesrc_open_file (GstFileSrc *src)
if
(
src
->
filename
==
NULL
)
{
gst_element_error
(
src
,
RESOURCE
,
NOT_FOUND
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
NOT_FOUND
,
(
_
(
"No filename specified"
)),
NULL
);
return
FALSE
;
...
...
@@ -733,7 +733,7 @@ gst_filesrc_open_file (GstFileSrc *src)
if
(
src
->
filename
==
NULL
)
{
gst_element_error
(
src
,
RESOURCE
,
NOT_FOUND
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
NOT_FOUND
,
(
_
(
"No file specified for reading"
)),
NULL
);
return
FALSE
;
...
...
@@ -747,9 +747,9 @@ gst_filesrc_open_file (GstFileSrc *src)
if
(
src
->
fd
<
0
)
{
if
(
errno
==
ENOENT
)
gst_element_error
(
src
,
RESOURCE
,
NOT_FOUND
,
NULL
,
NULL
);
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
NOT_FOUND
,
NULL
,
NULL
);
else
gst_element_error
(
src
,
RESOURCE
,
OPEN_READ
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
OPEN_READ
,
(
_
(
"Could not open file
\"
%s
\"
for reading"
),
src
->
filename
),
GST_ERROR_SYSTEM
);
return
FALSE
;
...
...
@@ -760,7 +760,7 @@ gst_filesrc_open_file (GstFileSrc *src)
fstat
(
src
->
fd
,
&
stat_results
);
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
),
NULL
);
close
(
src
->
fd
);
...
...
plugins/elements/gstidentity.c
View file @
c5b612ed
...
...
@@ -166,7 +166,7 @@ gst_identity_chain (GstPad *pad, GstData *_data)
identity
->
error_after
--
;
if
(
identity
->
error_after
==
0
)
{
gst_buffer_unref
(
buf
);
gst_element_error
(
identity
,
CORE
,
FAILED
,
GST_ELEMENT_ERROR
(
identity
,
CORE
,
FAILED
,
(
_
(
"Failed after iterations as requested"
)),
NULL
);
return
;
...
...
plugins/elements/gstmultidisksrc.c
View file @
c5b612ed
...
...
@@ -240,7 +240,7 @@ gboolean gst_multidisksrc_open_file (GstMultiDiskSrc *src, GstPad *srcpad)
src
->
fd
=
open
((
const
char
*
)
src
->
currentfilename
,
O_RDONLY
);
if
(
src
->
fd
<
0
)
{
gst_element_error
(
src
,
RESOURCE
,
OPEN_READ
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
OPEN_READ
,
(
_
(
"Could not open file
\"
%s
\"
for reading"
),
src
->
currentfilename
),
GST_ERROR_SYSTEM
);
return
FALSE
;
...
...
@@ -255,7 +255,7 @@ gboolean gst_multidisksrc_open_file (GstMultiDiskSrc *src, GstPad *srcpad)
/* collapse state if that failed */
if
(
src
->
map
==
NULL
)
{
close
(
src
->
fd
);
gst_element_error
(
src
,
RESOURCE
,
TOO_LAZY
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
TOO_LAZY
,
NULL
,
(
"mmap call failed"
));
return
FALSE
;
...
...
plugins/elements/gstmultifilesrc.c
View file @
c5b612ed
...
...
@@ -240,7 +240,7 @@ gboolean gst_multidisksrc_open_file (GstMultiDiskSrc *src, GstPad *srcpad)
src
->
fd
=
open
((
const
char
*
)
src
->
currentfilename
,
O_RDONLY
);
if
(
src
->
fd
<
0
)
{
gst_element_error
(
src
,
RESOURCE
,
OPEN_READ
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
OPEN_READ
,
(
_
(
"Could not open file
\"
%s
\"
for reading"
),
src
->
currentfilename
),
GST_ERROR_SYSTEM
);
return
FALSE
;
...
...
@@ -255,7 +255,7 @@ gboolean gst_multidisksrc_open_file (GstMultiDiskSrc *src, GstPad *srcpad)
/* collapse state if that failed */
if
(
src
->
map
==
NULL
)
{
close
(
src
->
fd
);
gst_element_error
(
src
,
RESOURCE
,
TOO_LAZY
,
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
TOO_LAZY
,
NULL
,
(
"mmap call failed"
));
return
FALSE
;
...
...
plugins/elements/gstpipefilter.c
View file @
c5b612ed
...
...
@@ -169,7 +169,7 @@ gst_pipefilter_get (GstPad *pad)
readbytes
=
read
(
pipefilter
->
fdout
[
0
],
GST_BUFFER_DATA
(
newbuf
),
pipefilter
->
bytes_per_read
);
GST_DEBUG
(
"read %ld bytes"
,
readbytes
);