Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Player : GLib.Object {
- Gst.Element playbin;
- construct {
- playbin = Gst.ElementFactory.make ("playbin", "bin");
- }
- public void play() {
- playbin.set_state (Gst.State.PLAYING);
- }
- public void pause() {
- playbin.set_state (Gst.State.PAUSED);
- }
- public string uri {
- owned get {
- string u;
- playbin.get ("uri", out u);
- return u;
- }
- set {
- playbin.set_state (Gst.State.NULL);
- playbin["uri"] = value;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement