Playbin with alsasink element as audiosink

ateixidor ateixidor at optimus.cat
Fri Sep 13 04:39:41 PDT 2013


Hello,

I have a question. I use playbin element to play some files using the
alsasink element into audiosink propierty. The application must run over
long time, but i noticed that the application stops some time after i
started it.

With the GST_DEBUG=playbin:4 variable set, the message that appears is the
next: 

0:18:35.369733877 23457   0x1bbb20 ERROR                playbin
gstplaybin2.c:4976:activate_group:<player> failed to activate sinks
Error received from element alsasink: Could not open audio device for
playback.
Debugging information: gstalsasink.c(851): gst_alsasink_open ():
/GstAlsaSink:alsasink:
Playback open error on device 'dsp_left': Too many open files
0:18:35.382125752 23457   0x1bbb20 INFO                 playbin
gstplaybin2.c:2163:gst_play_bin_set_sink:<player> Setting audio sink to
<alsasink>
main_loop = 3820848

(appumxDIGI:23457): GStreamer-CRITICAL **: gst_poll_get_read_gpollfd:
assertion 'set != NULL' failed
0:18:35.384735251 23457   0x1bbb20 ERROR                playbin
gstplaybin2.c:4976:activate_group:<player> failed to activate sinks
Error received from element alsasink: Could not open audio device for
playback.
Debugging information: gstalsasink.c(851): gst_alsasink_open ():
/GstAlsaSink:alsasink:
Playback open error on device 'dsp_left': Too many open files
0:18:35.397440752 23457   0x1bbb20 INFO                 playbin
gstplaybin2.c:2163:gst_play_bin_set_sink:<player> Setting audio sink to
<alsasink>
main_loop = 3820832

(appumxDIGI:23457): GStreamer-CRITICAL **: gst_poll_get_read_gpollfd:
assertion 'set != NULL' failed
0:18:35.399912502 23457   0x1bbb20 ERROR                playbin
gstplaybin2.c:4976:activate_group:<player> failed to activate sinks
Error received from element alsasink: Could not open audio device for
playback.
Debugging information: gstalsasink.c(851): gst_alsasink_open ():
/GstAlsaSink:alsasink:
Playback open error on device 'dsp_left': Too many open files

(appumxDIGI:23457): GStreamer-CRITICAL **: gst_poll_write_control: assertion
'set != NULL' failed

(appumxDIGI:23457): GStreamer-CRITICAL **: gstsystemclock: write control
failed in wakeup_async: 22:Invalid argument


(appumxDIGI:23457): GStreamer-CRITICAL **: gst_poll_free: assertion 'set !=
NULL' failed

(appumxDIGI:23457): GStreamer-CRITICAL **: gst_poll_get_read_gpollfd:
assertion 'set != NULL' failed
0:18:35.412797876 23457   0x1bbb20 INFO                 playbin
gstplaybin2.c:2163:gst_play_bin_set_sink:<player> Setting audio sink to
<alsasink>
main_loop = 3656488

(appumxDIGI:23457): GStreamer-CRITICAL **: gst_bus_create_watch: assertion
'bus->priv->poll != NULL' failed

(appumxDIGI:23457): GLib-CRITICAL **: g_source_set_callback: assertion
'source != NULL' failed
Segmentation fault

i've checked the memory usage with valgrind but i didn't find what could be
the problem.

Here is the code that i use:

        GMainLoop *main_loop; 
	GstElement *pipeline = gst_element_factory_make("playbin", "player");
	GstElement *el = gst_element_factory_make ("alsasink", "alsasink");
	g_object_set (el,"device", "dsp_left",NULL);
	g_object_set(G_OBJECT(pipeline), "uri",
"file:///mnt/jffs2/msg/espancomido.ogg", NULL);
	g_object_set(G_OBJECT(pipeline), "audio-sink", el, NULL);

	main_loop = g_main_loop_new (NULL, FALSE);
	
        GstBus *bus;
	bus = gst_element_get_bus (pipeline);
			 
	gst_bus_add_watch (bus, (GstBusFunc)handle_message, main_loop);
	gst_object_unref (bus);
		
	gst_element_set_state(GST_ELEMENT(pipeline), GST_STATE_PLAYING);
	
	g_main_loop_run (main_loop);
			
	gst_element_set_state(GST_ELEMENT(pipeline), GST_STATE_NULL);
	g_main_loop_unref (main_loop);
        gst_object_unref(GST_OBJECT(pipeline));

Coult anyone tell me if i'm doing something wrong?

Thank you very much.





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Playbin-with-alsasink-element-as-audiosink-tp4661985.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list