def _shell_started_cb():
# Unfreeze the display
hw_manager = hardwaremanager.get_manager()
hw_manager.set_dcon_freeze(0)
startup_sound = os.path.join(env.get_data_path('startup.flac'))
if os.path.exists(startup_sound):
player = gst.element_factory_make("playbin", "player")
player.set_property("uri", "file://" + startup_sound)
bus = player.get_bus()
bus.add_signal_watch()
bus.connect("message::eos", lambda player: player.set_state(gst.STATE_NULL))
player.set_state(gst.STATE_PLAYING)
produces:
[u'sugar-activity', u'journalactivity.JournalActivity', '-b', dbus.String(u'org.laptop.JournalActivity', variant_level=1), '-a', '51cd84430532754fc58724e539472df6800b4a77']
TypeError: <lambda>() takes exactly 1 argument (2 given)
(sugar-shell:2618): GStreamer-CRITICAL **:
Trying to dispose element preroll_audio_src0, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
(sugar-shell:2618): GStreamer-CRITICAL **: pad selector_audio_src0:sink0 returned NULL caps from getcaps function
(sugar-shell:2618): GStreamer-CRITICAL **:
Trying to dispose element selector_audio_src0, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
(sugar-shell:2618): GStreamer-CRITICAL **: Failed to deactivate pad typefind:src, very bad
(sugar-shell:2618): GStreamer-CRITICAL **: Failed to deactivate pad flacdec0:sink, very bad
(sugar-shell:2618): GStreamer-CRITICAL **:
Trying to dispose element flacdec0, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
(sugar-shell:2618): GStreamer-CRITICAL **:
Trying to dispose element typefind, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
(sugar-shell:2618): GStreamer-CRITICAL **:
Trying to dispose element decodebin0, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
(sugar-shell:2618): GStreamer-CRITICAL **:
Trying to dispose element source, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
(sugar-shell:2618): GStreamer-CRITICAL **:
Trying to dispose element player, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
(sugar-shell:2618): GStreamer-CRITICAL **:
Trying to dispose element player, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.