|
|
@ -84,7 +84,7 @@ public class WriteThread extends Thread {
|
|
|
|
/** Transmit the specified RTMP packet (thread-safe) */
|
|
|
|
/** Transmit the specified RTMP packet (thread-safe) */
|
|
|
|
public void send(RtmpPacket rtmpPacket) {
|
|
|
|
public void send(RtmpPacket rtmpPacket) {
|
|
|
|
if (rtmpPacket != null) {
|
|
|
|
if (rtmpPacket != null) {
|
|
|
|
writeQueue.offer(rtmpPacket);
|
|
|
|
writeQueue.add(rtmpPacket);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
synchronized (txPacketLock) {
|
|
|
|
synchronized (txPacketLock) {
|
|
|
|
txPacketLock.notify();
|
|
|
|
txPacketLock.notify();
|
|
|
@ -93,6 +93,7 @@ public class WriteThread extends Thread {
|
|
|
|
|
|
|
|
|
|
|
|
public void shutdown() {
|
|
|
|
public void shutdown() {
|
|
|
|
Log.d(TAG, "Stopping");
|
|
|
|
Log.d(TAG, "Stopping");
|
|
|
|
|
|
|
|
writeQueue.clear();
|
|
|
|
active = false;
|
|
|
|
active = false;
|
|
|
|
synchronized (txPacketLock) {
|
|
|
|
synchronized (txPacketLock) {
|
|
|
|
txPacketLock.notify();
|
|
|
|
txPacketLock.notify();
|
|
|
|