mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-21 03:52:48 +00:00
Use LimeLog for logging
This commit is contained in:
parent
700ec361b0
commit
e13241eebf
@ -181,7 +181,7 @@ public class Connection extends Activity {
|
||||
}
|
||||
|
||||
if (macAddress == null) {
|
||||
System.out.println("Couldn't find a MAC address");
|
||||
LimeLog.severe("Couldn't find a MAC address");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ import java.nio.ByteBuffer;
|
||||
|
||||
import android.view.SurfaceHolder;
|
||||
|
||||
import com.limelight.LimeLog;
|
||||
import com.limelight.nvstream.av.ByteBufferDescriptor;
|
||||
import com.limelight.nvstream.av.DecodeUnit;
|
||||
import com.limelight.nvstream.av.video.VideoDecoderRenderer;
|
||||
@ -120,7 +121,7 @@ public class AndroidCpuDecoderRenderer implements VideoDecoderRenderer {
|
||||
// Disable the non-compliant speed optimizations
|
||||
avcFlags &= ~AvcDecoder.FAST_DECODE;
|
||||
|
||||
System.out.println("Using high quality decoding");
|
||||
LimeLog.info("Using high quality decoding");
|
||||
}
|
||||
|
||||
int err = AvcDecoder.init(width, height, avcFlags, threadCount);
|
||||
@ -132,7 +133,7 @@ public class AndroidCpuDecoderRenderer implements VideoDecoderRenderer {
|
||||
|
||||
decoderBuffer = ByteBuffer.allocate(DECODER_BUFFER_SIZE + AvcDecoder.getInputPaddingSize());
|
||||
|
||||
System.out.println("Using software decoding (performance level: "+perfLevel+")");
|
||||
LimeLog.info("Using software decoding (performance level: "+perfLevel+")");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -4,6 +4,7 @@ import java.nio.ByteBuffer;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import com.limelight.LimeLog;
|
||||
import com.limelight.nvstream.av.ByteBufferDescriptor;
|
||||
import com.limelight.nvstream.av.DecodeUnit;
|
||||
import com.limelight.nvstream.av.video.VideoDecoderRenderer;
|
||||
@ -81,13 +82,13 @@ public class MediaCodecDecoderRenderer implements VideoDecoderRenderer {
|
||||
}
|
||||
|
||||
if (badCodec) {
|
||||
System.out.println("Blacklisted decoder: "+codecInfo.getName());
|
||||
LimeLog.info("Blacklisted decoder: "+codecInfo.getName());
|
||||
continue;
|
||||
}
|
||||
|
||||
for (String mime : codecInfo.getSupportedTypes()) {
|
||||
if (mime.equalsIgnoreCase("video/avc")) {
|
||||
System.out.println("Selected decoder: "+codecInfo.getName());
|
||||
LimeLog.info("Selected decoder: "+codecInfo.getName());
|
||||
return codecInfo;
|
||||
}
|
||||
}
|
||||
@ -105,11 +106,11 @@ public class MediaCodecDecoderRenderer implements VideoDecoderRenderer {
|
||||
videoDecoder = MediaCodec.createByCodecName(safeDecoder.getName());
|
||||
needsSpsFixup = isDecoderInList(spsFixupDecoderPrefixes, safeDecoder.getName());
|
||||
if (needsSpsFixup) {
|
||||
System.out.println("Decoder "+safeDecoder.getName()+" needs SPS fixup");
|
||||
LimeLog.info("Decoder "+safeDecoder.getName()+" needs SPS fixup");
|
||||
}
|
||||
fastInputQueueing = isDecoderInList(fastInputQueueingPrefixes, safeDecoder.getName());
|
||||
if (fastInputQueueing) {
|
||||
System.out.println("Decoder "+safeDecoder.getName()+" supports fast input queueing");
|
||||
LimeLog.info("Decoder "+safeDecoder.getName()+" supports fast input queueing");
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -125,7 +126,7 @@ public class MediaCodecDecoderRenderer implements VideoDecoderRenderer {
|
||||
|
||||
videoDecoderInputBuffers = videoDecoder.getInputBuffers();
|
||||
|
||||
System.out.println("Using hardware decoding");
|
||||
LimeLog.info("Using hardware decoding");
|
||||
}
|
||||
|
||||
private void startRendererThread()
|
||||
@ -141,11 +142,11 @@ public class MediaCodecDecoderRenderer implements VideoDecoderRenderer {
|
||||
int outIndex = videoDecoder.dequeueOutputBuffer(info, 100000);
|
||||
switch (outIndex) {
|
||||
case MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED:
|
||||
System.out.println("Output buffers changed");
|
||||
LimeLog.info("Output buffers changed");
|
||||
break;
|
||||
case MediaCodec.INFO_OUTPUT_FORMAT_CHANGED:
|
||||
System.out.println("Output format changed");
|
||||
System.out.println("New output Format: " + videoDecoder.getOutputFormat());
|
||||
LimeLog.info("Output format changed");
|
||||
LimeLog.info("New output Format: " + videoDecoder.getOutputFormat());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -215,11 +216,11 @@ public class MediaCodecDecoderRenderer implements VideoDecoderRenderer {
|
||||
int mcFlags = 0;
|
||||
|
||||
if ((decodeUnit.getFlags() & DecodeUnit.DU_FLAG_CODEC_CONFIG) != 0) {
|
||||
System.out.println("Codec config");
|
||||
LimeLog.info("Codec config");
|
||||
mcFlags |= MediaCodec.BUFFER_FLAG_CODEC_CONFIG;
|
||||
}
|
||||
if ((decodeUnit.getFlags() & DecodeUnit.DU_FLAG_SYNC_FRAME) != 0) {
|
||||
System.out.println("Sync frame");
|
||||
LimeLog.info("Sync frame");
|
||||
mcFlags |= MediaCodec.BUFFER_FLAG_SYNC_FRAME;
|
||||
}
|
||||
|
||||
@ -242,7 +243,7 @@ public class MediaCodecDecoderRenderer implements VideoDecoderRenderer {
|
||||
|
||||
switch (header.length) {
|
||||
case 26:
|
||||
System.out.println("Modifying SPS (26)");
|
||||
LimeLog.info("Modifying SPS (26)");
|
||||
buf.put(header.data, header.offset, 24);
|
||||
buf.put((byte) 0x11);
|
||||
buf.put((byte) 0xe3);
|
||||
@ -251,7 +252,7 @@ public class MediaCodecDecoderRenderer implements VideoDecoderRenderer {
|
||||
spsLength = header.length + 2;
|
||||
break;
|
||||
case 27:
|
||||
System.out.println("Modifying SPS (27)");
|
||||
LimeLog.info("Modifying SPS (27)");
|
||||
buf.put(header.data, header.offset, 25);
|
||||
buf.put((byte) 0x04);
|
||||
buf.put((byte) 0x78);
|
||||
@ -260,7 +261,7 @@ public class MediaCodecDecoderRenderer implements VideoDecoderRenderer {
|
||||
spsLength = header.length + 2;
|
||||
break;
|
||||
default:
|
||||
System.out.println("Unknown SPS of length "+header.length);
|
||||
LimeLog.warning("Unknown SPS of length "+header.length);
|
||||
buf.put(header.data, header.offset, header.length);
|
||||
spsLength = header.length;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user