var msg = bus.TimedPopFiltered (Constants.CLOCK_TIME_NONE, MessageType.Eos | MessageType.Error);
// Free resources
- if (msg != null)
- msg.Dispose ();
-
- bus.Dispose ();
pipeline.SetState (State.Null);
- pipeline.Dispose ();
}
}
}
\ No newline at end of file
// Build the pipeline
pipeline.Add (source, sink);
if (!source.Link (sink)) {
- pipeline.Dispose ();
Console.WriteLine ("Elements could not be linked");
return;
}
var ret = pipeline.SetState(State.Playing);
if (ret == StateChangeReturn.Failure) {
Console.WriteLine ("Unable to set the pipeline to the playing state");
- pipeline.Dispose ();
return;
}
Console.WriteLine ("Unexpected messag received");
break;
}
- msg.Dispose ();
}
- bus.Dispose ();
pipeline.SetState (State.Null);
- pipeline.Dispose ();
}
}
}
\ No newline at end of file