Exemple #1
0
    public static void Main(string[] args)
    {
        if (args.Length < 1) {
            Console.WriteLine ("usage: mono playbin-player.exe audio_file_uri");
            return;
        }

        songs = args;

        Gst.Application.Init ();
        loop = new MainLoop ();

        play = ElementFactory.Make ("playbin", "play") as PlayBin;

        if (play == null) {
            Console.WriteLine ("error creating a playbin gstreamer object");
            return;
        }

        play.Uri = songs[song_idx++];
        play.Bus.AddWatch (new BusFunc (BusCb));
        play.SetState (State.Playing);

        loop.Run ();
    }
Exemple #2
0
        public GStreamerAudioStream()
        {
            Gst.Application.Init();
            loop = new MainLoop();

            play = ElementFactory.Make ("playbin", "play") as PlayBin;

            if (play == null) {
                Console.WriteLine ("error creating a playbin gstreamer object");
                return;
            }
        }