mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
9c289eb563
This is not needed anymore as ABI compatible structures are now generated and used by the code generator.
30 lines
685 B
C#
30 lines
685 B
C#
// Authors
|
|
// Copyright (C) 2014 Stephan Sundermann <stephansundermann@gmail.com>
|
|
|
|
using System;
|
|
using Gst;
|
|
|
|
namespace GstreamerSharp
|
|
{
|
|
class Playback
|
|
{
|
|
public static void Main (string[] args)
|
|
{
|
|
// Initialize Gstreamer
|
|
Application.Init(ref args);
|
|
|
|
// Build the pipeline
|
|
var pipeline = Parse.Launch("playbin uri=http://download.blender.org/durian/trailer/sintel_trailer-1080p.mp4");
|
|
|
|
// Start playing
|
|
pipeline.SetState(State.Playing);
|
|
|
|
// Wait until error or EOS
|
|
var bus = pipeline.Bus;
|
|
var msg = bus.TimedPopFiltered (Constants.CLOCK_TIME_NONE, MessageType.Eos | MessageType.Error);
|
|
|
|
// Free resources
|
|
pipeline.SetState (State.Null);
|
|
}
|
|
}
|
|
}
|