Пример #1
0
        static void Main(string[] args)
        {
            Gst.Application.Init(ref args);

            Element src     = ElementFactory.Make("audiotestsrc");
            Element convert = ElementFactory.Make("audioconvert");
            Element volume  = new ExampleVolume();
            Element sink    = ElementFactory.Make("autoaudiosink");

            Pipeline pipeline = new Pipeline();

            pipeline.Add(src, convert, volume, sink);
            Element.Link(src, convert, volume, sink);

            pipeline.SetState(State.Playing);

            MainLoop loop = new MainLoop();

            loop.Run();

            pipeline.SetState(State.Null);

            Console.ReadLine();
        }
Пример #2
0
        static void Main(string[] args)
        {
            Application.Init(ref args);

            Element src = ElementFactory.Make("audiotestsrc");
            Element convert = ElementFactory.Make("audioconvert");
            Element volume = new ExampleVolume();
            Element sink = ElementFactory.Make("autoaudiosink");

            Pipeline pipeline = new Pipeline();
            pipeline.Add(src, convert, volume, sink);
            Element.Link(src, convert, volume, sink);

            pipeline.SetState(State.Playing);

            MainLoop loop = new MainLoop();
            loop.Run();

            pipeline.SetState(State.Null);

            Console.ReadLine();
        }