projects
/
projects
/
chimara
/
chimara.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve error handling
[projects/chimara/chimara.git]
/
libchimara
/
schannel.c
diff --git
a/libchimara/schannel.c
b/libchimara/schannel.c
index 696aaa2a7351f225ea9a009e44c1d0e3741d43f4..004efefd87288841194b894958dd0f099ff777b5 100644
(file)
--- a/
libchimara/schannel.c
+++ b/
libchimara/schannel.c
@@
-44,12
+44,19
@@
glk_schannel_create(glui32 rock)
g_free(pipeline_name);
/* Create GStreamer elements to put in the pipeline */
g_free(pipeline_name);
/* Create GStreamer elements to put in the pipeline */
- s->source = gst_element_factory_make("f
ak
esrc", NULL);
+ s->source = gst_element_factory_make("f
il
esrc", NULL);
s->filter = gst_element_factory_make("identity", NULL);
s->filter = gst_element_factory_make("identity", NULL);
- s->sink = gst_element_factory_make("fakesink", NULL);
+ s->sink = gst_element_factory_make("autoaudiosink", NULL);
+ if(!s->source || !s->filter || !s->sink) {
+ WARNING("Could not create one or more GStreamer elements");
+ goto fail;
+ }
+
gst_bin_add_many(GST_BIN(s->pipeline), s->source, s->filter, s->sink, NULL);
gst_bin_add_many(GST_BIN(s->pipeline), s->source, s->filter, s->sink, NULL);
- if(!gst_element_link_many(s->source, s->filter, s->sink, NULL))
+ if(!gst_element_link_many(s->source, s->filter, s->sink, NULL)) {
+ WARNING("Could not link GStreamer elements");
goto fail;
goto fail;
+ }
return s;
return s;
@@
-166,8
+173,7
@@
glk_schannel_get_rock(schanid_t chan)
glui32
glk_schannel_play(schanid_t chan, glui32 snd)
{
glui32
glk_schannel_play(schanid_t chan, glui32 snd)
{
- VALID_SCHANNEL(chan, return 0);
- return 0;
+ return glk_schannel_play_ext(chan, snd, 1, 0);
}
/**
}
/**