Skip to content

Commit

Permalink
- cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ritzalam committed Mar 5, 2012
1 parent 01b34e7 commit 892de24
Showing 1 changed file with 2 additions and 41 deletions.
43 changes: 2 additions & 41 deletions bbb-voice/src/main/java/org/red5/app/sip/AudioStream.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
/*
* Copyright (c) 2008, 2009 by Xuggle Incorporated. All rights reserved.
*
* This file is part of Xuggler.
*
* You can redistribute Xuggler and/or modify it under the terms of the GNU
* Affero General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Xuggler is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Xuggler. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.red5.app.sip;

import java.io.IOException;
Expand Down Expand Up @@ -63,29 +44,23 @@ public class AudioStream implements IBroadcastStream, IProvider, IPipeConnection
public AudioStream(String name) {
publishedStreamName = name;
livePipe = null;
log.trace("name: {}", name);

streamCodecInfo = new StreamCodecInfo();
creationTime = null;
}

public IProvider getProvider() {
log.trace("getProvider()");
return this;
}

public Notify getMetaData() {
System.out.println("**** GETTING METADATA ******");
return null;
}

public String getPublishedName() {
log.trace("getPublishedName()");
return publishedStreamName;
}

public String getSaveFilename() {
log.trace("getSaveFilename()");
throw new Error("unimplemented method");
}

Expand All @@ -95,7 +70,6 @@ public void addStreamListener(IStreamListener listener) {
}

public Collection<IStreamListener> getStreamListeners() {
// log.trace("getStreamListeners()");
return streamListeners;
}

Expand All @@ -104,14 +78,11 @@ public void removeStreamListener(IStreamListener listener) {
streamListeners.remove(listener);
}

public void saveAs(String filePath, boolean isAppend) throws IOException,
ResourceNotFoundException, ResourceExistException {
log.trace("saveAs(filepath:{}, isAppend:{})", filePath, isAppend);
public void saveAs(String filePath, boolean isAppend) throws IOException, ResourceNotFoundException, ResourceExistException {
throw new Error("unimplemented method");
}

public void setPublishedName(String name) {
log.trace("setPublishedName(name:{})", name);
publishedStreamName = name;
}

Expand All @@ -120,13 +91,10 @@ public void close() {
}

public IStreamCodecInfo getCodecInfo() {
// log.trace("getCodecInfo()");
// we don't support this right now.
return streamCodecInfo;
}

public String getName() {
log.trace("getName(): {}", publishedStreamName);
// for now, just return the published name
return publishedStreamName;
}
Expand Down Expand Up @@ -159,34 +127,27 @@ public void onPipeConnectionEvent(PipeConnectionEvent event) {
case PipeConnectionEvent.PROVIDER_CONNECT_PUSH:
log.trace("PipeConnectionEvent.PROVIDER_CONNECT_PUSH");
System.out.println("PipeConnectionEvent.PROVIDER_CONNECT_PUSH");
if (event.getProvider() == this
&& (event.getParamMap() == null
|| !event.getParamMap().containsKey("record"))) {
if (event.getProvider() == this && (event.getParamMap() == null || !event.getParamMap().containsKey("record"))) {
log.trace("Creating a live pipe");
System.out.println("Creating a live pipe");
this.livePipe = (IPipe) event.getSource();
}
break;
case PipeConnectionEvent.PROVIDER_DISCONNECT:
log.trace("PipeConnectionEvent.PROVIDER_DISCONNECT");
System.out.println("PipeConnectionEvent.PROVIDER_DISCONNECT");
if (this.livePipe == event.getSource()) {
log.trace("PipeConnectionEvent.PROVIDER_DISCONNECT - this.mLivePipe = null;");
System.out.println("PipeConnectionEvent.PROVIDER_DISCONNECT - this.mLivePipe = null;");
this.livePipe = null;
}
break;
case PipeConnectionEvent.CONSUMER_CONNECT_PUSH:
log.trace("PipeConnectionEvent.CONSUMER_CONNECT_PUSH");
System.out.println("PipeConnectionEvent.CONSUMER_CONNECT_PUSH");
break;
case PipeConnectionEvent.CONSUMER_DISCONNECT:
log.trace("PipeConnectionEvent.CONSUMER_DISCONNECT");
System.out.println("PipeConnectionEvent.CONSUMER_DISCONNECT");
break;
default:
log.trace("PipeConnectionEvent default");
System.out.println("PipeConnectionEvent default");
break;
}
}
Expand Down

0 comments on commit 892de24

Please sign in to comment.