mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-10-22 16:17:27 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8086c3d46b | ||
|
|
928fca843f | ||
|
|
25d74785d0 | ||
|
|
e12a8e7946 | ||
|
|
b14f2ce219 | ||
|
|
d31be3d64e | ||
|
|
0704f2aaf6 | ||
|
|
832e52ac74 | ||
|
|
f5444551b2 | ||
|
|
3143797b55 | ||
|
|
cc9b1aeaab |
No files matched your search
@@ -20,7 +20,7 @@ function p_h264raw.dissector(buf, pkt, root)
|
|||||||
|
|
||||||
local i = 0
|
local i = 0
|
||||||
local data_start = -1
|
local data_start = -1
|
||||||
while i < buf:len do
|
while i < buf:len() do
|
||||||
-- Make sure we have a potential start sequence and type
|
-- Make sure we have a potential start sequence and type
|
||||||
if buf:len() - i < 5 then
|
if buf:len() - i < 5 then
|
||||||
-- We need more data
|
-- We need more data
|
||||||
|
|||||||
+3
-3
@@ -5,14 +5,14 @@ apply plugin: 'com.android.application'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 25
|
compileSdkVersion 25
|
||||||
buildToolsVersion "25.0.0"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
|
|
||||||
versionName "4.8.1"
|
versionName "4.8.2"
|
||||||
versionCode = 113
|
versionCode = 114
|
||||||
}
|
}
|
||||||
|
|
||||||
productFlavors {
|
productFlavors {
|
||||||
|
|||||||
Binary file not shown.
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".PcView"
|
android:name=".PcView"
|
||||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize|layoutDirection">
|
android:configChanges="mcc|mnc|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize|layoutDirection">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".AppView"
|
android:name=".AppView"
|
||||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize|layoutDirection">
|
android:configChanges="mcc|mnc|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize|layoutDirection">
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
android:value="com.limelight.PcView" />
|
android:value="com.limelight.PcView" />
|
||||||
@@ -85,6 +85,7 @@
|
|||||||
android:name=".Game"
|
android:name=".Game"
|
||||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize|layoutDirection"
|
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize|layoutDirection"
|
||||||
android:screenOrientation="sensorLandscape"
|
android:screenOrientation="sensorLandscape"
|
||||||
|
android:noHistory="true"
|
||||||
android:theme="@style/StreamTheme">
|
android:theme="@style/StreamTheme">
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
@@ -101,7 +102,13 @@
|
|||||||
android:name=".binding.input.driver.UsbDriverService"
|
android:name=".binding.input.driver.UsbDriverService"
|
||||||
android:label="Usb Driver Service" />
|
android:label="Usb Driver Service" />
|
||||||
|
|
||||||
<activity android:name=".HelpActivity"></activity>
|
<activity
|
||||||
|
android:name=".HelpActivity"
|
||||||
|
android:configChanges="mcc|mnc|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize|layoutDirection">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
|
android:value="com.limelight.PcView" />
|
||||||
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -30,8 +30,8 @@ public class MediaCodecDecoderRenderer extends EnhancedDecoderRenderer {
|
|||||||
// Used on versions < 5.0
|
// Used on versions < 5.0
|
||||||
private ByteBuffer[] legacyInputBuffers;
|
private ByteBuffer[] legacyInputBuffers;
|
||||||
|
|
||||||
private String avcDecoderName;
|
private MediaCodecInfo avcDecoder;
|
||||||
private String hevcDecoderName;
|
private MediaCodecInfo hevcDecoder;
|
||||||
|
|
||||||
private MediaCodec videoDecoder;
|
private MediaCodec videoDecoder;
|
||||||
private Thread rendererThread;
|
private Thread rendererThread;
|
||||||
@@ -94,19 +94,17 @@ public class MediaCodecDecoderRenderer extends EnhancedDecoderRenderer {
|
|||||||
public MediaCodecDecoderRenderer(int videoFormat) {
|
public MediaCodecDecoderRenderer(int videoFormat) {
|
||||||
//dumpDecoders();
|
//dumpDecoders();
|
||||||
|
|
||||||
MediaCodecInfo avcDecoder = findAvcDecoder();
|
avcDecoder = findAvcDecoder();
|
||||||
if (avcDecoder != null) {
|
if (avcDecoder != null) {
|
||||||
avcDecoderName = avcDecoder.getName();
|
LimeLog.info("Selected AVC decoder: "+avcDecoder.getName());
|
||||||
LimeLog.info("Selected AVC decoder: "+avcDecoderName);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LimeLog.warning("No AVC decoder found");
|
LimeLog.warning("No AVC decoder found");
|
||||||
}
|
}
|
||||||
|
|
||||||
MediaCodecInfo hevcDecoder = findHevcDecoder(videoFormat);
|
hevcDecoder = findHevcDecoder(videoFormat);
|
||||||
if (hevcDecoder != null) {
|
if (hevcDecoder != null) {
|
||||||
hevcDecoderName = hevcDecoder.getName();
|
LimeLog.info("Selected HEVC decoder: "+hevcDecoder.getName());
|
||||||
LimeLog.info("Selected HEVC decoder: "+hevcDecoderName);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LimeLog.info("No HEVC decoder found");
|
LimeLog.info("No HEVC decoder found");
|
||||||
@@ -117,24 +115,24 @@ public class MediaCodecDecoderRenderer extends EnhancedDecoderRenderer {
|
|||||||
// library. The limitation of this is that we don't know whether we're using HEVC or AVC, so
|
// library. The limitation of this is that we don't know whether we're using HEVC or AVC, so
|
||||||
// we just assume AVC. This isn't really a problem because the capabilities are usually
|
// we just assume AVC. This isn't really a problem because the capabilities are usually
|
||||||
// shared between AVC and HEVC decoders on the same device.
|
// shared between AVC and HEVC decoders on the same device.
|
||||||
if (avcDecoderName != null) {
|
if (avcDecoder != null) {
|
||||||
directSubmit = MediaCodecHelper.decoderCanDirectSubmit(avcDecoderName);
|
directSubmit = MediaCodecHelper.decoderCanDirectSubmit(avcDecoder.getName());
|
||||||
adaptivePlayback = MediaCodecHelper.decoderSupportsAdaptivePlayback(avcDecoderName);
|
adaptivePlayback = MediaCodecHelper.decoderSupportsAdaptivePlayback(avcDecoder.getName());
|
||||||
|
|
||||||
if (directSubmit) {
|
if (directSubmit) {
|
||||||
LimeLog.info("Decoder "+avcDecoderName+" will use direct submit");
|
LimeLog.info("Decoder "+avcDecoder.getName()+" will use direct submit");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isHevcSupported() {
|
public boolean isHevcSupported() {
|
||||||
return hevcDecoderName != null;
|
return hevcDecoder != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAvcSupported() {
|
public boolean isAvcSupported() {
|
||||||
return avcDecoderName != null;
|
return avcDecoder != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -148,9 +146,9 @@ public class MediaCodecDecoderRenderer extends EnhancedDecoderRenderer {
|
|||||||
|
|
||||||
if (videoFormat == VideoFormat.H264) {
|
if (videoFormat == VideoFormat.H264) {
|
||||||
mimeType = "video/avc";
|
mimeType = "video/avc";
|
||||||
selectedDecoderName = avcDecoderName;
|
selectedDecoderName = avcDecoder.getName();
|
||||||
|
|
||||||
if (avcDecoderName == null) {
|
if (avcDecoder == null) {
|
||||||
LimeLog.severe("No available AVC decoder!");
|
LimeLog.severe("No available AVC decoder!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -175,9 +173,9 @@ public class MediaCodecDecoderRenderer extends EnhancedDecoderRenderer {
|
|||||||
}
|
}
|
||||||
else if (videoFormat == VideoFormat.H265) {
|
else if (videoFormat == VideoFormat.H265) {
|
||||||
mimeType = "video/hevc";
|
mimeType = "video/hevc";
|
||||||
selectedDecoderName = hevcDecoderName;
|
selectedDecoderName = hevcDecoder.getName();
|
||||||
|
|
||||||
if (hevcDecoderName == null) {
|
if (hevcDecoder == null) {
|
||||||
LimeLog.severe("No available HEVC decoder!");
|
LimeLog.severe("No available HEVC decoder!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -812,11 +810,11 @@ public class MediaCodecDecoderRenderer extends EnhancedDecoderRenderer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void directSubmitDecodeUnit(DecodeUnit du) {
|
public void directSubmitDecodeUnit(DecodeUnit du) {
|
||||||
int inputIndex;
|
int inputIndex = -1;
|
||||||
|
|
||||||
notifyDuReceived(du);
|
notifyDuReceived(du);
|
||||||
|
|
||||||
for (;;) {
|
while (!Thread.currentThread().isInterrupted()) {
|
||||||
try {
|
try {
|
||||||
inputIndex = dequeueInputBuffer(true, true);
|
inputIndex = dequeueInputBuffer(true, true);
|
||||||
break;
|
break;
|
||||||
@@ -854,8 +852,8 @@ public class MediaCodecDecoderRenderer extends EnhancedDecoderRenderer {
|
|||||||
String str = "";
|
String str = "";
|
||||||
|
|
||||||
str += "Format: "+renderer.videoFormat+"\n";
|
str += "Format: "+renderer.videoFormat+"\n";
|
||||||
str += "AVC Decoder: "+renderer.avcDecoderName+"\n";
|
str += "AVC Decoder: "+((renderer.avcDecoder != null) ? renderer.avcDecoder.getName():"(none)")+"\n";
|
||||||
str += "HEVC Decoder: "+renderer.hevcDecoderName+"\n";
|
str += "HEVC Decoder: "+((renderer.hevcDecoder != null) ? renderer.hevcDecoder.getName():"(none)")+"\n";
|
||||||
str += "Initial video dimensions: "+renderer.initialWidth+"x"+renderer.initialHeight+"\n";
|
str += "Initial video dimensions: "+renderer.initialWidth+"x"+renderer.initialHeight+"\n";
|
||||||
str += "In stats: "+renderer.numVpsIn+", "+renderer.numSpsIn+", "+renderer.numPpsIn+", "+renderer.numIframeIn+"\n";
|
str += "In stats: "+renderer.numVpsIn+", "+renderer.numSpsIn+", "+renderer.numPpsIn+", "+renderer.numIframeIn+"\n";
|
||||||
str += "Total frames: "+renderer.totalFrames+"\n";
|
str += "Total frames: "+renderer.totalFrames+"\n";
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<resources>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Use a black background to avoid the transparent background when switching apps.
|
||||||
|
android:windowBackgroundFallback is supposed to do this, but it wasn't working for
|
||||||
|
me as of Android 7.1
|
||||||
|
-->
|
||||||
|
<style name="StreamBaseTheme" parent="AppBaseTheme">
|
||||||
|
<item name="android:windowBackground">@android:color/black</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
||||||
@@ -22,14 +22,16 @@
|
|||||||
<item name="android:windowNoTitle">true</item>
|
<item name="android:windowNoTitle">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Stream activity theme -->
|
<style name="StreamBaseTheme" parent="AppBaseTheme">
|
||||||
<style name="StreamTheme" parent="AppBaseTheme">
|
|
||||||
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
|
|
||||||
<item name="android:windowActionBar">false</item>
|
|
||||||
<item name="android:windowNoTitle">true</item>
|
|
||||||
|
|
||||||
<!-- Transparent streaming background to avoid extra overdraw -->
|
<!-- Transparent streaming background to avoid extra overdraw -->
|
||||||
<item name="android:windowBackground">@android:color/transparent</item>
|
<item name="android:windowBackground">@android:color/transparent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!-- Stream activity theme -->
|
||||||
|
<style name="StreamTheme" parent="StreamBaseTheme">
|
||||||
|
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
|
||||||
|
<item name="android:windowActionBar">false</item>
|
||||||
|
<item name="android:windowNoTitle">true</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
+1
-1
@@ -4,7 +4,7 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.2.2'
|
classpath 'com.android.tools.build:gradle:2.2.3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user