Exemplo n.º 1
0
    public void padAdded(Element element, Pad pad) {

      this.caps = pad.getCaps();

      if (pad.isLinked()) {
        return;
      }

      pad.link(this.nextElement.getStaticPad("sink"));
    }
Exemplo n.º 2
0
  public void removeInput(final String url) {

    if (!inputElements.containsKey(url)) return;

    System.out.println("\n------------\nremoveInput: " + url + "\n-------------\n");
    removedInput = inputElements.get(url);

    boolean playing = pipe.isPlaying();
    Pad inputSrcPad = removedInput.getSrcPads().get(0);
    removedIdentity = inputSrcPad.getPeer().getParentElement();
    Pad adderSinkPad = removedIdentity.getSrcPads().get(0).getPeer();
    pipe.setState(State.READY);
    boolean removed = adder.removePad(adderSinkPad);
    System.out.println("Pad removed: " + removed);

    inputElements.remove(url);
    if (playing) {
      System.out.println("Adder inputs: " + adder.getSinkPads());
      pipe.setState(State.PLAYING);
    }
  }