spek

Acoustic spectrum analyser
git clone http://git.hanabi.in/repos/spek.git
Log | Files | Refs | README

commit 5926b602c6fe70d76fd9325cafdf38ea4e150d6b
parent 81373dd7cc0dced4157e5e9ce0ae373c40f9b12b
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Tue,  4 May 2010 20:03:53 +1000

Proper ctor/dtor

Diffstat:
Msrc/spek-source.vala | 12+++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/spek-source.vala b/src/spek-source.vala @@ -1,11 +1,21 @@ using Gst; namespace Spek { - public class Source { + public class Source : GLib.Object { + + public string file_name { get; construct; } private Pipeline pipeline; public Source (string file_name) { + GLib.Object (file_name: file_name); + } + + ~Source () { + pipeline.set_state (State.NULL); + } + + construct { pipeline = new Pipeline ("pipeline"); var filesrc = ElementFactory.make ("filesrc", null); var decodebin = ElementFactory.make ("decodebin", null);