blob: f7b8c002d9d3155377e3f33c71331413b2827b1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// 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);
}
}
}
|