Compare commits

..
14 Commits
9 changed files with 56 additions and 51 deletions

No files matched your search

+1 -1
View File
@@ -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
View File
@@ -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.3"
versionCode = 113 versionCode = 115
} }
productFlavors { productFlavors {
Binary file not shown.
+11 -3
View File
@@ -26,6 +26,7 @@
<application <application
android:allowBackup="true" android:allowBackup="true"
android:isGame="true"
android:banner="@drawable/atv_banner" android:banner="@drawable/atv_banner"
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
@@ -41,7 +42,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 +63,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 +86,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 +103,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>
@@ -339,18 +339,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
} }
} }
// Ignore the back buttonn if a controller has both buttons
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
boolean[] hasSelectKey = dev.hasKeys(KeyEvent.KEYCODE_BUTTON_SELECT, KeyEvent.KEYCODE_BACK, 0);
if (hasSelectKey[0] && hasSelectKey[1]) {
// Xiaomi gamepads claim to have both buttons then only send KEYCODE_BACK events
if (dev.getVendorId() != 0x2717) {
LimeLog.info("Ignoring back button because select is present");
context.ignoreBack = true;
}
}
}
// The ADT-1 controller needs a similar fixup to the ASUS Gamepad // The ADT-1 controller needs a similar fixup to the ASUS Gamepad
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) { if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
// The device name provided is just "Gamepad" which is pretty useless, so we // The device name provided is just "Gamepad" which is pretty useless, so we
@@ -414,9 +402,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
if (gasRange == null) { if (gasRange == null) {
context.isXboxBtController = true; context.isXboxBtController = true;
} }
else {
context.ignoreBack = false;
}
} }
} }
@@ -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";
+12
View File
@@ -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>
+8 -6
View File
@@ -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
View File
@@ -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'
} }
} }