Remove unnessary condition in SrsFlvMuxer stop

Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
camera2
Leo Ma 9 years ago
parent 04c831146d
commit 71a7e51940

@ -197,10 +197,6 @@ public class SrsFlvMuxer {
* stop the muxer, disconnect RTMP connection from SRS. * stop the muxer, disconnect RTMP connection from SRS.
*/ */
public void stop() { public void stop() {
if (worker == null || publisher == null) {
throw new IllegalStateException("SrsFlvMuxer Not init!");
}
disconnect(); disconnect();
if (worker != null) { if (worker != null) {

@ -3,7 +3,6 @@ package net.ossrs.sea.rtmp.io;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import android.util.Log;
import net.ossrs.sea.rtmp.packets.RtmpPacket; import net.ossrs.sea.rtmp.packets.RtmpPacket;
/** /**

@ -402,17 +402,6 @@ public class RtmpHeader {
this.timestampDelta = timestampDelta; this.timestampDelta = timestampDelta;
} }
//
// /** Get the timestamp as specified by the server */
// public int getTimestamp() {
// return timestamp;
// }
//
//
// /** Calculate and return the timestamp delta relative to START_TIMESTAMP */
// public int getTimestampDelta() {
// return (int) System.nanoTime() / 1000 - START_TIMESTAMP;
// }
/** Sets the RTMP chunk stream ID (channel ID) for this chunk */ /** Sets the RTMP chunk stream ID (channel ID) for this chunk */
public void setChunkStreamId(int channelId) { public void setChunkStreamId(int channelId) {
this.chunkStreamId = channelId; this.chunkStreamId = channelId;
@ -434,12 +423,6 @@ public class RtmpHeader {
this.packetLength = packetLength; this.packetLength = packetLength;
} }
// public void initStartTimeStamp() {
// if (START_TIMESTAMP == -1) {
// START_TIMESTAMP = (int) System.nanoTime() / 1000;
// }
// timestamp = 0;
// }
public void writeAggregateHeaderByte(OutputStream out) throws IOException { public void writeAggregateHeaderByte(OutputStream out) throws IOException {
// Aggregate header 0x11 : 11.. .... // Aggregate header 0x11 : 11.. ....
out.write(0xC0 | chunkStreamId); out.write(0xC0 | chunkStreamId);

Loading…
Cancel
Save