cheese r748 - in branches/cheese-vala: . src
- From: jhaitsma svn gnome org
- To: svn-commits-list gnome org
- Subject: cheese r748 - in branches/cheese-vala: . src
- Date: Mon, 2 Jun 2008 20:58:16 +0000 (UTC)
Author: jhaitsma
Date: Mon Jun 2 20:58:16 2008
New Revision: 748
URL: http://svn.gnome.org/viewvc/cheese?rev=748&view=rev
Log:
woohoobzr diff cheese-audio works now
Modified:
branches/cheese-vala/ (props changed)
branches/cheese-vala/src/cheese-audio.vala
branches/cheese-vala/src/cheese-window.vala
Modified: branches/cheese-vala/src/cheese-audio.vala
==============================================================================
--- branches/cheese-vala/src/cheese-audio.vala (original)
+++ branches/cheese-vala/src/cheese-audio.vala Mon Jun 2 20:58:16 2008
@@ -34,6 +34,7 @@
construct {
pipeline = new Pipeline ("pipeline");
playbin = ElementFactory.make ("playbin", "playbin");
+ pipeline.add (playbin);
var bus = pipeline.get_bus ();
bus.add_watch (on_bus_message);
playbin.set ("uri", Filename.to_uri (filename));
@@ -42,7 +43,7 @@
public Audio (string filename) {
this.filename = filename;
}
-
+
public static bool play_file (string filename) {
var audio = new Audio (filename);
audio.start ();
@@ -66,37 +67,11 @@
this.unref ();
break;
case (MessageType.ERROR):
+ //TODO add passing error here
done ();
- break;
-
+ this.unref ();
+ break;
}
return true;
}
-/*
- GstAudioPlay *self = GST_AUDIO_PLAY (data);
- GError *error = NULL;
-
- switch (GST_MESSAGE_TYPE (message)) {
- case GST_MESSAGE_EOS:
- g_signal_emit (self, signals[SIGNAL_DONE], 0, NULL);
-
- gst_audio_play_stop (self);
- g_object_unref (self);
-
- break;
-
- case GST_MESSAGE_ERROR:
- gst_message_parse_error (message, &error, NULL);
- g_signal_emit (self, signals[SIGNAL_DONE], 0, error);
- g_clear_error (&error);
-
- gst_audio_play_stop (self);
- g_object_unref (self);
-
- break;
-
- default:
- break;
- }
- return TRUE; */
}
Modified: branches/cheese-vala/src/cheese-window.vala
==============================================================================
--- branches/cheese-vala/src/cheese-window.vala (original)
+++ branches/cheese-vala/src/cheese-window.vala Mon Jun 2 20:58:16 2008
@@ -225,6 +225,7 @@
}
void on_action_button (Button button) {
+ Audio.play_file ("/home/haitsma/Programming/gnome2/cheese/data/sounds/shutter0.ogg");
}
void on_account_photo (Action action) {
@@ -320,7 +321,7 @@
label_take_photo.set_text_with_mnemonic ("<b>" + _("_Take a photo") + "</b>");
label_take_photo.set_use_markup (true);
- take_picture.set_sensitive (false);
+ //take_picture.set_sensitive (false);
thumb_view = new ThumbView (media_path);
thumb_container.add (thumb_view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]