mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 03:23:07 +00:00
Fix order of initialization of streams.
This commit is contained in:
parent
0a445b9add
commit
c631649867
@ -87,9 +87,9 @@ public class NvAudioStream {
|
|||||||
|
|
||||||
startDepacketizerThread();
|
startDepacketizerThread();
|
||||||
|
|
||||||
startUdpPingThread();
|
|
||||||
|
|
||||||
startDecoderThread();
|
startDecoderThread();
|
||||||
|
|
||||||
|
startUdpPingThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
}).start();
|
}).start();
|
||||||
|
@ -76,6 +76,7 @@ public class NvConnection {
|
|||||||
|
|
||||||
if (inputStream != null) {
|
if (inputStream != null) {
|
||||||
inputStream.close();
|
inputStream.close();
|
||||||
|
inputStream = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ import com.limelight.nvstream.av.AvByteBufferPool;
|
|||||||
import com.limelight.nvstream.av.AvDecodeUnit;
|
import com.limelight.nvstream.av.AvDecodeUnit;
|
||||||
import com.limelight.nvstream.av.AvRtpPacket;
|
import com.limelight.nvstream.av.AvRtpPacket;
|
||||||
import com.limelight.nvstream.av.video.AvVideoDepacketizer;
|
import com.limelight.nvstream.av.video.AvVideoDepacketizer;
|
||||||
|
import com.limelight.nvstream.av.video.AvVideoPacket;
|
||||||
|
|
||||||
import jlibrtp.Participant;
|
import jlibrtp.Participant;
|
||||||
import jlibrtp.RTPSession;
|
import jlibrtp.RTPSession;
|
||||||
@ -153,19 +154,6 @@ public class NvVideoStream {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start the receive thread early to avoid missing
|
|
||||||
// early packets
|
|
||||||
startReceiveThread();
|
|
||||||
|
|
||||||
// Start the keepalive ping to keep the stream going
|
|
||||||
startUdpPingThread();
|
|
||||||
|
|
||||||
// Start the depacketizer thread to deal with the RTP data
|
|
||||||
startDepacketizerThread();
|
|
||||||
|
|
||||||
// Start decoding the data we're receiving
|
|
||||||
startDecoderThread();
|
|
||||||
|
|
||||||
// Read the first frame to start the UDP video stream
|
// Read the first frame to start the UDP video stream
|
||||||
try {
|
try {
|
||||||
readFirstFrame(host);
|
readFirstFrame(host);
|
||||||
@ -175,6 +163,19 @@ public class NvVideoStream {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Start the receive thread early to avoid missing
|
||||||
|
// early packets
|
||||||
|
startReceiveThread();
|
||||||
|
|
||||||
|
// Start the depacketizer thread to deal with the RTP data
|
||||||
|
startDepacketizerThread();
|
||||||
|
|
||||||
|
// Start decoding the data we're receiving
|
||||||
|
startDecoderThread();
|
||||||
|
|
||||||
|
// Start the keepalive ping to keep the stream going
|
||||||
|
startUdpPingThread();
|
||||||
|
|
||||||
// Render the frames that are coming out of the decoder
|
// Render the frames that are coming out of the decoder
|
||||||
outputDisplayLoop(this);
|
outputDisplayLoop(this);
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,9 @@ public class AvAudioDepacketizer {
|
|||||||
// Put it on the decoded queue
|
// Put it on the decoded queue
|
||||||
decodedUnits.add(new AvShortBufferDescriptor(pcmData, 0, decodeLen));
|
decodedUnits.add(new AvShortBufferDescriptor(pcmData, 0, decodeLen));
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
pool.free(pcmData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void releaseBuffer(AvShortBufferDescriptor decodedData)
|
public void releaseBuffer(AvShortBufferDescriptor decodedData)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user