From 0a174c8bb369c461e10fa9e1ced482d0af9df437 Mon Sep 17 00:00:00 2001 From: Emil Ivov Date: Thu, 5 Nov 2009 20:40:01 +0000 Subject: [PATCH] Removes a duplicate or implementation in media direction --- .../protocol/sip/CallPeerMediaHandler.java | 5 +-- .../service/neomedia/MediaDirection.java | 36 ------------------- 2 files changed, 3 insertions(+), 38 deletions(-) diff --git a/src/net/java/sip/communicator/impl/protocol/sip/CallPeerMediaHandler.java b/src/net/java/sip/communicator/impl/protocol/sip/CallPeerMediaHandler.java index 512fc831d..f81a665e6 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/CallPeerMediaHandler.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/CallPeerMediaHandler.java @@ -412,7 +412,7 @@ private MediaStream initStream(StreamConnector connector, } else { - stream.stop(); + //this is a reinit } return configureAndStartStream(connector, device, format, @@ -439,7 +439,8 @@ private MediaStream configureAndStartStream( else this.videoStream = (VideoMediaStream)stream; - stream.start(); + if ( ! stream.isStarted()) + stream.start(); return stream; } diff --git a/src/net/java/sip/communicator/service/neomedia/MediaDirection.java b/src/net/java/sip/communicator/service/neomedia/MediaDirection.java index d4889076e..575b7ee26 100644 --- a/src/net/java/sip/communicator/service/neomedia/MediaDirection.java +++ b/src/net/java/sip/communicator/service/neomedia/MediaDirection.java @@ -182,42 +182,6 @@ else if( this == RECVONLY) return direction; } - /** - * Reverses a direction constraint on this MediaDirection - * or in other words performs an or operation. This method is - * meant for use in cases like putting a stream off hold or in other words - * reversing the SENDONLY constraint. - * - * @param direction the direction that we'd like to enable (i.e. add) to - * this MediaDirection - * - * @return the new MediaDirection obtained after adding the - * specified direction this MediaDirection. - */ - public MediaDirection or(MediaDirection direction) - { - if (this == SENDRECV) - { - return this; - } - else if( this == SENDONLY) - { - if( direction.allowsReceiving()) - return SENDRECV; - else - return this; - } - else if( this == RECVONLY) - { - if( direction.allowsSending()) - return SENDRECV; - else - return this; - } - else // INACTIVE - return direction; - } - /** * Returns the MediaDirection value corresponding to a remote * party's perspective of this MediaDirection. In other words,