Exemplo n.º 1
0
    public void TestGetAllowedCaps()
    {
        Caps caps;

        Pad sink = new Pad("sink", PadDirection.Sink);

        caps = sink.AllowedCaps;
        Assert.IsNull(caps);

        Pad src = new Pad("src", PadDirection.Src);

        caps = src.AllowedCaps;
        Assert.IsNull(caps);

        caps = Caps.FromString("foo/bar");

        src.SetCaps(caps);
        sink.SetCaps(caps);

        PadLinkReturn plr = src.Link(sink);

        Assert.AreEqual(plr, PadLinkReturn.Ok);

        Caps gotcaps = src.AllowedCaps;

        Assert.IsNotNull(gotcaps);
        Assert.IsTrue(gotcaps.IsEqual(caps));
    }
Exemplo n.º 2
0
 private void uriDecodeBin_PadAdded(object o, PadAddedArgs args)
 {
     System.Diagnostics.Debug.WriteLine("uriDecodeBin_PadAdded: called with new pad named: " + args.NewPad.Name);
     
     // a pad has been added to the source so we need to link it to the rest of the pipeline to ultimately display it onscreen
     Pad sinkPad = videoSink.GetStaticPad("sink");   // get the pad for the one we have recieved  so we can link to the depayloader element
     System.Diagnostics.Debug.WriteLine("uriDecodeBin_PadAdded: queue pad returned: " + sinkPad.Name);
     PadLinkReturn ret = args.NewPad.Link(sinkPad);
     
     System.Diagnostics.Debug.WriteLine("uriDecodeBin_PadAdded: link attempt returned: " + ret.ToString());
 }